[103793] trunk/dports/devel/lua-numlua

and.damore at macports.org and.damore at macports.org
Thu Mar 7 09:46:00 PST 2013


Revision: 103793
          https://trac.macports.org/changeset/103793
Author:   and.damore at macports.org
Date:     2013-03-07 09:46:00 -0800 (Thu, 07 Mar 2013)
Log Message:
-----------
port lua-numlua: updating to 0.3, dropping old patchfiles, adding a Makefile created ad-hoc, adding myself as maintiainer, fixes #38247; maintainer timeout

Modified Paths:
--------------
    trunk/dports/devel/lua-numlua/Portfile

Added Paths:
-----------
    trunk/dports/devel/lua-numlua/files/Makefile

Removed Paths:
-------------
    trunk/dports/devel/lua-numlua/files/patch-Makefile.diff
    trunk/dports/devel/lua-numlua/files/patch-lib-Makefile.diff
    trunk/dports/devel/lua-numlua/files/patch-lib-config.diff
    trunk/dports/devel/lua-numlua/files/patch-src-Makefile.diff

Modified: trunk/dports/devel/lua-numlua/Portfile
===================================================================
--- trunk/dports/devel/lua-numlua/Portfile	2013-03-07 16:41:55 UTC (rev 103792)
+++ trunk/dports/devel/lua-numlua/Portfile	2013-03-07 17:46:00 UTC (rev 103793)
@@ -1,50 +1,60 @@
 # $Id$
 
 PortSystem 1.0
+PortGroup               github  1.0
 
+github.setup            carvalho numlua 0.3
+github.tarball_from     downloads
 name                    lua-numlua
-version                 0.2.1
-revision                1
 license                 MIT
 categories              devel
 platforms               darwin
-maintainers             bfulgham
+maintainers             bfulgham and.damore
 description             Numerical package for the Lua programming language.
