1 # Maintainer: kevku <kevku@msn.com>
2 pkgname=libfrontend-elements
5 pkgdesc="A collection of elementary building blocks for implementing compiler frontends in c++"
9 url="http://kolpackov.net/projects/libfrontend-elements"
11 source=("ftp://kolpackov.net/pub/projects/$pkgname/1.1/$pkgname-$pkgver.tar.bz2")
12 md5sums=('d086e872cacdf3c3fa2e07f11ec08acd')
15 cd "$srcdir/$pkgname-$pkgver"
18 -e 's| $(out_base)/examples/[[:alnum:]\.]*||' \
19 -e '/examples\/makefile/d' \
20 makefile || die "sed failed"
22 mkdir -p build/{cxx/gnu,ld}
24 cat >> build/cxx/configuration-dynamic.make <<- EOF
29 cxx_pp_extra_options :=
30 cxx_extra_options := ${CXXFLAGS}
31 cxx_ld_extra_options := ${LDFLAGS}
33 cxx_extra_lib_paths :=
36 cat >> build/cxx/gnu/configuration-dynamic.make <<- EOF
39 cxx_gnu_optimization_options :=
42 cat >> build/ld/configuration-lib-dynamic.make <<- EOF
45 cat >> build/import/libcult/configuration-dynamic.make <<- EOF
46 libcult_installed := y
52 cd "$srcdir/$pkgname-$pkgver"
53 install -D frontend-elements/libfrontend-elements.so $pkgdir/usr/lib/libfrontend-elements.so
54 find frontend-elements -iname "*.cxx" \
55 -o -iname "makefile" \
56 -o -iname "*.o" -o -iname "*.d" \
57 -o -iname "*.m4" -o -iname "*.l" \
58 -o -iname "*.cpp-options" -o -iname "*.so" | xargs rm -f
59 mkdir $pkgdir/usr/include
60 cp -r frontend-elements $pkgdir/usr/include