mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
armv6h: Fix the GLESv2 and EGL locations in qmake's linux.conf and remove
pkg-config checks which would detect mesa's libgl. Don't use Qt's raspberry pi config, because that would trigger its cross-compilation config. Manually include the rpi hooks in the eglfs plugin.
This commit is contained in:
parent
d3e32cb049
commit
6c8c5332a0
2 changed files with 63 additions and 89 deletions
|
@ -9,6 +9,9 @@
|
|||
# - added Raspberry Pi patches for armv6h
|
||||
# - icu makedepend so qtwebkit can build
|
||||
|
||||
# Arno Rehn <arno@arnorehn.de>
|
||||
# - fix Raspberry Pi EGL/GLESv2 build
|
||||
|
||||
pkgbase=qt5
|
||||
pkgname=('qt5-base'
|
||||
'qt5-connectivity'
|
||||
|
@ -32,7 +35,7 @@ pkgname=('qt5-base'
|
|||
'qt5-x11extras'
|
||||
'qt5-xmlpatterns')
|
||||
pkgver=5.3.1
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
arch=('i686' 'x86_64')
|
||||
url='http://qt-project.org/'
|
||||
license=('GPL3' 'LGPL' 'FDL' 'custom')
|
||||
|
@ -49,13 +52,13 @@ source=("http://download.qt-project.org/official_releases/qt/5.3/${pkgver}/singl
|
|||
'use-python2.patch'
|
||||
'rpi.patch'
|
||||
'qt5webkit-0002-Fix-QtWebKit-build-on-ARM-softfp.patch')
|
||||
md5sums=('f00ac7930e3b1b2b364dedcd15acc142'
|
||||
md5sums=('f9a24a0d5645efa0715b6ff0fa13d60f'
|
||||
'b2897dd6a2967bccf8f10e397aafee55'
|
||||
'9638a78e502719ef8fe5f8d10d0361a9'
|
||||
'188da8f4c87316e730ebf1c6217bf5a0'
|
||||
'322b419b16c75d4de0ee7ad0a246caa1'
|
||||
'a378deccf363bd6079da459c89aff7b9'
|
||||
'd7992d2309194c42a7d47b86010d13d7'
|
||||
'8df638e1dbf41617ffb0827978b54c8e'
|
||||
'd9eb94a6cf4f178a7d77d6b8a9280ee2')
|
||||
|
||||
prepare() {
|
||||
|
@ -69,13 +72,26 @@ prepare() {
|
|||
cd ..
|
||||
|
||||
# Raspberry Pi
|
||||
# if [ "$CARCH" == 'armv6h' ]; then
|
||||
# cd qtbase
|
||||
# patch -p1 -i "${srcdir}"/rpi.patch
|
||||
# cd ..
|
||||
# rbp_config="-device linux-rasp-pi-g++ -eglfs"
|
||||
# export CXXFLAGS=${CXXFLAGS}" -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
|
||||
# fi
|
||||
if [ "$CARCH" == 'armv6h' ]; then
|
||||
# Removes pkg-config checks for egl and glesv2 which would interfere with our custom paths below.
|
||||
# Better solution would be to provide a raspberrypi-libgl package which provides 'libgl' and pkg-config modules
|
||||
# for the egl, glesv2 libs in /opt/vc/. Not sure if that would break other packages, though. So I'm leaving it
|
||||
# at this for now.
|
||||
patch -p1 -i "${srcdir}"/rpi.patch
|
||||
|
||||
# VideoCore libs and includes
|
||||
vc_include_dir="/opt/vc/include /opt/vc/include/interface/vcos/pthreads /opt/vc/include/interface/vmcs_host/linux"
|
||||
vc_lib_dir="/opt/vc/lib"
|
||||
sed -i "/^QMAKE_INCDIR_OPENGL\s/s|=|= $vc_include_dir|g" qtbase/mkspecs/common/linux.conf
|
||||
sed -i "/^QMAKE_LIBDIR_OPENGL\s/s|=|= $vc_lib_dir|g" qtbase/mkspecs/common/linux.conf
|
||||
|
||||
sed -i "/^QMAKE_INCDIR_EGL\s/s|=|= $vc_include_dir|g" qtbase/mkspecs/common/linux.conf
|
||||
sed -i "/^QMAKE_LIBDIR_EGL\s/s|=|= $vc_lib_dir|g" qtbase/mkspecs/common/linux.conf
|
||||
sed -i "/^QMAKE_LIBS_EGL\s/s|= -lEGL|= -lEGL -lGLESv2|g" qtbase/mkspecs/common/linux.conf
|
||||
|
||||
echo "EGLFS_PLATFORM_HOOKS_SOURCES = $PWD/qtbase/mkspecs/devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp" >> qtbase/mkspecs/common/linux.conf
|
||||
echo "EGLFS_PLATFORM_HOOKS_LIBS = -lbcm_host" >> qtbase/mkspecs/common/linux.conf
|
||||
fi
|
||||
|
||||
sed -i "s|-O2|${CXXFLAGS}|" qtbase/mkspecs/common/{g++,gcc}-base.conf
|
||||
sed -i "/^QMAKE_LFLAGS_RPATH/s| -Wl,-rpath,||g" qtbase/mkspecs/common/gcc-base-unix.conf
|
||||
|
@ -121,8 +137,7 @@ build() {
|
|||
-no-sse4.2 \
|
||||
-no-avx \
|
||||
-no-avx2 \
|
||||
-opengl es2 \
|
||||
$rbp_config
|
||||
-opengl es2
|
||||
|
||||
make
|
||||
|
||||
|
@ -138,9 +153,14 @@ build() {
|
|||
|
||||
package_qt5-base() {
|
||||
pkgdesc='A cross-platform application and UI framework'
|
||||
depends=('libjpeg-turbo' 'xcb-util-keysyms' 'libgl' 'dbus' 'fontconfig' 'systemd'
|
||||
depends=('libjpeg-turbo' 'xcb-util-keysyms' 'dbus' 'fontconfig' 'systemd'
|
||||
'xcb-util-wm' 'libxrender' 'libxi' 'sqlite' 'xcb-util-image' 'icu'
|
||||
'qtchooser')
|
||||
|
||||
# On the Raspberry Pi, we don't need mesa-libgl and use broadcom's libs instead
|
||||
# (see above in prepare())
|
||||
test "$CARCH" != 'armv6h' && depends+=('libgl')
|
||||
|
||||
optdepends=('postgresql-libs: PostgreSQL driver'
|
||||
'libmariadbclient: MariaDB driver'
|
||||
'unixodbc: ODBC driver'
|
||||
|
|
|
@ -1,80 +1,34 @@
|
|||
--- a/src/gui/Qt5GuiConfigExtras.cmake.in
|
||||
+++ b/src/gui/Qt5GuiConfigExtras.cmake.in
|
||||
@@ -96,12 +96,10 @@
|
||||
string(REGEX REPLACE "[^_A-Za-z0-9]" "_" _cmake_lib_name ${_lib})
|
||||
if (NOT TARGET Qt5::Gui_${_cmake_lib_name})
|
||||
find_library(Qt5Gui_${_cmake_lib_name}_LIBRARY ${_lib}
|
||||
-!!IF !isEmpty(CROSS_COMPILE)
|
||||
PATHS \"${LibDir}\"
|
||||
!!IF !mac
|
||||
NO_DEFAULT_PATH
|
||||
!!ENDIF
|
||||
-!!ENDIF
|
||||
)
|
||||
!!IF mac
|
||||
set(Qt5Gui_${_cmake_lib_name}_LIBRARY "${Qt5Gui_${_cmake_lib_name}_LIBRARY}/${_lib}")
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -3206,11 +3206,6 @@
|
||||
else
|
||||
XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
|
||||
--- qt-everywhere-opensource-src-5.3.1/qtbase/configure.orig 2014-07-19 13:59:34.000000000 +0200
|
||||
+++ qt-everywhere-opensource-src-5.3.1/qtbase/configure 2014-07-19 13:53:37.000000000 +0200
|
||||
@@ -4801,16 +4801,6 @@
|
||||
fi
|
||||
-if [ "$PLATFORM" != "$XPLATFORM" ]; then
|
||||
- QT_CROSS_COMPILE=yes
|
||||
- QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
|
||||
- QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
|
||||
elif [ "$CFG_OPENGL" = "es2" ]; then
|
||||
#OpenGL ES 2.x
|
||||
- if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
|
||||
- QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
|
||||
- QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
|
||||
- QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null`
|
||||
- QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null`
|
||||
- QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "`shellArgumentListToQMakeList "$QMAKE_INCDIR_OPENGL_ES2"`"
|
||||
- QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "`shellArgumentListToQMakeList "$QMAKE_LIBDIR_OPENGL_ES2"`"
|
||||
- QMakeVar set QMAKE_LIBS_OPENGL_ES2 "`shellArgumentListToQMakeList "$QMAKE_LIBS_OPENGL_ES2"`"
|
||||
- fi
|
||||
|
||||
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
|
||||
@@ -3538,11 +3533,6 @@
|
||||
if [ "$CFG_DEV" = "yes" ]; then
|
||||
CFG_BUILD_PARTS="$CFG_BUILD_PARTS tests"
|
||||
fi
|
||||
-
|
||||
- # don't build tools by default when cross-compiling
|
||||
- if [ "$PLATFORM" != "$XPLATFORM" ]; then
|
||||
- CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, tools,,g"`
|
||||
- fi
|
||||
compileTest unix/opengles2 "OpenGL ES 2.x" $QMAKE_LIBS_OPENGL_ES2 $QMAKE_CFLAGS_OPENGL_ES2
|
||||
if [ $? != "0" ]; then
|
||||
echo "The OpenGL ES 2.0 functionality test failed!"
|
||||
@@ -5130,14 +5120,6 @@
|
||||
exit 101
|
||||
fi
|
||||
for nobuild in $CFG_NOBUILD_PARTS; do
|
||||
CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
|
||||
--- a/mkspecs/devices/common/linux_device_post.conf
|
||||
+++ b/mkspecs/devices/common/linux_device_post.conf
|
||||
@@ -6,4 +6,3 @@
|
||||
QMAKE_CFLAGS += $$COMPILER_FLAGS
|
||||
QMAKE_CXXFLAGS += $$COMPILER_FLAGS
|
||||
|
||||
-deviceSanityCheckCompiler()
|
||||
diff --git a/mkspecs/devices/common/linux_device_pre.conf b/mkspecs/devices/common/linux_device_pre.conf
|
||||
index 51f04d9..4794b1e 100644
|
||||
--- a/mkspecs/devices/common/linux_device_pre.conf
|
||||
+++ b/mkspecs/devices/common/linux_device_pre.conf
|
||||
@@ -12,14 +12,3 @@
|
||||
error(Could not successfully load device configuration)
|
||||
}
|
||||
|
||||
-# modifications to g++-unix.conf
|
||||
-QMAKE_CC = $${CROSS_COMPILE}gcc
|
||||
-QMAKE_CXX = $${CROSS_COMPILE}g++
|
||||
-QMAKE_LINK = $${QMAKE_CXX}
|
||||
-QMAKE_LINK_SHLIB = $${QMAKE_CXX}
|
||||
-
|
||||
-# modifications to linux.conf
|
||||
-QMAKE_AR = $${CROSS_COMPILE}ar cqs
|
||||
-QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy
|
||||
-QMAKE_NM = $${CROSS_COMPILE}nm -P
|
||||
-QMAKE_STRIP = $${CROSS_COMPILE}strip
|
||||
--- a/mkspecs/devices/linux-rasp-pi-g++/qmake.conf
|
||||
+++ b/mkspecs/devices/linux-rasp-pi-g++/qmake.conf
|
||||
@@ -18,6 +18,10 @@
|
||||
|
||||
QMAKE_LIBS_EGL = -lEGL -lGLESv2
|
||||
|
||||
+QMAKE_INCDIR_OPENVG = $$[QT_SYSROOT]/opt/vc/include
|
||||
+QMAKE_LIBDIR_OPENVG = $$[QT_SYSROOT]/opt/vc/lib
|
||||
+QMAKE_LIBS_OPENVG = -lOpenVG -lGLESv2
|
||||
+
|
||||
contains(DISTRO, squeeze) {
|
||||
#Debian Squeeze: Legacy everything
|
||||
QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 -lEGL
|
||||
- if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
|
||||
- QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
|
||||
- QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
|
||||
- QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
|
||||
- QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
|
||||
- QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
|
||||
- QMakeVar set QMAKE_CFLAGS_EGL "`echo " $QMAKE_CFLAGS_EGL " | sed -e 's, -I[^ ]* , ,g;s,^ ,,;s, $,,'`"
|
||||
- fi # detect EGL support
|
||||
if compileTest qpa/egl "EGL" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
|
||||
CFG_EGL=yes
|
||||
if compileTest qpa/egl-x11 "EGL-X11" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
|
||||
|
|
Loading…
Reference in a new issue