diff options
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/icu/Manifest | 1 | ||||
-rw-r--r-- | dev-libs/icu/files/icu-remove-bashisms.patch | 230 | ||||
-rw-r--r-- | dev-libs/icu/icu-55.1.ebuild | 134 |
3 files changed, 365 insertions, 0 deletions
diff --git a/dev-libs/icu/Manifest b/dev-libs/icu/Manifest new file mode 100644 index 00000000..f600c9f2 --- /dev/null +++ b/dev-libs/icu/Manifest @@ -0,0 +1 @@ +DIST icu4c-55_1-src.tgz 25600847 SHA256 e16b22cbefdd354bec114541f7849a12f8fc2015320ca5282ee4fd787571457b SHA512 21a3eb2c3678cd27b659eed073f8f1bd99c9751291d077820e9a370fd90b7d9b3bf414cc03dec4acb7fa61087e02d04f9f40e91a32c5180c718e2102fbd0cd35 WHIRLPOOL 8c5221c82ee2c8a02beafd0fdf91e0038e49912cc8b05fb7437dd4d0a0204b97ea62c45c2dd9dde0f658620b772d706e795821865c567d2e1eb91f8b83a12c4a diff --git a/dev-libs/icu/files/icu-remove-bashisms.patch b/dev-libs/icu/files/icu-remove-bashisms.patch new file mode 100644 index 00000000..980d84b7 --- /dev/null +++ b/dev-libs/icu/files/icu-remove-bashisms.patch @@ -0,0 +1,230 @@ +Index: config/Makefile.inc.in +=================================================================== +--- config/Makefile.inc.in (revision 36912) ++++ config/Makefile.inc.in (working copy) +@@ -125,12 +125,6 @@ + # with usually. Many applications will want to add $(ICULIBS_I18N) as well. + ICULIBS = $(ICULIBS_BASE) $(ICULIBS_I18N) $(ICULIBS_COMMON) $(ICULIBS_DATA) + +-# Proper echo newline handling is needed in icu-config +-ECHO_N=@ICU_ECHO_N@ +-ECHO_C=@ICU_ECHO_C@ +-# Not currently being used but good to have for proper tab handling +-ECHO_T=@ICU_ECHO_T@ +- + ################################################################## + ################################################################## + # +Index: config/icu-config-bottom +=================================================================== +--- config/icu-config-bottom (revision 36912) ++++ config/icu-config-bottom (working copy) +@@ -217,73 +217,73 @@ + ;; + + --cflags) +- echo $ECHO_N "${CFLAGS} ${ECHO_C}" ++ printf "%s" "${CFLAGS} " + ;; + + --cc) +- echo $ECHO_N "${CC} ${ECHO_C}" ++ printf "%s" "${CC} " + ;; + + --cxx) +- echo $ECHO_N "${CXX} ${ECHO_C}" ++ printf "%s" "${CXX} " + ;; + + --cxxflags) +- echo $ECHO_N "${CXXFLAGS} ${ECHO_C}" ++ printf "%s" "${CXXFLAGS} " + ;; + + --cppflags) + # Don't echo the -I. - it's unneeded. +- echo $ECHO_N "${CPPFLAGS} ${ECHO_C}" | sed -e 's/-I. //' ++ printf "%s" "${CPPFLAGS} " | sed -e 's/-I. //' + ;; + + --cppflags-searchpath) +- echo $ECHO_N "-I${prefix}/include ${ECHO_C}" ++ printf "%s" "-I${prefix}/include " + ;; + + --cppflags-dynamic) +- echo $ECHO_N "${SHAREDLIBCPPFLAGS} ${ECHO_C}" ++ printf "%s" "${SHAREDLIBCPPFLAGS} " + ;; + + --cxxflags-dynamic) +- echo $ECHO_N "${SHAREDLIBCXXFLAGS} ${ECHO_C}" ++ printf "%s" "${SHAREDLIBCXXFLAGS} " + ;; + + --cflags-dynamic) +- echo $ECHO_N "${SHAREDLIBCFLAGS} ${ECHO_C}" ++ printf "%s" "${SHAREDLIBCFLAGS} " + ;; + + --ldflags-system) +- echo $ECHO_N "${LIBS} ${ECHO_C}" ++ printf "%s" "${LIBS} " + ;; + + --ldflags) +- echo $ECHO_N "${LDFLAGS} ${ICULIBS} ${ECHO_C}" ++ printf "%s" "${LDFLAGS} ${ICULIBS} " + # $RPATH_LDFLAGS + ;; + + --ldflags-libsonly) +- echo $ECHO_N "${ICULIBS_I18N} ${ICULIBS_COMMON} ${ICULIBS_DATA} ${ECHO_C}" ++ printf "%s" "${ICULIBS_I18N} ${ICULIBS_COMMON} ${ICULIBS_DATA} " + ;; + + --ldflags-icuio) +- echo $ECHO_N " ${ICULIBS_ICUIO} ${ECHO_C}" ++ printf "%s" " ${ICULIBS_ICUIO} " + ;; + + --ldflags-obsolete) +- echo $ECHO_N "${ICULIBS_OBSOLETE} ${ECHO_C}" ++ printf "%s" "${ICULIBS_OBSOLETE} " + ;; + + --ldflags-toolutil) +- echo $ECHO_N " ${ICULIBS_TOOLUTIL} ${ECHO_C}" ++ printf "%s" " ${ICULIBS_TOOLUTIL} " + ;; + + --ldflags-layout) +- echo $ECHO_N "${ICULIBS_LAYOUT} ${ICULIBS_LAYOUTEX} ${ECHO_C}" ++ printf "%s" "${ICULIBS_LAYOUT} ${ICULIBS_LAYOUTEX} " + ;; + + --ldflags-searchpath) +- echo $ECHO_N "-L${libdir} ${ECHO_C}" ++ printf "%s" "-L${libdir} " + ;; + + --detect-prefix) +@@ -319,47 +319,47 @@ + ;; + + --shared-datadir) +- echo $ECHO_N "${datadir} ${ECHO_C}" ++ printf "%s" "${datadir} " + ;; + + --incfile) +- echo $ECHO_N "${pkglibdir}/Makefile.inc ${ECHO_C}" ++ printf "%s" "${pkglibdir}/Makefile.inc " + ;; + + --incpkgdatafile) +- echo $ECHO_N "${pkglibdir}/pkgdata.inc ${ECHO_C}" ++ printf "%s" "${pkglibdir}/pkgdata.inc " + ;; + + --icudata) +- echo $ECHO_N "${ICUDATA_NAME} ${ECHO_C}" ++ printf "%s" "${ICUDATA_NAME} " + ;; + + --icudata-mode) +- echo $ECHO_N "${PKGDATA_MODE} ${ECHO_C}" ++ printf "%s" "${PKGDATA_MODE} " + ;; + + --icudata-install-dir) +- echo $ECHO_N "${ICUPKGDATA_DIR} ${ECHO_C}" ++ printf "%s" "${ICUPKGDATA_DIR} " + ;; + + --icudatadir) +- echo $ECHO_N "${ICUDATA_DIR} ${ECHO_C}" ++ printf "%s" "${ICUDATA_DIR} " + ;; + + --shlib-c) +- echo $ECHO_N "${SHLIB_c} ${ECHO_C}" ++ printf "%s" "${SHLIB_c} " + ;; + + --shlib-cc) +- echo $ECHO_N "${SHLIB_cc} ${ECHO_C}" ++ printf "%s" "${SHLIB_cc} " + ;; + + --version) +- echo $ECHO_N $VERSION ++ printf "%s" "$VERSION" + ;; + + --unicode-version) +- echo $ECHO_N $UNICODE_VERSION ++ printf "%s" "$UNICODE_VERSION" + ;; + + --host) +Index: configure.ac +=================================================================== +--- configure.ac (revision 36912) ++++ configure.ac (working copy) +@@ -19,24 +19,6 @@ + PACKAGE="icu" + AC_SUBST(PACKAGE) + +-# Use custom echo test for newline option +-# Current autoconf (2.65) gives incorrect echo newline option +-# for icu-config +-# This may be removed later - mow (June 17, 2010) +-ICU_ECHO_C= ICU_ECHO_N= ICU_ECHO_T= +-case `/bin/sh -c "echo -n x"` in +--n*) +- case `/bin/sh -c "echo 'x\c'"` in +- *c*) ICU_ECHO_T=' ';; # ECHO_T is single tab character. +- *) ICU_ECHO_C='\c';; +- esac;; +-*) +- ICU_ECHO_N='-n';; +-esac +-AC_SUBST(ICU_ECHO_N) +-AC_SUBST(ICU_ECHO_C) +-AC_SUBST(ICU_ECHO_T) +- + AC_MSG_CHECKING(for ICU version numbers) + + # Get the ICU version from uversion.h or other headers +Index: icudefs.mk.in +=================================================================== +--- icudefs.mk.in (revision 36912) ++++ icudefs.mk.in (working copy) +@@ -155,11 +155,6 @@ + ENABLE_STATIC = @ENABLE_STATIC@ + ENABLE_SHARED = @ENABLE_SHARED@ + +-# Echo w/o newline +- +-#ECHO_N = @ICU_ECHO_N@ +-#ECHO_C = @ICU_ECHO_C@ +- + # Commands to compile + COMPILE.c= $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c + COMPILE.cc= $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c +Index: test/hdrtst/Makefile.in +=================================================================== +--- test/hdrtst/Makefile.in (revision 36912) ++++ test/hdrtst/Makefile.in (working copy) +@@ -33,9 +33,6 @@ + include $(shell icu-config --incfile) + DIRS=$(prefix)/include/unicode + LDIRS=$(prefix)/include/layout +-ECHO_T=@ECHO_T@ +-ECHO_C=@ECHO_C@ +-ECHO_N=@ECHO_N@ + + all: + @echo Please read this Makefile for more information. diff --git a/dev-libs/icu/icu-55.1.ebuild b/dev-libs/icu/icu-55.1.ebuild new file mode 100644 index 00000000..896fda0d --- /dev/null +++ b/dev-libs/icu/icu-55.1.ebuild @@ -0,0 +1,134 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils flag-o-matic toolchain-funcs autotools multilib-minimal + +DESCRIPTION="International Components for Unicode" +HOMEPAGE="http://www.icu-project.org/" +SRC_URI="http://download.icu-project.org/files/icu4c/${PV/_/}/icu4c-${PV//./_}-src.tgz" + +LICENSE="BSD" + +SLOT="0/55" + +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd" +IUSE="debug doc examples static-libs" + +DEPEND=" + virtual/pkgconfig + doc? ( + app-doc/doxygen[dot] + ) +" + +S="${WORKDIR}/${PN}/source" + +MULTILIB_CHOST_TOOLS=( + /usr/bin/icu-config +) + +src_prepare() { + local variable + + epatch "${FILESDIR}/${PN}-remove-bashisms.patch" + epatch_user + + # Disable renaming as it is stupind thing to do + sed -i \ + -e "s/#define U_DISABLE_RENAMING 0/#define U_DISABLE_RENAMING 1/" \ + common/unicode/uconfig.h || die + + # Fix linking of icudata + sed -i \ + -e "s:LDFLAGSICUDT=-nodefaultlibs -nostdlib:LDFLAGSICUDT=:" \ + config/mh-linux || die + + # Append doxygen configuration to configure + sed -i \ + -e 's:icudefs.mk:icudefs.mk Doxyfile:' \ + configure.ac || die + + eautoreconf +} + +src_configure() { + # Do _not_ use C++11 yet, make sure to force GNU C++ 98 standard. + append-cxxflags -std=gnu++98 + + if tc-is-cross-compiler; then + mkdir "${WORKDIR}"/host || die + pushd "${WORKDIR}"/host >/dev/null || die + + CFLAGS="" CXXFLAGS="" ASFLAGS="" LDFLAGS="" \ + CC="$(tc-getBUILD_CC)" CXX="$(tc-getBUILD_CXX)" AR="$(tc-getBUILD_AR)" \ + RANLIB="$(tc-getBUILD_RANLIB)" LD="$(tc-getBUILD_LD)" \ + "${S}"/configure --disable-renaming --disable-debug \ + --disable-samples --enable-static || die + emake + + popd >/dev/null || die + fi + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local myeconfargs=( + --disable-renaming + --disable-samples + $(use_enable debug) + $(use_enable static-libs static) + ) + + multilib_is_native_abi && myeconfargs+=( + $(use_enable examples samples) + ) + tc-is-cross-compiler && myeconfargs+=( + --with-cross-build="${WORKDIR}"/host + ) + + # icu tries to use clang by default + tc-export CC CXX + + ECONF_SOURCE=${S} \ + econf "${myeconfargs[@]}" +} + +multilib_src_compile() { + default + + if multilib_is_native_abi && use doc; then + doxygen -u Doxyfile || die + doxygen Doxyfile || die + fi +} + +multilib_src_test() { + # INTLTEST_OPTS: intltest options + # -e: Exhaustive testing + # -l: Reporting of memory leaks + # -v: Increased verbosity + # IOTEST_OPTS: iotest options + # -e: Exhaustive testing + # -v: Increased verbosity + # CINTLTST_OPTS: cintltst options + # -e: Exhaustive testing + # -v: Increased verbosity + emake -j1 VERBOSE="1" check +} + +multilib_src_install() { + default + + if multilib_is_native_abi && use doc; then + dohtml -p api -r doc/html/ + fi +} + +multilib_src_install_all() { + einstalldocs + dohtml ../readme.html +} |