diff options
-rw-r--r-- | libre/sagemath/PKGBUILD | 12 | ||||
-rw-r--r-- | libre/sagemath/sagemath-python2-pkgconfig-1.2.patch | 111 |
2 files changed, 119 insertions, 4 deletions
diff --git a/libre/sagemath/PKGBUILD b/libre/sagemath/PKGBUILD index 182405106..6c63c4dfa 100644 --- a/libre/sagemath/PKGBUILD +++ b/libre/sagemath/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 197484 2016-12-01 06:57:57Z arojas $ +# $Id: PKGBUILD 197777 2016-12-02 21:06:23Z arojas $ # Maintainer (Arch): Evgeniy Alekseev <arcanis.arch at gmail dot com> # Maintainer (Arch): Antonio Rojas <arojas@archlinux.org> # Contributor (Arch): Daniel Wallace <danielwallace at gtmanfred dot com> @@ -11,7 +11,7 @@ pkgname=sagemath pkgver=7.4 -pkgrel=12.parabola1 +pkgrel=13.parabola1 pkgdesc="Free Mathematics Software, free software replacement of Magma, Maple, Mathematica, and Matlab, without nonfree nauty support" arch=(i686 x86_64 armv7h) url="http://www.sagemath.org" @@ -38,7 +38,7 @@ provides=(sage-mathematics) source=("$pkgname-$pkgver.tar.gz::https://github.com/sagemath/sage/archive/$pkgver.tar.gz" env.patch skip-check.patch cython-sys-path.patch is-package-installed.patch package.patch disable-fes.patch jupyter-path.patch test-optional.patch python-2.7.11.patch ecm-7.patch increase-rtol.patch sagemath-singular4.patch - sagemath-cython0.25.patch pynac-0.7.1.patch) + sagemath-cython0.25.patch pynac-0.7.1.patch sagemath-python2-pkgconfig-1.2.patch) md5sums=('8311ee35a309dbc668b5148795211254' '784ba3fca83f24ed0bbf62e01fa4e967' '6cafcb381437d4751fd55b25d5090987' @@ -53,7 +53,8 @@ md5sums=('8311ee35a309dbc668b5148795211254' '39d3fded716d2a7ae0ab03e0896b7497' '4bd7305e8b69add8356f9751470cf587' 'e76faa070a490de97818762ba340d9dc' - '32da930dcb7c4718acf0188e090c07b9') + '32da930dcb7c4718acf0188e090c07b9' + '329a483b16c0e1960b15b3ca3082f2d0') prepare(){ cd sage-$pkgver @@ -96,6 +97,9 @@ prepare(){ # port to pynac 0.7.1 patch -p1 -i ../pynac-0.7.1.patch +# fix build with python2-pkgconfig 1.2 + patch -p1 -i ../sagemath-python2-pkgconfig-1.2.patch + # use python2 sed -e 's|#!/usr/bin/env python|#!/usr/bin/env python2|' -e 's|exec python|exec python2|' -i src/bin/* sed -e 's|cython {OPT}|cython2 {OPT}|' -e 's|python setup.py|python2 setup.py|' -i src/sage/misc/cython.py diff --git a/libre/sagemath/sagemath-python2-pkgconfig-1.2.patch b/libre/sagemath/sagemath-python2-pkgconfig-1.2.patch new file mode 100644 index 000000000..2cecb94ab --- /dev/null +++ b/libre/sagemath/sagemath-python2-pkgconfig-1.2.patch @@ -0,0 +1,111 @@ +--- sage-7.4/src/module_list.py.0 2016-12-02 18:55:28.123669807 +0000 ++++ sage-7.4/src/module_list.py 2016-12-02 18:59:09.943258665 +0000 +@@ -13,9 +13,9 @@ + + # CBLAS can be one of multiple implementations + cblas_pc = pkgconfig.parse('cblas') +-cblas_libs = list(cblas_pc['libraries']) +-cblas_library_dirs = list(cblas_pc['library_dirs']) +-cblas_include_dirs = list(cblas_pc['include_dirs']) ++cblas_libs = cblas_pc['libraries'] ++cblas_library_dirs = cblas_pc['library_dirs'] ++cblas_include_dirs = cblas_pc['include_dirs'] + + # TODO: Remove Cygwin hack by installing a suitable cblas.pc + if os.path.exists('/usr/lib/libblas.dll.a'): +@@ -23,58 +23,59 @@ + + # LAPACK can be one of multiple implementations + lapack_pc = pkgconfig.parse('lapack') +-lapack_libs = list(lapack_pc['libraries']) +-lapack_library_dirs = list(lapack_pc['library_dirs']) +-lapack_include_dirs = list(lapack_pc['include_dirs']) ++lapack_libs = lapack_pc['libraries'] ++lapack_library_dirs = lapack_pc['library_dirs'] ++lapack_include_dirs = lapack_pc['include_dirs'] + + # FFLAS-FFPACK + fflas_ffpack_pc = pkgconfig.parse('fflas-ffpack') +-fflas_ffpack_libs = list(fflas_ffpack_pc['libraries']) +-fflas_ffpack_library_dirs = list(fflas_ffpack_pc['library_dirs']) ++fflas_ffpack_libs = fflas_ffpack_pc['libraries'] ++fflas_ffpack_library_dirs = fflas_ffpack_pc['library_dirs'] + fflas_ffpack_cflags = pkgconfig.cflags('fflas-ffpack').split() + + # Givaro + givaro_pc = pkgconfig.parse('givaro') +-givaro_libs = list(givaro_pc['libraries']) +-givaro_library_dirs = list(givaro_pc['library_dirs']) ++givaro_libs = givaro_pc['libraries'] ++givaro_library_dirs = givaro_pc['library_dirs'] + givaro_cflags = pkgconfig.cflags('givaro').split() + + # GNU Scientific Library + # Note we replace the built-in gslcblas with the above cblas + gsl_pc = pkgconfig.parse('gsl') +-gsl_libs = list(gsl_pc['libraries'].difference(['gslcblas']).union(cblas_libs)) +-gsl_library_dirs = list(gsl_pc['library_dirs']) +-gsl_include_dirs = list(gsl_pc['include_dirs']) ++gsl_pc['libraries'].remove('gslcblas') ++gsl_libs = gsl_pc['libraries'] + cblas_libs ++gsl_library_dirs = gsl_pc['library_dirs'] ++gsl_include_dirs = gsl_pc['include_dirs'] + + # GD image library + gd_pc = pkgconfig.parse('gdlib') +-gd_libs = list(gd_pc['libraries']) +-gd_library_dirs = list(gd_pc['library_dirs']) +-gd_include_dirs = list(gd_pc['include_dirs']) ++gd_libs = gd_pc['libraries'] ++gd_library_dirs = gd_pc['library_dirs'] ++gd_include_dirs = gd_pc['include_dirs'] + + # LinBox + linbox_pc = pkgconfig.parse('linbox') +-linbox_libs = list(linbox_pc['libraries']) +-linbox_library_dirs = list(linbox_pc['library_dirs']) ++linbox_libs = linbox_pc['libraries'] ++linbox_library_dirs = linbox_pc['library_dirs'] + linbox_cflags = pkgconfig.cflags('linbox').split() + + # Singular + singular_pc = pkgconfig.parse('Singular') +-singular_libs = list(singular_pc['libraries']) +-singular_library_dirs = list(singular_pc['library_dirs']) ++singular_libs = singular_pc['libraries'] ++singular_library_dirs = singular_pc['library_dirs'] + singular_cflags = pkgconfig.cflags('Singular').split() + + # PNG image library + png_pc = pkgconfig.parse('libpng') +-png_libs = list(png_pc['libraries']) +-png_library_dirs = list(png_pc['library_dirs']) +-png_include_dirs = list(png_pc['include_dirs']) ++png_libs = png_pc['libraries'] ++png_library_dirs = png_pc['library_dirs'] ++png_include_dirs = png_pc['include_dirs'] + + # zlib + zlib_pc = pkgconfig.parse('zlib') +-zlib_libs = list(zlib_pc['libraries']) +-zlib_library_dirs = list(zlib_pc['library_dirs']) +-zlib_include_dirs = list(zlib_pc['include_dirs']) ++zlib_libs = zlib_pc['libraries'] ++zlib_library_dirs = zlib_pc['library_dirs'] ++zlib_include_dirs = zlib_pc['include_dirs'] + + + ######################################################### +@@ -110,9 +110,9 @@ + ######################################################### + + m4ri_pc = pkgconfig.parse('m4ri') +-m4ri_libs = list(m4ri_pc['libraries']) +-m4ri_library_dirs = list(m4ri_pc['library_dirs']) +-m4ri_include_dirs = list(m4ri_pc['include_dirs']) ++m4ri_libs = m4ri_pc['libraries'] ++m4ri_library_dirs = m4ri_pc['library_dirs'] ++m4ri_include_dirs = m4ri_pc['include_dirs'] + + m4ri_extra_compile_args = pkgconfig.cflags('m4ri').split() + try: |