Ticket #17090: apr-universal.patch
File apr-universal.patch, 8.0 KB (added by mtalexander (Mike Alexander), 16 years ago) |
---|
-
dports/devel/apr/Portfile
1 1 # $Id$ 2 2 3 3 PortSystem 1.0 4 PortGroup muniversal 1.0 4 5 5 6 name apr 6 7 version 1.3.3 … … 34 35 use_parallel_build no 35 36 } 36 37 38 # configure script expects to be able to run binaries 39 if { ${os.arch}=="i386" } { 40 set universal_archs_supported "i386 x86_64" 41 } else { 42 set universal_archs_supported "ppc ppc64" 43 } 44 45 set merger_dont_diff "${prefix}/bin/apr-1-config \ 46 ${prefix}/share/apr-1/build/apr_rules.mk \ 47 ${prefix}/share/apr-1/build/libtool" 48 49 # Don't append "-m32" or "-m64" to compiler command itself (only to the args) or libtool 50 # won't work. 51 set merger_arch_compiler "no" 52 53 set diff_format_shell_ppc {--old-group-format='if test "x$TARGET_ARCH" != "xppc64"; then 54 %<fi 55 ' --new-group-format='if test "x$TARGET_ARCH" = "xppc64"; then 56 %>fi 57 ' --unchanged-group-format='%=' --changed-group-format='if test "x$TARGET_ARCH" = "xppc64"; then 58 %>else 59 %<fi 60 '} 61 62 set diff_format_make_ppc {--old-group-format='ifneq ($(TARGET_ARCH), ppc64) 63 %<endif 64 ' --new-group-format='ifeq ($(TARGET_ARCH), ppc64) 65 %>endif 66 ' --unchanged-group-format='%=' --changed-group-format='ifeq ($(TARGET_ARCH), ppc64) 67 %>else 68 %<endif 69 '} 70 71 set diff_format_shell_intel {--old-group-format='if test "x$TARGET_ARCH" != "xx86_64"; then 72 %<fi 73 ' --new-group-format='if test "x$TARGET_ARCH" = "xx86_64"; then 74 %>fi 75 ' --unchanged-group-format='%=' --changed-group-format='if test "x$TARGET_ARCH" = "xx86_64"; then 76 %>else 77 %<fi 78 '} 79 80 set diff_format_make_intel {--old-group-format='ifneq ($(TARGET_ARCH), x86_64) 81 %<endif 82 ' --new-group-format='ifeq ($(TARGET_ARCH), x86_64) 83 %>endif 84 ' --unchanged-group-format='%=' --changed-group-format='ifeq ($(TARGET_ARCH), x86_64) 85 %>else 86 %<endif 87 '} 88 89 post-destroot { 90 if {[variant_isset universal]} { 91 foreach fl ${merger_dont_diff} { 92 set fl [subst ${fl}] 93 if { ${os.arch}=="i386" } { 94 set fl64 [regsub {/([^/]*)$} ${fl} [subst -nobackslashes {/x86_64-\1}]] 95 set fl32 [regsub {/([^/]*)$} ${fl} [subst -nobackslashes {/i386-\1}]] 96 if { [file exists ${destroot}${fl32}] && [file exists ${destroot}${fl64}] } { 97 if { [string match {*.mk} ${fl}] } { 98 system "/usr/bin/diff -d ${diff_format_make_intel} ${destroot}${fl32} ${destroot}${fl64} > ${destroot}${fl}; test \$? -le 1" 99 } else { 100 system "/usr/bin/diff -d ${diff_format_shell_intel} ${destroot}${fl32} ${destroot}${fl64} > ${destroot}${fl}; test \$? -le 1" 101 system "/bin/chmod a+x ${destroot}${fl}" 102 } 103 } 104 } else { 105 set fl64 [regsub {/([^/]*)$} ${fl} [subst -nobackslashes {/ppc64-\1}]] 106 set fl32 [regsub {/([^/]*)$} ${fl} [subst -nobackslashes {/ppc-\1}]] 107 ui_debug "fl64: $fl64, fl32: $fl32" 108 if { [file exists ${destroot}${fl32}] && [file exists ${destroot}${fl64}] } { 109 if { [string match {*.mk} ${fl}] } { 110 system "/usr/bin/diff -d ${diff_format_make_ppc} ${destroot}${fl32} ${destroot}${fl64} > ${destroot}${fl}; test \$? -le 1" 111 } else { 112 system "/usr/bin/diff -d ${diff_format_shell_ppc} ${destroot}${fl32} ${destroot}${fl64} > ${destroot}${fl}; test \$? -le 1" 113 system "/bin/chmod a+x ${destroot}${fl}" 114 } 115 } 116 } 117 } 118 } 119 } 120 37 121 livecheck.check regex 38 122 livecheck.url http://apache.org/dist/apr/ 39 123 livecheck.regex {<a href="#apr">APR (\d+(?:\.\d+)*) is the latest available version</a>} -
dports/devel/apr-util/Portfile
1 1 # $Id$ 2 2 3 3 PortSystem 1.0 4 PortGroup muniversal 1.0 4 5 5 6 name apr-util 6 7 version 1.3.4 … … 29 30 --with-iconv=${prefix} --with-berkeley-db=${prefix}/include:${prefix}/lib/db46 \ 30 31 --without-mysql --without-pgsql --with-sqlite3=${prefix} 31 32 33 array set merger_configure_env { 34 ppc TARGET_ARCH=ppc 35 i386 TARGET_ARCH=i386 36 ppc64 TARGET_ARCH=ppc64 37 x86_64 TARGET_ARCH=x86_64 38 } 39 40 array set merger_build_env { 41 ppc TARGET_ARCH=ppc 42 i386 TARGET_ARCH=i386 43 ppc64 TARGET_ARCH=ppc64 44 x86_64 TARGET_ARCH=x86_64 45 } 46 32 47 test.run yes 33 48 test.target check 34 49 test.env DYLD_LIBRARY_PATH=${worksrcpath}/.libs … … 36 51 use_parallel_build no 37 52 } 38 53 54 # No cross architecture universal binaries 55 if { ${os.arch}=="i386" } { 56 set universal_archs_supported "i386 x86_64" 57 } else { 58 set universal_archs_supported "ppc ppc64" 59 } 39 60 61 set merger_dont_diff "${prefix}/bin/apu-1-config" 62 63 64 set diff_format_shell_ppc {--old-group-format='if test "x$TARGET_ARCH" != "xppc64"; then 65 %<fi 66 ' --new-group-format='if test "x$TARGET_ARCH" = "xppc64"; then 67 %>fi 68 ' --unchanged-group-format='%=' --changed-group-format='if test "x$TARGET_ARCH" = "xppc64"; then 69 %>else 70 %<fi 71 '} 72 73 set diff_format_make_ppc {--old-group-format='ifneq ($(TARGET_ARCH), ppc64) 74 %<endif 75 ' --new-group-format='ifeq ($(TARGET_ARCH), ppc64) 76 %>endif 77 ' --unchanged-group-format='%=' --changed-group-format='ifeq ($(TARGET_ARCH), ppc64) 78 %>else 79 %<endif 80 '} 81 82 set diff_format_shell_intel {--old-group-format='if test "x$TARGET_ARCH" != "xx86_64"; then 83 %<fi 84 ' --new-group-format='if test "x$TARGET_ARCH" = "xx86_64"; then 85 %>fi 86 ' --unchanged-group-format='%=' --changed-group-format='if test "x$TARGET_ARCH" = "xx86_64"; then 87 %>else 88 %<fi 89 '} 90 91 set diff_format_make_intel {--old-group-format='ifneq ($(TARGET_ARCH), x86_64) 92 %<endif 93 ' --new-group-format='ifeq ($(TARGET_ARCH), x86_64) 94 %>endif 95 ' --unchanged-group-format='%=' --changed-group-format='ifeq ($(TARGET_ARCH), x86_64) 96 %>else 97 %<endif 98 '} 99 100 post-destroot { 101 if {[variant_isset universal]} { 102 foreach fl ${merger_dont_diff} { 103 set fl [subst ${fl}] 104 if { ${os.arch}=="i386" } { 105 set fl64 [regsub {/([^/]*)$} ${fl} [subst -nobackslashes {/x86_64-\1}]] 106 set fl32 [regsub {/([^/]*)$} ${fl} [subst -nobackslashes {/i386-\1}]] 107 if { [file exists ${destroot}${fl32}] && [file exists ${destroot}${fl64}] } { 108 if { [string match {*.mk} ${fl}] } { 109 system "/usr/bin/diff -d ${diff_format_make_intel} ${destroot}${fl32} ${destroot}${fl64} > ${destroot}${fl}; test \$? -le 1" 110 } else { 111 system "/usr/bin/diff -d ${diff_format_shell_intel} ${destroot}${fl32} ${destroot}${fl64} > ${destroot}${fl}; test \$? -le 1" 112 system "/bin/chmod a+x ${destroot}${fl}" 113 } 114 } 115 } else { 116 set fl64 [regsub {/([^/]*)$} ${fl} [subst -nobackslashes {/ppc64-\1}]] 117 set fl32 [regsub {/([^/]*)$} ${fl} [subst -nobackslashes {/ppc-\1}]] 118 ui_debug "fl64: $fl64, fl32: $fl32" 119 if { [file exists ${destroot}${fl32}] && [file exists ${destroot}${fl64}] } { 120 if { [string match {*.mk} ${fl}] } { 121 system "/usr/bin/diff -d ${diff_format_make_ppc} ${destroot}${fl32} ${destroot}${fl64} > ${destroot}${fl}; test \$? -le 1" 122 } else { 123 system "/usr/bin/diff -d ${diff_format_shell_ppc} ${destroot}${fl32} ${destroot}${fl64} > ${destroot}${fl}; test \$? -le 1" 124 system "/bin/chmod a+x ${destroot}${fl}" 125 } 126 } 127 } 128 } 129 } 130 } 131 132 133 40 134 variant no_bdb description {Build without BerkeleyDB support} { 41 135 depends_lib-delete port:db46 42 136 configure.args-delete --with-berkeley-db=${prefix}/include:${prefix}/lib/db46