[39644] trunk/dports/graphics/dcraw
ryandesign at macports.org
ryandesign at macports.org
Wed Aug 27 13:57:02 PDT 2008
Revision: 39644
http://trac.macosforge.org/projects/macports/changeset/39644
Author: ryandesign at macports.org
Date: 2008-08-27 13:57:01 -0700 (Wed, 27 Aug 2008)
Log Message:
-----------
dcraw: use a Makefile to build the dcraw binary
Modified Paths:
--------------
trunk/dports/graphics/dcraw/Portfile
Added Paths:
-----------
trunk/dports/graphics/dcraw/files/
trunk/dports/graphics/dcraw/files/Makefile.in
Modified: trunk/dports/graphics/dcraw/Portfile
===================================================================
--- trunk/dports/graphics/dcraw/Portfile 2008-08-27 20:25:22 UTC (rev 39643)
+++ trunk/dports/graphics/dcraw/Portfile 2008-08-27 20:57:01 UTC (rev 39644)
@@ -12,7 +12,6 @@
master_sites ${homepage}archive/
worksrcdir $name
dist_subdir ${name}/${version}-${distfile_date}
-use_configure no
use_parallel_build yes
description \
@@ -32,14 +31,19 @@
port:jpeg \
port:lcms
-variant universal {}
+post-extract {
+ xinstall -W ${filespath} Makefile.in ${worksrcpath}/Makefile
+}
-build {
- if {[variant_isset universal]} {
- system "cd ${worksrcpath} && cc -o dcraw ${configure.cflags} ${configure.universal_cflags} dcraw.c -ljpeg -llcms -lintl -liconv ${configure.cppflags} ${configure.ldflags} -DLOCALEDIR=\\\"${prefix}/share/locale/\\\""
- } else {
- system "cd ${worksrcpath} && cc -o dcraw ${configure.cflags} dcraw.c -ljpeg -llcms -lintl -liconv ${configure.cppflags} ${configure.ldflags} -DLOCALEDIR=\\\"${prefix}/share/locale/\\\""
- }
+# configure.cc doesn't get set until the default configure phase runs
+configure.cmd true
+
+post-configure {
+ reinplace "s|@CC@|${configure.cc}|g" ${worksrcpath}/Makefile
+ reinplace "s|@CFLAGS@|${configure.cflags}|g" ${worksrcpath}/Makefile
+ reinplace "s|@CPPFLAGS@|${configure.cppflags}|g" ${worksrcpath}/Makefile
+ reinplace "s|@LDFLAGS@|${configure.ldflags}|g" ${worksrcpath}/Makefile
+ reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/Makefile
}
destroot {
Added: trunk/dports/graphics/dcraw/files/Makefile.in
===================================================================
--- trunk/dports/graphics/dcraw/files/Makefile.in (rev 0)
+++ trunk/dports/graphics/dcraw/files/Makefile.in 2008-08-27 20:57:01 UTC (rev 39644)
@@ -0,0 +1,10 @@
+CC = @CC@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+PREFIX = @PREFIX@
+
+all: dcraw
+
+dcraw:
+ $(CC) -o dcraw $(CFLAGS) dcraw.c -ljpeg -llcms -lintl -liconv $(CPPFLAGS) $(LDFLAGS) -DLOCALEDIR=\"$(PREFIX)/share/locale/\"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080827/9242e9a1/attachment.html
More information about the macports-changes
mailing list