[67860] trunk/dports/devel

blair at macports.org blair at macports.org
Wed May 19 22:53:06 PDT 2010


Revision: 67860
          http://trac.macports.org/changeset/67860
Author:   blair at macports.org
Date:     2010-05-19 22:53:03 -0700 (Wed, 19 May 2010)
Log Message:
-----------
Simplify the ice-* ports by using more standardized variables.

1) Replace ${workpath}/Ice-${version} with ${worksrcpath}.

2) Instead of using test.dir and/or destroot.dir set build.dir, which
   test.dir and destroot.dir default to.

Patch by: ryandesign

Modified Paths:
--------------
    trunk/dports/devel/ice-cpp/Portfile
    trunk/dports/devel/ice-java/Portfile
    trunk/dports/devel/ice-python/Portfile
    trunk/dports/devel/ice-python25/Portfile
    trunk/dports/devel/ice-python26/Portfile

Modified: trunk/dports/devel/ice-cpp/Portfile
===================================================================
--- trunk/dports/devel/ice-cpp/Portfile	2010-05-20 05:50:09 UTC (rev 67859)
+++ trunk/dports/devel/ice-cpp/Portfile	2010-05-20 05:53:03 UTC (rev 67860)
@@ -52,23 +52,25 @@
                 port:readline \
                 port:mcpp
 
