[96382] trunk/dports/net/elhttp

ryandesign at macports.org ryandesign at macports.org
Wed Aug 8 03:07:58 PDT 2012


Revision: 96382
          https://trac.macports.org/changeset/96382
Author:   ryandesign at macports.org
Date:     2012-08-08 03:07:57 -0700 (Wed, 08 Aug 2012)
Log Message:
-----------
elhttp: fix patch failure due to DOS line endings in source file and fix destroot failure due to cwd assumption (#35588); ensure we're UsingTheRightCompiler and -arch flags and add universal variant

Modified Paths:
--------------
    trunk/dports/net/elhttp/Portfile

Added Paths:
-----------
    trunk/dports/net/elhttp/files/patch-Makefile.diff

Modified: trunk/dports/net/elhttp/Portfile
===================================================================
--- trunk/dports/net/elhttp/Portfile	2012-08-08 10:04:51 UTC (rev 96381)
+++ trunk/dports/net/elhttp/Portfile	2012-08-08 10:07:57 UTC (rev 96382)
@@ -14,15 +14,27 @@
 master_sites	${homepage} http://downloads.openwrt.org/sources/
 extract.suffix	.tgz
 checksums		md5 b52f68c47f709e9fc9429250eb8f954c
-patchfiles		patch-elhttp.c
 
+post-extract {
+	# DOS to UNIX line endings so we can patch.
+	reinplace "s|\r||g" ${worksrcpath}/elhttp.c
+}
+
+patchfiles		patch-Makefile.diff \
+				patch-elhttp.c
+
 use_configure	no
 
+variant universal {}
+
+build.args		CC="${configure.cc}" \
+				CFLAGS="${configure.cflags} [get_canonical_archflags cc]"
+
 build.target	linux
 
 destroot	{
 	xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}/
 	xinstall -m 755 -s ${worksrcpath}/elhttp ${destroot}${prefix}/sbin
-	xinstall -m 644 ${worksrcpath}/README ChangeLog \
+	xinstall -m 644 -W ${worksrcpath} README ChangeLog \
 		${destroot}${prefix}/share/doc/${name}/
 }

Added: trunk/dports/net/elhttp/files/patch-Makefile.diff
===================================================================
--- trunk/dports/net/elhttp/files/patch-Makefile.diff	                        (rev 0)
+++ trunk/dports/net/elhttp/files/patch-Makefile.diff	2012-08-08 10:07:57 UTC (rev 96382)
@@ -0,0 +1,10 @@
+--- Makefile.orig	2004-06-18 08:32:17.000000000 -0500
++++ Makefile	2012-08-08 05:04:18.000000000 -0500
+@@ -1,6 +1,6 @@
+ 
+ linux:
+-	gcc -O -W -Wall -o elhttp elhttp.c
++	$(CC) $(CFLAGS) -W -Wall -o elhttp elhttp.c
+ 	strip elhttp
+ 
+ sunos:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120808/3159fb58/attachment.html>


More information about the macports-changes mailing list