1 # Maintainer: Eugen Zagorodniy e dot zagorodniy at gmail dot com
6 pkgdesc="A KML library written in C++ with bindings to other languages"
8 url="http://code.google.com/p/$pkgname/"
10 depends=('expat' 'uriparser')
11 optdepends=('swig: bindings for additional languages'
12 'python2: python bindings'
14 # TODO: Use existing libminizip package instead of conflicting with it.
15 conflicts=('libminizip')
16 source=("http://$pkgname.googlecode.com/files/$pkgname-$pkgver.tar.gz"
17 "swig-version-check.patch")
18 md5sums=('25d534437f971bf55a945608e39fea79'
19 'ba79679b85f24c5e6e82241683ea4a0f')
22 cd "$srcdir/$pkgname-$pkgver"
24 # Take into account major version number when checking version of SWIG
25 # in configure script.
26 patch < $srcdir/swig-version-check.patch
28 # '--Wno-long-long' works around warning (with -Wall treated as error)
29 # in 'third_party/boost_1_34_1/boost/config/suffix.hpp', lines 435-436.
31 # '--no-as-needed' works around 'undefined reference' errors in
32 # 'examples/helloworld'.
34 # Add --disable-python or --disable-java to configure flags if your
35 # system doesn't have corresponding language.
37 CXXFLAGS+=-Wno-long-long LDFLAGS+=-Wl,--no-as-needed PYTHON=python2 \
38 ./configure --prefix=/usr --enable-systempython \
39 --with-python-include-dir=/usr/include/python2.7 \
40 --with-python-lib-dir=/usr/lib/python2.7
43 # TODO: Use installed packages instead of contents of third_party
44 # directory if possible.
46 # TODO: Either fix 'WARNING: Package contains reference to $srcdir' or
47 # ensure that it is harmless.
51 cd "$srcdir/$pkgname-$pkgver"
52 make DESTDIR="$pkgdir/" install
53 # TODO: Remove uriparser sources before building and use existing package.
54 rm "$pkgdir/usr/lib/liburiparser."{{,l}a,so{,.1{,.0.5}}}
55 mkdir -p "$pkgdir/share/licenses/$pkgname"
56 cp COPYING "$pkgdir/share/licenses/$pkgname/"