desktop/gnuplot/PKGBUILD
2018-10-10 16:11:45 +02:00

53 lines
1.7 KiB
Bash

# Forked from https://git.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/gnuplot&id=be5f1a375aaa550032e221adf954adfe5fea269c
pkgname=gnuplot
pkgver=5.2.5
pkgrel=1
pkgdesc="Plotting package which outputs to X11, PostScript, PNG, GIF, and others"
arch=('x86_64')
url="http://www.gnuplot.info"
license=('custom')
depends=('readline' 'gd' 'cairo' 'libjpeg' 'lua' 'qt5-svg' 'qt5-tools' 'gnutls')
makedepends=('texinfo' 'texlive-core' 'emacs-nox' 'texlive-latexextra')
options=('!makeflags')
source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz"
"lua53_compat.patch")
sha1sums=('6c0e43968ec19f813241b91cbcf15e44f6ad5c73'
'9005fa9e4da91ceedb8ccd1d761866e7b064f8b1')
prepare() {
cd $pkgname-$pkgver
# fix default source location; use the GDFONTPATH variable to modify at runtime
sed -i 's|/usr/X11R6/lib/X11/fonts/truetype|/usr/share/fonts/TTF|' src/variable.c
sed -i -e 's|/usr/X11R6/lib/X11/fonts/Type1|/usr/share/fonts/Type1|' \
-e 's|$(X11ROOT)/X11R6/lib/X11/fonts/Type1|$(X11ROOT)/usr/share/fonts/Type1|' \
src/variable.c
patch -p1 < "$srcdir"/lua53_compat.patch
}
build() {
cd $pkgname-$pkgver
export CXXFLAGS="-std=c++11"
./configure --prefix=/usr \
--libexecdir=/usr/bin \
--with-gihdir=/usr/share/gnuplot \
--with-readline=gnu \
--disable-wxwidgets \
--with-bitmap-terminals \
--with-texdir=/usr/share/texmf/tex/latex/gnuplot
make pkglibexecdir=/usr/bin
}
package() {
cd $pkgname-$pkgver
make pkglibexecdir=/usr/bin DESTDIR="${pkgdir}" install
install -Dm644 Copyright "${pkgdir}/usr/share/licenses/$pkgname/Copyright"
rm -f "${pkgdir}/usr/share/texmf-dist/ls-R"
}