+build.dir       ${worksrcpath}/cpp
+
 post-patch {
         # Remove this reinplace when 3.4.1 is released.
         reinplace "s/nodarwing/nodarwin/" \
-                ${workpath}/Ice-${version}/scripts/TestUtil.py
+                ${worksrcpath}/scripts/TestUtil.py
 
         reinplace "s/-O2/-g -O2/" \
-                ${workpath}/Ice-${version}/cpp/config/Make.rules.Darwin
+                ${build.dir}/config/Make.rules.Darwin
 
         # To prevent a compilation failure by picking up header files
         # from an older installed version of Ice, put the $(CPPFLAGS)
         # before $(READLINE_FLAGS).
         reinplace "s|\$\(READLINE_FLAGS\) \$\(CPPFLAGS\)|\$\(CPPFLAGS\) \$\(READLINE_FLAGS\)|" \
-                ${workpath}/Ice-${version}/cpp/demo/Freeze/library/Makefile \
-                ${workpath}/Ice-${version}/cpp/demo/Freeze/phonebook/Makefile \
-                ${workpath}/Ice-${version}/cpp/demo/book/evictor_filesystem/Makefile \
-                ${workpath}/Ice-${version}/cpp/demo/book/lifecycle/Makefile \
-                ${workpath}/Ice-${version}/cpp/demo/book/map_filesystem/Makefile
+                ${build.dir}/demo/Freeze/library/Makefile \
+                ${build.dir}/demo/Freeze/phonebook/Makefile \
+                ${build.dir}/demo/book/evictor_filesystem/Makefile \
+                ${build.dir}/demo/book/lifecycle/Makefile \
+                ${build.dir}/demo/book/map_filesystem/Makefile
 
         # It appears that the 10.4 and 10.5 installed versions of
         # ${prefix}/include/iconv.h have different definitions of
@@ -80,7 +82,7 @@
         close $fl
         foreach line [split $data \n] {
                 if {[string match "extern size_t iconv*const*" $line]} {
-                        reinplace "s/_LIBICONV_VERSION < 0x010B/1/" ${workpath}/Ice-${version}/cpp/include/Ice/IconvStringConverter.h
+                        reinplace "s/_LIBICONV_VERSION < 0x010B/1/" ${build.dir}/include/Ice/IconvStringConverter.h
                         break
                 }
         }
@@ -88,10 +90,10 @@
         # Prevent name conflicts between libICE.* from xorg-libice and
         # libIce.* from this port by renaming libIce.* to libZeroCIce.*.
         reinplace "s/,Ice/,ZeroCIce/" \
-                ${workpath}/Ice-${version}/cpp/src/Ice/Makefile
+                ${build.dir}/src/Ice/Makefile
         reinplace "s/-lIce /-lZeroCIce /" \
-                ${workpath}/Ice-${version}/cpp/config/Make.rules.Darwin
-        foreach {f} [exec find ${workpath}/Ice-${version}/cpp -name Makefile] {
+                ${build.dir}/config/Make.rules.Darwin
+        foreach {f} [exec find ${build.dir} -name Makefile] {
                 reinplace "s/-lIce /-lZeroCIce /" ${f}
         }
 }
@@ -99,16 +101,14 @@
 use_configure   no
 
 build {
-        set cmd "cd ${workpath}/Ice-${version}/cpp && make prefix='${prefix}' embedded_runpath_prefix='${prefix}' CC='${configure.cc}' CXX='${configure.cxx}' OPTIMIZE='yes' BZIP2_HOME='${prefix}' DB_HOME='${prefix}' EXPAT_HOME='${prefix}' OPENSSL_HOME='${prefix}' READLINE_HOME='${prefix}' USE_READLINE=yes MCPP_HOME='${prefix}' LDPLATFORMFLAGS= all && cd doc && make"
+        set cmd "cd ${build.dir} && make prefix='${prefix}' embedded_runpath_prefix='${prefix}' CC='${configure.cc}' CXX='${configure.cxx}' OPTIMIZE='yes' BZIP2_HOME='${prefix}' DB_HOME='${prefix}' EXPAT_HOME='${prefix}' OPENSSL_HOME='${prefix}' READLINE_HOME='${prefix}' USE_READLINE=yes MCPP_HOME='${prefix}' LDPLATFORMFLAGS= all && cd doc && make"
         ui_debug ${cmd}
         system ${cmd}
 }
 
-test.dir        ${worksrcpath}/cpp
 test.run        yes
 test.target     test
 
-destroot.dir    ${worksrcpath}/cpp
 destroot.target prefix="${destroot}${prefix}" \
                 embedded_runpath_prefix="${prefix}" \
                 OPTIMIZE="yes" \
@@ -122,7 +122,6 @@
                 install
 
 post-destroot {
-        set cppdir ${workpath}/Ice-${version}/cpp
         set sharedir ${destroot}${prefix}/share
         set docdir ${sharedir}/doc/${name}
 
@@ -133,15 +132,15 @@
         xinstall -m 755 -d ${docdir}
         file rename ${destroot}${prefix}/ICE_LICENSE ${docdir}
         file rename ${destroot}${prefix}/LICENSE ${docdir}
-        file copy ${cppdir}/doc/reference ${docdir}
+        file copy ${build.dir}/doc/reference ${docdir}
 
         foreach f {CHANGES RELEASE_NOTES} {
-                file copy ${workpath}/Ice-${version}/${f} ${docdir}
+                file copy ${worksrcpath}/${f} ${docdir}
         }
 
         if {[variant_isset demo_source_code]} {
-                system "cd ${cppdir}/demo && make clean"
-                file copy ${cppdir}/demo $docdir
+                system "cd ${build.dir}/demo && make clean"
+                file copy ${build.dir}/demo $docdir
         }
 }
 

Modified: trunk/dports/devel/ice-java/Portfile
===================================================================
--- trunk/dports/devel/ice-java/Portfile	2010-05-20 05:50:09 UTC (rev 67859)
+++ trunk/dports/devel/ice-java/Portfile	2010-05-20 05:53:03 UTC (rev 67860)
@@ -47,29 +47,28 @@
                 port:jgoodies-looks \
                 port:proguard
 
+build.dir       ${worksrcpath}/java
+
 post-patch {
         # Remove this reinplace when 3.4.1 is released.
         reinplace "s/nodarwing/nodarwin/" \
-                ${workpath}/Ice-${version}/scripts/TestUtil.py
+                ${worksrcpath}/scripts/TestUtil.py
 }
 
 use_configure        no
 
 set classpath ${prefix}/lib/db46/db.jar:${prefix}/share/java/forms.jar:${prefix}/share/java/looks.jar:${prefix}/share/java/proguard.jar
 
-build.dir       ${worksrcpath}/java
 build.env       JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home CLASSPATH=${classpath} ANT_OPTS=-Xmx512m ICE_HOME=${prefix}
 build.cmd       ant
 build.target    clean all
 
 test.run        yes
-test.dir        ${worksrcpath}/java
 test.env        JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home CLASSPATH=${classpath} ANT_OPTS=-Xmx512m ICE_HOME=${prefix} DYLD_LIBRARY_PATH=${prefix}/lib/db46
 test.cmd        python
 test.target     allTests.py
 
 destroot {
-        set ice-java ${workpath}/Ice-${version}/java
         set javadir ${destroot}${prefix}/share/java
         set docdir ${destroot}${prefix}/share/doc/${name}
 
@@ -77,17 +76,17 @@
         xinstall -d -m 755 ${docdir}
 
         foreach f {ant-ice.jar Ice.jar IceGridGUI.jar} {
-                file copy ${ice-java}/lib/${f} ${javadir}/
+                file copy ${build.dir}/lib/${f} ${javadir}/
         }
-        file copy ${ice-java}/resources/IceGridAdmin ${docdir}/
+        file copy ${build.dir}/resources/IceGridAdmin ${docdir}/
 
         foreach f {CHANGES ICE_LICENSE LICENSE RELEASE_NOTES} {
                 file copy ${worksrcpath}/${f} ${docdir}
         }
-        file copy ${worksrcpath}/java/INSTALL ${docdir}
+        file copy ${build.dir}/INSTALL ${docdir}
 
         if {[variant_isset demo_source_code]} {
-                file copy ${ice-java}/demo ${docdir}/
+                file copy ${build.dir}/demo ${docdir}/
         }
 }
 

Modified: trunk/dports/devel/ice-python/Portfile
===================================================================
--- trunk/dports/devel/ice-python/Portfile	2010-05-20 05:50:09 UTC (rev 67859)
+++ trunk/dports/devel/ice-python/Portfile	2010-05-20 05:53:03 UTC (rev 67860)
@@ -41,25 +41,26 @@
 depends_lib     port:python24 \
                 port:ice-cpp
 
+build.dir       ${worksrcpath}/py
+
 post-patch {
         # Remove this reinplace when 3.4.1 is released.
         reinplace "s/nodarwing/nodarwin/" \
-                ${workpath}/Ice-${version}/scripts/TestUtil.py
+                ${worksrcpath}/scripts/TestUtil.py
 
         reinplace "s/-O2/-g -O2/" \
-                ${workpath}/Ice-${version}/py/config/Make.rules.Darwin
+                ${build.dir}/config/Make.rules.Darwin
 
         # Prevent name conflicts between libICE.* from xorg-libice and
         # libIce.* from this port by renaming libIce.* to libZeroCIce.*.
         reinplace "s/-lIce /-lZeroCIce /" \
-                ${workpath}/Ice-${version}/py/config/Make.rules
+                ${build.dir}/config/Make.rules
         reinplace "s/-lIce /-lZeroCIce /" \
-                ${workpath}/Ice-${version}/py/config/Make.rules.Darwin
+                ${build.dir}/config/Make.rules.Darwin
 }
 
 use_configure   no
 
-build.dir       ${worksrcpath}/py
 build.target    prefix="${prefix}" \
                 CC="${configure.cc}" \
                 CXX="${configure.cxx}" \
@@ -70,12 +71,10 @@
                 all
 
 test.run        yes
-test.dir        ${worksrcpath}/py
 test.env        ICE_HOME=${prefix}
 test.cmd        ${prefix}/bin/python2.4
 test.target     allTests.py
 
-destroot.dir    ${worksrcpath}/py
 destroot.target prefix="${destroot}${prefix}" \
                 CC="${configure.cc}" \
                 CXX="${configure.cxx}" \
@@ -113,10 +112,10 @@
         foreach f {CHANGES RELEASE_NOTES} {
                 file copy ${worksrcpath}/${f} ${docdir}
         }
-        file copy ${worksrcpath}/py/INSTALL ${docdir}
+        file copy ${build.dir}/INSTALL ${docdir}
 
         if {[variant_isset demo_source_code]} {
-                file copy ${worksrcpath}/py/demo ${docdir}
+                file copy ${build.dir}/demo ${docdir}
         }
 }
 

Modified: trunk/dports/devel/ice-python25/Portfile
===================================================================
--- trunk/dports/devel/ice-python25/Portfile	2010-05-20 05:50:09 UTC (rev 67859)
+++ trunk/dports/devel/ice-python25/Portfile	2010-05-20 05:53:03 UTC (rev 67860)
@@ -41,25 +41,26 @@
 depends_lib     port:python25 \
                 port:ice-cpp
 
+build.dir       ${worksrcpath}/py
+
 post-patch {
         # Remove this reinplace when 3.4.1 is released.
         reinplace "s/nodarwing/nodarwin/" \
-                ${workpath}/Ice-${version}/scripts/TestUtil.py
+                ${worksrcpath}/scripts/TestUtil.py
 
         reinplace "s/-O2/-g -O2/" \
-                ${workpath}/Ice-${version}/py/config/Make.rules.Darwin
+                ${build.dir}/config/Make.rules.Darwin
 
         # Prevent name conflicts between libICE.* from xorg-libice and
         # libIce.* from this port by renaming libIce.* to libZeroCIce.*.
         reinplace "s/-lIce /-lZeroCIce /" \
-                ${workpath}/Ice-${version}/py/config/Make.rules
+                ${build.dir}/config/Make.rules
         reinplace "s/-lIce /-lZeroCIce /" \
-                ${workpath}/Ice-${version}/py/config/Make.rules.Darwin
+                ${build.dir}/config/Make.rules.Darwin
 }
 
 use_configure   no
 
