summaryrefslogtreecommitdiff
path: root/repo/qt5-qtbase
diff options
context:
space:
mode:
Diffstat (limited to 'repo/qt5-qtbase')
-rw-r--r--repo/qt5-qtbase/qt-musl-iconv-no-bom.patch11
-rw-r--r--repo/qt5-qtbase/qt5-base-cflags.patch46
-rw-r--r--repo/qt5-qtbase/qt5-base-nostrip.patch13
-rw-r--r--repo/qt5-qtbase/qt5-qtbase.xibuild78
4 files changed, 148 insertions, 0 deletions
diff --git a/repo/qt5-qtbase/qt-musl-iconv-no-bom.patch b/repo/qt5-qtbase/qt-musl-iconv-no-bom.patch
new file mode 100644
index 0000000..8bf35ec
--- /dev/null
+++ b/repo/qt5-qtbase/qt-musl-iconv-no-bom.patch
@@ -0,0 +1,11 @@
+--- qtbase/src/corelib/codecs/qiconvcodec.cpp 2017-01-18 15:20:58.000000000 +0100
++++ qtbase/src/corelib/codecs/qiconvcodec.cpp 2017-02-21 14:33:32.423808603 +0100
+@@ -64,7 +64,7 @@
+ #elif defined(Q_OS_AIX)
+ # define NO_BOM
+ # define UTF16 "UCS-2"
+-#elif defined(Q_OS_FREEBSD)
++#elif defined(Q_OS_FREEBSD) || (defined(Q_OS_LINUX) && !defined(__GLIBC__))
+ # define NO_BOM
+ # if Q_BYTE_ORDER == Q_BIG_ENDIAN
+ # define UTF16 "UTF-16BE"
diff --git a/repo/qt5-qtbase/qt5-base-cflags.patch b/repo/qt5-qtbase/qt5-base-cflags.patch
new file mode 100644
index 0000000..c33aa78
--- /dev/null
+++ b/repo/qt5-qtbase/qt5-base-cflags.patch
@@ -0,0 +1,46 @@
+diff --git a/mkspecs/common/g++-unix.conf b/mkspecs/common/g++-unix.conf
+index a493cd5984..41342f5020 100644
+--- a/mkspecs/common/g++-unix.conf
++++ b/mkspecs/common/g++-unix.conf
+@@ -10,5 +10,6 @@
+
+ include(g++-base.conf)
+
+-QMAKE_LFLAGS_RELEASE += -Wl,-O1
++SYSTEM_LDFLAGS = $$(LDFLAGS)
++!isEmpty(SYSTEM_LDFLAGS) { eval(QMAKE_LFLAGS_RELEASE += $$(LDFLAGS)) } else { QMAKE_LFLAGS_RELEASE += -Wl,-O1 }
+ QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined
+diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf
+index 1f919d270a..7ef6046326 100644
+--- a/mkspecs/common/gcc-base.conf
++++ b/mkspecs/common/gcc-base.conf
+@@ -40,9 +40,11 @@ QMAKE_CFLAGS_OPTIMIZE_SIZE = -Os
+ QMAKE_CFLAGS_DEPS += -M
+ QMAKE_CFLAGS_WARN_ON += -Wall -Wextra
+ QMAKE_CFLAGS_WARN_OFF += -w
+-QMAKE_CFLAGS_RELEASE += $$QMAKE_CFLAGS_OPTIMIZE
+-QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -g
+-QMAKE_CFLAGS_DEBUG += -g
++SYSTEM_CFLAGS = $$(CFLAGS)
++SYSTEM_DEBUG_CFLAGS = $$(DEBUG_CFLAGS)
++!isEmpty(SYSTEM_CFLAGS) { eval(QMAKE_CFLAGS_RELEASE += $$(CPPFLAGS) $$(CFLAGS)) } else { QMAKE_CFLAGS_RELEASE += $$QMAKE_CFLAGS_OPTIMIZE }
++!isEmpty(SYSTEM_CFLAGS) { eval(QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$(CPPFLAGS) -g $$(CFLAGS)) } else { QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -g }
++!isEmpty(SYSTEM_DEBUG_CFLAGS) { eval(QMAKE_CFLAGS_DEBUG += $$(DEBUG_CFLAGS)) } else { QMAKE_CFLAGS_DEBUG += -g }
+ QMAKE_CFLAGS_SHLIB += $$QMAKE_CFLAGS_PIC
+ QMAKE_CFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_PIC
+ QMAKE_CFLAGS_APP += $$QMAKE_CFLAGS_PIC
+@@ -59,9 +61,11 @@ QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
+ QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
+ QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON
+ QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF
+-QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE
+-QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
+-QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG
++SYSTEM_CXXFLAGS = $$(CXXFLAGS)
++SYSTEM_DEBUG_CXXFLAGS = $$(DEBUG_CXXFLAGS)
++!isEmpty(SYSTEM_CXXFLAGS) { eval(QMAKE_CXXFLAGS_RELEASE += $$(CPPFLAGS) $$(CXXFLAGS)) } else { QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_OPTIMIZE }
++!isEmpty(SYSTEM_CXXFLAGS) { eval(QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$(CPPFLAGS) -g $$(CXXFLAGS)) } else { QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -g }
++!isEmpty(SYSTEM_DEBUG_CXXFLAGS) { eval(QMAKE_CXXFLAGS_DEBUG += $$(DEBUG_CXXFLAGS)) } else { QMAKE_CXXFLAGS_DEBUG += -g }
+ QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB
+ QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB
+ QMAKE_CXXFLAGS_APP += $$QMAKE_CFLAGS_APP
diff --git a/repo/qt5-qtbase/qt5-base-nostrip.patch b/repo/qt5-qtbase/qt5-base-nostrip.patch
new file mode 100644
index 0000000..17d24b4
--- /dev/null
+++ b/repo/qt5-qtbase/qt5-base-nostrip.patch
@@ -0,0 +1,13 @@
+diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf
+index 99d77156fd..fc840fe9f6 100644
+--- a/mkspecs/common/gcc-base.conf
++++ b/mkspecs/common/gcc-base.conf
+@@ -31,6 +31,8 @@
+ # you can use the manual test in tests/manual/mkspecs.
+ #
+
++CONFIG += nostrip
++
+ QMAKE_CFLAGS_OPTIMIZE = -O2
+ QMAKE_CFLAGS_OPTIMIZE_FULL = -O3
+ QMAKE_CFLAGS_OPTIMIZE_DEBUG = -Og
diff --git a/repo/qt5-qtbase/qt5-qtbase.xibuild b/repo/qt5-qtbase/qt5-qtbase.xibuild
new file mode 100644
index 0000000..d9e4791
--- /dev/null
+++ b/repo/qt5-qtbase/qt5-qtbase.xibuild
@@ -0,0 +1,78 @@
+#!/bin/sh
+
+NAME="qt5-qtbase"
+DESC="Qt5 - QtBase components"
+
+MAKEDEPS="make libexecinfo"
+DEPS="dbus glib icu openssl pcre2 xdg-utils zlib zstd musl "
+
+PKG_VER=5.15.4
+commit="e0a15c11b853954d4189b2e30aa2450184de0987"
+SOURCE="https://invent.kde.org/qt/qt/qtbase/-/archive/$commit/qtbase-$commit.tar.gz"
+ADDITIONAL="
+compile-with-libexecinfo-enabled.patch
+qt-musl-iconv-no-bom.patch
+qt5-base-cflags.patch
+qt5-base-nostrip.patch
+qt5-qtbase.xibuild
+"
+
+qt5_prefix=/usr/lib/qt5
+qt5_datadir=/usr/share/qt5
+
+prepare () {
+ apply_patches
+ sed -i -e "s|-O2|$CXXFLAGS|" \
+ -e "/^QMAKE_RPATH/s| -Wl,-rpath,||g" \
+ -e "/^QMAKE_LFLAGS\s/s|+=|+= $LDFLAGS|g" \
+ mkspecs/common/*.conf
+
+ mkdir .git
+}
+
+build () {
+ ./configure -confirm-license -opensource \
+ -archdatadir "$qt5_prefix" \
+ -bindir "$qt5_prefix"/bin \
+ -datadir "$qt5_datadir" \
+ -dbus-linked \
+ -docdir /usr/share/doc/qt5 \
+ -examplesdir /usr/share/doc/qt5/examples \
+ -glib \
+ -headerdir /usr/include/qt5 \
+ -icu \
+ -importdir "$qt5_prefix"/imports \
+ -libexecdir "$qt5_prefix"/libexec \
+ -no-rpath \
+ -no-separate-debug-info \
+ -no-pch \
+ -nomake examples \
+ -opengl \
+ -openssl-linked \
+ -optimized-qmake \
+ -plugin-sql-sqlite \
+ -plugindir "$qt5_prefix"/plugins \
+ -prefix /usr \
+ -sysconfdir /etc/xdg \
+ -system-libjpeg \
+ -system-libpng \
+ -system-sqlite \
+ -system-zlib \
+ -translationdir "$qt5_datadir"/translations \
+ -no-reduce-relocations
+ export LDFLAGS="-lexecinfo"
+ make
+}
+
+package () {
+ make INSTALL_ROOT=$PKG_DEST install
+ install -d $PKG_DEST/usr/bin
+ for i in "$PKG_DEST"/"$qt5_prefix"/bin/*; do
+ name=${i##*/}
+ case $_name in
+ *.*) dest="$PKG_DEST"/usr/bin/${name%.*}-qt5.${name##*.};;
+ *) dest="$PKG_DEST"/usr/bin/${name%.*}-qt5;;
+ esac
+ ln -s ../lib/qt5/bin/"$name" "$dest"
+ done
+}