commit:     77165b807efc2a976f20c98dd6e07c24aa349656
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Dec  3 15:16:40 2017 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Dec  3 15:17:11 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77165b80

dev-libs/icu: add Prefix support

Package-Manager: Portage-2.3.13, Repoman-2.3.3

 dev-libs/icu/Manifest                    |  4 +--
 dev-libs/icu/files/icu-58.2-darwin.patch | 55 ++++++++++++++++++++++++++++++++
 dev-libs/icu/icu-58.2-r1.ebuild          | 15 ++++++++-
 dev-libs/icu/icu-60.1.ebuild             |  9 +++++-
 4 files changed, 79 insertions(+), 4 deletions(-)

diff --git a/dev-libs/icu/Manifest b/dev-libs/icu/Manifest
index 25e55a75ffb..2fb7f8b34c1 100644
--- a/dev-libs/icu/Manifest
+++ b/dev-libs/icu/Manifest
@@ -1,4 +1,4 @@
-DIST icu4c-58_1-src.tgz 23366443 SHA256 
0eb46ba3746a9c2092c8ad347a29b1a1b4941144772d13a88667a7b11ea30309 SHA512 
59b2a76834192a35125fda326587e613ef4486152cf0278c6f22568d4ae02c4b2d897efcea2654ef2b11bd1c3154aecd38cb68a70f69430736f343689f94c155
 WHIRLPOOL 
faf2624a83f0d6f874166b328522dc9c89088db2690433ab05e96371722b635b81fd5210c7e87fe8e5df6681e881cf10204832925b448552affe8c2f6c851e37
-DIST icu4c-58_2-src.tgz 23369902 SHA256 
2b0a4410153a9b20de0e20c7d8b66049a72aef244b53683d0d7521371683da0c SHA512 
5c21af748f48b392e6c0412bd0aee92162ea931820dcbfab4ec6e0299868504b303d88f7586cc95de55c777ac0dca3a29d6c8ca0892c646ebc864c8a5b5a162a
 WHIRLPOOL 
25829f8ee870b703fd604ae5b9b584390a142f5011e2a5db18332453e2f1640d81270086f243318eeb93f187b04ea23dab14901ab81c8d924c8d47b1f77aee5a
+DIST icu4c-58_1-src.tgz 23366443 BLAKE2B 
16f1c778d925893769c6e0f0901fe02e57289535a25edd8ee8c96bdf4551499ead2c75d0f7e733fb89d1670c5065f1e8013ebe14cbdc34881a67452e622cd990
 SHA512 
59b2a76834192a35125fda326587e613ef4486152cf0278c6f22568d4ae02c4b2d897efcea2654ef2b11bd1c3154aecd38cb68a70f69430736f343689f94c155
+DIST icu4c-58_2-src.tgz 23369902 BLAKE2B 
cdd2e02c3aba050f5b7f8b38c5a3731e3e5f1cc1403ef86a50908b95560ea3cf8a2d47119fa60cf34f22a8b65eaa2392fd5bcbd3bc48b3da541fe3d9bd7392c0
 SHA512 
5c21af748f48b392e6c0412bd0aee92162ea931820dcbfab4ec6e0299868504b303d88f7586cc95de55c777ac0dca3a29d6c8ca0892c646ebc864c8a5b5a162a
 DIST icu4c-59_1-src.tgz 22706578 SHA256 
7132fdaf9379429d004005217f10e00b7d2319d0fea22bdfddef8991c45b75fe SHA512 
9348aa68d72a74cd1f26588c30c80eee1b48800a26930d7eb0749390fd65f7930ee8843058b6a6dd5f265e79054fef661e807ded16a1ad691cbc5ebc5ab944c4
 WHIRLPOOL 
f213951e98b7e1b59a3caf193f671fd9dff9a77c49aa3c4c118d6e3414688830ffb029d5c01495b369d4e666ab38669340a4c24a26f93742a99145972e20ede0
 DIST icu4c-60_1-src.tgz 23296064 BLAKE2B 
4f90c1f4f00b686d2632429fbaa6a6ec3d977e414f8d00cf82a525a1504c9d8c9b1a19458b495e5847abbcfff933038752f96d6bd165d206582f8ec1b77fff40
 SHA512 
a6798f70add1b3bac2197a49e09a0bb636279af7019ce572f63a30ab713e09657ee9d9b20aac7ea806fbb84667ca2eca981411e5053b47c3c705aa496a669233