-long_description        ${description} It includes support for complex \
-            numbers, multidimensional matrices, random generation \
-            and special functions.  Much of the routines are \
-            simple wrappers for the stable and well-known \
-            libraries from Netlib (http://www.netlib.org).
+long_description        ${description} It includes support for complex numbers, multidimensional \
+                        matrices, random generation and special functions. Much of the routines are \
+                        simple wrappers for the stable and well-known libraries from Netlib
 
-homepage                http://luaforge.net/projects/numlua
-set luaforge_release    2566
-master_sites            http://luaforge.net/frs/download.php/${luaforge_release}
-distname                numlua-${version}
-worksrcdir              numlua
+use_zip                 yes
+master_sites            https://github.com/carvalho/numlua/archive/
+set     archive_hash    f05281e96030adb9c09a01b9d9be4fa9fa4c795e
+distfiles               ${archive_hash}.zip
+worksrcdir              numlua-${archive_hash}
 
+checksums               md5     acfce2eb1c0c5f1942b3a9917893c17c \
+                        sha1    2fe543baedc9e62112a2df7b0dfbf8e8b304658d \
+                        rmd160  df58135379ce8f01e0b454a8073257a01f23a03e
+
 use_configure           no
 
-checksums               md5     c4d0ce508e7f2ec2754242f2816f4cfc \
-                        sha1    e7c5fb14ebaa92b1ae5bef4cbe303644b9fe5252 \
-                        rmd160  6238e6b79cd446c47a676c4bcb3afa8fd41c42a6
+# there used to be a dependency on a gccXX port due to the need for a fortran compiler
+# this has now been removed due to dependency on port atlas
 
-depends_build-append    port:lua \
-                        port:gcc43
+depends_lib-append      port:lua \
+                        port:atlas \
+                        lib:fftw:fftw-3 \
+                        lib:hdf5:hdf5-18
 
-depends_lib-append      lib:fftw:fftw-3 
+post-extract {
+    xinstall -m 644 ${filespath}/Makefile ${worksrcpath} }
 
-patchfiles              patch-Makefile.diff \
-                        patch-lib-config.diff \
-                        patch-lib-Makefile.diff \
-                        patch-src-Makefile.diff
+post-patch {
+    reinplace -W $worksrcpath "s|%%PREFIX%%|${prefix}|" Makefile }
 
-pre-build {
-	system "cd ${worksrcpath}/lib && make"
-}
+build.args-append       CC=${configure.cc} \
+                        CPP=${configure.cpp} \
+                        PREFIX=$prefix \
+                        CFLAGS="${configure.cflags} [get_canonical_archflags]" \
+                        CPPFLAGS=${configure.cppflags} \
+                        LDFLAGS=${configure.ldflags} \
+                        DEPLOYMENT_TARGET=${macosx_deployment_target}
 
-post-patch {
-    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/Makefile
-    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/lib/config
-    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/src/Makefile
-}
+destroot.args-append    PREFIX=$prefix
 
+post-destroot {
+    xinstall -d -m 755 ${destroot}${prefix}/share/doc
+    xinstall -d -m 755 ${destroot}${prefix}/share/examples
+
+    file copy ${worksrcpath}/docs ${destroot}${prefix}/share/doc/${name}
+    file copy ${worksrcpath}/examples ${destroot}${prefix}/share/examples/${name}
+    file copy ${worksrcpath}/lhp ${destroot}${prefix}/share/doc/${name}/lhp }

Added: trunk/dports/devel/lua-numlua/files/Makefile
===================================================================
--- trunk/dports/devel/lua-numlua/files/Makefile	                        (rev 0)
+++ trunk/dports/devel/lua-numlua/files/Makefile	2013-03-07 17:46:00 UTC (rev 103793)
@@ -0,0 +1,41 @@
+# Makefile for numlua
+# $Id$
+
+CC ?= /usr/bin/clang
+CFLAGS ?= -O2 -arch x86_64
+CPPFLAGS ?= -I%%PREFIX%%/include
+LDFLAGS ?= -L%%PREFIX%%/lib
+DEPLOYMENT_TARGET ?= 10.5
+PREFIX ?= /tmp
+
+INSTALL_ROOT = $(DESTDIR)$(PREFIX)
+INSTALL_INC = $(INSTALL_ROOT)/include/lua5.1
+INSTALL_LUA = $(INSTALL_ROOT)/share/lua/5.1/numlua
+INSTALL_LIB = $(INSTALL_ROOT)/lib/lua/5.1
+TO_INC = amos.h blas.h cdflib.h lapack.h numlua.h rng.h
+TO_LUA = matrix.lua seeall.lua
+TO_LIB = numlua.so
+
+OBJECTS = numlua.o complex.o fft.o msort.o lmatrix.o mt.o ranlib.o rng.o dcdflib.o ipmpar.o stat.o amos.o mathx.o
+
+%.o : %.c
+	export MACOSX_DEPLOYMENT_TARGET=$(DEPLOYMENT_TARGET); $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+
+.PHONY : numlua
+numlua : numlua.so
+
+numlua.so : $(OBJECTS)
+	export MACOSX_DEPLOYMENT_TARGET=$(DEPLOYMENT_TARGET); $(CC) -bundle -undefined dynamic_lookup -all_load -o numlua.so $(LDFLAGS) $(OBJECTS) -Wl,-rpath,$(PREFIX)/lib: -lhdf5 -lfftw3 -llapack -lblas
+
+clean : 
+	-rm -f $(OBJECTS) numlua.so
+
+all : numlua
+
+install : all
+	mkdir -p "$(INSTALL_ROOT)"
+	mkdir -p $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_LUA)
+	cp $(TO_INC) $(INSTALL_INC)
+	cp $(TO_LIB) $(INSTALL_LIB)
+	cp $(TO_LUA) $(INSTALL_LUA)
+


Property changes on: trunk/dports/devel/lua-numlua/files/Makefile
___________________________________________________________________
Added: svn:eol-style
   + native

