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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Fri Jan 4 15:15:25 2013 UTC (23 months, 2 weeks ago) by ulm
Branch: MAIN
Changes since 1.5: +4 -3 lines
Fix LICENSE, bug 448166.

(Portage version: 2.1.11.38/cvs/Linux x86_64, signed Manifest commit with key E7BE08CA7DC6EA25)

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

  ViewVC Help
Powered by ViewVC 1.1.20