updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / libbackend-elements / PKGBUILD
blob3953c5cb615dd65a94399aa37103b324b93cdea2
1 # Maintainer: kevku <kevku@msn.com>
2 pkgname=libbackend-elements
3 pkgver=1.7.2
4 pkgrel=1
5 pkgdesc="A collection of elementary building blocks for implementing compiler backends in c++"
6 arch=('x86_64' 'i686')
7 makedepends=('build' 'boost-libs' 'libcult')
8 url="http://www.kolpackov.net/projects/libbackend-elements"
9 license=('GPL2')
10 source=("ftp://kolpackov.net/pub/projects/$pkgname/1.7/$pkgname-$pkgver.tar.bz2")
11 md5sums=('1b7548faf0d20f90cb754b73ee3bd5b0')
13 build() {
14   cd "$srcdir/$pkgname-$pkgver"
15   #configuration
16   mkdir -p build/{ld,cxx/gnu,import/libboost,import/libcult}
18   cat >> build/cxx/configuration-dynamic.make <<- EOF
19         cxx_id       := gnu
20         cxx_optimize := n
21         cxx_debug    := n
22         cxx_rpath    := n
23         cxx_pp_extra_options :=
24         cxx_extra_options    := ${CXXFLAGS} -I/usr/include/boost
25         cxx_ld_extra_options := ${LDFLAGS}
26         cxx_extra_libs       :=
27         cxx_extra_lib_paths  :=
28                 EOF
30   cat >> build/cxx/gnu/configuration-dynamic.make <<- EOF
31         cxx_gnu := g++
32         cxx_gnu_libraries :=
33         cxx_gnu_optimization_options :=
34                 EOF
37   cat >> build/import/libboost/configuration-dynamic.make <<- EOF
38         libboost_installed := y
39         libboost_suffix :=
40                 EOF
42   cat >> build/import/libcult/configuration-dynamic.make <<- EOF
43         libcult_installed := y
44                 EOF
46   cat >> build/ld/configuration-lib-dynamic.make <<- EOF
47         ld_lib_type   := shared
48                 EOF
51   make
53 package() {
54  cd "$srcdir/$pkgname-$pkgver"
55  find backend-elements -iname "*.cxx" \
56                 -o -iname "makefile" \
57                 -o -iname "*.o" -o -iname "*.d" \
58                 -o -iname "*.m4" -o -iname "*.l" \
59                 -o -iname "*.cpp-options" -o -iname "*.so" | xargs rm -f
60         rm -rf backend-elements/arch
61   mkdir -p $pkgdir/usr/include
62   cp -r backend-elements $pkgdir/usr/include