Deleted: trunk/dports/devel/lua-numlua/files/patch-Makefile.diff
===================================================================
--- trunk/dports/devel/lua-numlua/files/patch-Makefile.diff	2013-03-07 16:41:55 UTC (rev 103792)
+++ trunk/dports/devel/lua-numlua/files/patch-Makefile.diff	2013-03-07 17:46:00 UTC (rev 103793)
@@ -1,64 +0,0 @@
---- Makefile.orig	2011-12-14 22:36:59.000000000 +0100
-+++ Makefile	2011-12-14 22:41:28.000000000 +0100
-@@ -3,8 +3,8 @@
- # modify src/Makefile to your taste
- # $Id: Makefile,v 1.3 2006-09-11 02:27:11 carvalho Exp $
- 
--# linux | win32 : edit src/Makefile accordingly
--TARGET = linux
-+# linux | win32 | darwin : edit src/Makefile accordingly
-+TARGET = darwin
- 
- # these are based on default settings in luaconf.h
- ifeq ($(TARGET), linux)
-@@ -13,10 +13,17 @@
- INSTALL_LIB = $(INSTALL_ROOT)/lib/lua/5.1
- INSTALL_LUA = $(INSTALL_ROOT)/share/lua/5.1/numlua
- else
-+  ifeq ($(TARGET), win32)
- INSTALL_ROOT = C:\\Program Files\\Lua51
- INSTALL_INC = $(INSTALL_ROOT)\\include
- INSTALL_LIB = $(INSTALL_ROOT)
- INSTALL_LUA = $(INSTALL_ROOT)\\lua\\numlua
-+  else #ifeq ($(TARGET), darwin)
-+INSTALL_ROOT = @PREFIX@
-+INSTALL_INC = $(INSTALL_ROOT)/include
-+INSTALL_LIB = $(INSTALL_ROOT)/lib/lua/5.1
-+INSTALL_LUA = $(INSTALL_ROOT)/share/lua/5.1/numlua
-+  endif
- endif
- 
- INSTALL = cp
-@@ -28,20 +35,24 @@
- TO_INC = $(LIBS:%=%.h)
- TO_LUA = $(LIBS:lua%=%.lua) init.lua
- ifeq ($(TARGET), linux)
--TO_LIB = $(LIBS:%=%.so)
--else
--TO_LIB = $(LIBS:%=%.dll)
-+ TO_LIB = $(LIBS:%=%.so)
-+else 
-+ ifeq ($(TARGET), win32)
-+  TO_LIB = $(LIBS:%=%.dll)
-+ else #ifeq ($(TARGET), darwin)
-+  TO_LIB = $(LIBS:%=%.so)
-+ endif
- endif
- 
- all clean klean refresh :
- 	cd src; make $@
- 
- install : all
--	mkdir -p "$(INSTALL_ROOT)"
--	mkdir -p $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_LUA)
--	cd src; $(INSTALL) $(TO_INC) $(INSTALL_INC)
--	cd src; $(INSTALL) $(TO_LIB) $(INSTALL_LIB)
--	cd lua; $(INSTALL) $(TO_LUA) $(INSTALL_LUA)
-+	mkdir -p "$(DESTDIR)$(INSTALL_ROOT)"
-+	mkdir -p $(DESTDIR)$(INSTALL_INC) $(DESTDIR)$(INSTALL_LIB) $(DESTDIR)$(INSTALL_LUA)
-+	cd src; $(INSTALL) $(TO_INC) $(DESTDIR)$(INSTALL_INC)
-+	cd src; $(INSTALL) $(TO_LIB) $(DESTDIR)$(INSTALL_LIB)
-+	cd lua; $(INSTALL) $(TO_LUA) $(DESTDIR)$(INSTALL_LUA)
- 
- lib :
- 	cd $@; make

Deleted: trunk/dports/devel/lua-numlua/files/patch-lib-Makefile.diff
===================================================================
--- trunk/dports/devel/lua-numlua/files/patch-lib-Makefile.diff	2013-03-07 16:41:55 UTC (rev 103792)
+++ trunk/dports/devel/lua-numlua/files/patch-lib-Makefile.diff	2013-03-07 17:46:00 UTC (rev 103793)
@@ -1,12 +0,0 @@
---- lib/Makefile.orig	2009-09-16 17:40:23.000000000 +0200
-+++ lib/Makefile	2009-09-16 17:43:23.000000000 +0200
-@@ -1,7 +1,8 @@
- # Top makefile for netlib libs
- # $Id :$
- 
--LIBS = libdcdflib.a libfnlib.a libranlib.a libblas.a liblapack.a
-+#LIBS = libdcdflib.a libfnlib.a libranlib.a libblas.a liblapack.a
-+LIBS = libdcdflib.a libfnlib.a libranlib.a
- NOLAPACK = libdcdflib.a libfnlib.a libranlib.a libblas.a
- NOBLAS = libdcdflib.a libfnlib.a libranlib.a
- MAKE = make

