void-packages/srcpkgs/source-highlight/template
2020-05-20 21:46:44 +02:00

46 lines
1.2 KiB
Bash

# Template file for 'source-highlight'
pkgname=source-highlight
version=3.1.9
revision=4
build_style=gnu-configure
configure_args="--with-boost=${XBPS_CROSS_BASE}/usr
--with-bash-completion=/usr/share/bash-completion/completions"
makedepends="boost-devel"
short_desc="Convert source code to syntax highlighted document"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="http://www.gnu.org/software/src-highlite/"
distfiles="${GNU_SITE}/src-highlite/$pkgname-$version.tar.gz"
checksum=3a7fd28378cb5416f8de2c9e77196ec915145d44e30ff4e0ee8beb3fe6211c91
if [ "$CROSS_BUILD" ]; then
hostmakedepends="source-highlight"
fi
post_patch() {
# On Void, lesspipe is installed as lesspipe.sh
vsed -e 's/\blesspipe\b/&.sh/g' -i src/src-hilite-lesspipe.sh.in
}
post_configure() {
if [ "$CROSS_BUILD" ]; then
sed -e 's,SRCHILITEEXE =.*,SRCHILITEEXE = source-highlight,g' -i doc/Makefile
fi
}
libsource-highlight_package() {
short_desc+=" - runtime library"
pkg_install() {
vmove "usr/lib/*.so.*"
}
}
source-highlight-devel_package() {
short_desc+=" - development files"
depends="libsource-highlight>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
}
}