| 1 |
hwoarang |
1.1 |
# Copyright 1999-2012 Gentoo Foundation |
| 2 |
|
|
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
jer |
1.11 |
# $Header: /var/cvsroot/gentoo-x86/dev-libs/icu/icu-49.1.1-r1.ebuild,v 1.10 2012/06/03 17:18:36 armin76 Exp $ |
| 4 |
hwoarang |
1.1 |
|
| 5 |
|
|
EAPI="4" |
| 6 |
|
|
|
| 7 |
armin76 |
1.10 |
inherit eutils versionator flag-o-matic |
| 8 |
hwoarang |
1.1 |
|
| 9 |
|
|
MAJOR_VERSION="$(get_version_component_range 1)" |
| 10 |
|
|
if [[ "${PV}" =~ ^[[:digit:]]+_rc[[:digit:]]*$ ]]; then |
| 11 |
|
|
MINOR_VERSION="0" |
| 12 |
|
|
else |
| 13 |
|
|
MINOR_VERSION="$(get_version_component_range 2)" |
| 14 |
|
|
fi |
| 15 |
|
|
|
| 16 |
|
|
DESCRIPTION="International Components for Unicode" |
| 17 |
|
|
HOMEPAGE="http://www.icu-project.org/" |
| 18 |
|
|
|
| 19 |
|
|
BASE_URI="http://download.icu-project.org/files/icu4c/${PV/_/}" |
| 20 |
|
|
SRC_ARCHIVE="icu4c-${PV//./_}-src.tgz" |
| 21 |
|
|
DOCS_ARCHIVE="icu4c-${PV//./_}-docs.zip" |
| 22 |
|
|
|
| 23 |
|
|
SRC_URI="${BASE_URI}/${SRC_ARCHIVE} |
| 24 |
|
|
doc? ( ${BASE_URI}/${DOCS_ARCHIVE} )" |
| 25 |
|
|
|
| 26 |
|
|
LICENSE="BSD" |
| 27 |
|
|
SLOT="0" |
| 28 |
jer |
1.11 |
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd" |
| 29 |
hwoarang |
1.1 |
IUSE="debug doc examples static-libs" |
| 30 |
|
|
|
| 31 |
|
|
DEPEND="doc? ( app-arch/unzip )" |
| 32 |
|
|
RDEPEND="" |
| 33 |
|
|
|
| 34 |
|
|
S="${WORKDIR}/${PN}/source" |
| 35 |
|
|
|
| 36 |
|
|
QA_DT_NEEDED="/usr/lib.*/libicudata\.so\.${MAJOR_VERSION}\.${MINOR_VERSION}.*" |
| 37 |
|
|
|
| 38 |
|
|
src_unpack() { |
| 39 |
|
|
unpack "${SRC_ARCHIVE}" |
| 40 |
|
|
if use doc; then |
| 41 |
|
|
mkdir docs |
| 42 |
|
|
pushd docs > /dev/null |
| 43 |
|
|
unpack "${DOCS_ARCHIVE}" |
| 44 |
|
|
popd > /dev/null |
| 45 |
|
|
fi |
| 46 |
|
|
} |
| 47 |
|
|
|
| 48 |
|
|
src_prepare() { |
| 49 |
|
|
# Do not hardcode flags into icu-config. |
| 50 |
|
|
# https://ssl.icu-project.org/trac/ticket/6102 |
| 51 |
|
|
local variable |
| 52 |
|
|
for variable in CFLAGS CPPFLAGS CXXFLAGS FFLAGS LDFLAGS; do |
| 53 |
|
|
sed -i -e "/^${variable} =.*/s:@${variable}@::" config/Makefile.inc.in || die "sed failed" |
| 54 |
|
|
done |
| 55 |
|
|
|
| 56 |
|
|
epatch "${FILESDIR}/${PN}-4.8.1-fix_binformat_fonts.patch" |
| 57 |
|
|
epatch "${FILESDIR}/${PN}-4.8.1.1-fix_ltr.patch" |
| 58 |
|
|
epatch "${FILESDIR}/${P}-regex.patch" |
| 59 |
aballier |
1.2 |
epatch "${FILESDIR}/${P}-bsd.patch" |
| 60 |
hwoarang |
1.1 |
} |
| 61 |
|
|
|
| 62 |
|
|
src_configure() { |
| 63 |
jer |
1.11 |
# Fails without this on hppa/s390/sparc |
| 64 |
|
|
if use hppa || use s390 || use sparc; then |
| 65 |
armin76 |
1.10 |
append-flags "-DU_IS_BIG_ENDIAN=1" |
| 66 |
|
|
fi |
| 67 |
|
|
|
| 68 |
hwoarang |
1.1 |
econf \ |
| 69 |
|
|
$(use_enable debug) \ |
| 70 |
|
|
$(use_enable examples samples) \ |
| 71 |
|
|
$(use_enable static-libs static) |
| 72 |
|
|
} |
| 73 |
|
|
|
| 74 |
|
|
src_test() { |
| 75 |
|
|
# INTLTEST_OPTS: intltest options |
| 76 |
|
|
# -e: Exhaustive testing |
| 77 |
|
|
# -l: Reporting of memory leaks |
| 78 |
|
|
# -v: Increased verbosity |
| 79 |
|
|
# IOTEST_OPTS: iotest options |
| 80 |
|
|
# -e: Exhaustive testing |
| 81 |
|
|
# -v: Increased verbosity |
| 82 |
|
|
# CINTLTST_OPTS: cintltst options |
| 83 |
|
|
# -e: Exhaustive testing |
| 84 |
|
|
# -v: Increased verbosity |
| 85 |
|
|
emake -j1 check |
| 86 |
|
|
} |
| 87 |
|
|
|
| 88 |
|
|
src_install() { |
| 89 |
|
|
emake DESTDIR="${D}" install |
| 90 |
|
|
|
| 91 |
|
|
dohtml ../readme.html |
| 92 |
|
|
dodoc ../unicode-license.txt |
| 93 |
|
|
if use doc; then |
| 94 |
|
|
insinto /usr/share/doc/${PF}/html/api |
| 95 |
|
|
doins -r "${WORKDIR}/docs/"* |
| 96 |
|
|
fi |
| 97 |
|
|
} |