void-packages/srcpkgs/cparser/template

47 lines
1.0 KiB
Bash

# Template file for 'cparser'
pkgname=cparser
version=1.22.0
revision=3
wrksrc="cparser-cparser-${version}"
makedepends="libfirm-devel"
depends="gcc"
short_desc="C99 parser (with GNU extensions) and libfirm frontend"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="GPL-2.0-or-later"
homepage="http://libfirm.org/"
distfiles="https://github.com/MatzeB/cparser/archive/cparser-${version}.tar.gz"
checksum=0965aa23d8ed7d4cce309806fec2d2c18ad20a74a084340baed0dc874b24175b
case "$XBPS_TARGET_MACHINE" in
aarch64*|ppc*) broken="requires broken libfirm" ;;
esac
post_extract() {
rmdir libfirm
}
do_configure() {
vsed -i Makefile -e 's;"\\#;"#;g'
cat <<EOF >config.mak
variant = release
CFLAGS_release = $CFLAGS
LINKFLAGS_release = $LDFLAGS
V = 1
CC = $CC
FIRM_CPPFLAGS =
FIRM_LIBS = -lfirm -lm
COMPILER_INCLUDE_DIR = -DCOMPILER_INCLUDE_DIR=\"/usr/lib/${pkgname}/include\"
EOF
}
do_build() {
make ${makejobs}
}
do_install() {
vbin build/release/cparser
vman cparser.1
vmkdir usr/lib/${pkgname}
vcopy include usr/lib/${pkgname}
}