Ticket #23773: icu442-universal.diff
File icu442-universal.diff, 5.0 KB (added by takanori@…, 14 years ago) |
---|
-
files/patch-universal.diff
1 --- Makefile.in.orig 2010-09-30 03:38:38.000000000 +0900 2 +++ Makefile.in 2010-12-01 06:16:12.000000000 +0900 3 @@ -137,13 +137,13 @@ 4 $(INSTALL_SCRIPT) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(pkgdatadir)/mkinstalldirs 5 $(INSTALL_SCRIPT) $(top_srcdir)/install-sh $(DESTDIR)$(pkgdatadir)/install-sh 6 $(INSTALL_DATA) $(top_srcdir)/../license.html $(DESTDIR)$(pkgdatadir)/license.html 7 - $(INSTALL_SCRIPT) $(top_builddir)/config/icu-config $(DESTDIR)$(bindir)/icu-config 8 - $(INSTALL_DATA) $(top_builddir)/config/Makefile.inc $(DESTDIR)$(pkglibdir)/Makefile.inc 9 - $(INSTALL_DATA) $(top_builddir)/config/pkgdata.inc $(DESTDIR)$(pkglibdir)/pkgdata.inc 10 + $(INSTALL_SCRIPT) $(top_builddir)/config/icu-config $(DESTDIR)$(bindir)/icu-config-__ARCH__ 11 + $(INSTALL_DATA) $(top_builddir)/config/Makefile.inc $(DESTDIR)$(pkglibdir)/Makefile-__ARCH__.inc 12 + $(INSTALL_DATA) $(top_builddir)/config/pkgdata.inc $(DESTDIR)$(pkglibdir)/pkgdata-__ARCH__.inc 13 cd $(DESTDIR)$(pkglibdir)/..; \ 14 $(RM) current && ln -s $(VERSION) current; \ 15 - $(RM) Makefile.inc && ln -s current/Makefile.inc Makefile.inc; \ 16 - $(RM) pkgdata.inc && ln -s current/pkgdata.inc pkgdata.inc 17 +# $(RM) Makefile.inc && ln -s current/Makefile.inc Makefile.inc; \ 18 +# $(RM) pkgdata.inc && ln -s current/pkgdata.inc pkgdata.inc 19 20 ifeq ($(DOXYGEN),) 21 install-doc: -
Portfile
7 7 name icu 8 8 set my_name icu4c 9 9 version 4.4.2 10 revision 110 revision 2 11 11 categories devel textproc 12 12 platforms darwin freebsd 13 13 maintainers nox openmaintainer … … 38 38 set docdir ${prefix}/share/doc/${name} 39 39 40 40 if {[variant_isset universal]} { 41 patchfiles-append patch-universal.diff 41 42 set merger_must_run_binaries yes 42 43 } 43 44 … … 61 62 configure.cppflags 62 63 configure.ldflags 63 64 65 post-configure { 66 if {[variant_isset universal]} { 67 # Ticket #23773 68 foreach arch ${universal_archs_to_use} { 69 reinplace "s|__ARCH__|${arch}|g" ${worksrcpath}-${arch}/Makefile 70 } 71 } 72 } 73 64 74 build.type gnu 65 75 66 76 use_parallel_build yes … … 68 78 test.run yes 69 79 test.target check 70 80 71 post-build { 81 post-destroot { 82 xinstall -d ${destroot}${docdir} 83 eval xinstall -m 0644 [glob ${worksrcpath}/../*.{css,html,txt}] ${destroot}${docdir} 84 72 85 if {[variant_isset universal]} { 73 set dirs {}86 # Ticket #23773 74 87 foreach arch ${universal_archs_to_use} { 75 lappend dirs ${worksrcpath}-${arch} 88 reinplace "s|/Makefile.inc|/Makefile-${arch}.inc|g" ${destroot}${prefix}/bin/icu-config-${arch} 89 reinplace "s|/pkgdata.inc|/pkgdata-${arch}.inc|g" ${destroot}${prefix}/bin/icu-config-${arch} 76 90 } 77 } else {78 set dirs ${worksrcpath}91 ln -s current/Makefile.inc ${destroot}${prefix}/lib/icu/Makefile.inc 92 ln -s current/pkgdata.inc ${destroot}${prefix}/lib/icu/pkgdata.inc 79 93 } 80 foreach dir ${dirs} { 81 reinplace -E {s|-arch [a-z0-9_]+||g} \ 82 ${dir}/config/icu-config \ 83 ${dir}/config/Makefile.inc \ 84 ${dir}/config/pkgdata.inc 94 } 95 96 post-activate { 97 if {[variant_isset universal]} { 98 # Ticket #23773 99 set a ${configure.build_arch} 100 if {$a == "ppc64"} { 101 if {![file exists ${prefix}/bin/icu-config-${a}]} { 102 set a "ppc" 103 } 104 } elseif {$a == "x86_64"} { 105 if {![file exists ${prefix}/bin/icu-config-${a}]} { 106 set a "i386" 107 if {![file exists ${prefix}/bin/icu-config-${a}]} { 108 set a "ppc" 109 } 110 } 111 } elseif {$a == "i386"} { 112 if {![file exists ${prefix}/bin/icu-config-${a}]} { 113 set a "ppc" 114 } 115 } 116 foreach {p q} [list "${prefix}/bin/icu-config-${a}" "${prefix}/bin/icu-config" \ 117 "${prefix}/lib/icu/${version}/Makefile-${a}.inc" "${prefix}/lib/icu/${version}/Makefile.inc" \ 118 "${prefix}/lib/icu/${version}/pkgdata-${a}.inc" "${prefix}/lib/icu/${version}/pkgdata.inc"] { 119 ln -s ${p} ${q} 120 } 85 121 } 86 122 } 87 123 88 post-destroot { 89 xinstall -d ${destroot}${docdir} 90 eval xinstall -m 0644 [glob ${worksrcpath}/../*.{css,html,txt}] ${destroot}${docdir} 124 post-deactivate { 125 if {[variant_isset universal]} { 126 # Ticket #23773 127 foreach f [list "${prefix}/bin/icu-config" \ 128 "${prefix}/lib/icu/${version}/Makefile.inc" \ 129 "${prefix}/lib/icu/${version}/pkgdata.inc"] { 130 delete ${f} 131 } 132 } 91 133 } 92 134 93 135 # The official doc archive seems to be a bit incomplete.