summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2019-02-21 00:18:34 +0100
committer Eric Hameleers <alien@slackware.com>2019-02-21 00:18:34 +0100
commit35231fe5b5b2d3343f6e4193acad800cfb7c48b4 (patch)
treeded6ca7848d77739d7acf77b392997da1bff98b3
parentca12c76aebfa3f071eae915b0578b58500c89948 (diff)
downloadktown-35231fe5b5b2d3343f6e4193acad800cfb7c48b4.tar.gz
ktown-35231fe5b5b2d3343f6e4193acad800cfb7c48b4.tar.xz
Make PyQt4 and QScintilla compile again
-rw-r--r--deps/QScintilla/.url2
-rwxr-xr-xdeps/QScintilla/QScintilla.SlackBuild112
-rw-r--r--deps/QScintilla/patches/QScintilla_qsciscintillabase_qurl.diff11
-rw-r--r--deps/sip/patches/PyQt4_sip_regression.patch71
-rwxr-xr-xdeps/sip/sip.SlackBuild6
5 files changed, 146 insertions, 56 deletions
diff --git a/deps/QScintilla/.url b/deps/QScintilla/.url
index 83e87e6..66849ec 100644
--- a/deps/QScintilla/.url
+++ b/deps/QScintilla/.url
@@ -1 +1 @@
-https://www.riverbankcomputing.com/static/Downloads/QScintilla/QScintilla_gpl-2.11.tar.gz
+https://www.riverbankcomputing.com/static/Downloads/QScintilla/QScintilla_gpl-2.11.1.tar.gz
diff --git a/deps/QScintilla/QScintilla.SlackBuild b/deps/QScintilla/QScintilla.SlackBuild
index 339b62b..1ddc363 100755
--- a/deps/QScintilla/QScintilla.SlackBuild
+++ b/deps/QScintilla/QScintilla.SlackBuild
@@ -28,8 +28,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=QScintilla
-VERSION=${VERSION:-2.11}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-2.11.1}
+BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:-" -j$(nproc) "}
@@ -78,6 +78,10 @@ cd $TMP
rm -rf ${PKGNAM}_gpl-$VERSION
tar xvf $CWD/${PKGNAM}_gpl-$VERSION.tar.?z || exit 1
cd ${PKGNAM}_gpl-$VERSION || exit 1
+
+# Fix compilation:
+cat $CWD/patches/QScintilla_qsciscintillabase_qurl.diff | patch -p1 --verbose || exit 1
+
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -147,58 +151,58 @@ fi
# QT4 SUPPORT CURRENTLY DOES NOT COMPILE...
# /usr/lib64/qt/include/QtCore/qglobal.h:2242:20: error: invalid application of 'sizeof' to incomplete type 'QUrl'
-## QT4 support:
-#echo "-- Compiling Qt4 support --"
-#cd Qt4Qt5
-# echo "-- >> Qt4Qt5 --"
-# qmake \
-# -o Makefile \
-# QMAKE_CFLAGS+="$SLKCFLAGS" \
-# QMAKE_CXXFLAGS+="$SLKCFLAGS -std=c++11" \
-# qscintilla.pro || exit 1
-# make $NUMJOBS || exit 1
-# make install INSTALL_ROOT=$PKG || exit 1
-#cd -
-#
-#cd designer-Qt4Qt5
-# echo "-- >> designer-Qt4Qt5 --"
-# qmake \
-# -o Makefile \
-# INCLUDEPATH+=../Qt4Qt5 QMAKE_LIBDIR+=../Qt4Qt5 \
-# QMAKE_CFLAGS+="$SLKCFLAGS" \
-# QMAKE_CXXFLAGS+="$SLKCFLAGS -std=c++11" \
-# designer.pro || exit 1
-# make $NUMJOBS || exit 1
-# make install INSTALL_ROOT=$PKG || exit 1
-#cd -
-#
-#cd Python
-# echo "-- >> Python --"
-# python3 configure.py \
-# --verbose \
-# --qmake /usr/bin/qmake \
-# -n ../Qt4Qt5/ -o ../Qt4Qt5/ -c \
-# || exit 1
-# make -j1 || exit 1
-# make -j1 install INSTALL_ROOT=$PKG || exit 1
-#
-# make clean || exit 1
-#
-# python2 configure.py \
-# --verbose \
-# --qmake /usr/bin/qmake \
-# -n ../Qt4Qt5/ -o ../Qt4Qt5/ -c \
-# || exit 1
-# make -j1 || exit 1
-# make -j1 install INSTALL_ROOT=$PKG || exit 1
-#cd -
-#
-## Link the shared qt4 libraries into /usr/lib${LIBDIRSUFFIX}:
-#( cd $PKG/usr/lib${LIBDIRSUFFIX}
-# for file in $(ls -1 qt/lib/*.so* 2>/dev/null) ; do
-# ln -sf $file .
-# done
-#)
+# QT4 support:
+echo "-- Compiling Qt4 support --"
+cd Qt4Qt5
+ echo "-- >> Qt4Qt5 --"
+ qmake \
+ -o Makefile \
+ QMAKE_CFLAGS+="$SLKCFLAGS" \
+ QMAKE_CXXFLAGS+="$SLKCFLAGS -std=c++11" \
+ qscintilla.pro || exit 1
+ make $NUMJOBS || exit 1
+ make install INSTALL_ROOT=$PKG || exit 1
+cd -
+
+cd designer-Qt4Qt5
+ echo "-- >> designer-Qt4Qt5 --"
+ qmake \
+ -o Makefile \
+ INCLUDEPATH+=../Qt4Qt5 QMAKE_LIBDIR+=../Qt4Qt5 \
+ QMAKE_CFLAGS+="$SLKCFLAGS" \
+ QMAKE_CXXFLAGS+="$SLKCFLAGS -std=c++11" \
+ designer.pro || exit 1
+ make $NUMJOBS || exit 1
+ make install INSTALL_ROOT=$PKG || exit 1
+cd -
+
+cd Python
+ echo "-- >> Python --"
+ python3 configure.py \
+ --verbose \
+ --qmake /usr/bin/qmake \
+ -n ../Qt4Qt5/ -o ../Qt4Qt5/ -c \
+ || exit 1
+ make -j1 || exit 1
+ make -j1 install INSTALL_ROOT=$PKG || exit 1
+
+ make clean || exit 1
+
+ python2 configure.py \
+ --verbose \
+ --qmake /usr/bin/qmake \
+ -n ../Qt4Qt5/ -o ../Qt4Qt5/ -c \
+ || exit 1
+ make -j1 || exit 1
+ make -j1 install INSTALL_ROOT=$PKG || exit 1
+cd -
+
+# Link the shared qt4 libraries into /usr/lib${LIBDIRSUFFIX}:
+( cd $PKG/usr/lib${LIBDIRSUFFIX}
+ for file in $(ls -1 qt/lib/*.so* 2>/dev/null) ; do
+ ln -sf $file .
+ done
+)
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
diff --git a/deps/QScintilla/patches/QScintilla_qsciscintillabase_qurl.diff b/deps/QScintilla/patches/QScintilla_qsciscintillabase_qurl.diff
new file mode 100644
index 0000000..9720a4b
--- /dev/null
+++ b/deps/QScintilla/patches/QScintilla_qsciscintillabase_qurl.diff
@@ -0,0 +1,11 @@
+--- QScintilla_gpl-2.11.1/Qt4Qt5/qsciscintillabase.cpp.orig
++++ QScintilla_gpl-2.11.1/Qt4Qt5/qsciscintillabase.cpp
+@@ -37,6 +37,7 @@
+ #include <QScrollBar>
+ #include <QStyle>
+ #include <QTextCodec>
++#include <QUrl>
+
+ #include "SciAccessibility.h"
+ #include "ScintillaQt.h"
+
diff --git a/deps/sip/patches/PyQt4_sip_regression.patch b/deps/sip/patches/PyQt4_sip_regression.patch
new file mode 100644
index 0000000..e656ff4
--- /dev/null
+++ b/deps/sip/patches/PyQt4_sip_regression.patch
@@ -0,0 +1,71 @@
+# HG changeset patch
+# User Phil Thompson <phil@riverbankcomputing.com>
+# Date 1550579387 0
+# Node ID 7bd4d19479adc46c40e8d43629aaac871fae6cd7
+# Parent 4ab117a13343cd8d8f5804600936f445fb2d59ef
+Fixed a code generation regression specific to PyQt4.
+
+diff -r 4ab117a13343 -r 7bd4d19479ad sipgen/gencode.c
+--- a/sipgen/gencode.c Tue Feb 12 09:27:11 2019 +0000
++++ b/sipgen/gencode.c Tue Feb 19 12:29:47 2019 +0000
+@@ -295,7 +295,7 @@
+ static int emptyIfaceFile(sipSpec *pt, ifaceFileDef *iff);
+ static void declareLimitedAPI(int py_debug, moduleDef *mod, FILE *fp);
+ static int generatePluginSignalsTable(sipSpec *pt, classDef *cd,
+- const char *pyqt_prefix, FILE *fp);
++ int pyqt_version, FILE *fp);
+ static int generatePyQt5ClassPlugin(sipSpec *pt, classDef *cd, FILE *fp);
+ static int generatePyQt4ClassPlugin(sipSpec *pt, classDef *cd, FILE *fp);
+ static void generateGlobalFunctionTableEntries(sipSpec *pt, moduleDef *mod,
+@@ -15542,7 +15542,7 @@
+ * Generate the PyQt4/5 signals table.
+ */
+ static int generatePluginSignalsTable(sipSpec *pt, classDef *cd,
+- const char *pyqt_prefix, FILE *fp)
++ int pyqt_version, FILE *fp)
+ {
+ int is_signals = FALSE;
+
+@@ -15586,8 +15586,8 @@
+ "\n"
+ "\n"
+ "/* Define this type's signals. */\n"
+-"static const %sQtSignal signals_%C[] = {\n"
+- , pyqt_prefix, classFQCName(cd));
++"static const pyqt%dQtSignal signals_%C[] = {\n"
++ , pyqt_version, classFQCName(cd));
+ }
+
+ /*
+@@ -15628,9 +15628,9 @@
+
+ if (is_signals)
+ prcode(fp,
+-" {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR}\n"
++" {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, %s}\n"
+ "};\n"
+- );
++ , (pyqt_version == 5 ? "SIP_NULLPTR" : "0"));
+ }
+
+ return is_signals;
+@@ -15643,7 +15643,7 @@
+ */
+ static int generatePyQt5ClassPlugin(sipSpec *pt, classDef *cd, FILE *fp)
+ {
+- int is_signals = generatePluginSignalsTable(pt, cd, "pyqt5", fp);
++ int is_signals = generatePluginSignalsTable(pt, cd, 5, fp);
+
+ prcode(fp,
+ "\n"
+@@ -15696,7 +15696,7 @@
+ */
+ static int generatePyQt4ClassPlugin(sipSpec *pt, classDef *cd, FILE *fp)
+ {
+- int is_signals = generatePluginSignalsTable(pt, cd, "pyqt4", fp);
++ int is_signals = generatePluginSignalsTable(pt, cd, 4, fp);
+
+ prcode(fp,
+ "\n"
+
+
diff --git a/deps/sip/sip.SlackBuild b/deps/sip/sip.SlackBuild
index cda5235..38e620a 100755
--- a/deps/sip/sip.SlackBuild
+++ b/deps/sip/sip.SlackBuild
@@ -27,7 +27,7 @@
PKGNAM=sip
VERSION=${VERSION:-4.19.14}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:-" -j$(nproc) "}
@@ -70,6 +70,10 @@ cd $TMP
rm -rf $PKGNAM-$VERSION
tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
cd $PKGNAM-$VERSION || exit 1
+
+# Get PyQt4 to compile:
+cat $CWD/patches/PyQt4_sip_regression.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 \) \