diff --git a/dev-libs/icu/files/icu-58.2-darwin.patch 
b/dev-libs/icu/files/icu-58.2-darwin.patch
new file mode 100644
index 00000000000..e5a9000a346
--- /dev/null
+++ b/dev-libs/icu/files/icu-58.2-darwin.patch
@@ -0,0 +1,55 @@
+same as 4.7, but retargetted to apply with eapply
+
+--- a/config/mh-darwin
++++ b/config/mh-darwin
+@@ -4,6 +4,13 @@
+ ## Copyright (c) 1999-2011 International Business Machines Corporation and
+ ## others. All Rights Reserved.
+ 
++
++SO_TARGET = $(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO)
++FINAL_SO_TARGET = 
$(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO_TARGET_VERSION).$(SO)
++MIDDLE_SO_TARGET = 
$(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO_TARGET_VERSION_MAJOR).$(SO)
++
++IS_DARWIN = yes
++
+ ## Flags for position independent code
+ SHAREDLIBCFLAGS = -dynamic
+ SHAREDLIBCXXFLAGS = -dynamic
+@@ -28,7 +35,7 @@
+ ifeq ($(ENABLE_RPATH),YES)
+ LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) 
-Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(libdir)/$(notdir 
$(MIDDLE_SO_TARGET))
+ else
+-LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) 
-Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(notdir 
$(MIDDLE_SO_TARGET))
++LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) 
-Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(libdir)/$(notdir 
$(MIDDLE_SO_TARGET))
+ endif
+ 
+ ## Compiler switch to embed a runtime search path
+--- a/stubdata/Makefile.in
++++ b/stubdata/Makefile.in
+@@ -32,7 +32,11 @@
+ 
+ 
+ ifneq ($(ENABLE_SHARED),)
++ifeq ($(IS_DARWIN),)
+ SO_TARGET = 
$(STUBDATA_LIBDIR)$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX)$(STUB_SUFFIX).$(SO)
++else
++SO_TARGET = 
$(LIBDIR)/$(STUBDATA_LIBDIR)$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX)$(STUB_SUFFIX).$(SO)
++endif
+ ALL_SO_TARGETS = $(FINAL_SO_TARGET) $(MIDDLE_SO_TARGET) $(SO_TARGET) 
$(BATCH_STUB_TARGET) $(SHARED_OBJECT)
+ endif
+ 
+--- a/tools/ctestfw/Makefile.in
++++ b/tools/ctestfw/Makefile.in
+@@ -31,7 +31,11 @@
+ endif
+ 
+ ifneq ($(ENABLE_SHARED),)
++ifeq ($(IS_DARWIN),)
+ SO_TARGET = $(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO)
++else
++SO_TARGET = $(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO)
++endif
+ ALL_SO_TARGETS = $(SO_TARGET) $(MIDDLE_SO_TARGET) $(FINAL_SO_TARGET) 
$(SHARED_OBJECT)
+ endif
+ 

diff --git a/dev-libs/icu/icu-58.2-r1.ebuild b/dev-libs/icu/icu-58.2-r1.ebuild
index 1eaa578e41b..cb2f808c5fc 100644
--- a/dev-libs/icu/icu-58.2-r1.ebuild
+++ b/dev-libs/icu/icu-58.2-r1.ebuild
@@ -13,7 +13,7 @@ LICENSE="BSD"
 
 SLOT="0/${PV}"
 
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh 
sparc x86 ~amd64-fbsd ~x86-fbsd"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh 
sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos 
~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
 IUSE="debug doc examples static-libs"
 
 DEPEND="
@@ -34,6 +34,7 @@ PATCHES=(
        "${FILESDIR}/${PN}-58.1-iterator.patch"
        "${FILESDIR}/${PN}-58.2-CVE-2017-7867.patch"
        "${FILESDIR}/${PN}-58.2-glibc226.patch"
+       "${FILESDIR}/${PN}-58.2-darwin.patch"
 )
 
 pkg_pretend() {
@@ -66,6 +67,12 @@ src_prepare() {
                -e 's:icudefs.mk:icudefs.mk Doxyfile:' \
                configure.ac || die
 
+       # Fix compilation on Solaris due to enabling of conflicting standards
+       if [[ ${CHOST} == *-solaris* ]] ; then
+               sed -i -e '/define _XOPEN_SOURCE_EXTENDED/s/_XOPEN/no_XOPEN/' \
+                       common/uposixdefs.h || die
+       fi
+
        eautoreconf
 }
 
@@ -116,6 +123,12 @@ multilib_src_configure() {
        # icu tries to use clang by default
        tc-export CC CXX
 
+       # make sure we configure with the same shell as we run icu-config
+       # with, or ECHO_N, ECHO_T and ECHO_C will be wrongly defined
+       export CONFIG_SHELL=${EPREFIX}/bin/sh
+       # probably have no /bin/sh in prefix-chain
+       [[ -x ${CONFIG_SHELL} ]] || CONFIG_SHELL=${BASH}
+
        ECONF_SOURCE=${S} \
        econf "${myeconfargs[@]}"
 }

diff --git a/dev-libs/icu/icu-60.1.ebuild b/dev-libs/icu/icu-60.1.ebuild
index c8f9ddca172..773d5b35d4b 100644
--- a/dev-libs/icu/icu-60.1.ebuild
+++ b/dev-libs/icu/icu-60.1.ebuild
@@ -13,7 +13,7 @@ LICENSE="BSD"
 
 SLOT="0/${PV}"
 
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-aix ~amd64-linux ~x86-linux 
~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris 
~x86-winnt"
 IUSE="debug doc examples static-libs"
 
 DEPEND="
@@ -31,6 +31,7 @@ MULTILIB_CHOST_TOOLS=(
 
 PATCHES=(
        "${FILESDIR}/${PN}-58.1-remove-bashisms.patch"
+       "${FILESDIR}/${PN}-58.2-darwin.patch"
 )
 
 pkg_pretend() {
@@ -113,6 +114,12 @@ multilib_src_configure() {
        # icu tries to use clang by default
        tc-export CC CXX
 
+       # make sure we configure with the same shell as we run icu-config
+       # with, or ECHO_N, ECHO_T and ECHO_C will be wrongly defined
+       export CONFIG_SHELL=${EPREFIX}/bin/sh
+       # probably have no /bin/sh in prefix-chain
+       [[ -x ${CONFIG_SHELL} ]] || CONFIG_SHELL=${BASH}
+
        ECONF_SOURCE=${S} \
        econf "${myeconfargs[@]}"
 }

Reply via email to