[89858] trunk/dports/devel
and.damore at macports.org
and.damore at macports.org
Mon Feb 13 05:47:20 PST 2012
Revision: 89858
http://trac.macports.org/changeset/89858
Author: and.damore at macports.org
Date: 2012-02-13 05:47:19 -0800 (Mon, 13 Feb 2012)
Log Message:
-----------
new port: lua-md5, cryptographics facilities for Lua
Added Paths:
-----------
trunk/dports/devel/lua-md5/
trunk/dports/devel/lua-md5/Portfile
trunk/dports/devel/lua-md5/files/
trunk/dports/devel/lua-md5/files/patch-config.diff
Added: trunk/dports/devel/lua-md5/Portfile
===================================================================
--- trunk/dports/devel/lua-md5/Portfile (rev 0)
+++ trunk/dports/devel/lua-md5/Portfile 2012-02-13 13:47:19 UTC (rev 89858)
@@ -0,0 +1,50 @@
+# $Id$
+PortSystem 1.0
+
+name lua-md5
+version 1.1.2
+categories devel
+platforms darwin
+maintainers and.damore openmaintainer
+description basic cryptographic facilities for Lua 5.1
+long_description MD5 offers basic cryptographic facilities for Lua 5.1: a hash (digest) \
+ function, a pair crypt/decrypt based on MD5 and CFB, and a pair \
+ crypt/decrypt based on DES with 56-bit keys.
+homepage http://www.keplerproject.org/md5
+master_sites http://luaforge.net/frs/download.php/3355/
+distname md5-${version}
+
+checksums md5 68874cff64547f2157d5ecdc3572b544 \
+ sha1 f6c2ee21faf94c6ee95fc767ef2fdf0cf0382dc9 \
+ rmd160 bd74bc5eddf3167ff0d64b72be0ad428331399a7
+
+# package configure script is not from autotools and only searches for lua binary prefix
+# we patch it and force it to ${prefix}
+patchfiles patch-config.diff
+post-patch {
+ reinplace "s|%PREFIX%|${prefix}|" ${worksrcpath}/config
+ reinplace "s|%COMPILER%|${configure.compiler}|" ${worksrcpath}/config
+}
+
+# it is needed to manually set flags env variable as well
+build.env-append CFLAGS="${configure.cflags}" \
+ LDFLAGS="${configure.ldflags} -llua -lm"
+pre-build {
+ eval file copy [glob -directory ${worksrcpath}/src des56.{h,c}] ${worksrcpath}/tests/DES56
+}
+
+post-build {
+ # fdemo example is broken, it's using libcrypt
+ system -W ${worksrcpath}/tests/DES56 "${build.cmd} fdemo"
+}
+
+post-destroot {
+ xinstall -d ${destroot}${prefix}/share/doc/${name}
+ eval file copy [glob ${worksrcpath}/doc/us/*] ${destroot}${prefix}/share/doc/${name}
+
+ xinstall -d ${destroot}${prefix}/share/examples/${name}
+ eval xinstall -m 755 ${worksrcpath}/tests/DES56/fdemo ${destroot}${prefix}/share/examples/${name}
+ eval xinstall -m 644 ${worksrcpath}/tests/DES56/fdemo.c ${destroot}${prefix}/share/examples/${name}
+ eval xinstall -m 644 ${worksrcpath}/tests/test.lua ${destroot}${prefix}/share/examples/${name}
+}
+
Property changes on: trunk/dports/devel/lua-md5/Portfile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/dports/devel/lua-md5/files/patch-config.diff
===================================================================
--- trunk/dports/devel/lua-md5/files/patch-config.diff (rev 0)
+++ trunk/dports/devel/lua-md5/files/patch-config.diff 2012-02-13 13:47:19 UTC (rev 89858)
@@ -0,0 +1,41 @@
+--- config.orig 2012-02-13 12:51:37.000000000 +0100
++++ config 2012-02-13 12:52:08.000000000 +0100
+@@ -1,20 +1,20 @@
+ # Installation directories
+
+ # Default prefix
+-PREFIX = /usr/local
++PREFIX = %PREFIX%
+
+ # System's libraries directory (where binary libraries are installed)
+-LUA_LIBDIR= $(PREFIX)/lib/lua/5.1
++LUA_LIBDIR= $(DESTDIR)$(PREFIX)/lib/lua/5.1
+
+ # System's lua directory (where Lua libraries are installed)
+-LUA_DIR= $(PREFIX)/share/lua/5.1
++LUA_DIR= $(DESTDIR)$(PREFIX)/share/lua/5.1
+
+ # Lua includes directory
+ LUA_INC= $(PREFIX)/include
+
+ # OS dependent
+-LIB_OPTION= -shared #for Linux
+-#LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X
++#LIB_OPTION= -shared #for Linux
++LIB_OPTION= $(LDFLAGS) -bundle -undefined dynamic_lookup
+
+ # Lua version number
+ # (according to Lua 5.1 definition:
+@@ -24,9 +24,9 @@
+ COMPAT_DIR= ../compat/src
+
+ # Compilation directives
+-WARN= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -Wpointer-arith
++WARN= -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -Wpointer-arith
+ INCS= -I$(LUA_INC) -I$(COMPAT_DIR)
+-CFLAGS= $(WARN) $(INCS)
+-CC= gcc
++CFLAGS+= $(WARN) $(INCS)
++CC= %COMPILER%
+
+ # $Id: config,v 1.6 2007/10/29 23:00:23 carregal Exp $
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120213/f7bfcdf5/attachment.html>
More information about the macports-changes
mailing list