| 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 | |
| 50 | set diff_format_shell_ppc {--old-group-format='if test "x$TARGET_ARCH" != "xppc64"; then |
| 51 | %<fi |
| 52 | ' --new-group-format='if test "x$TARGET_ARCH" = "xppc64"; then |
| 53 | %>fi |
| 54 | ' --unchanged-group-format='%=' --changed-group-format='if test "x$TARGET_ARCH" = "xppc64"; then |
| 55 | %>else |
| 56 | %<fi |
| 57 | '} |
| 58 | |
| 59 | set diff_format_make_ppc {--old-group-format='ifneq ($(TARGET_ARCH), ppc64) |
| 60 | %<endif |
| 61 | ' --new-group-format='ifeq ($(TARGET_ARCH), ppc64) |
| 62 | %>endif |
| 63 | ' --unchanged-group-format='%=' --changed-group-format='ifeq ($(TARGET_ARCH), ppc64) |
| 64 | %>else |
| 65 | %<endif |
| 66 | '} |
| 67 | |
| 68 | set diff_format_shell_intel {--old-group-format='if test "x$TARGET_ARCH" != "xx86_64"; then |
| 69 | %<fi |
| 70 | ' --new-group-format='if test "x$TARGET_ARCH" = "xx86_64"; then |
| 71 | %>fi |
| 72 | ' --unchanged-group-format='%=' --changed-group-format='if test "x$TARGET_ARCH" = "xx86_64"; then |
| 73 | %>else |
| 74 | %<fi |
| 75 | '} |
| 76 | |
| 77 | set diff_format_make_intel {--old-group-format='ifneq ($(TARGET_ARCH), x86_64) |
| 78 | %<endif |
| 79 | ' --new-group-format='ifeq ($(TARGET_ARCH), x86_64) |
| 80 | %>endif |
| 81 | ' --unchanged-group-format='%=' --changed-group-format='ifeq ($(TARGET_ARCH), x86_64) |
| 82 | %>else |
| 83 | %<endif |
| 84 | '} |
| 85 | |
| 86 | post-destroot { |
| 87 | if {[variant_isset universal]} { |
| 88 | foreach fl ${merger_dont_diff} { |
| 89 | set fl [subst ${fl}] |
| 90 | if { ${os.arch}=="i386" } { |
| 91 | set fl64 [regsub {/([^/]*)$} ${fl} [subst -nobackslashes {/x86_64-\1}]] |
| 92 | set fl32 [regsub {/([^/]*)$} ${fl} [subst -nobackslashes {/i386-\1}]] |
| 93 | if { [file exists ${fl32}] && [file exists ${fl64}] } { |
| 94 | if { [string match {*.mk} ${fl}] } { |
| 95 | system "/usr/bin/diff -d ${diff_format_make_intel} ${destroot}${fl32} ${destroot}${fl64} > ${destroot}${fl}; test \$? -le 1" |
| 96 | } else { |
| 97 | system "/usr/bin/diff -d ${diff_format_shell_intel} ${destroot}${fl32} ${destroot}${fl64} > ${destroot}${fl}; test \$? -le 1" |
| 98 | } |
| 99 | } |
| 100 | } else { |
| 101 | set fl64 [regsub {/([^/]*)$} ${fl} [subst -nobackslashes {/ppc64-\1}]] |
| 102 | set fl32 [regsub {/([^/]*)$} ${fl} [subst -nobackslashes {/ppc-\1}]] |
| 103 | if { [file exists ${fl32}] && [file exists ${fl64}] } { |
| 104 | if { [string match {*.mk} ${fl}] } { |
| 105 | system "/usr/bin/diff -d ${diff_format_make_ppc} ${destroot}${fl32} ${destroot}${fl64} > ${destroot}${fl}; test \$? -le 1" |
| 106 | } else { |
| 107 | system "/usr/bin/diff -d ${diff_format_shell_ppc} ${destroot}${fl32} ${destroot}${fl64} > ${destroot}${fl}; test \$? -le 1" |
| 108 | } |
| 109 | } |
| 110 | } |
| 111 | } |
| 112 | } |
| 113 | } |
| 114 | |