[89870] trunk/dports/devel/lua-md5

ryandesign at macports.org ryandesign at macports.org
Mon Feb 13 08:37:30 PST 2012


Revision: 89870
          http://trac.macports.org/changeset/89870
Author:   ryandesign at macports.org
Date:     2012-02-13 08:37:26 -0800 (Mon, 13 Feb 2012)
Log Message:
-----------
lua-md5: use the right compiler and arch flags; copy extra DES56 source files in post-patch instead of pre-build so that repeated build attempts don't fail with a 'file already exists' error

Modified Paths:
--------------
    trunk/dports/devel/lua-md5/Portfile
    trunk/dports/devel/lua-md5/files/patch-config.diff

Modified: trunk/dports/devel/lua-md5/Portfile
===================================================================
--- trunk/dports/devel/lua-md5/Portfile	2012-02-13 16:36:46 UTC (rev 89869)
+++ trunk/dports/devel/lua-md5/Portfile	2012-02-13 16:37:26 UTC (rev 89870)
@@ -5,6 +5,7 @@
 
 name                lua-md5
 version             1.1.2
+revision            1
 categories          devel
 platforms           darwin
 maintainers         and.damore openmaintainer
@@ -24,22 +25,25 @@
 
 # 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
+patchfiles          patch-config.diff \
+                    patch-tests-DES56-Makefile.diff
+
 post-patch {
-    reinplace   "s|%PREFIX%|${prefix}|"             ${worksrcpath}/config
-    reinplace "s|%COMPILER%|${configure.compiler}|" ${worksrcpath}/config
+    eval file copy [glob -directory ${worksrcpath}/src des56.{h,c}] ${worksrcpath}/tests/DES56
 }
 
+variant universal {}
+
+build.args          CC=${configure.cc} \
+                    PREFIX=${prefix}
+
 # 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
-}
+build.env-append    CFLAGS="${configure.cflags} [get_canonical_archflags cc]" \
+                    LDFLAGS="${configure.ldflags} [get_canonical_archflags ld] -llua -lm"
 
 post-build {
     # fdemo example is broken, it's using libcrypt
-    system -W ${worksrcpath}/tests/DES56 "${build.cmd} fdemo"
+    system -W ${worksrcpath}/tests/DES56 "[join ${build.env}] ${build.cmd} [join ${build.args}] fdemo"
 }
 
 post-destroot {

Modified: trunk/dports/devel/lua-md5/files/patch-config.diff
===================================================================
--- trunk/dports/devel/lua-md5/files/patch-config.diff	2012-02-13 16:36:46 UTC (rev 89869)
+++ trunk/dports/devel/lua-md5/files/patch-config.diff	2012-02-13 16:37:26 UTC (rev 89870)
@@ -1,12 +1,8 @@
---- 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
+--- config.orig	2007-10-29 18:00:23.000000000 -0500
++++ config	2012-02-13 10:29:02.000000000 -0600
+@@ -4,17 +4,17 @@
+ PREFIX = /usr/local
  
- # 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
@@ -34,8 +30,7 @@
 +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%
+ CC= gcc
  
  # $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/b915b017/attachment.html>


More information about the macports-changes mailing list