pkgname=clucene pkgver=2.3.3.4 pkgrel=31 pkgdesc="CLucene is a C++ port of Lucene: A high-performance, full-featured text search engine." arch=('x86_64') url="https://clucene.sourceforge.net" license=('APACHE' 'LGPL') depends=('gcc-libs' 'zlib') makedepends=('cmake' 'boost') source=("https://downloads.sourceforge.net/clucene/${pkgname}-core-${pkgver}.tar.gz" 'clucene-core-2.3.3.4-install_contribs_lib.patch' 'clucene-core-2.3.3.4-pkgconfig.patch' 'fix_zlib_detections.diff' "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-cpp/clucene/files/clucene-2.3.3.4-fix-binary-function.patch" 'missing-time.h.patch') md5sums=('48d647fbd8ef8889e5a7f422c1bfda94' '7e8004510b0cdeec29bbecb36307669b' '28faf56ff95eb1f5239885ad5060e28f' 'f9bce8197704b1d2ebd47c37648f1a17' '8257225c469a044fcd8be57495d2baaa' 'a3cdf0f62059fc33fed82ad6ca306be5') build() { cd ${pkgname}-core-${pkgver} # Fedora patches needed by Libre 3.6 patch -p1 -i ${srcdir}/clucene-core-2.3.3.4-install_contribs_lib.patch patch -p1 -i ${srcdir}/clucene-core-2.3.3.4-pkgconfig.patch # one upstream postrelease commit for proper zlib detection patch -p1 -i ${srcdir}/fix_zlib_detections.diff # gcc 12, c++17 needed patch -p1 -i ${srcdir}/clucene-2.3.3.4-fix-binary-function.patch patch -p1 -i ${srcdir}/missing-time.h.patch mkdir -p build pushd build cmake .. \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ -DENABLE_ASCII_MODE=OFF \ -DENABLE_PACKAGING=OFF \ -DBUILD_CONTRIBS_LIB:BOOL=ON \ -DLIB_DESTINATION:PATH=/usr/lib \ -DLUCENE_SYS_INCLUDES:PATH=/usr/lib \ -DDISABLE_MULTITHREADING=OFF popd make -C build } package() { cd ${pkgname}-core-${pkgver} make DESTDIR=${pkgdir} install -C build rm -rf ${pkgdir}/usr/lib/CLuceneConfig.cmake }