gnuplot: use alternatives.

This commit is contained in:
Christian Neukirchen 2016-02-11 15:14:31 +01:00
parent 7ec3a7427c
commit e8ec6e3ee7
1 changed files with 9 additions and 3 deletions

View File

@ -1,7 +1,7 @@
# Template file for 'gnuplot'
pkgname=gnuplot
version=5.0.2
revision=1
revision=2
configure_args="--with-readline=builtin"
hostmakedepends="pkg-config lua52"
makedepends="zlib-devel libX11-devel gd-devel lua52-devel"
@ -22,6 +22,8 @@ if [ -z "$CROSS_BUILD" ]; then
subpackages+=" gnuplot-wx gnuplot-qt"
fi
alternatives="gnuplot:gnuplot:/usr/bin/gnuplot-x11"
pre_configure() {
# fix fonts location
sed -i \
@ -75,8 +77,9 @@ do_install() {
# install qt and rename binary
make -C qt DESTDIR=${DESTDIR} install
mv ${DESTDIR}/usr/bin/gnuplot{,-qt}
# install wx
# install wx and rename binary
make -C wx DESTDIR=${DESTDIR} install
mv ${DESTDIR}/usr/bin/gnuplot{,-wx}
else
find -name '*.o' -delete
make -C x11/docs DESTDIR=${DESTDIR} \
@ -84,6 +87,7 @@ do_install() {
LDFLAGS="$BUILD_LDFLAGS" install
fi
vlicense x11/Copyright LICENSE
rm ${DESTDIR}/usr/share/man/man1/gnuplot-ja*
}
gnuplot-common_package() {
@ -106,14 +110,16 @@ gnuplot-wx_package() {
replaces="gnuplot<4.6.6_1"
depends="gnuplot-common>=${version}_${revision}"
short_desc+=" - wxWidgets frontend"
alternatives="gnuplot:gnuplot:/usr/bin/gnuplot-wx"
pkg_install() {
vmove usr/bin/gnuplot
vmove usr/bin/gnuplot-wx
}
}
gnuplot-qt_package() {
depends="gnuplot-common>=${version}_${revision}"
short_desc+=" - Qt frontend"
alternatives="gnuplot:gnuplot:/usr/bin/gnuplot-qt"
pkg_install() {
vmove usr/bin/gnuplot-qt
vmove usr/libexec/gnuplot/${version%.*}/gnuplot_qt