updated on Sun Jan 15 16:02:00 UTC 2012
[aur-mirror.git] / libxsd-frontend / PKGBUILD
blob7ff731342446bd2c45cd3105600ba5672e0a0ace
1 # Maintainer: kevku <kevku@gmx.com>
2 pkgname=libxsd-frontend
3 pkgver=1.18.0
4 pkgrel=1
5 pkgdesc="A compiler frontend for the W3C XML Schema definition language"
6 arch=('x86_64' 'i686')
7 depends=('boost-libs' 'xerces-c' 'libfrontend-elements')
8 makedepends=('build' 'boost')
9 url="http://www.codesynthesis.com/projects/libxsd-frontend"
10 license=('GPL2')
11 source=("http://www.codesynthesis.com/download/$pkgname/1.18/$pkgname-$pkgver.tar.bz2"
12         "boost_fs_v2.patch"
13         "disable_tests.patch")
14 md5sums=('886f60ac32a380186b8ba99a03d83842'
15          'bf54d079953b631268b952faedaae276'
16          '6b3745ec62a6b9367ed7151d0f3cd653')
18 build() {
19   cd "$srcdir/$pkgname-$pkgver"
20   patch -Np1 -i "$srcdir/boost_fs_v2.patch"
21   patch -N -i "$srcdir/disable_tests.patch"
22   #configuration
24   mkdir -p \
25         build/{ld,cxx/gnu} \
26         build/import/lib{boost,cult,frontend-elements,xerces-c}
28   cat >> build/cxx/configuration-dynamic.make <<- EOF
29         cxx_id       := gnu
30         cxx_optimize := n
31         cxx_debug    := n
32         cxx_rpath    := n
33         cxx_pp_extra_options :=
34         cxx_extra_options    := ${CXXFLAGS} -I/usr/include/boost
35         cxx_ld_extra_options := ${LDFLAGS}
36         cxx_extra_libs       :=
37         cxx_extra_lib_paths  :=
38                 EOF
40   cat >> build/cxx/gnu/configuration-dynamic.make <<- EOF
41         cxx_gnu := g++
42         cxx_gnu_libraries :=
43         cxx_gnu_optimization_options :=
44                 EOF
45   cat >> build/import/libboost/configuration-dynamic.make <<- EOF
46         libboost_installed := y
47         libboost_suffix :=
48                 EOF
49   cat >> build/import/libcult/configuration-dynamic.make <<- EOF
50         libcult_installed := y
51                 EOF
52   cat >> build/ld/configuration-lib-dynamic.make <<- EOF
53         ld_lib_type   := shared
54                 EOF
55   cat >> build/import/libfrontend-elements/configuration-dynamic.make <<- EOF
56         libfrontend_elements_installed := y
57                 EOF
59   cat >> build/import/libxerces-c/configuration-dynamic.make <<- EOF
60         libxerces_c_installed := y
61                 EOF
63   make
66 package() {
67  cd "$srcdir/$pkgname-$pkgver"
68   install -D xsd-frontend/libxsd-frontend.so $pkgdir/usr/lib/libxsd-frontend.so
69   find xsd-frontend -iname "*.cxx" \
70                 -o -iname "makefile" \
71                 -o -iname ".git*" \
72                 -o -iname "*.o" -o -iname "*.d" \
73                 -o -iname "*.m4" -o -iname "*.l" \
74                 -o -iname "*.cpp-options" -o -iname "*.so" | xargs rm -f
75   
76   mkdir $pkgdir/usr/include
77   cp -r xsd-frontend $pkgdir/usr/include