[57800] trunk/dports/devel/lua-numlua
and.damore at macports.org
and.damore at macports.org
Wed Sep 16 13:25:37 PDT 2009
Revision: 57800
http://trac.macports.org/changeset/57800
Author: and.damore at macports.org
Date: 2009-09-16 13:25:37 -0700 (Wed, 16 Sep 2009)
Log Message:
-----------
update lua-numlua to 0.2.1, closing #16041
Modified Paths:
--------------
trunk/dports/devel/lua-numlua/Portfile
trunk/dports/devel/lua-numlua/files/patch-Makefile
trunk/dports/devel/lua-numlua/files/patch-lib-Makefile
trunk/dports/devel/lua-numlua/files/patch-lib-config
trunk/dports/devel/lua-numlua/files/patch-src-Makefile
Modified: trunk/dports/devel/lua-numlua/Portfile
===================================================================
--- trunk/dports/devel/lua-numlua/Portfile 2009-09-16 19:59:42 UTC (rev 57799)
+++ trunk/dports/devel/lua-numlua/Portfile 2009-09-16 20:25:37 UTC (rev 57800)
@@ -3,66 +3,43 @@
PortSystem 1.0
name lua-numlua
-version 0.2
+version 0.2.1
revision 0
categories devel
platforms darwin
maintainers bfulgham
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).
+ 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).
homepage http://luaforge.net/projects/numlua
-master_sites http://luaforge.net/frs/download.php/1400
+set luaforge_release 2566
+master_sites http://luaforge.net/frs/download.php/${luaforge_release}
distname numlua-${version}
+worksrcdir numlua
-use_configure no
+use_configure no
-checksums md5 a49efb211b94fe3e436f6b00b6b01536 \
- sha1 8465209f95d12f1803a5f6995a2c9af51fdbb021 \
- rmd160 0f8461b7af617c5e1d4eb0395baef4ccefb7a9b9
+checksums md5 c4d0ce508e7f2ec2754242f2816f4cfc \
+ sha1 e7c5fb14ebaa92b1ae5bef4cbe303644b9fe5252 \
+ rmd160 6238e6b79cd446c47a676c4bcb3afa8fd41c42a6
-depends_build-append port:gcc42
+depends_build-append port:lua \
+ port:gcc43
depends_lib-append lib:fftw:fftw-3
patchfiles patch-Makefile \
patch-lib-config \
- patch-lib-Makefile \
- patch-src-Makefile
-
-build.type gnu
-build.cmd cd lib && make && cd ../src && make && cd ..
-build.args
-build.target
-
+ patch-lib-Makefile \
+ patch-src-Makefile
+pre-build {
+ system "cd ${worksrcpath}/lib && make"
+}
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
+ reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/Makefile
+ reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/lib/config
+ reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/src/Makefile
}
-
-destroot {
- xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
- file copy INSTALL LICENSE README TODO ${destroot}${prefix}/share/doc/${name}
-
- # Binaries
- xinstall -m 755 -d ${destroot}${prefix}/lib/lua/5.1
- foreach lib [glob src/*.so] {
- xinstall -m 0644 ${lib} ${destroot}${prefix}/lib/lua/5.1
- }
-
- # Lua libraries
- xinstall -m 755 -d ${destroot}${prefix}/share/lua/5.1
- foreach luadat [glob lua/*.lua] {
- xinstall -m 0644 ${luadat} ${destroot}${prefix}/share/lua/5.1
- }
-
- # Lua includes
- xinstall -m 755 -d ${destroot}${prefix}/include/lua5.1
- foreach inc [glob src/*.h] {
- xinstall -m 0644 ${inc} ${destroot}${prefix}/include/lua5.1
- }
-}
Modified: trunk/dports/devel/lua-numlua/files/patch-Makefile
===================================================================
--- trunk/dports/devel/lua-numlua/files/patch-Makefile 2009-09-16 19:59:42 UTC (rev 57799)
+++ trunk/dports/devel/lua-numlua/files/patch-Makefile 2009-09-16 20:25:37 UTC (rev 57800)
@@ -1,8 +1,8 @@
---- Makefile.orig 2006-02-17 18:11:35.000000000 -0800
-+++ Makefile 2006-11-11 19:50:09.000000000 -0800
+--- Makefile.orig 2009-09-16 22:05:59.000000000 +0200
++++ Makefile 2009-09-16 22:08:32.000000000 +0200
@@ -3,8 +3,8 @@
# modify src/Makefile to your taste
- # $Id: Makefile,v 1.2 2006/02/13 01:03:17 carvalho Exp $
+ # $Id: Makefile,v 1.3 2006-09-11 02:27:11 carvalho Exp $
-# linux | win32 : edit src/Makefile accordingly
-TARGET = linux
@@ -16,12 +16,12 @@
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)\dll"
- INSTALL_LUA = "$(INSTALL_ROOT)\lua"
+ 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_ROOT = /opt/local
+INSTALL_INC = $(INSTALL_ROOT)/include
+INSTALL_LIB = $(INSTALL_ROOT)/lib
+INSTALL_LUA = $(INSTALL_ROOT)/share/lua/5.1/numlua
@@ -29,3 +29,36 @@
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
Modified: trunk/dports/devel/lua-numlua/files/patch-lib-Makefile
===================================================================
--- trunk/dports/devel/lua-numlua/files/patch-lib-Makefile 2009-09-16 19:59:42 UTC (rev 57799)
+++ trunk/dports/devel/lua-numlua/files/patch-lib-Makefile 2009-09-16 20:25:37 UTC (rev 57800)
@@ -1,5 +1,5 @@
---- lib/Makefile.orig 2007-03-14 21:33:57.000000000 -0700
-+++ lib/Makefile 2007-03-14 21:47:19.000000000 -0700
+--- 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 :$
Modified: trunk/dports/devel/lua-numlua/files/patch-lib-config
===================================================================
--- trunk/dports/devel/lua-numlua/files/patch-lib-config 2009-09-16 19:59:42 UTC (rev 57799)
+++ trunk/dports/devel/lua-numlua/files/patch-lib-config 2009-09-16 20:25:37 UTC (rev 57800)
@@ -1,20 +1,20 @@
---- lib/config.orig 2007-03-14 21:33:25.000000000 -0700
-+++ lib/config 2007-03-15 22:24:56.000000000 -0700
+--- 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/local
+-LUADIR = /usr
+LUADIR = @PREFIX@
# FORTRAN flags (used by blas, lapack, dcdflib, and fnlib)
-FC = g77
-+FC = gfortran-mp-4.2
++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.2
++CC = gcc-mp-4.3
CFLAGS = -W -Wall -pedantic
OPTFLAGS = -fomit-frame-pointer -O2
- INCFLAGS = -I../../src -I$(LUADIR)/include
+ INCFLAGS = -I../../src -I$(LUADIR)/include/lua5.1
Modified: trunk/dports/devel/lua-numlua/files/patch-src-Makefile
===================================================================
--- trunk/dports/devel/lua-numlua/files/patch-src-Makefile 2009-09-16 19:59:42 UTC (rev 57799)
+++ trunk/dports/devel/lua-numlua/files/patch-src-Makefile 2009-09-16 20:25:37 UTC (rev 57800)
@@ -1,8 +1,9 @@
---- src/Makefile.orig 2007-03-14 21:25:59.000000000 -0700
-+++ src/Makefile 2007-03-15 21:53:59.000000000 -0700
-@@ -1,13 +1,13 @@
- # Makefile for numlua
- # $Id: Makefile,v 1.6 2006/02/18 01:54:38 carvalho Exp $
+--- 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
@@ -10,27 +11,25 @@
+TARGET = darwin
# atlas | atlas_threaded | blas | custom
--BLAS = blas
-+BLAS = custom
- # if BLAS = custom, define CUSTOMBLAS below
--CUSTOMBLAS =
-+CUSTOMBLAS = -faltivec -framework Accelerate -lm -lgfortran
- # Kazushige Goto's BLAS
- #CUSTOMBLAS = -llapack -lgoto_prescott-32-r0.99-3 -lpthread -lg2c
+ BLAS = custom
+@@ -13,13 +13,13 @@
# Intel's MKL
-@@ -15,9 +15,9 @@
+ #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/local
+-LUADIR = /usr
+LUADIR = @PREFIX@
-CC = gcc
-+CC = MACOSX_DEPLOYMENT_TARGET="10.3" gcc-mp-4.2
++CC = MACOSX_DEPLOYMENT_TARGET="10.3" gcc-mp-4.3
CFLAGS = -W -Wall -pedantic -fshort-enums
- OPTFLAGS = -fomit-frame-pointer -O2 # -g
+ OPTFLAGS = -fomit-frame-pointer -O2
-@@ -43,6 +43,10 @@
+@@ -45,6 +45,10 @@
endif
ifeq ($(TARGET), win32)
LIBS += -L$(LUADIR)/lib -llua
@@ -41,7 +40,7 @@
endif
OBJ = luaspfun.o luarng.o luacomplex.o
-@@ -53,22 +57,36 @@
+@@ -56,22 +60,36 @@
DLIB = $(LIB:.a=.so)
LMDLIB = $(LMLIB:.a=.so)
else
@@ -54,11 +53,10 @@
+ endif
endif
- OBJFLAGS = -I$(LUADIR)/include
+ OBJFLAGS = -I$(LUADIR)/include/lua5.1
ifeq ($(TARGET), linux)
LDFLAGS = -fpic
endif
-+
+ifeq ($(TARGET), darwin)
+LDFLAGS += -bundle -undefined dynamic_lookup
+else
@@ -75,6 +73,7 @@
+ 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/20090916/2f287072/attachment.html>
More information about the macports-changes
mailing list