summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD53
1 files changed, 29 insertions, 24 deletions
diff --git a/PKGBUILD b/PKGBUILD
index bc1c9982a998..0e3a10359df2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,9 +1,10 @@
-# Maintainer: Никола "hauzer" Вукосављевић <hauzer@gmx.com>
+# Maintainer: Viktor Schneider <aur@vjs.io>
+# Contributor: Никола "hauzer" Вукосављевић <hauzer@gmx.com>
# Contributor: Daniel Kirchner <daniel@ekpyron.org>
# Based on mingw-w64-boost
pkgname=mingw-w64-boost-python
-pkgver=1.62.0
+pkgver=1.73.0
_boostver=${pkgver//./_}
pkgrel=1
pkgdesc="Free peer-reviewed portable C++ source libraries (mingw-w64, python)"
@@ -14,13 +15,11 @@ depends=('mingw-w64-crt' 'mingw-w64-zlib' 'mingw-w64-bzip2' 'mingw-w64-boost' 'm
# Depends on native Boost so we can use its bjam instead of building it ourself first
makedepends=('mingw-w64-gcc' 'boost' 'bzip2' 'wine')
options=(!strip !buildflags staticlibs)
-source=(http://downloads.sourceforge.net/sourceforge/boost/boost_${_boostver}.tar.bz2
- boost-mingw.patch
- python_jam.patch)
-md5sums=('5fb94629535c19e48703bdb2b2e9490f'
- '01f5f0d6b915d3b04dbabfd6db40f1e9'
- '086cece11abae7e60a8f3d41f7833f3d')
-
+source=("https://dl.bintray.com/boostorg/release/${pkgver}/source/boost_${_boostver}.tar.bz2"
+ "python_jam.patch")
+sha256sums=('4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402'
+ '6437811e541e1230576c6d60e73420bba1a644f5692a6973eb6bb6aea7e88056')
+
_architectures=('i686-w64-mingw32' 'x86_64-w64-mingw32')
_bjam() {
@@ -35,20 +34,22 @@ _bjam() {
echo /usr/bin/bjam \
toolset=gcc-mingw64 \
target-os=windows \
+ debug-symbols=off \
variant=release \
threading=multi \
threadapi=win32 \
- link=static \
+ link=static,shared \
runtime-link=shared \
--prefix="${pkgdir}/usr/${_arch}" \
--user-config=user-config.jam \
--with-python \
- cxxflags=\'-std=c++11 -include cmath -I/usr/x86_64-w64-mingw32/include/python27/\' \
+ cxxflags=\"-std=c++14 -DUSE_DL_EXPORT=1 -D_FORTIFY_SOURCE=2 -O2 -pipe -fno-plt -fexceptions --param=ssp-buffer-size=4\" \
+ linkflags=\"-Wl,-O1,--sort-common,--as-needed -fstack-protector -lpython3.8\" \
address-model=${_address_model} \
architecture=x86 \
binary-format=pe \
${MAKEFLAGS} \
- --layout=tagged -d+2
+ --layout=system -d+2
}
build() {
@@ -58,12 +59,10 @@ build() {
pushd "build-${_arch}"
_pyver=$(wine /usr/${_arch}/bin/python --version | sed -nr 's/Python ([0-9]\.[0-9])\.[0-9]/\1/p')
- _pyver_nodot=$(echo ${_pyver} | sed -nr 's/([0-9])\.([0-9])/\1\2/p')
-
- patch -Np0 -i "${srcdir}/boost-mingw.patch"
- patch -Np0 -i "${srcdir}/python_jam.patch"
+
+ patch -Np0 -i "${srcdir}/python_jam.patch"
- cat > user-config.jam << EOF
+ cat > user-config.jam << EOF
using gcc : mingw64 :
/usr/bin/${_arch}-g++ :
<rc>/usr/bin/${_arch}-windres
@@ -71,15 +70,15 @@ using gcc : mingw64 :
<root>/usr/${_arch}
;
-using python : ${_pyver} : :
- /usr/${_arch}/include/python${_pyver_nodot} :
+using python : ${_pyver} : "wine /usr/${_arch}/bin/python" :
+ /usr/${_arch}/include/python${_pyver} :
/usr/${_arch}/lib
;
EOF
unset LDFLAGS CPPFLAGS
- eval $(_bjam ${_arch}) linkflags="-L/usr/${_arch}/lib"
+ eval $(_bjam ${_arch})
popd
done
@@ -89,11 +88,17 @@ package() {
cd "${srcdir}"
for _arch in "${_architectures[@]}" ; do
pushd "build-${_arch}"
-
- mkdir -p "${pkgdir}/usr/${_arch}/lib"
- cp ./stage/lib/*.a "${pkgdir}/usr/${_arch}/lib/"
+
+ install -d ${pkgdir}/usr/${_arch}/lib/cmake
+ install -d ${pkgdir}/usr/${_arch}/bin
+ cp -rv ./stage/lib/cmake/boost_python-${pkgver} "${pkgdir}/usr/${_arch}/lib/cmake/"
+ cp -rv ./stage/lib/cmake/boost_numpy-${pkgver} "${pkgdir}/usr/${_arch}/lib/cmake/"
+ cp -v ./stage/lib/*.a "${pkgdir}/usr/${_arch}/lib/"
+ cp -v ./stage/lib/*.dll "${pkgdir}/usr/${_arch}/bin/"
+
+
${_arch}-strip -g "${pkgdir}"/usr/${_arch}/lib/*.a
- #${_arch}-strip -g "${pkgdir}"/usr/${_arch}/lib/*.dll
+ ${_arch}-strip --strip-unneeded "${pkgdir}"/usr/${_arch}/bin/*.dll
popd
done