commit:     28f6305c1429622be651a113a015b26e8ba64d32
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 10 17:38:43 2015 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Nov 10 17:45:41 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28f6305c

dev-libs/boost: Work-around library rename due to ABIFLAGS

Create a compatibility symlink to work-around Boost linking failures
when Python library name contains ABIFLAGS. A proper fix would be
preferable but the build system is convoluted and buggy, so a
work-around is put in place instead.

 dev-libs/boost/boost-1.57.0.ebuild    | 11 ++++++++++-
 dev-libs/boost/boost-1.58.0-r1.ebuild | 11 ++++++++++-
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/dev-libs/boost/boost-1.57.0.ebuild 
b/dev-libs/boost/boost-1.57.0.ebuild
index caddfd5..a1273ec 100644
--- a/dev-libs/boost/boost-1.57.0.ebuild
+++ b/dev-libs/boost/boost-1.57.0.ebuild
@@ -75,10 +75,19 @@ create_user-config.jam() {
        fi
 
        if python_bindings_needed; then
+               # boost expects libpython$(pyver) and doesn't allow overrides
+               # and the build system is so creepy that it's easier just to
+               # provide a symlink (linker's going to use SONAME anyway)
+               # TODO: replace it with proper override one day
+               ln -f -s "$(python_get_library_path)" 
"${T}/lib${EPYTHON}$(get_libname)" || die
+
                if tc-is-cross-compiler; then
                        python_configuration="using python : ${EPYTHON#python} 
: : ${SYSROOT:-${EROOT}}/usr/include/${EPYTHON} : 
${SYSROOT:-${EROOT}}/usr/$(get_libdir) ;"
                else
-                       python_configuration="using python : : ${PYTHON} ;"
+                       # note: we need to provide version explicitly because of
+                       # a bug in the build system:
+                       # https://github.com/boostorg/build/pull/104
+                       python_configuration="using python : ${EPYTHON#python} 
: ${PYTHON} : $(python_get_includedir) : ${T} ;"
                fi
        fi
 

diff --git a/dev-libs/boost/boost-1.58.0-r1.ebuild 
b/dev-libs/boost/boost-1.58.0-r1.ebuild
index 6389bc0..10cddb9 100644
--- a/dev-libs/boost/boost-1.58.0-r1.ebuild
+++ b/dev-libs/boost/boost-1.58.0-r1.ebuild
@@ -74,10 +74,19 @@ create_user-config.jam() {
        fi
 
        if python_bindings_needed; then
+               # boost expects libpython$(pyver) and doesn't allow overrides
+               # and the build system is so creepy that it's easier just to
+               # provide a symlink (linker's going to use SONAME anyway)
+               # TODO: replace it with proper override one day
+               ln -f -s "$(python_get_library_path)" 
"${T}/lib${EPYTHON}$(get_libname)" || die
+
                if tc-is-cross-compiler; then
                        python_configuration="using python : ${EPYTHON#python} 
: : ${SYSROOT:-${EROOT}}/usr/include/${EPYTHON} : 
${SYSROOT:-${EROOT}}/usr/$(get_libdir) ;"
                else
-                       python_configuration="using python : : ${PYTHON} ;"
+                       # note: we need to provide version explicitly because of
+                       # a bug in the build system:
+                       # https://github.com/boostorg/build/pull/104
+                       python_configuration="using python : ${EPYTHON#python} 
: ${PYTHON} : $(python_get_includedir) : ${T} ;"
                fi
        fi
 

Reply via email to