OCaml 4.13.1 rebuild, fixes FS#72998
[arch-packages.git] / clucene / trunk / PKGBUILD
blob2a13bfe05650ab32337c4adee4a294f0ea3f590f
1 # Maintainer: AndyRTR <andyrtr@archlinux.org>
2 # Contributor: Alexander Rødseth
3 # Contributor: Alois Nespor <alois.nespor@gmail.com>
4 # Contributor: Tobias Powalowski <tpowa@archlinux.org>
5 pkgname=clucene
6 pkgver=2.3.3.4
7 pkgrel=11
8 pkgdesc="C++ port of the high-performance text search engine Lucene"
9 arch=('x86_64')
10 url="http://clucene.sourceforge.net/"
11 license=('APACHE' 'LGPL')
12 depends=('gcc-libs>=4.7.1-5' 'zlib' 'boost-libs')
13 makedepends=('cmake' 'boost>=1.54.0')
14 source=(https://downloads.sourceforge.net/$pkgname/$pkgname-core-$pkgver.tar.gz
15         # Fedora patches
16         clucene-core-2.3.3.4-pkgconfig.patch
17         clucene-core-2.3.3.4-install_contribs_lib.patch
18         # upstream patch
19         fix_zlib_detections.diff
20         # LibreOffice patches
21         clucene-warnings.patch
22         clucene-gcc-atomics.patch
23         clucene-debug.patch
24         clucene-narrowing-conversions.patch
25         clucene-multimap-put.patch)
26 sha512sums=('1c9da9077edcebd46563bd9e47d330518e0b30061016650a759cfe051e9748fdad8932a472b1cca53a6adafed5f41656527271fc5f55ddfcefb558f0d83286b4'
27             'b357cb5a1c5d66219f3168724a71af3ebf5c45c752a612d3a69c170b739acc065dc17c261c3a730298ea6c637fe820637a100f73ab03d931734f80bb598fbf55'
28             '0aa92635949089196e4e7c579e78761e8751987ef5036320a161a4aaa67da3c63756398c903419c76ea0fbdc8a949e871fcb65be98179a9853a24a5a4cacfde3'
29             '883cdd389a1f6f9483250cf55030b944f5a0b5e82607f9a71ead0abaa2a9a0f08bc339ffe0518c78b65ad543e659a9eee35555a7bd9abbdae9d5204499ac039f'
30             'd74c3e4cccbb05b576c063c8e25a67546b70c5bc59f2ee62be8a7095ae90020278709df79316b0f233153a76968abf465d933a81706ee2e68583f6bf921e6604'
31             'c2ed8a7e7612a47e1f49266f0ea07a2a29a9d5db2b7d6f5079c031cd6edef7f39b0d771ee6f88665957d798be05ff83fd8a93cc9a84b414d84ed3344034bd0de'
32             'd1de3ffba0ec3f5cf54c86339182355809be28e43245e49b3f78b43e8e8572fa6e7ca5ed174c22cc6792a678157a61f30773e3c2243f199d5178b6929f34bd41'
33             'f39f36b385f09722026a7759ee49b89ec6b5f06db0d56b472628cc68fd9badd35cc6b977122eb8e6ae108fa71b075315377ee83e9fc85e2d1722c434cfdc18b4'
34             '07c8b496045e5d9d4256ad854734d6228abb67455f2349b20173d42fc733cb0663559818542c257ef2cdd84e6d08f673bfea38591087498e2e2466f555af3b04')
36 build() {
37   cd "$srcdir"/$pkgname-core-$pkgver
39   # add missing contrib-libs needed by LibO 3.6, patch by FC
40   patch -Np1 -i "${srcdir}"/clucene-core-2.3.3.4-install_contribs_lib.patch
41   # pkgconfig file is missing clucene-shared (upstream ID: 3461512), patch by FC
42   patch -Np1 -i "${srcdir}"/clucene-core-2.3.3.4-pkgconfig.patch
43   # one upstream postrelease commit for proper zlib detection
44   patch -Np1 -i "${srcdir}"/fix_zlib_detections.diff
45   # LibreOffice patches http://cgit.freedesktop.org/libreoffice/core/tree/clucene/patches
46   patch -Np0 -i "${srcdir}"/clucene-warnings.patch
47   patch -Np0 -i "${srcdir}"/clucene-gcc-atomics.patch
48   patch -Np0 -i "${srcdir}"/clucene-debug.patch
49   patch -Np0 -i "${srcdir}"/clucene-narrowing-conversions.patch
50   patch -Np0 -i "${srcdir}"/clucene-multimap-put.patch
52   mkdir build
53   pushd build
54   cmake .. \
55     -DCMAKE_BUILD_TYPE=Release \
56     -DCMAKE_INSTALL_PREFIX=/usr \
57     -DENABLE_ASCII_MODE=OFF \
58     -DENABLE_PACKAGING=OFF \
59     -DBUILD_CONTRIBS_LIB:BOOL=ON \
60     -DLIB_DESTINATION:PATH=/usr/lib \
61     -DLUCENE_SYS_INCLUDES:PATH=/usr/lib \
62     -DDISABLE_MULTITHREADING=OFF
63   popd
64   make -C build
67 #check() {
68 #  cd $srcdir/$pkgname-core-$pkgver
69 #  make cl_test -C build
70 #  make test -C build || /bin/true # currently fails the tests as expected (see FC comment)
73 package() {
74   cd "$srcdir"/$pkgname-core-$pkgver
75   make DESTDIR="$pkgdir" install -C build
76   rm -rfv "$pkgdir"/usr/lib/CLuceneConfig.cmake
77   
78   cd "$pkgdir"/usr/include//CLucene
79   ln -s /usr/lib/CLucene/clucene-config.h .