Deleted: trunk/dports/devel/lua-numlua/files/patch-lib-config.diff
===================================================================
--- trunk/dports/devel/lua-numlua/files/patch-lib-config.diff	2013-03-07 16:41:55 UTC (rev 103792)
+++ trunk/dports/devel/lua-numlua/files/patch-lib-config.diff	2013-03-07 17:46:00 UTC (rev 103793)
@@ -1,20 +0,0 @@
---- lib/config.orig	2009-09-16 17:40:27.000000000 +0200
-+++ lib/config	2009-09-16 17:42:14.000000000 +0200
-@@ -3,14 +3,14 @@
- 
- # change LUADIR below to where lua is installed, that is, INSTALL_TOP in lua's
- # main Makefile
--LUADIR = /usr
-+LUADIR = @PREFIX@
- 
- # FORTRAN flags (used by blas, lapack, dcdflib, and fnlib)
--FC = g77
-+FC = gfortran-mp-4.3
- FFLAGS = -fno-f2c -funroll-all-loops -fomit-frame-pointer -O
- 
- # C flags (used by ranlib)
--CC = gcc
-+CC = gcc-mp-4.3
- CFLAGS = -W -Wall -pedantic
- OPTFLAGS = -fomit-frame-pointer -O2
- INCFLAGS = -I../../src -I$(LUADIR)/include/lua5.1

Deleted: trunk/dports/devel/lua-numlua/files/patch-src-Makefile.diff
===================================================================
--- trunk/dports/devel/lua-numlua/files/patch-src-Makefile.diff	2013-03-07 16:41:55 UTC (rev 103792)
+++ trunk/dports/devel/lua-numlua/files/patch-src-Makefile.diff	2013-03-07 17:46:00 UTC (rev 103793)
@@ -1,79 +0,0 @@
---- src/Makefile.orig	2007-03-18 20:05:34.000000000 +0100
-+++ src/Makefile	2009-09-16 17:49:40.000000000 +0200
-@@ -1,8 +1,8 @@
--# Makefile for numlua
-+# Makefile for numlua
- # $Id: Makefile,v 1.8 2006-09-11 02:25:38 carvalho Exp $
- 
--# linux | win32
--TARGET = linux
-+# linux | win32 | darwin
-+TARGET = darwin
- 
- # atlas | atlas_threaded | blas | custom
- BLAS = custom
-@@ -13,13 +13,13 @@
- # Intel's MKL
- #CUSTOMBLAS = -L/opt/intel/mkl/8.0/lib/32 -lmkl_lapack -lmkl_ia32 -lguide -lpthread -lg2c
- # Ubuntu with atlas
--CUSTOMBLAS = -llapack -lblas -lg2c
-+CUSTOMBLAS = -faltivec -framework Accelerate -lm -lgfortran
- 
- # change LUADIR below to where lua is installed, that is, INSTALL_TOP in lua's
- # main Makefile
--LUADIR = /usr
-+LUADIR = @PREFIX@
- 
--CC = gcc
-+CC = MACOSX_DEPLOYMENT_TARGET="10.3" gcc-mp-4.3
- CFLAGS = -W -Wall -pedantic -fshort-enums
- OPTFLAGS = -fomit-frame-pointer -O2
- 
-@@ -45,6 +45,10 @@
- endif
- ifeq ($(TARGET), win32)
- LIBS += -L$(LUADIR)/lib -llua
-+else
-+  ifeq ($(TARGET), darwin)
-+LIBS += -L$(LUADIR)/lib -llua
-+  endif
- endif
- 
- OBJ = luaspfun.o luarng.o luacomplex.o
-@@ -56,22 +60,36 @@
- DLIB = $(LIB:.a=.so)
- LMDLIB = $(LMLIB:.a=.so)
- else
-+  ifeq ($(TARGET), win32)
- DLIB = $(LIB:.a=.dll)
- LMDLIB = $(LMLIB:.a=.dll)
-+  else
-+DLIB = $(LIB:.a=.so)
-+LMDLIB = $(LMLIB:.a=.so)
-+  endif
- endif
- 
- OBJFLAGS = -I$(LUADIR)/include/lua5.1
- ifeq ($(TARGET), linux)
- LDFLAGS = -fpic
- endif
-+ifeq ($(TARGET), darwin)
-+LDFLAGS += -bundle -undefined dynamic_lookup
-+else
- LDFLAGS += -shared
-+endif
- 
- all : $(LIB) $(LMLIB) $(DLIB) $(LMDLIB)
- 
- ifeq ($(TARGET), linux)
- $(DLIB) : %.so : %.o
- else
-+  ifeq ($(TARGET), win32)
- $(DLIB) : %.dll : %.o
-+  else
-+$(DLIB) : %.so : %.o
-+  endif
-+
- endif
- 	$(CC) $(CFLAGS) $< $(LDFLAGS) -o $@ $(LIBS)
- #	$(STRIP) $@
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130307/7a93352a/attachment-0001.html>


More information about the macports-changes mailing list