summaryrefslogtreecommitdiff
path: root/source/l/PyQt/PyQt.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/PyQt/PyQt.SlackBuild')
-rwxr-xr-xsource/l/PyQt/PyQt.SlackBuild68
1 files changed, 36 insertions, 32 deletions
diff --git a/source/l/PyQt/PyQt.SlackBuild b/source/l/PyQt/PyQt.SlackBuild
index 6c2bd12c..7f866e16 100755
--- a/source/l/PyQt/PyQt.SlackBuild
+++ b/source/l/PyQt/PyQt.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Slackware build script for PyQt
@@ -29,19 +29,30 @@
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=PyQt
-VERSION=${VERSION:-$(echo ${PKGNAM}4_gpl_x11-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+VERSION=${VERSION:-$(echo ${PKGNAM}4_gpl_x11-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
-MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i586 ;;
- armv7hl) export ARCH=$MARCH ;;
- arm*) export ARCH=arm ;;
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
+ *) ARCH=$(uname -m) ;;
esac
+ export ARCH
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+else
+ SLKCFLAGS="-O2"
fi
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
@@ -57,26 +68,15 @@ NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -mtune=i686"
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
-elif [ "$ARCH" = "armv7hl" ]; then
- SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
-else
- SLKCFLAGS="-O2"
-fi
-
-PYTHONLIB=$( python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())' )
-PYTHON3LIB=$( python3 -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())' )
+PYTHON2LIB=$( python2 -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())' 2>/dev/null )
+PYTHON3LIB=$( python3 -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())' 2>/dev/null )
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
+
rm -rf ${PKGNAM}4_gpl_x11-$VERSION
-tar xvf $CWD/${PKGNAM}4_gpl_x11-$VERSION.tar.xz || exit 1
+tar xvf $CWD/${PKGNAM}4_gpl_x11-$VERSION.tar.?z || exit 1
cd ${PKGNAM}4_gpl_x11-$VERSION || exit 1
# Fix phonon detection:
@@ -91,26 +91,31 @@ find . \
# This avoids compiling a version number into KDE's .la files:
export QTDIR=/usr/lib${LIBDIRSUFFIX}/qt
+export QT4DIR=/usr/lib${LIBDIRSUFFIX}/qt
export CFLAGS="$SLKCFLAGS"
export CXXFLAGS="$SLKCFLAGS"
-python3 configure.py --confirm-license --verbose
-
+python3 configure.py \
+ --confirm-license \
+ --qsci-api \
+ --verbose
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG INSTALL_ROOT=$PKG || exit 1
+make clean
mv $PKG/usr/bin/pyuic4 $PKG/usr/bin/pyuic4-py3
+rm -rf $PKG/$PYTHON3LIB/${PKGNAM}4/uic/port_v2/
-make clean
-
-python configure.py --confirm-license --verbose
+python2 configure.py \
+ --confirm-license \
+ --qsci-api \
+ --verbose
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG INSTALL_ROOT=$PKG || exit 1
-rm -rf $PKG/$PYTHON3LIB/PyQt4/uic/port_v2/
-rm -rf $PKG/$PYTHONLIB/PyQt4/uic/port_v3/
+rm -rf $PKG/$PYTHON2LIB/${PKGNAM}4/uic/port_v3/
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
@@ -132,4 +137,3 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $TMP/$PKGNAM-$(echo $VERSION |tr - _)-$ARCH-$BUILD.txz
-