* [gentoo-commits] dev/mgorny:split-boost commit in: dev-cpp/boost-headers/, eclass/
@ 2012-08-24 18:35 Michał Górny
0 siblings, 0 replies; only message in thread
From: Michał Górny @ 2012-08-24 18:35 UTC (permalink / raw
To: gentoo-commits
commit: 7648dbc1061be07023c4ed6a69f67b1e76a0bc14
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 21 10:36:43 2012 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Aug 21 12:27:23 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=7648dbc1
Initial part of split boost: headers.
---
| 1 +
| 25 +++++
eclass/boost.eclass | 98 +++++++++++++++++++++
3 files changed, 124 insertions(+), 0 deletions(-)
--git a/dev-cpp/boost-headers/Manifest b/dev-cpp/boost-headers/Manifest
new file mode 100644
index 0000000..5cea877
--- /dev/null
+++ b/dev-cpp/boost-headers/Manifest
@@ -0,0 +1 @@
+DIST boost_1_50_0.tar.bz2 50786885 SHA256 c9ace2b8c81fa6703d1d17c7e478de3bc51101c5adbdeb3f6cb72cf3045a8529 SHA512 5909a2eca520a28af31de6a36c51f57b11fddcc0a51493a1e500ade00d9c4e78175c4892c04857ee385f3874f96e561b74b6427e1a155102e926421067d889fe WHIRLPOOL f5f5d9bc2e321da270dbaab04e0ec898240010720e77b362fac7266896a67b1eaa2e71a1d0e948057f55578dca5998e4faf8dc300e2c92608ee06316092bd08c
--git a/dev-cpp/boost-headers/boost-headers-1.50.0.ebuild b/dev-cpp/boost-headers/boost-headers-1.50.0.ebuild
new file mode 100644
index 0000000..d4eab99
--- /dev/null
+++ b/dev-cpp/boost-headers/boost-headers-1.50.0.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit boost eutils
+
+DESCRIPTION="Boost header-only libraries"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+#IUSE="doc"
+
+src_unpack() {
+ local exclude_libs=(
+ chrono date_time exception filesystem graph graph_parallel iostreams
+ locale math mpi program_options python random regex serialization
+ signals system test thread timer wave
+ )
+
+ ebegin "Unpacking (parts of) ${A}"
+ # ${A} is quoted so it will fail horribly if it contains two files
+ tar -xf "${DISTDIR}"/"${A}" ${exclude_libs[@]/#/--exclude libs/} \
+ || die 'Boost unpack failed.'
+}
diff --git a/eclass/boost.eclass b/eclass/boost.eclass
new file mode 100644
index 0000000..6953747
--- /dev/null
+++ b/eclass/boost.eclass
@@ -0,0 +1,98 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+# @ECLASS: boost.eclass
+# @MAINTAINER:
+# mgorny@gentoo.org
+# @BLURB: common definitions and functions for split boost ebuilds
+# @DESCRIPTION:
+# This eclass is intended to be used in boost only.
+
+# TODO:
+# - tests
+
+case ${EAPI:-0} in
+ 4) ;;
+ 0|1|2|3) die "${ECLASS}.eclass does not support EAPI ${EAPI}." ;;
+ *) die "${ECLASS}.eclass API in EAPI ${EAPI} not yet established."
+esac
+
+inherit multilib multiprocessing toolchain-funcs versionator
+
+EXPORT_FUNCTIONS src_configure src_compile src_install
+
+BOOST_P=boost_$(replace_all_version_separators _)
+
+HOMEPAGE="http://www.boost.org/"
+SRC_URI="mirror://sourceforge/boost/${BOOST_P}.tar.bz2"
+LICENSE="Boost-1.0"
+SLOT="$(get_version_component_range 1-2)"
+
+# XXX: add <= sometime
+RDEPEND="!dev-libs/boost:1.50"
+DEPEND=">=dev-util/boost-build-1.50.0-r2:${SLOT}"
+
+S=${WORKDIR}/${BOOST_P}
+
+BOOST_MAJOR_PV=$(replace_all_version_separators _ ${SLOT})
+BOOST_BJAM=b2-${BOOST_MAJOR_PV}
+
+boost_create_user-config.jam() {
+ local compiler compiler_version compiler_executable
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ compiler="darwin"
+ compiler_version="$(gcc-fullversion)"
+ compiler_executable="$(tc-getCXX)"
+ else
+ compiler="gcc"
+ compiler_version="$(gcc-version)"
+ compiler_executable="$(tc-getCXX)"
+ fi
+
+ cat > user-config.jam << __EOF__
+using ${compiler} : ${compiler_version} : ${compiler_executable} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
+__EOF__
+}
+
+boost_src_configure() {
+ BOOST_OPTIONS+=(
+ --boost-build=/usr/share/boost-build-${BOOST_MAJOR_PV}
+ --layout=versioned
+ --prefix="${D}usr"
+
+ pch=off
+ )
+
+ boost_create_user-config.jam
+}
+
+boost_src_compile() {
+ export BOOST_ROOT="${S}"
+
+ local args=(
+ ${BOOST_BJAM} -j$(makeopts_jobs) -q -d+2
+ gentoorelease
+ --user-config=user-config.jam
+ "${BOOST_OPTIONS[@]}" threading=single,multi
+ )
+
+ einfo "${args[@]}"
+ "${args[@]}" || die "Build of boost libraries failed"
+}
+
+boost_src_install() {
+ local args=(
+ ${BOOST_BJAM} -q -d+2
+ gentoorelease
+ --user-config=user-config.jam
+ "${BOOST_OPTIONS[@]}" threading=single,multi
+ --includedir="${D}usr/include"
+ --libdir="${D}usr/$(get_libdir)"
+ install
+ )
+
+ einfo "${args[@]}"
+ "${args[@]}" || die "Install of boost libraries failed"
+}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-08-24 18:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-24 18:35 [gentoo-commits] dev/mgorny:split-boost commit in: dev-cpp/boost-headers/, eclass/ Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox