summaryrefslogtreecommitdiff
path: root/source/ap/sqlite
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/sqlite')
-rwxr-xr-xsource/ap/sqlite/sqlite.SlackBuild27
1 files changed, 20 insertions, 7 deletions
diff --git a/source/ap/sqlite/sqlite.SlackBuild b/source/ap/sqlite/sqlite.SlackBuild
index e3284444..650a3f1f 100755
--- a/source/ap/sqlite/sqlite.SlackBuild
+++ b/source/ap/sqlite/sqlite.SlackBuild
@@ -3,7 +3,7 @@
# Slackware build script for sqlite
# Copyright 2006 Martin Lefebvre <dadexter@gmail.com>
-# Copyright 2008, 2009, 2010, 2012 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2012, 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,9 +24,21 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PKGNAM=sqlite
+
+# First, convert the .zip file if needed:
+if ls *.zip 1> /dev/null 2> /dev/null ; then
+ unzip *.zip
+ tar cf $(basename *.zip .zip).tar $(basename *.zip .zip)
+ touch -r *.zip *.tar
+ xz -9 *.tar
+ rm -r $(basename *.zip .zip)
+ rm *.zip
+fi
+
VERSION=${VERSION:-$(echo $PKGNAM-src-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
OLD_STYLE=$(printf %d $(echo $VERSION | cut -b 1)).$(printf %d $(echo $VERSION | cut -b 2,3)).$(printf %d $(echo $VERSION | cut -b 4,5))
-PATCHLEVEL=$(printf %d $(echo $VERSION | cut -b 6,7))
+OLD_STYLE=$(printf "%1.f" $(echo $VERSION | cut -b 1)).$(printf "%1.f" $(echo $VERSION | cut -b 2,3)).$(printf "%1.f" $(echo $VERSION | cut -b 4,5))
+PATCHLEVEL=$(printf "%1.f" $(echo $VERSION | cut -b 6,7))
if [ ! "$PATCHLEVEL" = "0" ]; then
OLD_STYLE=${OLD_STYLE}.${PATCHLEVEL}
fi
@@ -37,7 +49,7 @@ NUMJOBS=${NUMJOBS:-" -j7 "}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -48,8 +60,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -63,7 +75,7 @@ else
fi
# Enable some features:
-SLKCFLAGS="$SLKCFLAGS -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_STAT2=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 -DSQLITE_SECURE_DELETE=1"
+SLKCFLAGS="$SLKCFLAGS -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 -DSQLITE_ENABLE_ICU -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_STAT2=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 -DSQLITE_SECURE_DELETE=1"
rm -rf $PKG
mkdir -p $TMP $PKG
@@ -80,7 +92,8 @@ find . \
configure() {
CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS $(icu-config --cppflags)" \
+LDFLAGS="$(icu-config --ldflags)" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \