Ticket #24904: worksrcpath.diff

File worksrcpath.diff, 13.5 KB (added by ryandesign (Ryan Carsten Schmidt), 14 years ago)

use worksrcpath and build.dir variables

  • devel/ice-python/Portfile

     
    4141depends_lib     port:python24 \
    4242                port:ice-cpp
    4343
     44build.dir       ${worksrcpath}/py
     45
    4446post-patch {
    4547        # Remove this reinplace when 3.4.1 is released.
    4648        reinplace "s/nodarwing/nodarwin/" \
    47                 ${workpath}/Ice-${version}/scripts/TestUtil.py
     49                ${worksrcpath}/scripts/TestUtil.py
    4850
    4951        reinplace "s/-O2/-g -O2/" \
    50                 ${workpath}/Ice-${version}/py/config/Make.rules.Darwin
     52                ${build.dir}/config/Make.rules.Darwin
    5153
    5254        # Prevent name conflicts between libICE.* from xorg-libice and
    5355        # libIce.* from this port by renaming libIce.* to libZeroCIce.*.
    5456        reinplace "s/-lIce /-lZeroCIce /" \
    55                 ${workpath}/Ice-${version}/py/config/Make.rules
     57                ${build.dir}/config/Make.rules
    5658        reinplace "s/-lIce /-lZeroCIce /" \
    57                 ${workpath}/Ice-${version}/py/config/Make.rules.Darwin
     59                ${build.dir}/config/Make.rules.Darwin
    5860}
    5961
    6062use_configure   no
    6163
    62 build.dir       ${worksrcpath}/py
    6364build.target    prefix="${prefix}" \
    6465                CC="${configure.cc}" \
    6566                CXX="${configure.cxx}" \
     
    7071                all
    7172
    7273test.run        yes
    73 test.dir        ${worksrcpath}/py
    7474test.env        ICE_HOME=${prefix}
    7575test.cmd        ${prefix}/bin/python2.4
    7676test.target     allTests.py
    7777
    78 destroot.dir    ${worksrcpath}/py
    7978destroot.target prefix="${destroot}${prefix}" \
    8079                CC="${configure.cc}" \
    8180                CXX="${configure.cxx}" \
     
    113112        foreach f {CHANGES RELEASE_NOTES} {
    114113                file copy ${worksrcpath}/${f} ${docdir}
    115114        }
    116         file copy ${worksrcpath}/py/INSTALL ${docdir}
     115        file copy ${build.dir}/INSTALL ${docdir}
    117116
    118117        if {[variant_isset demo_source_code]} {
    119                 file copy ${worksrcpath}/py/demo ${docdir}
     118                file copy ${build.dir}/demo ${docdir}
    120119        }
    121120}
    122121
  • devel/ice-cpp/Portfile

     
    5252                port:readline \
    5353                port:mcpp
    5454
     55build.dir       ${worksrcpath}/cpp
     56
    5557post-patch {
    5658        # Remove this reinplace when 3.4.1 is released.
    5759        reinplace "s/nodarwing/nodarwin/" \
    58                 ${workpath}/Ice-${version}/scripts/TestUtil.py
     60                ${worksrcpath}/scripts/TestUtil.py
    5961
    6062        reinplace "s/-O2/-g -O2/" \
    61                 ${workpath}/Ice-${version}/cpp/config/Make.rules.Darwin
     63                ${build.dir}/config/Make.rules.Darwin
    6264
    6365        # To prevent a compilation failure by picking up header files
    6466        # from an older installed version of Ice, put the $(CPPFLAGS)
    6567        # before $(READLINE_FLAGS).
    6668        reinplace "s|\$\(READLINE_FLAGS\) \$\(CPPFLAGS\)|\$\(CPPFLAGS\) \$\(READLINE_FLAGS\)|" \
    67                 ${workpath}/Ice-${version}/cpp/demo/Freeze/library/Makefile \
    68                 ${workpath}/Ice-${version}/cpp/demo/Freeze/phonebook/Makefile \
    69                 ${workpath}/Ice-${version}/cpp/demo/book/evictor_filesystem/Makefile \
    70                 ${workpath}/Ice-${version}/cpp/demo/book/lifecycle/Makefile \
    71                 ${workpath}/Ice-${version}/cpp/demo/book/map_filesystem/Makefile
     69                ${build.dir}/demo/Freeze/library/Makefile \
     70                ${build.dir}/demo/Freeze/phonebook/Makefile \
     71                ${build.dir}/demo/book/evictor_filesystem/Makefile \
     72                ${build.dir}/demo/book/lifecycle/Makefile \
     73                ${build.dir}/demo/book/map_filesystem/Makefile
    7274
    7375        # It appears that the 10.4 and 10.5 installed versions of
    7476        # ${prefix}/include/iconv.h have different definitions of
     
    8082        close $fl
    8183        foreach line [split $data \n] {
    8284                if {[string match "extern size_t iconv*const*" $line]} {
    83                         reinplace "s/_LIBICONV_VERSION < 0x010B/1/" ${workpath}/Ice-${version}/cpp/include/Ice/IconvStringConverter.h
     85                        reinplace "s/_LIBICONV_VERSION < 0x010B/1/" ${build.dir}/include/Ice/IconvStringConverter.h
    8486                        break
    8587                }
    8688        }
     
    8890        # Prevent name conflicts between libICE.* from xorg-libice and
    8991        # libIce.* from this port by renaming libIce.* to libZeroCIce.*.
    9092        reinplace "s/,Ice/,ZeroCIce/" \
    91                 ${workpath}/Ice-${version}/cpp/src/Ice/Makefile
     93                ${build.dir}/src/Ice/Makefile
    9294        reinplace "s/-lIce /-lZeroCIce /" \
    93                 ${workpath}/Ice-${version}/cpp/config/Make.rules.Darwin
    94         foreach {f} [exec find ${workpath}/Ice-${version}/cpp -name Makefile] {
     95                ${build.dir}/config/Make.rules.Darwin
     96        foreach {f} [exec find ${build.dir} -name Makefile] {
    9597                reinplace "s/-lIce /-lZeroCIce /" ${f}
    9698        }
    9799}
     
    99101use_configure   no
    100102
    101103build {
    102         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"
     104        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"
    103105        ui_debug ${cmd}
    104106        system ${cmd}
    105107}
    106108
    107 test.dir        ${worksrcpath}/cpp
    108109test.run        yes
    109110test.target     test
    110111
    111 destroot.dir    ${worksrcpath}/cpp
    112112destroot.target prefix="${destroot}${prefix}" \
    113113                embedded_runpath_prefix="${prefix}" \
    114114                OPTIMIZE="yes" \
     
    122122                install
    123123
    124124post-destroot {
    125         set cppdir ${workpath}/Ice-${version}/cpp
    126125        set sharedir ${destroot}${prefix}/share
    127126        set docdir ${sharedir}/doc/${name}
    128127
     
    133132        xinstall -m 755 -d ${docdir}
    134133        file rename ${destroot}${prefix}/ICE_LICENSE ${docdir}
    135134        file rename ${destroot}${prefix}/LICENSE ${docdir}
    136         file copy ${cppdir}/doc/reference ${docdir}
     135        file copy ${build.dir}/doc/reference ${docdir}
    137136
    138137        foreach f {CHANGES RELEASE_NOTES} {
    139                 file copy ${workpath}/Ice-${version}/${f} ${docdir}
     138                file copy ${worksrcpath}/${f} ${docdir}
    140139        }
    141140
    142141        if {[variant_isset demo_source_code]} {
    143                 system "cd ${cppdir}/demo && make clean"
    144                 file copy ${cppdir}/demo $docdir
     142                system "cd ${build.dir}/demo && make clean"
     143                file copy ${build.dir}/demo $docdir
    145144        }
    146145}
    147146
  • devel/ice-java/Portfile

     
    4747                port:jgoodies-looks \
    4848                port:proguard
    4949
     50build.dir       ${worksrcpath}/java
     51
    5052post-patch {
    5153        # Remove this reinplace when 3.4.1 is released.
    5254        reinplace "s/nodarwing/nodarwin/" \
    53                 ${workpath}/Ice-${version}/scripts/TestUtil.py
     55                ${worksrcpath}/scripts/TestUtil.py
    5456}
    5557
    5658use_configure        no
    5759
    5860set classpath ${prefix}/lib/db46/db.jar:${prefix}/share/java/forms.jar:${prefix}/share/java/looks.jar:${prefix}/share/java/proguard.jar
    5961
    60 build.dir       ${worksrcpath}/java
    6162build.env       JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home CLASSPATH=${classpath} ANT_OPTS=-Xmx512m ICE_HOME=${prefix}
    6263build.cmd       ant
    6364build.target    clean all
    6465
    6566test.run        yes
    66 test.dir        ${worksrcpath}/java
    6767test.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
    6868test.cmd        python
    6969test.target     allTests.py
    7070
    7171destroot {
    72         set ice-java ${workpath}/Ice-${version}/java
    7372        set javadir ${destroot}${prefix}/share/java
    7473        set docdir ${destroot}${prefix}/share/doc/${name}
    7574
     
    7776        xinstall -d -m 755 ${docdir}
    7877
    7978        foreach f {ant-ice.jar Ice.jar IceGridGUI.jar} {
    80                 file copy ${ice-java}/lib/${f} ${javadir}/
     79                file copy ${build.dir}/lib/${f} ${javadir}/
    8180        }
    82         file copy ${ice-java}/resources/IceGridAdmin ${docdir}/
     81        file copy ${build.dir}/resources/IceGridAdmin ${docdir}/
    8382
    8483        foreach f {CHANGES ICE_LICENSE LICENSE RELEASE_NOTES} {
    8584                file copy ${worksrcpath}/${f} ${docdir}
    8685        }
    87         file copy ${worksrcpath}/java/INSTALL ${docdir}
     86        file copy ${build.dir}/INSTALL ${docdir}
    8887
    8988        if {[variant_isset demo_source_code]} {
    90                 file copy ${ice-java}/demo ${docdir}/
     89                file copy ${build.dir}/demo ${docdir}/
    9190        }
    9291}
    9392
  • devel/ice-python25/Portfile

     
    4141depends_lib     port:python25 \
    4242                port:ice-cpp
    4343
     44build.dir       ${worksrcpath}/py
     45
    4446post-patch {
    4547        # Remove this reinplace when 3.4.1 is released.
    4648        reinplace "s/nodarwing/nodarwin/" \
    47                 ${workpath}/Ice-${version}/scripts/TestUtil.py
     49                ${worksrcpath}/scripts/TestUtil.py
    4850
    4951        reinplace "s/-O2/-g -O2/" \
    50                 ${workpath}/Ice-${version}/py/config/Make.rules.Darwin
     52                ${build.dir}/config/Make.rules.Darwin
    5153
    5254        # Prevent name conflicts between libICE.* from xorg-libice and
    5355        # libIce.* from this port by renaming libIce.* to libZeroCIce.*.
    5456        reinplace "s/-lIce /-lZeroCIce /" \
    55                 ${workpath}/Ice-${version}/py/config/Make.rules
     57                ${build.dir}/config/Make.rules
    5658        reinplace "s/-lIce /-lZeroCIce /" \
    57                 ${workpath}/Ice-${version}/py/config/Make.rules.Darwin
     59                ${build.dir}/config/Make.rules.Darwin
    5860}
    5961
    6062use_configure   no
    6163
    62 build.dir       ${worksrcpath}/py
    6364build.target    prefix="${prefix}" \
    6465                CC="${configure.cc}" \
    6566                CXX="${configure.cxx}" \
     
    7071                all
    7172
    7273test.run        yes
    73 test.dir        ${worksrcpath}/py
    7474test.env        ICE_HOME=${prefix}
    7575test.cmd        ${prefix}/bin/python2.5
    7676test.target     allTests.py
    7777
    78 destroot.dir    ${worksrcpath}/py
    7978destroot.target prefix="${destroot}${prefix}" \
    8079                CC="${configure.cc}" \
    8180                CXX="${configure.cxx}" \
     
    113112        foreach f {CHANGES RELEASE_NOTES} {
    114113                file copy ${worksrcpath}/${f} ${docdir}
    115114        }
    116         file copy ${worksrcpath}/py/INSTALL ${docdir}
     115        file copy ${build.dir}/INSTALL ${docdir}
    117116
    118117        if {[variant_isset demo_source_code]} {
    119                 file copy ${worksrcpath}/py/demo ${docdir}
     118                file copy ${build.dir}/demo ${docdir}
    120119        }
    121120}
    122121
  • devel/ice-python26/Portfile

     
    4141depends_lib     port:python26 \
    4242                port:ice-cpp
    4343
     44build.dir       ${worksrcpath}/py
     45
    4446post-patch {
    4547        # Remove this reinplace when 3.4.1 is released.
    4648        reinplace "s/nodarwing/nodarwin/" \
    47                 ${workpath}/Ice-${version}/scripts/TestUtil.py
     49                ${worksrcpath}/scripts/TestUtil.py
    4850
    4951        reinplace "s/-O2/-g -O2/" \
    50                 ${workpath}/Ice-${version}/py/config/Make.rules.Darwin
     52                ${build.dir}/config/Make.rules.Darwin
    5153
    5254        # Prevent name conflicts between libICE.* from xorg-libice and
    5355        # libIce.* from this port by renaming libIce.* to libZeroCIce.*.
    5456        reinplace "s/-lIce /-lZeroCIce /" \
    55                 ${workpath}/Ice-${version}/py/config/Make.rules
     57                ${build.dir}/config/Make.rules
    5658        reinplace "s/-lIce /-lZeroCIce /" \
    57                 ${workpath}/Ice-${version}/py/config/Make.rules.Darwin
     59                ${build.dir}/config/Make.rules.Darwin
    5860}
    5961
    6062use_configure   no
    6163
    62 build.dir       ${worksrcpath}/py
    6364build.target    prefix="${prefix}" \
    6465                CC="${configure.cc}" \
    6566                CXX="${configure.cxx}" \
     
    7071                all
    7172
    7273test.run        yes
    73 test.dir        ${worksrcpath}/py
    7474test.env        ICE_HOME=${prefix}
    7575test.cmd        ${prefix}/bin/python2.6
    7676test.target     allTests.py
    7777
    78 destroot.dir    ${worksrcpath}/py
    7978destroot.target prefix="${destroot}${prefix}" \
    8079                CC="${configure.cc}" \
    8180                CXX="${configure.cxx}" \
     
    117116        foreach f {CHANGES RELEASE_NOTES} {
    118117                file copy ${worksrcpath}/${f} ${docdir}
    119118        }
    120         file copy ${worksrcpath}/py/INSTALL ${docdir}
     119        file copy ${build.dir}/INSTALL ${docdir}
    121120
    122121        if {[variant_isset demo_source_code]} {
    123                 file copy ${worksrcpath}/py/demo ${docdir}
     122                file copy ${build.dir}/demo ${docdir}
    124123        }
    125124}
    126125