updated on Sun Jan 15 08:01:04 UTC 2012
[aur-mirror.git] / libfrontend-elements / PKGBUILD
blobb66b8f40ba9bc1023bdc789354e318121f4fea2d
1 # Maintainer: kevku <kevku@msn.com>
2 pkgname=libfrontend-elements
3 pkgver=1.1.4
4 pkgrel=1
5 pkgdesc="A collection of elementary building blocks for implementing compiler frontends in c++"
6 arch=('x86_64' 'i686')
7 depends=('libcult')
8 makedepends=('build')
9 url="http://kolpackov.net/projects/libfrontend-elements"
10 license=('GPL2')
11 source=("ftp://kolpackov.net/pub/projects/$pkgname/1.1/$pkgname-$pkgver.tar.bz2")
12 md5sums=('d086e872cacdf3c3fa2e07f11ec08acd')
14 build() {
15   cd "$srcdir/$pkgname-$pkgver"
16   #configuration
17   sed -i \
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
25         cxx_id       := gnu
26         cxx_optimize := n
27         cxx_debug    := n
28         cxx_rpath    := n
29         cxx_pp_extra_options :=
30         cxx_extra_options    := ${CXXFLAGS}
31         cxx_ld_extra_options := ${LDFLAGS}
32         cxx_extra_libs       :=
33         cxx_extra_lib_paths  :=
34                 EOF
36   cat >> build/cxx/gnu/configuration-dynamic.make <<- EOF
37         cxx_gnu := g++
38         cxx_gnu_libraries :=
39         cxx_gnu_optimization_options :=
40                 EOF
42   cat >> build/ld/configuration-lib-dynamic.make <<- EOF
43         ld_lib_type   := shared
44                 EOF
45   cat >> build/import/libcult/configuration-dynamic.make <<- EOF
46         libcult_installed := y
47                 EOF
49   make
51 package() {
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