updated on Fri Jan 20 20:16:25 UTC 2012
[aur-mirror.git] / xsd / PKGBUILD
blobb91a74a76e68d051af62c297b128c5f8ac373f1e
1 # Maintainer: kevku <kevku@msn.com>
2 pkgname=xsd
3 pkgver=3.3.0
4 pkgrel=4
5 pkgdesc="An open-source, cross-platform W3C XML Schema to C++ data binding compiler"
6 arch=('i686' 'x86_64')
7 url="http://www.codesynthesis.com/products/xsd"
8 license=('GPL2')
9 depends=('boost-libs' 'libxsd-frontend' 'libbackend-elements' 'zlib')
10 makedepends=('build' 'boost')
11 source=("http://www.codesynthesis.com/download/$pkgname/3.3/$pkgname-$pkgver.tar.bz2"
12         "3.3.0-disable_examples_and_tests.patch"
13         "3.3.0-fix_include.patch"
14         "3.3.0-fix_tests.patch"
15         "3.3.0-xsdcxx-rename.patch")
16 md5sums=('3723c74d320dd1e23afcc07510ed0306'
17          'b8545d9d37d31a731c9fea425b3730b0'
18          '5e8e993f015bee8fa1f99bc416943031'
19          '1f346b4b4a54c7b78b51f2fe81ef8e7f'
20          '99df6f9149504acd3276306f7f33367e')
22 build() {
23     cd $srcdir/$pkgname-$pkgver
24     patch -Np1 -i "$srcdir/$pkgver-disable_examples_and_tests.patch"
25     patch -Np1 -i "$srcdir/$pkgver-xsdcxx-rename.patch"
26     patch -Np1 -i "$srcdir/$pkgver-fix_include.patch"
27     patch -Np1 -i "$srcdir/$pkgver-fix_tests.patch"
29     mkdir -p \
30                 build/cxx/gnu \
31                 build/import/lib{ace,boost,cult,backend-elements,xerces-c,xqilla,xsd-frontend,z}
33     cat >> build/configuration-dynamic.make <<- EOF
34         xsd_with_zlib := y
35         xsd_with_ace := n
36         xsd_with_xdr := y
37         xsd_with_dbxml := n
38         xsd_with_xqilla := y
39         xsd_with_boost_date_time := y
40         xsd_with_boost_serialization := y
41                 EOF
43      cat >> build/cxx/configuration-dynamic.make <<- EOF
44         cxx_id       := gnu
45         cxx_optimize := n
46         cxx_debug    := n
47         cxx_rpath    := n
48         cxx_pp_extra_options :=
49         cxx_extra_options    := ${CXXFLAGS} -I/usr/include/boost
50         cxx_ld_extra_options := ${LDFLAGS}
51         cxx_extra_libs       :=
52         cxx_extra_lib_paths  :=
53                 EOF
55      cat >> build/cxx/gnu/configuration-dynamic.make <<- EOF
56         cxx_gnu := g++
57         cxx_gnu_libraries :=
58         cxx_gnu_optimization_options :=
59                 EOF
61      cat >> build/import/libace/configuration-dynamic.make <<- EOF
62         libace_installed := n
63                 EOF
65      cat >> build/import/libbackend-elements/configuration-dynamic.make <<- EOF
66         libbackend_elements_installed := y
67                 EOF
69      cat >> build/import/libboost/configuration-dynamic.make <<- EOF
70         libboost_installed := y
71         libboost_suffix := 
72         libboost_system := n
73                 EOF
75      cat >> build/import/libcult/configuration-dynamic.make <<- EOF
76         libcult_installed := y
77                 EOF
79      cat >> build/import/libxerces-c/configuration-dynamic.make <<- EOF
80         libxerces_c_installed := y
81                 EOF
83      cat >> build/import/libxqilla/configuration-dynamic.make <<- EOF
84         libxqilla_installed := y
85                 EOF
87      cat >> build/import/libxsd-frontend/configuration-dynamic.make <<- EOF
88         libxsd_frontend_installed := y
89                 EOF
91      cat >> build/import/libz/configuration-dynamic.make <<- EOF
92         libz_installed := y
93                 EOF
95      make
98 package() {
99  cd $srcdir/$pkgname-$pkgver/
100     make install_prefix="$pkgdir/usr" install
101     # Renaming binary/manpage to avoid collision with mono-2.0's xsd/xsd2
102     mv $pkgdir/usr/bin/xsd{,cxx}
103     mv $pkgdir/usr/share/man/man1/xsd{,cxx}.1