Ticket #21496: Portfile.diff

File Portfile.diff, 1.7 KB (added by Veence (Vincent), 15 years ago)

portfile patch

  • Portfile

    old new  
    6666    --enable-unicode \
    6767    --enable-display \
    6868    --enable-monolithic
     69   
     70variant universal description {builds 32/64-bit Cocoa version} {
     71        configure.args-delete --with-sdl
     72        configure.args-append   --without-sdl
     73        configure.args-delete   --with-mac
     74        configure.args-append   --with-osx_cocoa
     75        configure.args-append --with-macosx-version-min=10.5
     76       
     77        depends_lib-delete              port:libsdl
     78        depends_lib-delete              port:libsdl_mixer
     79}
    6980
    7081set installtype         release
    7182#set contrib            "gizmos stc ogl"
    7283
    7384build.target
    7485
     86post-configure {
     87        if {[variant_isset universal]} {
     88                system "cd ${worksrcpath} && \
     89                        patch < ${filespath}/patch_bk_make_pch.diff"
     90                system "cd ${worksrcpath}/../src/osx/cocoa && \
     91                        patch < ${filespath}/patch_textctrl_mm.diff"
     92                reinplace -E "s|^(OBJCXXFLAGS =.*)|\\1 ${configure.universal_cflags}|" \
     93                        ${worksrcpath}/Makefile
     94        }
     95}
     96
    7597#post-build {
    7698#    foreach c { ${contrib} } {
    7799#       system "cd ${build.dir} && make -C contrib/src/${c}"
     
    89111#       readme-gtk.txt readme-mac.txt \
    90112#       readme-mgl.txt readme-motif.txt readme-x11.txt \
    91113#       ${destroot}${prefix}/share/doc/${name}
    92     reinplace "s|-L${build.dir}/lib||" ${destroot}${prefix}/lib/${sub}/wx/config/osx_carbon-unicode-${installtype}-2.9
     114    if {[variant_isset universal]} {
     115        reinplace "s|-L${build.dir}/lib||" ${destroot}${prefix}/lib/${sub}/wx/config/osx_cocoa-unicode-${installtype}-2.9
     116    } else {
     117        reinplace "s|-L${build.dir}/lib||" ${destroot}${prefix}/lib/${sub}/wx/config/osx_carbon-unicode-${installtype}-2.9
     118    }
    93119}
    94120
    95121variant nonmonolithic description {build libraries separately} {