diff --git a/extra/kinfocenter/PKGBUILD b/extra/kinfocenter/PKGBUILD new file mode 100644 index 000000000..56b154dc0 --- /dev/null +++ b/extra/kinfocenter/PKGBUILD @@ -0,0 +1,64 @@ +# $Id: PKGBUILD 224713 2014-10-18 08:27:20Z andrea $ +# Maintainer: Andrea Scarpino +# Contributor: Antonio Rojas + +# ALARM on armv6h: Arno Rehn +# - Disable the failing EGLonX parts (not available on the R-Pi). Needs better upstream support. + +pkgname=kinfocenter +pkgver=5.1.0.1 +_pkgver=5.1.0 +pkgrel=1.1 +pkgdesc='KInfocenter' +arch=('i686' 'x86_64') +url='https://projects.kde.org/projects/kde/workspace/kinfocenter' +license=('LGPL') +depends=('kdelibs4support' 'kcmutils' 'pciutils' 'glu' 'libraw1394' 'kwayland') +makedepends=('extra-cmake-modules' 'kdoctools' 'python' 'plasma-framework') +conflicts=('kdebase-workspace') +groups=('plasma-next') +source=("http://download.kde.org/stable/plasma/5.1.0/$pkgname-$pkgver.tar.xz" + "kinfocenter_disable_eglonx.patch") +md5sums=('8d258cd1cb691027b8ccaa95695920a5' + 'a43a82b8be9aea5a4666b6372eecc7d2') + +prepare() { + mkdir -p build + + cd "${srcdir}/${pkgname}-${_pkgver}" + + # Raspberry Pi + if [ "$CARCH" == 'armv6h' ]; then + patch -p1 -i "${srcdir}/kinfocenter_disable_eglonx.patch" + fi +} + +build() { + # Raspberry Pi + if [ "$CARCH" == 'armv6h' ]; then + VC_INCLUDE_DIR="/opt/vc/include;/opt/vc/include/interface/vcos/pthreads;/opt/vc/include/interface/vmcs_host/linux" + VC_EGL_LIB="/opt/vc/lib/libEGL.so" + VC_GLESv2_LIB="/opt/vc/lib/libGLESv2.so" + + CMAKE_EXTRA_CONFIG_OPTIONS="-DOPENGLES_EGL_INCLUDE_DIR=$VC_INCLUDE_DIR \ + -DOPENGLES_EGL_LIBRARY=$VC_EGL_LIB \ + -DOPENGLES_INCLUDE_DIR=$VC_INCLUDE_DIR \ + -DOPENGLES_LIBRARY=$VC_GLESv2_LIB" + fi + + cd build + cmake ../$pkgname-5.1.0 \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_INSTALL_DIR=lib \ + -DSYSCONF_INSTALL_DIR=/etc \ + -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \ + -DBUILD_TESTING=OFF \ + $CMAKE_EXTRA_CONFIG_OPTIONS + make +} + +package() { + cd build + make DESTDIR="${pkgdir}" install +} diff --git a/extra/kinfocenter/kinfocenter_disable_eglonx.patch b/extra/kinfocenter/kinfocenter_disable_eglonx.patch new file mode 100644 index 000000000..046f61c76 --- /dev/null +++ b/extra/kinfocenter/kinfocenter_disable_eglonx.patch @@ -0,0 +1,13 @@ +diff --git a/Modules/opengl/opengl.cpp b/Modules/opengl/opengl.cpp +index c87cde8..dcb09ff 100644 +--- a/Modules/opengl/opengl.cpp ++++ b/Modules/opengl/opengl.cpp +@@ -818,7 +818,7 @@ static QTreeWidgetItem *get_gl_info_egl(Display *dpy, int scrnum, QTreeWidgetIte + return result; + } + +- surf = eglCreateWindowSurface(egl_dpy, config, win, NULL); ++ surf = 0; + if (!surf) { + qDebug() << "Error: eglCreateWindowSurface failed\n"; + eglDestroyContext(egl_dpy, ctx); diff --git a/extra/kwin/PKGBUILD b/extra/kwin/PKGBUILD new file mode 100644 index 000000000..005a54043 --- /dev/null +++ b/extra/kwin/PKGBUILD @@ -0,0 +1,72 @@ +# $Id: PKGBUILD 224438 2014-10-15 16:56:29Z andrea $ +# Maintainer: Andrea Scarpino + +# ALARM on armv6h: Arno Rehn +# - Find Broadcom's VideoCore GLES and EGL libraries instead of mesa's libs. +# - Remove forced compilation of the EGLonX part (not available on the r-pi) +# - Fix general compilation errors. +# - Proper upstream patches for the above are pending. + +pkgname=kwin +pkgver=5.1.0.1 +_pkgver=5.1.0 +pkgrel=1.1 +pkgdesc='KDE Window manager' +arch=('i686' 'x86_64') +url='https://projects.kde.org/projects/kde/workspace/kwin' +license=('LGPL') +depends=('qt5-multimedia' 'plasma-framework' 'knewstuff' 'libxcursor' 'kinit' + 'hicolor-icon-theme' 'libepoxy') +makedepends=('extra-cmake-modules' 'qt5-tools' 'kdoctools') +groups=('plasma-next') +install=${pkgname}.install +conflicts=('kdebase-workspace') +source=("http://download.kde.org/stable/plasma/5.1.0/${pkgname}-${pkgver}.tar.xz" + "rpi_fix_build.patch" + "kwin_remove_eglonxbackend.patch") +md5sums=('ab52f7ad3630b4da94b5e5dd09358e66' + '3e11a42013f03d55b4b730463bdd6fe0' + '28a1e8bd701a8fd1421e6ec238b4c522') + +prepare() { + mkdir -p build + + cd "${srcdir}/${pkgname}-${_pkgver}" + + # Raspberry Pi + if [ "$CARCH" == 'armv6h' ]; then + patch -p1 -i "${srcdir}/rpi_fix_build.patch" + patch -p1 -i "${srcdir}/kwin_remove_eglonxbackend.patch" + fi +} + +build() { + # Raspberry Pi + if [ "$CARCH" == 'armv6h' ]; then + VC_INCLUDE_DIR="/opt/vc/include;/opt/vc/include/interface/vcos/pthreads;/opt/vc/include/interface/vmcs_host/linux" + VC_EGL_LIB="/opt/vc/lib/libEGL.so" + VC_GLESv2_LIB="/opt/vc/lib/libGLESv2.so" + + CMAKE_EXTRA_CONFIG_OPTIONS="-DOPENGLES_EGL_INCLUDE_DIR=$VC_INCLUDE_DIR \ + -DOPENGLES_EGL_LIBRARY=$VC_EGL_LIB \ + -DOPENGLES_INCLUDE_DIR=$VC_INCLUDE_DIR \ + -DOPENGLES_LIBRARY=$VC_GLESv2_LIB" + fi + + cd build + cmake ../${pkgname}-5.1.0 \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_INSTALL_DIR=lib \ + -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \ + -DQML_INSTALL_DIR=lib/qt/qml \ + -DBUILD_TESTING=OFF \ + -DSYSCONF_INSTALL_DIR=/etc \ + $CMAKE_EXTRA_CONFIG_OPTIONS + make +} + +package() { + cd build + make DESTDIR="${pkgdir}" install +} diff --git a/extra/kwin/kwin.install b/extra/kwin/kwin.install new file mode 100644 index 000000000..1c0de2e4f --- /dev/null +++ b/extra/kwin/kwin.install @@ -0,0 +1,11 @@ +post_install() { + xdg-icon-resource forceupdate --theme hicolor &> /dev/null +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/extra/kwin/kwin_remove_eglonxbackend.patch b/extra/kwin/kwin_remove_eglonxbackend.patch new file mode 100644 index 000000000..5226f0c14 --- /dev/null +++ b/extra/kwin/kwin_remove_eglonxbackend.patch @@ -0,0 +1,40 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4058b34..a1f2060 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -397,10 +397,6 @@ if(KWIN_BUILD_ACTIVITIES) + ) + endif() + +-if(KWIN_HAVE_EGL) +- set(kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS} eglonxbackend.cpp) +-endif() +- + if(HAVE_WAYLAND) + set(kwin_KDEINIT_SRCS + ${kwin_KDEINIT_SRCS} +diff --git a/scene_opengl.cpp b/scene_opengl.cpp +index bacc980..e19bb00 100644 +--- a/scene_opengl.cpp ++++ b/scene_opengl.cpp +@@ -28,7 +28,6 @@ along with this program. If not, see . + *********************************************************************/ + #include "scene_opengl.h" + #ifdef KWIN_HAVE_EGL +-#include "eglonxbackend.h" + // for Wayland + #if HAVE_WAYLAND_EGL + #include "egl_wayland_backend.h" +@@ -437,10 +436,10 @@ SceneOpenGL *SceneOpenGL::createScene() + if (kwinApp()->shouldUseWaylandForCompositing()) { + backend = new EglWaylandBackend(); + } else { +- backend = new EglOnXBackend(); ++ backend = NULL; + } + #else +- backend = new EglOnXBackend(); ++ backend = NULL; + #endif + #endif + break; diff --git a/extra/kwin/rpi_fix_build.patch b/extra/kwin/rpi_fix_build.patch new file mode 100644 index 000000000..6af65dc39 --- /dev/null +++ b/extra/kwin/rpi_fix_build.patch @@ -0,0 +1,43 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c4745df..4058b34 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -222,10 +222,12 @@ set(KWIN_BUILD_OPENGL FALSE) + set(KWIN_BUILD_OPENGLES FALSE) + if(OPENGL_FOUND AND (${Qt5Gui_OPENGL_IMPLEMENTATION} STREQUAL "GL")) + set(KWIN_BUILD_OPENGL TRUE) ++ include_directories(${OPENGL_INCLUDE_DIR}) + message("Building KWin with OpenGL support") + endif() + if(OPENGLES_FOUND AND (${Qt5Gui_OPENGL_IMPLEMENTATION} STREQUAL "GLESv2")) + set(KWIN_BUILD_OPENGLES TRUE) ++ include_directories(${OPENGLES_INCLUDE_DIR} ${OPENGLES_EGL_INCLUDE_DIR}) + message("Building KWin with OpenGL ES 2 support") + endif() + +diff --git a/libkwineffects/kwinglplatform.cpp b/libkwineffects/kwinglplatform.cpp +index 548d459..5e5b25b 100644 +--- a/libkwineffects/kwinglplatform.cpp ++++ b/libkwineffects/kwinglplatform.cpp +@@ -25,6 +25,8 @@ along with this program. If not, see . + #include + #include + ++#include ++ + #include + + #include +diff --git a/libkwineffects/kwingltexture.cpp b/libkwineffects/kwingltexture.cpp +index 97d2747..1dcf0e3 100644 +--- a/libkwineffects/kwingltexture.cpp ++++ b/libkwineffects/kwingltexture.cpp +@@ -186,7 +186,7 @@ void GLTexturePrivate::cleanup() + bool GLTexture::isNull() const + { + Q_D(const GLTexture); +- return None == d->m_texture; ++ return 0 == d->m_texture; + } + + QSize GLTexture::size() const