aboutsummaryrefslogtreecommitdiffstats
path: root/main/qt5-qtbase
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-09-09 08:06:46 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-09-09 08:15:08 +0000
commit967af83a41c09a348aad6f00fc455129462b5cad (patch)
tree9ed85cb4c7156406c65f33806d20d648e84c51bc /main/qt5-qtbase
parent7dbda83b9c37a3554800c222ad674437b609966d (diff)
downloadaports-967af83a41c09a348aad6f00fc455129462b5cad.tar.bz2
aports-967af83a41c09a348aad6f00fc455129462b5cad.tar.xz
main/qt5-*: moved from testing
Diffstat (limited to 'main/qt5-qtbase')
-rw-r--r--main/qt5-qtbase/APKBUILD197
-rw-r--r--main/qt5-qtbase/qt-musl-iconv-no-bom.patch11
-rw-r--r--main/qt5-qtbase/qt-musl-socklen.patch14
-rw-r--r--main/qt5-qtbase/xcb-193.patch13
4 files changed, 235 insertions, 0 deletions
diff --git a/main/qt5-qtbase/APKBUILD b/main/qt5-qtbase/APKBUILD
new file mode 100644
index 0000000000..95b121bcf2
--- /dev/null
+++ b/main/qt5-qtbase/APKBUILD
@@ -0,0 +1,197 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=qt5-qtbase
+pkgver=5.3.1
+_ver=${pkgver/_/-}
+_ver=${_ver/beta0/beta}
+_ver=${_ver/rc0/rc}
+_V=${_ver/rc/RC}
+pkgrel=0
+pkgdesc="Qt5 - QtBase components"
+url="http://qt-project.org/"
+arch="all"
+license="LGPLv2 with exceptions or GPLv3 with exceptions"
+depends=""
+depends_dev="mesa-dev libice-dev libsm-dev libx11-dev libxext-dev
+ openssl-dev fontconfig-dev freetype-dev glib-dev libpng-dev zlib-dev
+ sqlite-dev dbus-dev"
+makedepends="$depends_dev
+ bison
+ cups-dev
+ flex
+ freetds-dev
+ gawk
+ gperf
+ gtk+2.0-dev
+ hicolor-icon-theme
+ icu-dev
+ libjpeg-turbo-dev
+ libxkbcommon-dev
+ libxi-dev
+ libxrandr-dev
+ libxrender-dev
+ libxslt-dev
+ libxv-dev
+ mysql-dev
+ pcre-dev
+ postgresql-dev
+ udev-dev
+ unixodbc-dev
+ xcb-util-dev
+ xcb-util-image-dev
+ xcb-util-keysyms-dev
+ xcb-util-wm-dev
+ "
+install=""
+subpackages="$pkgname-dev $pkgname-doc
+ $pkgname-sqlite $pkgname-odbc $pkgname-postgresql $pkgname-mysql
+ $pkgname-tds $pkgname-x11"
+case $pkgver in
+*_beta*|*_rc*) _rel=development_releases;;
+*) _rel=official_releases;;
+esac
+source="http://download.qt-project.org/$_rel/qt/${pkgver%.*}/$_ver/submodules/qtbase-opensource-src-$_V.tar.xz
+ qt-musl-iconv-no-bom.patch
+ qt-musl-socklen.patch
+ "
+
+_builddir="$srcdir"/qtbase-opensource-src-$_V
+prepare() {
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch)
+ msg "Applying $i"
+ patch -p1 -i "$srcdir"/$i || return 1
+ ;;
+ esac
+ done
+ sed -i -e "s|-O2|$CXXFLAGS|" \
+ -e "/^QMAKE_RPATH/s| -Wl,-rpath,||g" \
+ -e "/^QMAKE_LFLAGS\s/s|+=|+= $LDFLAGS|g" \
+ mkspecs/common/*.conf || return 1
+}
+
+build() {
+ cd "$_builddir"
+ ./configure -confirm-license -opensource \
+ -archdatadir /usr/lib/qt5 \
+ -datadir /usr/share/qt5 \
+ -dbus-linked \
+ -docdir /usr/share/doc/qt5 \
+ -examplesdir /usr/share/doc/qt5/examples \
+ -glib \
+ -gtkstyle \
+ -icu \
+ -importdir /usr/lib/qt5/imports \
+ -largefile \
+ -no-openvg \
+ -no-rpath \
+ -no-separate-debug-info \
+ -nomake examples \
+ -opengl \
+ -openssl-linked \
+ -optimized-qmake \
+ -plugin-sql-mysql \
+ -plugin-sql-odbc \
+ -plugin-sql-psql \
+ -plugin-sql-sqlite \
+ -plugin-sql-tds \
+ -plugindir /usr/lib/qt5/plugins \
+ -prefix /usr \
+ -reduce-relocations \
+ -silent \
+ -sysconfdir /etc \
+ -system-libjpeg \
+ -system-libpng \
+ -system-pcre \
+ -system-sqlite \
+ -system-xcb \
+ -system-zlib \
+ -translationdir /usr/share/qt5/translations \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make INSTALL_ROOT="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+_mv_files() {
+ local i
+ for i; do
+ mkdir -p "$subpkgdir"/${i%/*}
+ mv "$pkgdir"/$i "$subpkgdir"/$i || return 1
+ done
+}
+
+dev() {
+ cd "$pkgdir"
+ _mv_files usr/lib/qt5/mkspecs \
+ usr/lib/cmake \
+ usr/bin \
+ $(find usr/ -name '*.prl') \
+ || return 1
+ default_dev
+}
+
+sqlite() {
+ pkgdesc="SQLite driver for Qt5's SQL classes"
+ cd "$pkgdir"
+ _mv_files usr/lib/qt5/plugins/sqldrivers/libqsqlite*
+}
+
+odbc() {
+ pkgdesc="ODBC driver for Qt5's SQL classes"
+ cd "$pkgdir"
+ _mv_files usr/lib/qt5/plugins/sqldrivers/libqsqlodbc*
+}
+
+postgresql() {
+ pkgdesc="PostgreSQL driver for Qt5's SQL classes"
+ cd "$pkgdir"
+ _mv_files usr/lib/qt5/plugins/sqldrivers/libqsqlpsql*
+}
+
+mysql() {
+ pkgdesc="MySQL driver for Qt5's SQL classes"
+ cd "$pkgdir"
+ _mv_files usr/lib/qt5/plugins/sqldrivers/libqsqlmysql*
+}
+
+tds() {
+ pkgdesc="TDS driver for Qt5's SQL classes"
+ cd "$pkgdir"
+ _mv_files usr/lib/qt5/plugins/sqldrivers/libqsqltds*
+}
+
+x11() {
+ pkgdesc="Qt5 GUI-related libraries"
+ depends="hicolor-icon-theme"
+ cd "$pkgdir"
+ _mv_files \
+ usr/lib/libQt5Gui.so.* \
+ usr/lib/libQt5Widgets.so.* \
+ usr/lib/libQt5OpenGL.so.* \
+ usr/lib/libQt5PrintSupport.so.* \
+ usr/lib/qt5/plugins/accessible \
+ usr/lib/qt5/plugins/generic \
+ usr/lib/qt5/plugins/image* \
+ usr/lib/qt5/plugins/platform* \
+ usr/lib/qt5/plugins/printsupport* \
+ || return 1
+
+ scanelf -Rn usr/ | egrep '(libX|libQt5Gui|libGL)' && return 1
+ return 0
+}
+
+md5sums="572c9953847d391f2d33b420bbcdca46 qtbase-opensource-src-5.3.1.tar.xz
+077e31e0cb0d25637a3b3638fffbef3c qt-musl-iconv-no-bom.patch
+bc83dc99f866423b4803453a0e2949d2 qt-musl-socklen.patch"
+sha256sums="7b5a138d30d7c0228a51084407d5210f6d1acfbee2f95b87f189872cfcd3a569 qtbase-opensource-src-5.3.1.tar.xz
+40b337c16bbb1d259f315fe5a1b110f9917223aee53b82809934efa4fa5e62a3 qt-musl-iconv-no-bom.patch
+e70bdddf67c358c02099bebee460e3c5456666562bff9ef9ebaacf9f4ea7a6df qt-musl-socklen.patch"
+sha512sums="b867d8c2f37007770d8105fea1820f8a2b1c2006474c28fbdc29fb7f7dcf9eee0960752805c833639eb7b0fd92c670f552bbc4a7064d0daf5bbac875d081500a qtbase-opensource-src-5.3.1.tar.xz
+a185ea5e984d2636e3f9f6c4ed8fad66a17575da0679724da60a3dc519468ab45aa9369f43ce5c64f07cb730910e36623164aefafca3aabe0359c62becca870e qt-musl-iconv-no-bom.patch
+fb621e9e5a60bb5bd4ad86fa41772fd8db7e8ad3a6e8d36a3d720d493d462db618e4bf3187e3eb66d123fceca64bbbd2df2afba506cc4c79bafa456cd67e82aa qt-musl-socklen.patch"
diff --git a/main/qt5-qtbase/qt-musl-iconv-no-bom.patch b/main/qt5-qtbase/qt-musl-iconv-no-bom.patch
new file mode 100644
index 0000000000..35380ad671
--- /dev/null
+++ b/main/qt5-qtbase/qt-musl-iconv-no-bom.patch
@@ -0,0 +1,11 @@
+--- qt-everywhere-opensource-src-4.8.5/src/corelib/codecs/qiconvcodec.cpp.orig
++++ qt-everywhere-opensource-src-4.8.5/src/corelib/codecs/qiconvcodec.cpp
+@@ -62,7 +62,7 @@
+ #elif defined(Q_OS_AIX)
+ # define NO_BOM
+ # define UTF16 "UCS-2"
+-#elif defined(Q_OS_FREEBSD) || defined(Q_OS_MAC)
++#elif defined(Q_OS_FREEBSD) || defined(Q_OS_MAC) || (defined(Q_OS_LINUX) && !defined(__GLIBC__))
+ # define NO_BOM
+ # if Q_BYTE_ORDER == Q_BIG_ENDIAN
+ # define UTF16 "UTF-16BE"
diff --git a/main/qt5-qtbase/qt-musl-socklen.patch b/main/qt5-qtbase/qt-musl-socklen.patch
new file mode 100644
index 0000000000..90b9ccda08
--- /dev/null
+++ b/main/qt5-qtbase/qt-musl-socklen.patch
@@ -0,0 +1,14 @@
+--- qt-everywhere-opensource-src-4.8.5/mkspecs/linux-g++/qplatformdefs.h.orig
++++ qt-everywhere-opensource-src-4.8.5/mkspecs/linux-g++/qplatformdefs.h
+@@ -86,11 +86,7 @@
+
+ #undef QT_SOCKLEN_T
+
+-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
+ #define QT_SOCKLEN_T socklen_t
+-#else
+-#define QT_SOCKLEN_T int
+-#endif
+
+ #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+ #define QT_SNPRINTF ::snprintf
diff --git a/main/qt5-qtbase/xcb-193.patch b/main/qt5-qtbase/xcb-193.patch
new file mode 100644
index 0000000000..5ad3623cba
--- /dev/null
+++ b/main/qt5-qtbase/xcb-193.patch
@@ -0,0 +1,13 @@
+diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
+index cc8c42f..d03ea6f 100644
+--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
++++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
+@@ -1752,7 +1752,7 @@ bool QXcbConnection::xi2GetValuatorValueIfSet(void *event, int valuatorNum, doub
+ bool QXcbConnection::xi2PrepareXIGenericDeviceEvent(xcb_ge_event_t *event, int opCode)
+ {
+ // xGenericEvent has "extension" on the second byte, xcb_ge_event_t has "pad0".
+- if (event->pad0 == opCode) {
++ if (event->extension == opCode) {
+ // xcb event structs contain stuff that wasn't on the wire, the full_sequence field
+ // adds an extra 4 bytes and generic events cookie data is on the wire right after the standard 32 bytes.
+ // Move this data back to have the same layout in memory as it was on the wire