diff options
author | Eric Hameleers <alien@slackware.com> | 2015-07-20 20:17:50 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2015-07-20 20:17:50 +0000 |
commit | 3a0555c5f25e9279918a9c7b0f10aca1f3e875f4 (patch) | |
tree | b22b39933d3ce78bdcfbcff25a941675e3e7d4c5 /calibre | |
parent | 087efbe3b3b88ced8481da2cd51558716156e6b7 (diff) | |
download | asb-3a0555c5f25e9279918a9c7b0f10aca1f3e875f4.tar.gz asb-3a0555c5f25e9279918a9c7b0f10aca1f3e875f4.tar.xz |
calibre: updated to 2.32.1
Diffstat (limited to 'calibre')
-rwxr-xr-x | calibre/build/calibre.SlackBuild | 77 |
1 files changed, 54 insertions, 23 deletions
diff --git a/calibre/build/calibre.SlackBuild b/calibre/build/calibre.SlackBuild index 44a92008..2a23c1bd 100755 --- a/calibre/build/calibre.SlackBuild +++ b/calibre/build/calibre.SlackBuild @@ -46,6 +46,8 @@ # * Update. # 2.31.0-1: 15/jul/2015 by Eric Hameleers <alien@slackware.com> # * Update. +# 2.32.1-1: 20/jul/2015 by Eric Hameleers <alien@slackware.com> +# * Update. # # Run 'sh calibre.SlackBuild' to build a Slackware package. # The package (.txz) and .txt file as well as build logs are created in /tmp . @@ -54,7 +56,7 @@ # ----------------------------------------------------------------------------- PRGNAM=calibre -VERSION=${VERSION:-2.31.0} +VERSION=${VERSION:-2.32.1} BUILD=${BUILD:-1} NUMJOBS=${NUMJOBS:-" -j4 "} TAG=${TAG:-alien} @@ -74,6 +76,9 @@ REQUIRED_MTP="1.1.5" # Only used in case we need to build our own libmtp: INT_MTP=1.1.8 +# Only used when we build our own ImageMagick: +INT_MAGICK=6.9.1-9 + REQUIRED_PYTHON="2.7" REQUIRED_PYTHON_MIN="1" @@ -98,8 +103,6 @@ INT_PYCRYPTO=2.6 INT_PYQT=5.4.1 INT_APSW=3.7.17-r1 -#INT_MAGICK=6.9.1-3 - # Where do we look for sources? SRCDIR=$(cd $(dirname $0); pwd) PATCHDIR=${SRCDIR}/patches @@ -112,6 +115,11 @@ OUTPUT=${OUTPUT:-/tmp} SOURCE[0]="$SRCDIR/${PRGNAM}-${VERSION}.tar.xz" SRCURL[0]="http://downloads.sourceforge.net/${PRGNAM}/${PRGNAM}-${VERSION}.tar.xz" +# Allow the package builder to override BUILD_MAGICK: +# By default we do not compile an internal version but enabling this +# allows us to be independant of Slackware's ImageMagick upgrades. +BUILD_MAGICK=${BUILD_MAGICK:-NO} + # Allow the package builder to override BUILD_QT: if [ -z "$BUILD_QT" ]; then if pkg-config --exists "Qt5Core >= $REQUIRED_QT" ; then @@ -206,9 +214,6 @@ if [ "$BUILD_PYTHONMODS" = "YES" ]; then SOURCE[16]="$SRCDIR/Pygments-${INT_PYGMENTS}.tar.gz" SRCURL[16]="https://pypi.python.org/packages/source/P/Pygments/Pygments-${INT_PYGMENTS}.tar.gz" - #SOURCE[17]="$SRCDIR/ImageMagick-${INT_MAGICK}.tar.xz" - #SRCURL[17]="http://www.imagemagick.org/download/ImageMagick-${INT_MAGICK}.tar.xz" - NEXT_ARRAYEL=${#SOURCE[@]} else NEXT_ARRAYEL=1 @@ -241,6 +246,15 @@ if [ "$BUILD_QT" = "YES" ]; then NEXT_ARRAYEL=$(( ${NEXT_ARRAYEL} + 1 )) fi +if [ "$BUILD_MAGICK" = "YES" ]; then + echo ">> Compiling Magick <<" + + SOURCE[$NEXT_ARRAYEL]="$SRCDIR/ImageMagick-${INT_MAGICK}.tar.xz" + SRCURL[$NEXT_ARRAYEL]="http://www.imagemagick.org/download/releases/ImageMagick-${INT_MAGICK}.tar.xz" + + NEXT_ARRAYEL=$(( ${NEXT_ARRAYEL} + 1 )) +fi + ## ## --- with a little luck, you won't have to edit below this point --- ## ## @@ -330,7 +344,7 @@ echo "++" echo "|| $PRGNAM-$VERSION" echo "++" -if [ "$BUILD_PYTHON" = "YES" -o "$BUILD_PYTHONMODS" = "YES" -o "$BUILD_MTP" = "YES" -o "$BUILD_QT" = "YES" ]; then +if [ "$BUILD_PYTHON" = "YES" -o "$BUILD_PYTHONMODS" = "YES" -o "$BUILD_MTP" = "YES" -o "$BUILD_QT" = "YES" -o "$BUILD_MAGICK" = "YES" ]; then # Sanity check: in case we need to build an internal set of python interpreter # plus support modules, then you must not compile this package when calibre # is already installed! @@ -509,14 +523,14 @@ make_mtp() { # Build ImageMagick: # -make_ImageMagick() { +make_magick() { local MOD="ImageMagick" echo -e "\n** $MOD **\n" cd $TMP/tmp-$PRGNAM/ImageMagick-${INT_MAGICK} - LDFLAGS="-L$(pwd)/magick/.libs ${LDFLAGS}" \ + LDFLAGS="" CFLAGS="" CXXFLAGS="" \ ./configure \ --prefix=/usr/lib${LIBDIRSUFFIX}/calibre \ --enable-shared \ @@ -526,14 +540,25 @@ make_ImageMagick() { --without-frozenpaths \ --without-perl \ --without-x \ + --with-gcc-arch=$ARCH \ --enable-zero-configuration \ --build=$TARGET \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_${MOD}.log - # Build (no parallel build!) and install: + # Build (no parallel build!) and install: follow the official SlackBuild + # and first install to the target location, then rebuild and install into + # the package location. make 2>&1 | tee $OUTPUT/make-${PRGNAM}_${MOD}.log - make install DESTDIR=$PKG \ + make install \ 2>&1 | tee $OUTPUT/install-${PRGNAM}_${MOD}.log + make clean + echo -e "\n** Second run of 'make' for ImageMagick **\n" \ + >> $OUTPUT/make-${PRGNAM}_${MOD}.log + make 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_${MOD}.log + echo -e "\n** Second run of 'make install' for ImageMagick **\n" \ + >> $OUTPUT/make-${PRGNAM}_${MOD}.log + make install DESTDIR=$PKG \ + 2>&1 | tee -a $OUTPUT/install-${PRGNAM}_${MOD}.log # .la files in libdir should be removed. # Other .la files should be left alone, as ImageMagick uses them internally @@ -545,7 +570,7 @@ make_ImageMagick() { cp -a AUTHORS LICENSE NEWS NOTICE README* \ $PKG/usr/lib${LIBDIRSUFFIX}/calibre/doc/internaldeps/${MOD} || true -} # End make_ImageMagick +} # End make_magick # # Build python 2.7: @@ -1018,10 +1043,6 @@ make_calibre () { esac fi - ## Without the creation of these directories, calibre-0.9.33 refuses to build: - #cat $PATCHDIR/calibre.missingdirs.patch | patch -p1 --verbose \ - # 2>&1 | tee -a $OUTPUT/patch-$PRGNAM.log - # 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 @@ -1116,7 +1137,7 @@ make_calibre () { # # Compilation of the software: -if [ "$BUILD_PYTHON" = "YES" -o "$BUILD_PYTHONMODS" = "YES" -o "$BUILD_QT" = "YES" -o "$BUILD_MTP" = "YES" ]; then +if [ "$BUILD_PYTHON" = "YES" -o "$BUILD_PYTHONMODS" = "YES" -o "$BUILD_QT" = "YES" -o "$BUILD_MTP" = "YES" -o "$BUILD_MAGICK" = "YES" ]; then if [ -f $SRCDIR/${PRGNAM}_pythondeps-${SLACKVER}-${ARCH}.tar.bz2 ]; then # We unwrap the tarball of compiled python internal libraries instead of # having to build them - this saves a _lot_ of compile time: @@ -1153,7 +1174,23 @@ if [ "$BUILD_MTP" = "YES" ]; then make_mtp rsync -a $PKG/usr/lib${LIBDIRSUFFIX}/calibre/ /usr/lib${LIBDIRSUFFIX}/calibre/ + fi +fi + +if [ "$BUILD_MAGICK" = "YES" ]; then + # We want to have an internal version of ImageMagick to be less dependent + # of Slackware library version changes. + + if [ ! -f $SRCDIR/${PRGNAM}_pythondeps-${SLACKVER}-${ARCH}.tar.bz2 ]; then + # No tarball containing pre-compiled libraries was found. + # We need to build Magick ourself. + + # After each part is built we will sync to here because in the end, calibre + # will wipe the origin and we will have to sync it all back: + mkdir -p /usr/lib${LIBDIRSUFFIX}/calibre + make_magick + rsync -a $PKG/usr/lib${LIBDIRSUFFIX}/calibre/ /usr/lib${LIBDIRSUFFIX}/calibre/ fi fi @@ -1170,7 +1207,6 @@ if [ "$BUILD_QT" = "YES" ]; then make_qt5 rsync -a $PKG/usr/lib${LIBDIRSUFFIX}/calibre/ /usr/lib${LIBDIRSUFFIX}/calibre/ - fi fi @@ -1187,7 +1223,6 @@ if [ "$BUILD_PYTHON" = "YES" ]; then make_python rsync -a $PKG/usr/lib${LIBDIRSUFFIX}/calibre/ /usr/lib${LIBDIRSUFFIX}/calibre/ - fi SLK_PYTHON_INCLUDES="-I/usr/lib${LIBDIRSUFFIX}/calibre/include/python${REQUIRED_PYTHON}" @@ -1261,10 +1296,6 @@ if [ "$BUILD_PYTHONMODS" = "YES" ]; then make_pyqt rsync -a $PKG/usr/lib${LIBDIRSUFFIX}/calibre/ /usr/lib${LIBDIRSUFFIX}/calibre/ - # Does not work yet, linker errors: - #make_ImageMagick - #rsync -a $PKG/usr/lib${LIBDIRSUFFIX}/calibre/ /usr/lib${LIBDIRSUFFIX}/calibre/ - fi fi |