/[gentoo-x86]/dev-libs/STLport/STLport-5.2.1-r2.ebuild
Gentoo

Contents of /dev-libs/STLport/STLport-5.2.1-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Thu Sep 5 12:22:55 2013 UTC (6 years, 4 months ago) by pinkbyte
Branch: MAIN
CVS Tags: HEAD
Revision bump: EAPI 5, epatch_user, Prefix support and keywords. Drop old revision

(Portage version: 2.2.1/cvs/Linux x86_64, signed Manifest commit with key 0x1F357D42)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-libs/STLport/STLport-5.2.1-r1.ebuild,v 1.6 2013/08/10 12:53:20 ago Exp $
4
5 EAPI="5"
6
7 inherit eutils versionator toolchain-funcs multilib
8
9 PATCH_V="2"
10
11 DESCRIPTION="C++ STL library"
12 HOMEPAGE="http://stlport.sourceforge.net/"
13 SRC_URI="mirror://sourceforge/stlport/${P}.tar.bz2
14 http://dev.gentoo.org/~xarthisius/distfiles/${PN}-patches-${PV}-${PATCH_V}.tbz2"
15
16 LICENSE="boehm-gc HPND"
17 SLOT="0"
18 KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
19 IUSE="boost debug static static-libs threads"
20
21 DEPEND="boost? ( >=dev-libs/boost-1.35.0-r5 )"
22 RDEPEND="${DEPEND}"
23
24 DOCS=( README etc/ChangeLog doc/FAQ doc/README.utf8 )
25
26 pkg_setup() {
27 # make sure OSNAME is not in the environment (bug #305399)
28 unset OSNAME
29 }
30
31 src_prepare() {
32 EPATCH_SOURCE="${WORKDIR}/patches"
33 EPATCH_SUFFIX="diff"
34 epatch
35
36 # We have to add this to host.h to make sure
37 # that dependencies of STLport use the same settings
38 cat <<- EOF >> stlport/stl/config/host.h
39 #define _STLP_NATIVE_INCLUDE_PATH ../g++-v$(gcc-major-version)
40 /* use pthreads for threading */
41 #define _PTHREADS
42 /* enable largefile support */
43 #define _FILE_OFFSET_BITS 64
44 #define _LARGEFILE_SOURCE
45 #define _LARGEFILE64_SOURCE
46 EOF
47
48 epatch_user
49 }
50
51 src_configure() {
52 local myconf
53
54 if use boost ; then
55 BOOST_PKG="$(best_version ">=dev-libs/boost-1.35.0-r5")"
56 BOOST_VER="$(get_version_component_range 1-2 "${BOOST_PKG/*boost-/}")"
57 BOOST_VER="$(replace_all_version_separators _ "${BOOST_VER}")"
58 BOOST_INC="${EPREFIX}/usr/include/boost-${BOOST_VER}"
59
60 myconf+="--with-boost=${BOOST_INC} --with-system-boost "
61 # make sure user apps (e.g. other packges using STLport) use boost as well
62 sed -i \
63 -e 'N;N;N;s:/\**\n\(#define _STLP_USE_BOOST_SUPPORT 1\)*\n\*/:\1:' \
64 stlport/stl/config/user_config.h || die
65 fi
66
67 # It's not an autoconf script
68 ./configure \
69 --prefix="${EPREFIX}/usr" \
70 --libdir="${EPREFIX}/usr/$(get_libdir)" \
71 --use-compiler-family=gcc \
72 $(use debug || echo "--without-debug") \
73 $(use static && echo "--use-static-gcc") \
74 $(use static-libs && echo "--enable-static") \
75 $(use threads && echo "--without-thread") \
76 ${myconf} \
77 --with-cc="$(tc-getCC)" \
78 --with-cxx="$(tc-getCXX)" \
79 --with-extra-cflags="${CFLAGS}" \
80 --with-extra-cxxflags="${CXXFLAGS}" \
81 --with-extra-ldflags="${LDFLAGS}" || die "configure failed"
82 }
83
84 src_install() {
85 # precreate some directories
86 dodir /usr/$(get_libdir)
87
88 default
89 dodoc etc/*.txt doc/*.txt
90 }
91
92 src_test() {
93 if use static ; then
94 ewarn "Tests don't work when building with USE=static. Skipping..."
95 else
96 default
97 fi
98 }

  ViewVC Help
Powered by ViewVC 1.1.20