/[gentoo-x86]/dev-util/boost-build/boost-build-1.50.0-r2.ebuild
Gentoo

Contents of /dev-util/boost-build/boost-build-1.50.0-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Tue Aug 21 05:37:06 2012 UTC (2 years, 1 month ago) by dev-zero
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Fix false python-files removal. Fix minorsyn.

(Portage version: 2.1.11.9/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-util/boost-build/boost-build-1.50.0-r2.ebuild,v 1.1 2012/08/20 21:52:36 dev-zero Exp $
4
5 EAPI="4"
6 PYTHON_DEPEND="python? 2"
7
8 inherit eutils flag-o-matic python toolchain-funcs versionator
9
10 MY_PV=$(replace_all_version_separators _)
11 MAJOR_PV="$(replace_all_version_separators _ $(get_version_component_range 1-2))"
12
13 DESCRIPTION="A system for large project software construction, which is simple to use and powerful."
14 HOMEPAGE="http://www.boost.org/doc/tools/build/index.html"
15 SRC_URI="mirror://sourceforge/boost/boost_${MY_PV}.tar.bz2"
16
17 LICENSE="Boost-1.0"
18 SLOT="$(get_version_component_range 1-2)"
19 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
20 IUSE="examples python test"
21
22 RDEPEND="!<dev-libs/boost-1.34.0
23 !<=dev-util/boost-build-1.35.0-r1"
24 DEPEND="${RDEPEND}
25 test? ( =dev-lang/python-2*
26 sys-apps/diffutils )"
27
28 S="${WORKDIR}/boost_${MY_PV}/tools/build/v2"
29
30 pkg_setup() {
31 if use python ; then
32 python_set_active_version 2
33 python_pkg_setup
34 fi
35 }
36
37 src_unpack() {
38 tar xjpf "${DISTDIR}/${A}" boost_${MY_PV}/tools/build/v2 || die "unpacking tar failed"
39 }
40
41 src_prepare() {
42 epatch \
43 "${FILESDIR}/${PN}-1.48.0-support_dots_in_python-buildid.patch" \
44 "${FILESDIR}/${PN}-1.48.0-disable_python_rpath.patch" \
45 "${FILESDIR}/${P}-respect-c_ld-flags.patch" \
46 "${FILESDIR}/${P}-fix-test.patch"
47
48 # Remove stripping option
49 cd "${S}/engine"
50 sed -i -e 's|-s\b||' \
51 build.jam || die "sed failed"
52
53 # Force regeneration
54 rm jambase.c || die
55
56 # This patch allows us to fully control optimization
57 # and stripping flags when bjam is used as build-system
58 # We simply extend the optimization and debug-symbols feature
59 # with empty dummies called 'none'
60 cd "${S}"
61 sed -i \
62 -e 's/\(off speed space\)/\1 none/' \
63 -e 's/\(debug-symbols : on off\)/\1 none/' \
64 tools/builtin.jam || die "sed failed"
65 }
66
67 src_configure() {
68 # For slotting
69 sed -i \
70 -e "s|/usr/share/boost-build|/usr/share/boost-build-${MAJOR_PV}|" \
71 engine/Jambase || die "sed failed"
72
73 if use python ; then
74 # replace versions by user-selected one (TODO: fix this when slot-op
75 # deps are available to always match the best version available)
76 sed -i \
77 -e "s|2.7 2.6 2.5 2.4 2.3 2.2|${PYTHON_ABI}|" \
78 engine/build.jam || die "sed failed"
79 fi
80 }
81
82 src_compile() {
83 cd engine
84
85 local toolset
86
87 if [[ ${CHOST} == *-darwin* ]] ; then
88 toolset=darwin
89 else
90 # Using boost's generic toolset here, which respects CC and CFLAGS
91 toolset=cc
92 fi
93
94 CC=$(tc-getCC) ./build.sh ${toolset} -d+2 $(use_with python python /usr) || die "building bjam failed"
95 }
96
97 src_install() {
98 newbin engine/bin.*/bjam bjam-${MAJOR_PV}
99 newbin engine/bin.*/b2 b2-${MAJOR_PV}
100
101 insinto /usr/share/boost-build-${MAJOR_PV}
102 doins -r \
103 boost-build.jam bootstrap.jam build-system.jam user-config.jam *.py \
104 build kernel options tools util \
105 "${FILESDIR}/site-config.jam"
106
107 rm "${D}/usr/share/boost-build-${MAJOR_PV}/build/project.ann.py" || die "removing faulty python file failed"
108 if use python ; then
109 find "${D}/usr/share/boost-build-${MAJOR_PV}" -iname "*.py" -delete || die "removing experimental python files failed"
110 fi
111
112 dodoc changes.txt hacking.txt release_procedure.txt \
113 notes/build_dir_option.txt notes/relative_source_paths.txt
114
115 if use examples ; then
116 insinto /usr/share/doc/${PF}
117 doins -r example
118 fi
119 }
120
121 src_test() {
122 cd test
123
124 export TMP="${T}"
125
126 DO_DIFF="${PREFIX}/usr/bin/diff" $(PYTHON -2) test_all.py
127
128 if [ -s test_results.txt ] ; then
129 eerror "At least one test failed: $(<test_results.txt)"
130 die "tests failed"
131 fi
132 }
133
134 pkg_postinst() {
135 use python && python_mod_optimize /usr/share/boost-build-${MAJOR_PV}
136 }
137
138 pkg_postrm() {
139 use python && python_mod_cleanup /usr/share/boost-build-${MAJOR_PV}
140 }

  ViewVC Help
Powered by ViewVC 1.1.20