dev-libs/boost: Work-around library rename due to ABIFLAGS
authorMichał Górny <mgorny@gentoo.org>
Tue, 10 Nov 2015 17:38:43 +0000 (18:38 +0100)
committerMichał Górny <mgorny@gentoo.org>
Wed, 11 Nov 2015 10:22:13 +0000 (11:22 +0100)
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
dev-libs/boost/boost-1.58.0-r1.ebuild

index caddfd5588928960ef4b9e09bd5d2c702220afff..a1273eccd5e962f311aafe3b7f4c6e427f2639be 100644 (file)
@@ -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
 
index 6389bc0577a13a21df53a49bac681640f17d6853..10cddb9944320d533c267b863b437f558f32c815 100644 (file)
@@ -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