mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 21:37:15 +02:00
main/boost: fix boost_python3
ref #6874 upstream: https://github.com/boostorg/build/issues/163
This commit is contained in:
parent
fe9e2da758
commit
93d06d453e
@ -2,7 +2,7 @@
|
||||
pkgname=boost
|
||||
pkgver=1.62.0
|
||||
_pkgver="${pkgver//./_}"
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
pkgdesc="Free peer-reviewed portable C++ source libraries"
|
||||
url="http://www.boost.org/"
|
||||
arch="all"
|
||||
@ -12,7 +12,11 @@ depends_dev="linux-headers"
|
||||
makedepends="$depends_dev python2-dev>=2.6 python3-dev flex bison bzip2-dev zlib-dev"
|
||||
subpackages="$pkgname-dev $pkgname-doc"
|
||||
source="http://downloads.sourceforge.net/$pkgname/${pkgname}_$_pkgver.tar.bz2
|
||||
libressl.patch"
|
||||
libressl.patch
|
||||
boost-1.57.0-python-abi_letters.patch
|
||||
boost-1.57.0-python-libpython_dep.patch
|
||||
dual-python.patch
|
||||
"
|
||||
builddir="$srcdir/${pkgname}_${_pkgver}"
|
||||
|
||||
_libs="date_time
|
||||
@ -45,13 +49,15 @@ prepare() {
|
||||
|
||||
PY2_VERSION="$(_pyversion python2)"
|
||||
PY3_VERSION="$(_pyversion python3)"
|
||||
abiflags=$(python3-config --abiflags)
|
||||
|
||||
|
||||
# create user-config.jam
|
||||
cat > user-config.jam <<-__EOF__
|
||||
|
||||
using gcc : : $CC : <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
|
||||
using python : ${PY2_VERSION} : /usr/bin/python2 : /usr/include/python${PY2_VERSION} : /usr/lib ;
|
||||
using python : ${PY3_VERSION} : /usr/bin/python3 : /usr/include/python${PY3_VERSION}m : /usr/lib ;
|
||||
using python : ${PY2_VERSION} : /usr/bin/python2 : /usr/include/python${PY2_VERSION} : : : : ;
|
||||
using python : ${PY3_VERSION} : /usr/bin/python3 : /usr/include/python${PY3_VERSION}m : : : : $abiflags ;
|
||||
|
||||
__EOF__
|
||||
}
|
||||
@ -132,9 +138,8 @@ _pyversion() {
|
||||
$1 -c 'import sys; print("%i.%i" % (sys.version_info.major, sys.version_info.minor))'
|
||||
}
|
||||
|
||||
md5sums="21b799e5d35ba2beef75b225deaf199a boost_1_62_0.tar.bz2
|
||||
b941ebae33e625fe0d08ff48502c11d0 libressl.patch"
|
||||
sha256sums="a715dc2adff2d451719352b1e863d78cbb100a03f7ed76097c89b9016c59091e boost_1_62_0.tar.bz2
|
||||
bb47222b596f0b3ef1b85470d29abac5f497295f4965dae4d207962d4e41e84f libressl.patch"
|
||||
sha512sums="26f9bd25133e459e2e583cec7e0cbaf805de920a411dd1aa4e2b88091f6a6a9ea3642545da38fa3e7b8f44c336b8b909a4ce76db5502f7140fd62a1505e18e7c boost_1_62_0.tar.bz2
|
||||
5804c344b5e5ece17811e744f1965c58840b6695a084dd09c23c9db380f3cbfbca201d6c595b5379bc12ff6f285794509799d28864df6037db6212c63adb2207 libressl.patch"
|
||||
5804c344b5e5ece17811e744f1965c58840b6695a084dd09c23c9db380f3cbfbca201d6c595b5379bc12ff6f285794509799d28864df6037db6212c63adb2207 libressl.patch
|
||||
d96d4d37394a31764ed817d0bc4a99cffa68a75ff1ecfd4417b9e1e5ae2c31a96ed24f948c6f2758ffdac01328d2402c4cf0d33a37107e4f5f721e636daebd66 boost-1.57.0-python-abi_letters.patch
|
||||
132c4b62815d605c2d3c9038427fa4f422612a33711d47b2862f2311516af8a371d6b75bf078a7bffe20be863f8d21fb9fe74dc1a1bac3a10d061e9768ec3e02 boost-1.57.0-python-libpython_dep.patch
|
||||
de0d59b19f0a16a747b66833d399c62fa50a1f8baa68bd98195cc718d220ca98219a8a4b083c1962054a5d0299d0afdd83c0d2b54d8d457e37c34a9c05591265 dual-python.patch"
|
||||
|
62
main/boost/boost-1.57.0-python-abi_letters.patch
Normal file
62
main/boost/boost-1.57.0-python-abi_letters.patch
Normal file
@ -0,0 +1,62 @@
|
||||
--- boost_1_57_0/tools/build/src/tools/python.jam 2013-05-21 06:14:18.000000000 +0200
|
||||
+++ boost_1_55_0/tools/build/src/tools/python.jam 2014-05-29 19:09:12.115413877 +0200
|
||||
@@ -94,7 +94,7 @@ feature.feature pythonpath : : free opti
|
||||
# using python : 2.3 : /usr/local/bin/python ;
|
||||
#
|
||||
rule init ( version ? : cmd-or-prefix ? : includes * : libraries ?
|
||||
- : condition * : extension-suffix ? )
|
||||
+ : condition * : extension-suffix ? : abi-letters ? )
|
||||
{
|
||||
project.push-current $(.project) ;
|
||||
|
||||
@@ -107,7 +107,7 @@ rule init ( version ? : cmd-or-prefix ?
|
||||
}
|
||||
}
|
||||
|
||||
- configure $(version) : $(cmd-or-prefix) : $(includes) : $(libraries) : $(condition) : $(extension-suffix) ;
|
||||
+ configure $(version) : $(cmd-or-prefix) : $(includes) : $(libraries) : $(condition) : $(extension-suffix) : $(abi-letters) ;
|
||||
|
||||
project.pop-current ;
|
||||
}
|
||||
@@ -653,7 +653,7 @@ local rule system-library-dependencies (
|
||||
|
||||
# Declare a target to represent Python's library.
|
||||
#
|
||||
-local rule declare-libpython-target ( version ? : requirements * )
|
||||
+local rule declare-libpython-target ( version ? : requirements * : abi-letters ? )
|
||||
{
|
||||
# Compute the representation of Python version in the name of Python's
|
||||
# library file.
|
||||
@@ -677,13 +677,13 @@ local rule declare-libpython-target ( ve
|
||||
}
|
||||
|
||||
# Declare it.
|
||||
- lib python.lib : : <name>python$(lib-version) $(requirements) ;
|
||||
+ lib python.lib : : <name>python$(lib-version)$(abi-letters) $(requirements) ;
|
||||
}
|
||||
|
||||
|
||||
# Implementation of init.
|
||||
local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? :
|
||||
- condition * : extension-suffix ? )
|
||||
+ condition * : extension-suffix ? : abi-letters ? )
|
||||
{
|
||||
local prefix ;
|
||||
local exec-prefix ;
|
||||
@@ -699,6 +699,7 @@ local rule configure ( version ? : cmd-o
|
||||
extension-suffix ?= _d ;
|
||||
}
|
||||
extension-suffix ?= "" ;
|
||||
+ abi-letters ?= "" ;
|
||||
|
||||
# Normalize and dissect any version number.
|
||||
local major-minor ;
|
||||
@@ -922,7 +923,7 @@ local rule configure ( version ? : cmd-o
|
||||
}
|
||||
else
|
||||
{
|
||||
- declare-libpython-target $(version) : $(target-requirements) ;
|
||||
+ declare-libpython-target $(version) : $(target-requirements) : $(abi-letters) ;
|
||||
|
||||
# This is an evil hack. On, Windows, when Python is embedded, nothing
|
||||
# seems to set up sys.path to include Python's standard library
|
13
main/boost/boost-1.57.0-python-libpython_dep.patch
Normal file
13
main/boost/boost-1.57.0-python-libpython_dep.patch
Normal file
@ -0,0 +1,13 @@
|
||||
Index: boost_1_57_0/tools/build/src/tools/python.jam
|
||||
===================================================================
|
||||
--- boost_1_57_0/tools/build/src/tools/python.jam (revision 50406)
|
||||
+++ boost_1_57_0/tools/build/src/tools/python.jam (working copy)
|
||||
@@ -994,7 +994,7 @@
|
||||
else
|
||||
{
|
||||
alias python_for_extensions
|
||||
- :
|
||||
+ : python
|
||||
: $(target-requirements)
|
||||
:
|
||||
: $(usage-requirements)
|
27
main/boost/dual-python.patch
Normal file
27
main/boost/dual-python.patch
Normal file
@ -0,0 +1,27 @@
|
||||
diff --git a/tools/build/src/tools/python.jam b/tools/build/src/tools/python.jam
|
||||
index cbd6419..0c29df6 100644
|
||||
--- a/tools/build/src/tools/python.jam
|
||||
+++ b/tools/build/src/tools/python.jam
|
||||
@@ -907,14 +907,14 @@ local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? :
|
||||
# for a particular target OS as the default. This makes it so that we can
|
||||
# select a python interpreter with only knowledge of the target OS. And hence
|
||||
# can configure different Pythons based on the target OS only.
|
||||
- local toolset-requirements = [ toolset.requirements ] ;
|
||||
- local toolset-target-os-requirements
|
||||
- = [ property.evaluate-conditionals-in-context
|
||||
- [ $(toolset-requirements).raw ] : <target-os>$(target-os) ] ;
|
||||
- if ! <python> in $(toolset-target-os-requirements:G)
|
||||
- {
|
||||
- toolset.add-requirements <target-os>$(target-os):<python>$(version:E=default) ;
|
||||
- }
|
||||
+# local toolset-requirements = [ toolset.requirements ] ;
|
||||
+# local toolset-target-os-requirements
|
||||
+# = [ property.evaluate-conditionals-in-context
|
||||
+# [ $(toolset-requirements).raw ] : <target-os>$(target-os) ] ;
|
||||
+# if ! <python> in $(toolset-target-os-requirements:G)
|
||||
+# {
|
||||
+# toolset.add-requirements <target-os>$(target-os):<python>$(version:E=default) ;
|
||||
+# }
|
||||
|
||||
# Register the right suffix for extensions.
|
||||
register-extension-suffix $(extension-suffix) : $(target-requirements) ;
|
Loading…
Reference in New Issue
Block a user