summaryrefslogtreecommitdiffstats
path: root/calibre
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2019-10-24 10:49:30 +0000
committer Eric Hameleers <alien@slackware.com>2019-10-24 10:49:30 +0000
commit326a07b81d04743110b605bbafab4c1e6521ec75 (patch)
treeded8a1149d2f4634478ebf475838a5f2f4e0ee10 /calibre
parentd90b2c679db25cb6310236b13746412e18776c07 (diff)
downloadasb-326a07b81d04743110b605bbafab4c1e6521ec75.tar.gz
asb-326a07b81d04743110b605bbafab4c1e6521ec75.tar.xz
calibre: script fixes, adding hunspell.
Warn that on Slackware 14.2 you need to have installed meson, python3 and python3-setuptools
Diffstat (limited to 'calibre')
-rwxr-xr-xcalibre/build/calibre.SlackBuild80
1 files changed, 65 insertions, 15 deletions
diff --git a/calibre/build/calibre.SlackBuild b/calibre/build/calibre.SlackBuild
index d7945fc0..da58c1a6 100755
--- a/calibre/build/calibre.SlackBuild
+++ b/calibre/build/calibre.SlackBuild
@@ -28,6 +28,7 @@
# For: calibre
# Descr: e-book library management application
# URL: http://calibre-ebook.com/
+# Build needs:(Slackware 14.2) meson, python3, python3-setuptools.
# Needs: If you did not add Qt5 to the package, you will also need:
# libinput,libxkbcommon,qt5.
# If you did not add python2.7 to the package, you will also need:
@@ -188,9 +189,7 @@ INT_MARKDOWN=3.1
INT_MECHANIZE=0.4.3
INT_MSGPACK=0.6.1
INT_NETIFACES=0.10.9
-INT_OPTIPNG=0.7.7
INT_PILLOW=6.2.0
-INT_PODOFO=0.9.6
INT_PSUTIL=5.6.2
INT_PYCRYPTO=2.6.1
INT_PYGMENTS=2.3.1
@@ -202,10 +201,15 @@ INT_SIX=1.12.0
INT_SOUPSIEVE=1.9.1
INT_SQLITE=3280000
INT_UNRARDLL=0.1.3
-INT_UNRARSRC=5.5.6
INT_WEBENC=0.5.1
INT_XKB=0.9.1
+# Software that's an internal dependency to the package:
+INT_HUNSPELL=1.7.0
+INT_OPTIPNG=0.7.7
+INT_PODOFO=0.9.6
+INT_UNRARSRC=5.5.6
+
# Where do we look for sources?
SRCDIR=$(cd $(dirname $0); pwd)
PATCHDIR=${SRCDIR}/patches
@@ -366,11 +370,14 @@ if [ "$BUILD_PYTHONMODS" = "YES" ]; then
SOURCE[31]="$SRCDIR/sources/chardet-${INT_CHARDET}.tar.gz"
SRCURL[31]="https://pypi.io/packages/source/c/chardet/chardet-${INT_CHARDET}.tar.gz"
- SOURCE[32]="$SRCDIR/sources/unrarsrc-${INT_UNRARSRC}.tar.gz"
- SRCURL[32]="http://www.rarlab.com/rar/unrarsrc-${INT_UNRARSRC}.tar.gz"
+ SOURCE[32]="$SRCDIR/sources/PyQtWebEngine_gpl-${INT_PYQTWEBENG}.tar.gz"
+ SRCURL[32]="https://www.riverbankcomputing.com/static/Downloads/PyQtWebEngine/${INT_PYQTWEBENG}/PyQtWebEngine_gpl-${INT_PYQTWEBENG}.tar.gz"
+
+ SOURCE[33]="$SRCDIR/sources/unrarsrc-${INT_UNRARSRC}.tar.gz"
+ SRCURL[33]="http://www.rarlab.com/rar/unrarsrc-${INT_UNRARSRC}.tar.gz"
- SOURCE[33]="$SRCDIR/sources/PyQtWebEngine_gpl-${INT_PYQTWEBENG}.tar.gz"
- SRCURL[33]="https://www.riverbankcomputing.com/static/Downloads/PyQtWebEngine/${INT_PYQTWEBENG}/PyQtWebEngine_gpl-${INT_PYQTWEBENG}.tar.gz"
+ SOURCE[34]="$SRCDIR/sources/hunspell-${INT_HUNSPELL}.tar.gz"
+ SRCURL[34]="https://github.com/hunspell/hunspell/archive/v${INT_HUNSPELL}.tar.gz"
NEXT_ARRAYEL=${#SOURCE[@]}
else
@@ -1343,7 +1350,7 @@ make_optipng() {
#
make_unrarsrc() {
- local MOD="make_unrarsrc"
+ local MOD="unrarsrc"
echo -e "\n** $MOD **\n"
cd $TMP/tmp-$PRGNAM/unrar
@@ -1372,6 +1379,42 @@ make_unrarsrc() {
#
+# Build hunspell:
+#
+make_hunspell() {
+
+ local MOD="hunspell"
+ echo -e "\n** $MOD **\n"
+
+ cd $TMP/tmp-$PRGNAM/hunspell-${INT_HUNSPELL}
+
+ autoreconf -vif \
+ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_${MOD}.log
+
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix=/usr/lib${LIBDIRSUFFIX}/calibre \
+ --disable-static \
+ --with-readline \
+ --build=$TARGET \
+ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_${MOD}.log
+
+ # Build and install:
+ make $NUMJOBS || make \
+ 2>&1 | tee $OUTPUT/make-${PRGNAM}_${MOD}.log
+ make install DESTDIR=$PKG \
+ 2>&1 | tee $OUTPUT/install-${PRGNAM}_${MOD}.log
+
+ # Add documentation:
+ mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/calibre/doc/internaldeps/${MOD}
+ cp -a ABOUT-NLS AUTHORS* BUGS COPYING* ChangeLog* NEWS README* THANKS TODO \
+ $PKG/usr/lib${LIBDIRSUFFIX}/calibre/doc/internaldeps/${MOD} || true
+
+} # End make_hunspell
+
+
+#
# Build python-regex:
#
make_regex() {
@@ -1751,13 +1794,15 @@ make_calibre () {
touch $OUTPUT/patch-$PRGNAM.log
cd $TMP/tmp-$PRGNAM/${SRCNAM}-${VERSION}
- # This dropping of privilege is unneccessary and breaks the SlackBuild:
- sed -i -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
- setup/install.py
+ if [ "$P1" != "--oldbuild" ]; then
+ # This dropping of privilege is unneccessary and breaks the SlackBuild:
+ sed -i -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
+ setup/install.py
- # Calibre should not hard-code the hunspell library version:
- OURLIB=$(pkg-config --libs hunspell |sed 's/-l//')
- sed -i setup/extensions.json -e 's/"libraries": "hunspell-.*"/"libraries": "'$OURLIB'"/'
+ ## Calibre should not hard-code the hunspell library version:
+ #OURLIB=$(pkg-config --libs hunspell |sed 's/-l//')
+ #sed -i setup/extensions.json -e 's/"libraries": "hunspell-.*"/"libraries": "'$OURLIB'"/'
+ fi
# See if we picked up any compiler or linker flags for python:
LDFLAGS=${LDFLAGS:-""}
@@ -1788,6 +1833,8 @@ make_calibre () {
2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log
fi
+ export HUNSPELL_INC_DIR="/usr/lib${LIBDIRSUFFIX}/calibre/include/hunspell" \
+ export HUNSPELL_LIB_DIR="/usr/lib${LIBDIRSUFFIX}/calibre/lib" \
export PODOFO_INC_DIR="/usr/lib${LIBDIRSUFFIX}/calibre/include/podofo" \
export PODOFO_LIB_DIR="/usr/lib${LIBDIRSUFFIX}/calibre/lib" \
@@ -1877,7 +1924,10 @@ make_calibre () {
#
if [ "$BUILD_PYTHONMODS" = "YES" ]; then
- # Not part of Slackware and need it:
+ # Not part of Slackware or too old, and need it:
+ make_hunspell
+ rsync -a $PKG/usr/lib${LIBDIRSUFFIX}/calibre/ /usr/lib${LIBDIRSUFFIX}/calibre/
+
make_optipng
rsync -a $PKG/usr/lib${LIBDIRSUFFIX}/calibre/ /usr/lib${LIBDIRSUFFIX}/calibre/