mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-12 03:34:38 +08:00
49 lines
1.4 KiB
Bash
49 lines
1.4 KiB
Bash
# $Id$
|
|
# Maintainer: Antonio Rojas <arojas@archlinux.org>
|
|
|
|
pkgname=lcalc
|
|
pkgver=1.23
|
|
pkgrel=4
|
|
pkgdesc="C++ L-function class library and command line interface"
|
|
arch=('i686' 'x86_64')
|
|
url="http://oto.math.uwaterloo.ca/~mrubinst/L_function_public/L.html"
|
|
license=('GPL2')
|
|
depends=('pari')
|
|
makedepends=('chrpath')
|
|
source=("http://oto.math.uwaterloo.ca/~mrubinst/L_function_public/CODE/L-$pkgver.tar.gz" 'Lcommon.h.patch' 'gcc-4.9.patch' 'pari-2.7.patch'
|
|
'init_stack.patch')
|
|
md5sums=('8262d4495e0bbe0283e5341ef8694c23'
|
|
'8af1dd6d3118bb785f193283a31305a2'
|
|
'436dd35b06766dffad0941bcfb511e89'
|
|
'9829d36d0c68e37f2692f44cbb6df535'
|
|
'c1de0b9cdfa9991e980c34092a43dddf')
|
|
|
|
prepare() {
|
|
cd L-$pkgver
|
|
patch -p1 -i "$srcdir"/Lcommon.h.patch
|
|
patch -p1 -i "$srcdir"/gcc-4.9.patch
|
|
# Use pari_init_stack() instead of old allocatemoremem()
|
|
patch -p1 -i "$srcdir"/init_stack.patch
|
|
# port to PARI 2.7 API
|
|
patch -p1 -i "$srcdir"/pari-2.7.patch
|
|
}
|
|
|
|
build() {
|
|
cd L-$pkgver/src
|
|
make PARI_DEFINE="-DINCLUDE_PARI" LOCATION_PARI_H="/usr/include/pari" LOCATION_PARI_LIBRARY="/usr/lib" all
|
|
}
|
|
|
|
package() {
|
|
cd L-$pkgver/src
|
|
mkdir -p "$pkgdir"/usr/{bin,include,lib}
|
|
make INSTALL_DIR="$pkgdir"/usr install
|
|
|
|
# remove leftover files
|
|
rm "$pkgdir"/usr/include/Lfunction/{Lexplicit_formula.h.swap.crap,.*.swp,.DS*}
|
|
# fix wrong permissions
|
|
chmod 644 "$pkgdir"/usr/include/Lfunction/Ldokchitser.h
|
|
# fix insecure rpath
|
|
chrpath -d "$pkgdir"/usr/bin/lcalc
|
|
}
|
|
|