Browse Source

Cleanup, fix remaining issues with pyqt windows

tags/v1.1
falkTX 9 months ago
parent
commit
1457cc89d8
4 changed files with 62 additions and 7 deletions
  1. +17
    -7
      bootstrap-carla.sh
  2. +13
    -0
      patches/Python/win32/9003-debian-dist-packages-dir.patch
  3. +31
    -0
      patches/qtbase/win32/01_use-qsort.patch
  4. +1
    -0
      patches/qtbase/win64

+ 17
- 7
bootstrap-carla.sh View File

@@ -51,6 +51,7 @@ function build_conf_python() {
export CFLAGS="$(echo ${CFLAGS} | sed -e 's/-ffast-math//')"
export CFLAGS="$(echo ${CFLAGS} | sed -e 's/-fdata-sections -ffunction-sections//')"
export LDFLAGS="$(echo ${LDFLAGS} | sed -e 's/-Wl,-dead_strip -Wl,-dead_strip_dylibs//')"
export LDFLAGS="$(echo ${LDFLAGS} | sed -e 's/-Wl,--strip-all//')"
export LDFLAGS="$(echo ${LDFLAGS} | sed -e 's/-fdata-sections -ffunction-sections//')"

if [ ! -f "${pkgdir}/.stamp_preconfigured" ] && [ "${WIN32}" -eq 1 ]; then
@@ -117,6 +118,7 @@ function build_pyqt() {
export CXXFLAGS="$(echo ${CXXFLAGS} | sed -e 's/-fvisibility-inlines-hidden//')"
export CXXFLAGS="$(echo ${CXXFLAGS} | sed -e 's/-fdata-sections -ffunction-sections//')"
export LDFLAGS="$(echo ${LDFLAGS} | sed -e 's/-Wl,-dead_strip -Wl,-dead_strip_dylibs//')"
export LDFLAGS="$(echo ${LDFLAGS} | sed -e 's/-Wl,--strip-all//')"
export LDFLAGS="$(echo ${LDFLAGS} | sed -e 's/-fdata-sections -ffunction-sections//')"

if [ "${WIN32}" -eq 1 ]; then
@@ -132,7 +134,13 @@ function build_pyqt() {
ln -sf "${PAWPAW_PREFIX}/bin"/Qt* release/
fi

python3 configure.py ${extraconfrules}
local python3=python3

if [ "${CROSS_COMPILING}" -eq 1 ]; then
python3=python3.8
fi

${python3} configure.py ${extraconfrules}

# build sip as host tool first
if [ "${CROSS_COMPILING}" -eq 1 ] && [ "${name}" = "sip" ]; then
@@ -194,13 +202,15 @@ function build_pyqt() {
make PREFIX="${PAWPAW_PREFIX}" PKG_CONFIG="${TARGET_PKG_CONFIG}" ${MAKE_ARGS} -j 1 install

if [ "${name}" = "PyQt5_gpl" ]; then
sed -i -e "s|/usr|${PAWPAW_PREFIX}|g" ${PAWPAW_PREFIX}/bin/pylupdate5
sed -i -e "s|/usr|${PAWPAW_PREFIX}|g" ${PAWPAW_PREFIX}/bin/pyrcc5
sed -i -e "s|/usr|${PAWPAW_PREFIX}|g" ${PAWPAW_PREFIX}/bin/pyuic5
sed -i -e "s|/usr|${PAWPAW_PREFIX}|g" ${PAWPAW_PREFIX}/bin/py*5
if [ -n "${APP_EXT}" ]; then
sed -i -e "s|3.8 -m|3.8${APP_EXT} -m|" ${PAWPAW_PREFIX}/bin/py*5
fi
if [ -n "${EXE_WRAPPER}" ]; then
sed -i -e "s|exec /|exec ${EXE_WRAPPER} /|g" ${PAWPAW_PREFIX}/bin/pylupdate5
sed -i -e "s|exec /|exec ${EXE_WRAPPER} /|g" ${PAWPAW_PREFIX}/bin/pyrcc5
sed -i -e "s|exec /|exec ${EXE_WRAPPER} /|g" ${PAWPAW_PREFIX}/bin/pyuic5
sed -i -e "s|exec /|exec ${EXE_WRAPPER} /|" ${PAWPAW_PREFIX}/bin/py*5
fi
if [ "${WIN32}" -eq 1 ]; then
sed -i -e "s|d ||" ${PAWPAW_PREFIX}/lib/pkgconfig/Qt5*.pc
fi
fi
touch .stamp_installed


+ 13
- 0
patches/Python/win32/9003-debian-dist-packages-dir.patch View File

@@ -0,0 +1,13 @@
diff --git a/Lib/site.py b/Lib/site.py
index 3238506..8ce44ef 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -341,6 +341,8 @@ def getsitepackages(prefixes=None):
sitepackages.append(os.path.join(prefix, "lib",
"python%d.%d" % sys.version_info[:2],
"site-packages"))
+ # used in Debian
+ sitepackages.append(os.path.join(prefix, "lib", "python3", "dist-packages"))
else:
sitepackages.append(prefix)
sitepackages.append(os.path.join(prefix, "lib", "site-packages"))

+ 31
- 0
patches/qtbase/win32/01_use-qsort.patch View File

@@ -0,0 +1,31 @@
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp
index bf88aaa..1df99a8 100644
--- a/src/widgets/dialogs/qfilesystemmodel.cpp
+++ b/src/widgets/dialogs/qfilesystemmodel.cpp
@@ -1109,7 +1109,7 @@ void QFileSystemModelPrivate::sortChildren(int column, const QModelIndex &parent
}
}
QFileSystemModelSorter ms(column);
- std::sort(values.begin(), values.end(), ms);
+ qStableSort(values.begin(), values.end(), ms);
// First update the new visible list
indexNode->visibleChildren.clear();
//No more dirty item we reset our internal dirty index
@@ -1660,7 +1660,7 @@ void QFileSystemModelPrivate::_q_directoryChanged(const QString &directory, cons
return;
QStringList toRemove;
QStringList newFiles = files;
- std::sort(newFiles.begin(), newFiles.end());
+ qSort(newFiles.begin(), newFiles.end());
for (auto i = parentNode->children.constBegin(), cend = parentNode->children.constEnd(); i != cend; ++i) {
QStringList::iterator iterator = std::lower_bound(newFiles.begin(), newFiles.end(), i.value()->fileName);
if ((iterator == newFiles.end()) || (i.value()->fileName < *iterator))
@@ -1840,7 +1840,7 @@ void QFileSystemModelPrivate::_q_fileSystemChanged(const QString &path, const QV
}
// bundle up all of the changed signals into as few as possible.
- std::sort(rowsToUpdate.begin(), rowsToUpdate.end());
+ qSort(rowsToUpdate.begin(), rowsToUpdate.end());
QString min;
QString max;
for (int i = 0; i < rowsToUpdate.count(); ++i) {

+ 1
- 0
patches/qtbase/win64 View File

@@ -0,0 +1 @@
win32

Loading…
Cancel
Save