47 lines
1.6 KiB
Bash
47 lines
1.6 KiB
Bash
# Template file for 'highlight'
|
|
pkgname=highlight
|
|
version=4.1
|
|
revision=3
|
|
build_style=gnu-makefile
|
|
hostmakedepends="pkg-config swig perl"
|
|
makedepends="boost-devel lua54-devel perl"
|
|
short_desc="Fast and flexible source code highlighter (CLI version)"
|
|
maintainer="Steve Prybylski <sa.prybylx@gmail.com>"
|
|
license="GPL-3.0-or-later"
|
|
homepage="http://www.andre-simon.de/doku/highlight/en/highlight.php"
|
|
distfiles="http://www.andre-simon.de/zip/${pkgname}-${version}.tar.bz2"
|
|
checksum=3a4b6aa55b9837ea217f78e1f52bb294dbf3aaf4ccf8a5553cf859be4fbf3907
|
|
# No check target, fails spectacularly when asked
|
|
make_check=no
|
|
conf_files="/etc/highlight/filetypes.conf"
|
|
|
|
post_extract() {
|
|
# prevent leakage of cflags from host during cross, we don't care about
|
|
# most of them (except the largefile ones); we will pass the correct
|
|
# ones for target ourselves manually; but we still want include path
|
|
vsed -i '/PERL_INC/s/eccopts/eperl_inc/' extras/swig/makefile
|
|
}
|
|
|
|
pre_build() {
|
|
# extra flags used during build of perl itself
|
|
local _ecflags=
|
|
if [ "$XBPS_TARGET_LIBC" = "glibc" ]; then
|
|
_ecflags="-D_FILE_OFFSET_BITS=64 -DLARGE_FILE_SUPPORT64"
|
|
fi
|
|
make -C extras/swig perl "CXX=$CXX -fPIC -lperl $CFLAGS $_ecflags $LDFLAGS"
|
|
}
|
|
|
|
post_install() {
|
|
rm -r ${DESTDIR}/usr/share/doc/highlight/extras
|
|
}
|
|
|
|
highlight-perl_package() {
|
|
short_desc+=" - perl module"
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
pkg_install() {
|
|
vmkdir usr/lib/perl5/vendor_perl/auto/highlight
|
|
vinstall extras/swig/highlight.so 755 usr/lib/perl5/vendor_perl/auto/highlight
|
|
vinstall extras/swig/highlight.pm 644 usr/lib/perl5/vendor_perl
|
|
}
|
|
}
|