[91344] trunk/dports/graphics/freeimage/Portfile
cal at macports.org
cal at macports.org
Fri Mar 30 05:56:35 PDT 2012
Revision: 91344
https://trac.macports.org/changeset/91344
Author: cal at macports.org
Date: 2012-03-30 05:56:34 -0700 (Fri, 30 Mar 2012)
Log Message:
-----------
freeimage: Install freeimageplus (nomaintainer)
Modified Paths:
--------------
trunk/dports/graphics/freeimage/Portfile
Modified: trunk/dports/graphics/freeimage/Portfile
===================================================================
--- trunk/dports/graphics/freeimage/Portfile 2012-03-30 12:47:46 UTC (rev 91343)
+++ trunk/dports/graphics/freeimage/Portfile 2012-03-30 12:56:34 UTC (rev 91344)
@@ -5,7 +5,7 @@
name freeimage
version 3.15.0
-revision 1
+revision 2
license {FreeImage-1.0 GPL-2}
categories graphics
platforms macosx
@@ -32,22 +32,28 @@
post-patch {
# Libraries extension is ".dylib" on Darwin, not ".so"
- reinplace {s/\.so/.dylib/} ${worksrcpath}/Makefile.gnu
+ reinplace {s/\.so/.dylib/} ${worksrcpath}/Makefile.gnu \
+ ${worksrcpath}/Makefile.fip
- # A dash separate the library name from its version on Darwin
- reinplace /^SHAREDLIB/s/-/./ ${worksrcpath}/Makefile.gnu
+ # A dot separates the library name from its version on Darwin
+ reinplace /^SHAREDLIB/s/-/./ ${worksrcpath}/Makefile.gnu \
+ ${worksrcpath}/Makefile.fip
# Use libtool(1) instead of ar(1)
- reinplace {s/\$(AR) r/libtool -o/} ${worksrcpath}/Makefile.gnu
+ reinplace {s/\$(AR) r/libtool -o/} ${worksrcpath}/Makefile.gnu \
+ ${worksrcpath}/Makefile.fip
# Do not force installation as root
- reinplace {s/-o root -g root//} ${worksrcpath}/Makefile.gnu
+ reinplace {s/-o root -g root//} ${worksrcpath}/Makefile.gnu \
+ ${worksrcpath}/Makefile.fip
# Darwin requires different arguments to build dynamic libraries
- reinplace "s|-Wl,-soname,\$(VERLIBNAME)|-dynamiclib -install_name \$(PREFIX)/lib/\$(VERLIBNAME) -compatibility_version \$(VER_MAJOR) -current_version \$(VER_MAJOR).\$(VER_MINOR)|g" ${worksrcpath}/Makefile.gnu
+ reinplace "s|-Wl,-soname,\$(VERLIBNAME)|-dynamiclib -install_name \$(PREFIX)/lib/\$(VERLIBNAME) -compatibility_version \$(VER_MAJOR) -current_version \$(VER_MAJOR).\$(VER_MINOR)|g" ${worksrcpath}/Makefile.gnu \
+ ${worksrcpath}/Makefile.fip
# Darwin does not have a command ldconfig
reinplace "s|ldconfig||g" ${worksrcpath}/Makefile.gnu
+ # FreeImagePlus doesn't use ldconfig
}
use_configure no
@@ -66,6 +72,16 @@
CXX="${configure.cxx} ${configure.cxxflags} ${archflags}" \
LDFLAGS="${configure.ldflags}"
+post-build {
+ # build FreeImagePlus
+ system -W ${worksrcpath} "${build.cmd} -f Makefile.fip \
+ PREFIX=${prefix} \
+ VERLIBNAME=${VERLIBNAME} \
+ CC='${configure.cc} ${configure.cflags} ${archflags}' \
+ CXX='${configure.cxx} ${configure.cxxflags} ${archflags}' \
+ LDFLAGS='${configure.ldflags}'"
+}
+
destroot.args -f Makefile.gnu \
INCDIR=${destroot}${prefix}/include \
INSTALLDIR=${destroot}${prefix}/lib \
@@ -73,6 +89,15 @@
VERLIBNAME=${VERLIBNAME}
post-destroot {
+ # install FreeImagePlus
+ system -W ${worksrcpath} "${destroot.cmd} -f Makefile.fip install \
+ VERLIBNAME=${VERLIBNAME} \
+ CC='${configure.cc} ${configure.cflags} ${archflags}' \
+ CXX='${configure.cxx} ${configure.cxxflags} ${archflags}' \
+ LDFLAGS='${configure.ldflags}' \
+ INCDIR='${destroot}${prefix}/include' \
+ INSTALLDIR='${destroot}${prefix}/lib'"
+
set docdir ${prefix}/share/doc/${name}
xinstall -d ${destroot}${docdir}
xinstall -m 644 -W ${worksrcpath} Whatsnew.txt license-fi.txt \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120330/029b0030/attachment.html>
More information about the macports-changes
mailing list