Ticket #26410: Portfile-wxWidgets-devel.diff

File Portfile-wxWidgets-devel.diff, 3.5 KB (added by tvb377@…, 14 years ago)

corrections necessary after r71416

  • Portfile

    old new  
    1717
    1818homepage                http://www.wxwidgets.org/
    1919distname                wxWidgets
    20 master_sites            http://biolpc22.york.ac.uk/pub/CVS_HEAD/v2/files/ \
     20master_sites            sourceforge:wxwindows \
    2121    http://biolpc22.york.ac.uk/pub/${version}/ \
    2222    ftp://ftp.wxwidgets.org/pub/${version}
    2323use_bzip2               yes
     
    4646
    4747extract.only            ${distname}-${version}${extract.suffix}
    4848
     49# install -devel port into nonstandard subdirectory
     50# to avoid conflicts with mainstream version.
    4951set sub                 wx-devel
    5052configure.cmd           ../configure
    51 configure.ldflags       -L${build.dir}/lib -L${prefix}/lib
    5253configure.args          --mandir=${prefix}/share/man \
    5354    --libdir=${prefix}/lib/${sub} \
    5455    --bindir=${prefix}/lib/${sub}/bin \
     
    7172    # default carbon won't work on 64-bit
    7273    configure.args-delete --with-mac
    7374    configure.args-append --with-osx_cocoa
    74 #    patchfiles-append     patch-textctrl.diff
    7575}
    7676
    7777set installtype         release
    78 #set contrib            "gizmos stc ogl"
    7978
    8079build.target
    8180
    82 #post-build {
    83 #    foreach c { ${contrib} } {
    84 #       system "cd ${build.dir} && make -C contrib/src/${c}"
    85 #    }
    86 #}
    87 
    8881post-destroot {
    89 #    foreach c { ${contrib} } {
    90 #       system "cd ${destroot.dir} && make -C contrib/src/${c} install ${destroot.destdir}"
    91 #    }
    9282    xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
    93 #    xinstall -m 644 -W ${workpath}/${distname}-${version} \
    94 #       install-mac.txt install-mgl.txt install-motif.txt \
    95 #       INSTALL-OS2.txt install-x11.txt readme-cocoa.txt \
    96 #       readme-gtk.txt readme-mac.txt \
    97 #       readme-mgl.txt readme-motif.txt readme-x11.txt \
    98 #       ${destroot}${prefix}/share/doc/${name}
    99 #    if {$build_arch == "x86_64" || $build_arch == "ppc64"} {
    100 #        reinplace "s|-L${build.dir}/lib||" ${destroot}${prefix}/lib/${sub}/wx/config/osx_cocoa-unicode-${installtype}-2.9
    101 #    } else {
    102 #        reinplace "s|-L${build.dir}/lib||" ${destroot}${prefix}/lib/${sub}/wx/config/osx_carbon-unicode-${installtype}-2.9
    103 #    }
     83    # set final lib directory in dylibs
     84    set libdir ${prefix}/lib
     85    if { [string length ${sub}] != 0 } {
     86        set libdir ${libdir}/${sub}
     87    }
     88    set destrootlibdir ${destroot}/${prefix}/lib/${sub}
     89    set oldlibpath ${worksrcpath}/lib
     90    foreach lib [glob -directory ${destrootlibdir} *.dylib*] {
     91        if [string match "link" [file type ${lib}]] {
     92            continue
     93        }
     94        exec install_name_tool -id ${libdir}/[string replace ${lib} 0 [string last "/" ${lib}]] ${lib}
     95        foreach dep [exec otool -L ${lib}] {
     96            if [string match "${oldlibpath}*" ${dep}] {
     97                exec install_name_tool -change ${dep} ${libdir}/[string replace ${dep} 0 [string last "/" ${dep}]] ${lib}
     98            }
     99        }
     100    }
    104101}
    105102
    106103variant nonmonolithic description {build libraries separately} {
     
    109106
    110107variant debug description {add debug info to libraries} {
    111108    configure.args-append       --enable-debug
     109    configure.args-append       --enable-debug_gdb
     110    configure.args-append       --disable-optimise
    112111    set installtype debug
    113112}
    114113
     114variant stl description {use STL for containers} {
     115    configure.args-append       --enable-stl
     116}
     117
     118variant std_string description {use standard C++ string classes} {
     119    configure.args-append       --enable-std_string
     120}
     121
     122variant std_iostreams description {use standard C++ stream classes} {
     123    configure.args-append       --enable-std_iostreams
     124}
     125
    115126livecheck.type          regex
    116127livecheck.url           http://biolpc22.york.ac.uk/pub/
    117128livecheck.regex         (2.\[0-9\]+.\[0-9a-z.-\]+)/