void-packages/srcpkgs/pfff/template

37 lines
1.0 KiB
Bash

# Template build file for 'pfff'
pkgname=pfff
version=0.29
revision=4
build_style=configure
configure_args="--prefix=/usr"
short_desc="Tools and APIs for code analysis, visualization and transformation"
maintainer="John Regan <john@jrjrtech.com>"
license="LGPL-2.1"
homepage="https://github.com/facebook/pfff"
distfiles="$homepage/archive/v${version}.tar.gz"
checksum="d31c68f1ebb1770297eb26441d21d83728c0fbdb9c7bb3be27625db45fae72d1"
makedepends="perl ocaml ocaml-findlib ocaml-num camlp4 zlib-devel ncurses-devel"
depends="ocaml"
nocross=yes
nostrip=yes
export OCAMLPARAM="safe-string=0,_"
post_extract() {
sed -i s/uint32/uint32_t/g external/ocamlzip/zlibstubs.c
sed -i '50,${/exception Error/d}' external/ocamlzip/zip.ml #duplicate def
sed -i 's/-warn-error .a//' Makefile.common lang_php/matcher/Makefile
}
do_build() {
make depend
make
make opt
}
do_install() {
make DESTDIR=$DESTDIR install
mkdir -p $DESTDIR/usr/lib/ocaml
make OCAMLFIND_LDCONF=$DESTDIR/tmp/ld.conf OCAMLFIND_DESTDIR=$DESTDIR/usr/lib/ocaml install-findlib
}