Ticket #17558: macports-17558-test.diff

File macports-17558-test.diff, 7.3 KB (added by david@…, 16 years ago)

Patch against ports tree according to comment 46.

  • devel/openssl/Portfile

    diff --unidirectional-new-file -ru -x PortIndex ports.orig/devel/openssl/Portfile ports.test/devel/openssl/Portfile
    old new  
    6868        }
    6969
    7070        configure {
     71                # Save configure.universal_archs because we modify it before
     72                # each invocation of Configure.
     73                set tmp_universal_archs ${configure.universal_archs}
    7174                foreach arch ${universal_archs} {
     75                        # We configure for one arch at a time.
     76                        configure.universal_archs ${arch}
    7277                        if { [string first 64 $arch] == -1 } {
    7378                                set my_cc "darwin-${arch}-cc"
    7479                        } else {
     
    7984                                }
    8085                        }
    8186                        system "cd ${workpath}/${arch} && ./Configure ${my_cc} ${configure.pre_args} ${configure.args}"
     87                        reinplace "s|^\\(CFLAG=.*\\)|\\1 ${configure.cflags} ${configure.universal_cflags}|" \
     88                                ${workpath}/${arch}/Makefile
     89                        reinplace "s|^\\(SHARED_LDFLAGS=.*\\)|\\1 ${configure.ldflags} ${configure.universal_ldflags}|" \
     90                                ${workpath}/${arch}/Makefile \
     91                                ${workpath}/${arch}/Makefile.shared
    8292                }
     93                # Restore configure.universal_archs.
     94                configure.universal_archs $tmp_universal_archs
    8395        }
    8496
    8597        build {
  • graphics/cairo/Portfile

    diff --unidirectional-new-file -ru -x PortIndex ports.orig/graphics/cairo/Portfile ports.test/graphics/cairo/Portfile
    old new  
    6767    --enable-xlib-xrender \
    6868    --with-x
    6969
     70# This block helps us link correctly and setup our pc files correctly when we are
     71# +system_x11 and x11prefix is somewhere non-standard
     72if { ![file exists ${prefix}/lib/pkgconfig/x11.pc] && ![file exists ${x11prefix}/lib/pkgconfig/x11.pc] } {
     73    # AC_X_PATH blindly asks xmkmf where X11 is, and it always uses /usr/X11R6.
     74    # These next three lines should cause AC_X_PATH to let us setup our CPPFLAGS
     75    # and LDFLAGS without interference
     76    configure.args-append --x-include=${prefix}/include --x-lib=${prefix}/lib
     77    configure.cppflags-append -I${x11prefix}/include
     78    configure.ldflags-append  -L${x11prefix}/lib
     79   
     80    # And this will similarly get ports that use pkgconfig to find our pkgconfig-less libX11
     81    post-destroot {
     82        foreach pc [glob ${destroot}${prefix}/lib/pkgconfig/*.pc] {
     83            reinplace "s:-lX11:-L${prefix}/lib -L${x11prefix}/lib -lX11:g" ${pc}
     84        }
     85    }
     86}
     87
    7088variant glitz conflicts no_x11 description {Add glitz graphics interface} {
    7189    depends_lib-append \
    7290        port:glitz
     
    149167    }
    150168   
    151169    configure {
     170        # Save configure.universal_archs because we modify it before each
     171        # invocation of Configure.
     172        set tmp_universal_archs ${configure.universal_archs}
    152173        foreach arch ${universal_archs} {
    153             set my_arch_flag "-arch ${arch}"
    154             set my_cflags "${configure.cflags} -isysroot ${sysroot} ${my_arch_flag}"
    155             set my_ldflags "${configure.ldflags} ${my_arch_flag}"
    156             system "cd ${workpath}/${arch} && CFLAGS=\"${my_cflags}\" CXXFLAGS=\"${my_cflags}\" LDFLAGS=\"${my_ldflags}\" ${configure.cmd} ${configure.pre_args} ${configure.args}"
     174            # We configure for one arch at a time.
     175            configure.universal_archs ${arch}
     176            system "cd ${workpath}/${arch} && CPPFLAGS=\"${configure.cppflags} ${configure.universal_cppflags}\" CFLAGS=\"${configure.cflags} ${configure.universal_cflags}\" CXXFLAGS=\"${configure.cflags} ${configure.universal_cxxflags}\" LDFLAGS=\"${configure.ldflags} ${configure.universal_ldflags}\" ${configure.cmd} ${configure.pre_args} ${configure.args} ${configure.universal_args}"
    157177        }
     178        # Restore configure.universal_archs.
     179        configure.universal_archs $tmp_universal_archs
    158180    }
    159181   
    160182    build {
  • python/py25-py2app-devel/Portfile

    diff --unidirectional-new-file -ru -x PortIndex ports.orig/python/py25-py2app-devel/Portfile ports.test/python/py25-py2app-devel/Portfile
    old new  
    2626
    2727depends_lib-append  port:py25-setuptools \
    2828                    port:py25-altgraph \
    29                     path:${prefix}${apymacholibfile}:py25-macholib \
     29                    port:py25-macholib-devel \
    3030                    port:py25-modulegraph-devel \
    3131                    port:py25-bdist_mpkg
    3232
  • x11/gtk2/Portfile

    diff --unidirectional-new-file -ru -x PortIndex ports.orig/x11/gtk2/Portfile ports.test/x11/gtk2/Portfile
    old new  
    105105    system "${prefix}/bin/gdk-pixbuf-query-loaders >${prefix}/etc/gtk-2.0/gdk-pixbuf.loaders"
    106106}
    107107
     108# This block helps us link correctly and setup our pc files correctly when we are
     109# +system_x11 and x11prefix is somewhere non-standard
     110if { ![file exists ${prefix}/lib/pkgconfig/x11.pc] && ![file exists ${x11prefix}/lib/pkgconfig/x11.pc] } {
     111    # AC_X_PATH blindly asks xmkmf where X11 is, and it always uses /usr/X11R6.
     112    # These next three lines should cause AC_X_PATH to let us setup our CPPFLAGS
     113    # and LDFLAGS without interference
     114    configure.args-append --x-include=${prefix}/include --x-lib=${prefix}/lib
     115    configure.cppflags-append -I${x11prefix}/include
     116    configure.ldflags-append  -L${x11prefix}/lib
     117   
     118    # And this will similarly get ports that use pkgconfig to find our pkgconfig-less libX11
     119    post-destroot {
     120        foreach pc [glob ${destroot}${prefix}/lib/pkgconfig/*.pc] {
     121            reinplace "s:-lX11:-L${prefix}/lib -L${x11prefix}/lib -lX11:g" ${pc}
     122        }
     123    }
     124}
     125
    108126platform darwin 7 {
    109127    depends_build-append    port:cups-headers
    110128}
  • x11/pango/Portfile

    diff --unidirectional-new-file -ru -x PortIndex ports.orig/x11/pango/Portfile ports.test/x11/pango/Portfile
    old new  
    5858
    5959configure.ldflags-append \
    6060    -no-undefined \
    61     -bind_at_load
     61    -bind_at_load \
     62    "-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
    6263
    6364configure.args \
    6465    --enable-static
    6566
     67# This block helps us link correctly and setup our pc files correctly when we are
     68# +system_x11 and x11prefix is somewhere non-standard
     69if { ![file exists ${prefix}/lib/pkgconfig/x11.pc] && ![file exists ${x11prefix}/lib/pkgconfig/x11.pc] } {
     70    # AC_X_PATH blindly asks xmkmf where X11 is, and it always uses /usr/X11R6.
     71    # These next three lines should cause AC_X_PATH to let us setup our CPPFLAGS
     72    # and LDFLAGS without interference
     73    configure.args-append --x-include=${prefix}/include --x-lib=${prefix}/lib
     74    configure.cppflags-append -I${x11prefix}/include
     75    configure.ldflags-append  -L${x11prefix}/lib
     76   
     77    # And this will similarly get ports that use pkgconfig to find our pkgconfig-less libX11
     78    post-destroot {
     79        foreach pc [glob ${destroot}${prefix}/lib/pkgconfig/*.pc] {
     80            reinplace "s:-lX11:-L${prefix}/lib -L${x11prefix}/lib -lX11:g" ${pc}
     81        }
     82    }
     83}
     84
    6685variant no_x11 {
    6786    depends_lib-delete \
    6887        lib:libXft.2:Xft2