-build.dir       ${worksrcpath}/py
 build.target    prefix="${prefix}" \
                 CC="${configure.cc}" \
                 CXX="${configure.cxx}" \
@@ -70,12 +71,10 @@
                 all
 
 test.run        yes
-test.dir        ${worksrcpath}/py
 test.env        ICE_HOME=${prefix}
 test.cmd        ${prefix}/bin/python2.5
 test.target     allTests.py
 
-destroot.dir    ${worksrcpath}/py
 destroot.target prefix="${destroot}${prefix}" \
                 CC="${configure.cc}" \
                 CXX="${configure.cxx}" \
@@ -113,10 +112,10 @@
         foreach f {CHANGES RELEASE_NOTES} {
                 file copy ${worksrcpath}/${f} ${docdir}
         }
-        file copy ${worksrcpath}/py/INSTALL ${docdir}
+        file copy ${build.dir}/INSTALL ${docdir}
 
         if {[variant_isset demo_source_code]} {
-                file copy ${worksrcpath}/py/demo ${docdir}
+                file copy ${build.dir}/demo ${docdir}
         }
 }
 

Modified: trunk/dports/devel/ice-python26/Portfile
===================================================================
--- trunk/dports/devel/ice-python26/Portfile	2010-05-20 05:50:09 UTC (rev 67859)
+++ trunk/dports/devel/ice-python26/Portfile	2010-05-20 05:53:03 UTC (rev 67860)
@@ -41,25 +41,26 @@
 depends_lib     port:python26 \
                 port:ice-cpp
 
+build.dir       ${worksrcpath}/py
+
 post-patch {
         # Remove this reinplace when 3.4.1 is released.
         reinplace "s/nodarwing/nodarwin/" \
-                ${workpath}/Ice-${version}/scripts/TestUtil.py
+                ${worksrcpath}/scripts/TestUtil.py
 
         reinplace "s/-O2/-g -O2/" \
-                ${workpath}/Ice-${version}/py/config/Make.rules.Darwin
+                ${build.dir}/config/Make.rules.Darwin
 
         # Prevent name conflicts between libICE.* from xorg-libice and
         # libIce.* from this port by renaming libIce.* to libZeroCIce.*.
         reinplace "s/-lIce /-lZeroCIce /" \
-                ${workpath}/Ice-${version}/py/config/Make.rules
+                ${build.dir}/config/Make.rules
         reinplace "s/-lIce /-lZeroCIce /" \
-                ${workpath}/Ice-${version}/py/config/Make.rules.Darwin
+                ${build.dir}/config/Make.rules.Darwin
 }
 
 use_configure   no
 
-build.dir       ${worksrcpath}/py
 build.target    prefix="${prefix}" \
                 CC="${configure.cc}" \
                 CXX="${configure.cxx}" \
@@ -70,12 +71,10 @@
                 all
 
 test.run        yes
-test.dir        ${worksrcpath}/py
 test.env        ICE_HOME=${prefix}
 test.cmd        ${prefix}/bin/python2.6
 test.target     allTests.py
 
-destroot.dir    ${worksrcpath}/py
 destroot.target prefix="${destroot}${prefix}" \
                 CC="${configure.cc}" \
                 CXX="${configure.cxx}" \
@@ -117,10 +116,10 @@
         foreach f {CHANGES RELEASE_NOTES} {
                 file copy ${worksrcpath}/${f} ${docdir}
         }
-        file copy ${worksrcpath}/py/INSTALL ${docdir}
+        file copy ${build.dir}/INSTALL ${docdir}
 
         if {[variant_isset demo_source_code]} {
-                file copy ${worksrcpath}/py/demo ${docdir}
+                file copy ${build.dir}/demo ${docdir}
         }
 }
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100519/3b0f135d/attachment.html>


More information about the macports-changes mailing list