summaryrefslogtreecommitdiff
path: root/source/l/clucene
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/clucene')
-rwxr-xr-xsource/l/clucene/clucene.SlackBuild66
-rw-r--r--source/l/clucene/clucene.info5
-rw-r--r--source/l/clucene/clucene.pkgconfig.patch24
-rw-r--r--source/l/clucene/slack-desc7
4 files changed, 70 insertions, 32 deletions
diff --git a/source/l/clucene/clucene.SlackBuild b/source/l/clucene/clucene.SlackBuild
index e72989fa..8600cccf 100755
--- a/source/l/clucene/clucene.SlackBuild
+++ b/source/l/clucene/clucene.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/sh
# Copyright 2007 Heinz Wiesinger <hmwiesinger@gmx.at>
-# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,6 +22,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Modified by Robby Workman <rworkman@slackware.com>
+# Modified by Eric Hameleers <alien@slackware.com>
# No added terms or copyright claims
@@ -29,22 +30,20 @@ PKGNAM=clucene
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-1}
+NUMJOBS=${NUMJOBS:--j7}
+
# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
- arm*) export ARCH=arm ;;
+ case "$MARCH" in
+ i?86) export ARCH=i486 ;;
+ armv7hl) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$( uname -m ) ;;
+ *) export ARCH=$MARCH ;;
esac
fi
-NUMJOBS=${NUMJOBS:--j6}
-
-CWD=$(pwd)
-TMP=${TMP:-/tmp}
-PKG=$TMP/package-clucene
-
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
@@ -54,17 +53,28 @@ elif [ "$ARCH" = "s390" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-clucene
+
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
-rm -rf clucene-core-$VERSION
-tar xvf $CWD/clucene-core-$VERSION.tar.?z* || exit 1
-cd clucene-core-$VERSION || exit 1
+rm -rf clucene-src-$VERSION
+tar xvf $CWD/clucene-src-$VERSION.tar.?z* || exit 1
+cd clucene-src-$VERSION || exit 1
+
+# Fix the pkgconfig file by adding required shared library.
+cat $CWD/clucene.pkgconfig.patch | patch -p1 --verbose || exit 1
+
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -72,25 +82,27 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --disable-static \
- --build=$ARCH-slackware-linux
-
-make $NUMJOBS || make || exit 1
-make install DESTDIR=$PKG || exit 1
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ ..
+ make $NUMJOBS || make || exit 1
+ make install DESTDIR=$PKG || exit 1
+cd ..
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
mkdir -p $PKG/usr/doc/clucene-$VERSION
cp -a \
- APACHE.license AUTHORS COPYING* HACKING INSTALL \
+ APACHE.license AUTHORS COPYING* ChangeLog INSTALL \
LGPL.license NEWS README* REQUESTS \
$PKG/usr/doc/clucene-$VERSION
diff --git a/source/l/clucene/clucene.info b/source/l/clucene/clucene.info
deleted file mode 100644
index 52478e81..00000000
--- a/source/l/clucene/clucene.info
+++ /dev/null
@@ -1,5 +0,0 @@
-PRGNAM="clucene"
-VERSION="0.9.20"
-HOMEPAGE="http://clucene.sourceforge.net"
-DOWNLOAD="http://downloads.sourceforge.net/clucene/clucene-core-0.9.20.tar.bz2"
-MD5SUM="da62da5d23b17fec67f0175481a603b8"
diff --git a/source/l/clucene/clucene.pkgconfig.patch b/source/l/clucene/clucene.pkgconfig.patch
new file mode 100644
index 00000000..61444799
--- /dev/null
+++ b/source/l/clucene/clucene.pkgconfig.patch
@@ -0,0 +1,24 @@
+From 7be4a19b76d98260cf95040a47935f854a4ba7a4 Mon Sep 17 00:00:00 2001
+From: Valentin Rusu <kde@rusu.info>
+Date: Sat, 17 Dec 2011 13:47:58 +0100
+Subject: [PATCH] Fix .pc file by adding clucene-shared library
+
+---
+ src/core/libclucene-core.pc.cmake | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/core/libclucene-core.pc.cmake b/src/core/libclucene-core.pc.cmake
+index 0152b25..d421e70 100644
+--- a/src/core/libclucene-core.pc.cmake
++++ b/src/core/libclucene-core.pc.cmake
+@@ -6,6 +6,6 @@ includedir=${prefix}/include:${prefix}/include/CLucene/ext
+ Name: libclucene
+ Description: CLucene - a C++ search engine, ported from the popular Apache Lucene
+ Version: @CLUCENE_VERSION_MAJOR@.@CLUCENE_VERSION_MINOR@.@CLUCENE_VERSION_REVISION@.@CLUCENE_VERSION_PATCH@
+-Libs: -L${prefix}/@LIB_DESTINATION@/ -lclucene-core
++Libs: -L${prefix}/@LIB_DESTINATION@/ -lclucene-core -lclucene-shared
+ Cflags: -I${prefix}/include -I${prefix}/include/CLucene/ext
+ ~
+--
+1.7.8
+
diff --git a/source/l/clucene/slack-desc b/source/l/clucene/slack-desc
index 5d1d1a27..4d20e0ad 100644
--- a/source/l/clucene/slack-desc
+++ b/source/l/clucene/slack-desc
@@ -1,3 +1,10 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
|-----handy-ruler----------------------------------------------------|
clucene: clucene (Text-Search Engine)
clucene: