From b3f80e0306587663a493502e4fcfa1c17c5836fd Mon Sep 17 00:00:00 2001 From: Ctibor Date: Tue, 23 Oct 2012 22:23:48 +0200 Subject: Initial import of the local overlay. --- eclass/boost-utils.eclass | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 eclass/boost-utils.eclass (limited to 'eclass/boost-utils.eclass') diff --git a/eclass/boost-utils.eclass b/eclass/boost-utils.eclass new file mode 100755 index 0000000..d561ae3 --- /dev/null +++ b/eclass/boost-utils.eclass @@ -0,0 +1,36 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +# +# Author: Hanno Meyer-Thurow +# Purpose: Serve paths to boost libraries & headers +# + +inherit flag-o-matic multilib + +# get_boost_library_path +get_boost_library_path() { + local version="$(grep -o -e "[0-9]_[0-9][0-9]" \ + /usr/include/boost/version.hpp)" + + local path="/usr/$(get_libdir)/boost-${version}" + + [ -d "${path}" ] && echo -n "${path}" +} + +# add_boost_library_path +add_boost_library_path() { + local path="$(get_boost_library_path)" + + if [ "${path}" ] ; then + append-ldflags "-L${path}" + else + die "path not found! (${path})" + fi +} + +# add_boost_paths: convenient wrapper +add_boost_paths() { + add_boost_library_path +} -- cgit v1.2.3