Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@moyamo
Created October 7, 2017 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moyamo/cb34b89e523264bee4b81ba54cb9033e to your computer and use it in GitHub Desktop.
Save moyamo/cb34b89e523264bee4b81ba54cb9033e to your computer and use it in GitHub Desktop.
--- PKGBUILD.orig 2015-07-07 20:17:13.000000000 +0200
+++ PKGBUILD 2017-10-07 15:51:44.059374305 +0200
@@ -4,22 +4,27 @@
pkgname=python2-vpython
pkgver=6.11
-pkgrel=1
+pkgrel=2
pkgdesc="Easy-to-use 3D graphics module for Python."
arch=('i686' 'x86_64')
url="http://www.vpython.org"
-depends=('gtkglextmm' 'python2-numpy' 'boost-libs' 'wxpython' 'tk' 'python2-fonttools' 'python2-polygon' 'python2-ttfquery')
-makedepends=('boost' 'python2-setuptools')
+depends=('gtkglextmm' 'python2-numpy' 'wxpython' 'tk' 'python2-fonttools' 'python2-polygon' 'python2-ttfquery')
+makedepends=('python2-setuptools')
conflicts=('python-vpython')
replaces=('python-vpython')
license=('custom')
options=(!libtool)
-
-noextract=("${source[@]%%::*}")
+_boostversion=1.64.0
+_boostversion_underscore=${_boostversion//./_}
+noextract=("vpython-wx-src.${pkgver}.tgz")
source=("http://sourceforge.net/projects/vpythonwx/files/${pkgver}-release/vpython-wx-src.${pkgver}.tgz"
- "setup.patch")
-md5sums=('c9791cda6efc73440b5c355e226543c2'
- 'c879c7bff42ffba58766be3bcd5fdce2')
+ "https://downloads.sourceforge.net/project/boost/boost/${_boostversion}/boost_${_boostversion_underscore}.tar.bz2"
+ "setup.patch"
+ "setup2.patch")
+sha256sums=('decfdb3112d24e29b5f6cb47f1ba9c2324520fa83bb34345179179eb572e1776'
+ '7bcc5caace97baa948931d712ea5f37038dbb1c5d89b43ad4def4ed7cb683332'
+ '7e69964dd6c079ba6c9f1c87f01f8def06358419a65169e31f217ed86ce0405e'
+ 'bd60335f28f146288de64b609959bfe0dd81bcf77a1df7833203ce32ec5a2e52')
prepare() {
cd "${srcdir}"
@@ -29,11 +34,30 @@
cd vpython-wx-${pkgver}
tar -xzf "${srcdir}"/vpython-wx-src.${pkgver}.tgz
patch -p0 < ../setup.patch
+ patch -p0 < ../setup2.patch
sed -i "s|#![ ]*/usr/bin/env python[^2]|#!/usr/bin/env python2|" site-packages/vidle2/PyShell.py
+
+ cp -r ../boost_${_boostversion_underscore}/boost include
}
build() {
+ cd "${srcdir}/boost_${_boostversion_underscore}"
+ ./bootstrap.sh --with-toolset=gcc --with-icu --with-python=/usr/bin/python2 --with-libraries=python,signals
+
+ b2 \
+ variant=release \
+ debug-symbols=off \
+ threading=multi \
+ runtime-link=shared \
+ link=static \
+ toolset=gcc \
+ python=2.7 \
+ cflags="${CPPFLAGS} ${CFLAGS} -fPIC -O3" \
+ cxxflags="${CPPFLAGS} ${CXXFLAGS} -std=c++14 -fPIC -O3" \
+ linkflags="${LDFLAGS}" \
+ --stagedir="${srcdir}/vpython-wx-${pkgver}" \
+ stage
cd "${srcdir}"/vpython-wx-${pkgver}
python2 setup.py build
--- setup.py.orig 2015-01-02 15:02:31.000000000 +0200
+++ setup.py 2017-10-07 15:32:30.198548682 +0200
@@ -72,8 +72,6 @@
GTK_VIS_LIBS = get_libs()
# GTK_VIS_LIBS.append('boost_python-mt-py' + versionString)
- GTK_VIS_LIBS.append('boost_python')
- GTK_VIS_LIBS.append('boost_signals')
GTK_INCDIRS = get_includes()
@@ -152,6 +150,7 @@
library_dirs=LIBRARY_DIRS,
libraries=libraries,
extra_compile_args = extra_compile_args,
+ extra_objects = ['lib/libboost_python.a', 'lib/libboost_signals.a'],
)
SITE_PACKAGES = os.path.join(VISUAL_DIR, 'site-packages')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment