void-packages/srcpkgs/gap/template

64 lines
1.6 KiB
Bash

# Template file for 'gap'
pkgname=gap
version=4.12.1
revision=1
build_style=gnu-configure
makedepends="gmp-devel zlib-devel readline-devel"
checkdepends="perl"
short_desc="Groups, Algorithms, Programming - computational discrete algebra"
maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
license="GPL-2.0-or-later"
homepage="https://www.gap-system.org/"
changelog="https://raw.githubusercontent.com/gap-system/gap/master/CHANGES.md"
distfiles="https://github.com/gap-system/gap/releases/download/v${version}/gap-${version}.tar.gz"
checksum=f9ebef11ee31b210ce36e3c70960742b4e253282bbd5270adc9324273c92b016
if [ "$XBPS_CHECK_PKGS" = full ]; then
# not sure about this -- takes about 25 minutes
make_check_target=teststandard
fi
_GAPROOT=/usr/share/gap/
# minimal required packages
_GAPPKGS="autodoc gapdoc primgrp smallgrp transgrp"
# other expected packages
_GAPPKGS+=" atlasrep autpgrp alnuth crisp ctbllib factint fga irredsol laguna
polenta polycyclic radiroot resclasses sophus tomlib utils"
post_extract() {
# keep around only the packages that we want to install
mkdir pkg.install
for p in ${_GAPPKGS}; do
mv "pkg/$p" pkg.install
done
mv pkg pkg.orig
mv pkg.install pkg
}
post_install() {
vmkdir ${_GAPROOT}
vcopy pkg ${_GAPROOT}
}
pre_check() {
msg_normal "Check that loading packages works\n"
for p in ${_GAPPKGS}; do
cat <<-EOF
if LoadPackage("$p") <> true then
Error("loading package '$p'");
fi;
EOF
done | ./gap --quitonbreak -b -q -r
}
gap-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
}
}