Ticket #6743: Portfile.diff

File Portfile.diff, 3.7 KB (added by g3zi7y.wu72nfp@…, 18 years ago)

proposed patch of portfile

  • Portfile

    old new  
    99maintainers             mww@opendarwin.org blb@opendarwin.org
    1010description             mature cross-platform C++ GUI framework
    1111long_description        wxWidgets is a mature open-source cross-platform C++ \
    12                                 GUI framework for MacOS, Unix, Linux, Windows. It can \
    13                                 make use of a variety of native widget sets as well as \
    14                                 its own widget set: MacOS, GTK+, Motif, WIN32. \
    15                                 wxWidgets will even run on embedded systems using \
    16                                 Linux and X11.
     12                        GUI framework for MacOS, Unix, Linux, Windows. It can \
     13                        make use of a variety of native widget sets as well as \
     14                        its own widget set: MacOS, GTK+, Motif, WIN32. \
     15                        wxWidgets will even run on embedded systems using \
     16                        Linux and X11.
    1717
    1818homepage                http://www.wxwidgets.org/
    19 master_sites    ftp://biolpc22.york.ac.uk/pub/${version}/ \
     19master_sites            ftp://biolpc22.york.ac.uk/pub/${version}/ \
    2020                                sourceforge:wxwindows
    2121dist_subdir             ${name}/${version}
    2222checksums               md5 ee0aa211febd992c8540e6c9df749b51
    2323use_bzip2               yes
     24worksrcdir              ${name}-${version}
    2425
    2526depends_lib             port:jpeg \
    26                                 port:tiff \
    27                                 port:libpng \
    28                                 port:zlib \
    29                                 port:libiconv \
    30                                 port:expat \
    31                                 port:libsdl \
    32                                 port:libsdl_mixer
     27                        port:tiff \
     28                        port:libpng \
     29                        port:zlib \
     30                        port:libiconv \
     31                        port:expat \
     32                        port:libsdl \
     33                        port:libsdl_mixer
    3334
    34 set worksrcdir  build
    3535
    3636post-extract {
    37         file mkdir ${worksrcpath}
     37                file mkdir ${workpath}/build
    3838}
    3939
    40 configure.cmd   ../${name}-${version}/configure
     40configure.cmd   ../${worksrcdir}/configure
     41
    4142configure.env   CPPFLAGS="-I${prefix}/include" \
    42                                 CFLAGS="-I${prefix}/include" \
    43                                 LDFLAGS="-L${prefix}/lib"
     43                CFLAGS="-I${prefix}/include" \
     44                LDFLAGS="-L${prefix}/lib"
     45
    4446configure.args  --mandir=${prefix}/share/man \
    45                                 --with-libiconv-prefix=${prefix} \
    46                                 --with-libjpeg \
    47                                 --with-libtiff \
    48                                 --with-libpng \
    49                                 --with-zlib \
    50                                 --with-sdl \
    51                                 --with-opengl \
    52                                 --with-mac \
    53                                 --disable-sdltest \
    54                                 --enable-unicode \
    55                                 --enable-display \
    56                                 --enable-monolithic
     47                --with-libiconv-prefix=${prefix} \
     48                --with-libjpeg \
     49                --with-libtiff \
     50                --with-libpng \
     51                --with-zlib \
     52                --with-sdl \
     53                --with-opengl \
     54                --disable-sdltest \
     55                --enable-unicode \
     56                --enable-display \
     57                --enable-monolithic
     58
     59platform darwin 7 {
     60# OS 10.3.9, Xcode 1.5, and November2004gccupdater
     61# gcc version 3.3 20030304 (Apple Computer, Inc. build 1671)
     62# variant 'mac' (carbon):  QuickTime 7.0.1 and 7.0.3 tested
     63# variant 'cocoa':         QuickTime 7.0.1 and 7.0.4 tested
     64
     65        configure.env-append    CFLAGS="-I/usr/include" \
     66                                CXXFLAGS="-I/usr/include" \
     67                                LDFLAGS="-L${workpath}/build/lib"
     68}
    5769
    5870platform darwin 8 {
    5971        configure.env-append    CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0
    6072}
    6173
     74default_variants        +mac
     75
     76variant mac {
     77        configure.args-append   --with-mac \
     78                                --without-cocoa
     79}
     80
     81variant cocoa {
     82        configure.args-append   --with-cocoa \
     83                                --without-mac
     84        default_variants-delete +mac
     85}
     86
     87#variant gtk {}
     88#variant x11 {}
     89#variant motif {}
     90
     91
    6292set contrib             "animate gizmos stc"
    6393
    6494build.target
     
    73103                system "cd ${destroot.dir} && make -C contrib/src/${target} install ${destroot.destdir}"
    74104        }
    75105        xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
    76         xinstall -m 644 -W ${workpath}/${name}-${version} BuildCVS.txt CHANGES.txt \
     106        xinstall -m 644 -W ${workpath}/${worksrcdir} BuildCVS.txt CHANGES.txt \
    77107                COPYING.LIB INSTALL-MAC.txt INSTALL-MGL.txt INSTALL-MOTIF.txt \
    78108                INSTALL-OS2.txt INSTALL-X11.txt LICENCE.txt README-MAC.txt \
    79109                README-MGL.txt README-MOTIF.txt README-X11.txt README.txt \
     
    81111        system "cd ${destroot}${prefix}/bin && \
    82112                ln -sf ${prefix}/lib/wx/config/mac-unicode-release-2.6 wx-config"
    83113}
     114