summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO31
-rw-r--r--0001-fix-glsl-version.patch19
-rw-r--r--PKGBUILD57
3 files changed, 107 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..55d57cd97ab8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,31 @@
+pkgbase = cogl-amdgpu-pro
+ pkgdesc = cogl with support for amdgpu-pro
+ pkgver = 1.22.2
+ pkgrel = 1
+ url = http://www.clutter-project.org/
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ makedepends = gobject-introspection
+ makedepends = git
+ makedepends = gtk-doc
+ depends = mesa
+ depends = libdrm
+ depends = libxext
+ depends = libxdamage
+ depends = libxcomposite
+ depends = gdk-pixbuf2
+ depends = pango
+ depends = libxrandr
+ optdepends = amdgpu-pro: hybrid driver for AMDGPU cards
+ provides = cogl
+ conflicts = cogl
+ replaces = cogl
+ options = !emptydirs
+ source = git://git.gnome.org/cogl#commit=f38cda9046913c3627c52108467ba90e53d18c33
+ source = 0001-fix-glsl-version.patch
+ sha256sums = SKIP
+ sha256sums = 1766949fb76a45c218dffaf191f70362791a5547aa72cbc3f51249f0379f3469
+
+pkgname = cogl-amdgpu-pro
+
diff --git a/0001-fix-glsl-version.patch b/0001-fix-glsl-version.patch
new file mode 100644
index 000000000000..18d199ba65d5
--- /dev/null
+++ b/0001-fix-glsl-version.patch
@@ -0,0 +1,19 @@
+--- a/cogl/driver/gl/gl/cogl-driver-gl.c
++++ b/cogl/driver/gl/gl/cogl-driver-gl.c
+@@ -403,9 +403,13 @@
+ &ctx->glsl_minor);
+ }
+
+- if (COGL_CHECK_GL_VERSION (ctx->glsl_major, ctx->glsl_minor, 1, 2))
+- /* We want to use version 120 if it is available so that the
+- * gl_PointCoord can be used. */
++ if (COGL_CHECK_GL_VERSION (ctx->glsl_major, ctx->glsl_minor, 1, 5))
++ ctx->glsl_version_to_use = 150;
++ else if (COGL_CHECK_GL_VERSION (ctx->glsl_major, ctx->glsl_minor, 1, 4))
++ ctx->glsl_version_to_use = 140;
++ else if (COGL_CHECK_GL_VERSION (ctx->glsl_major, ctx->glsl_minor, 1, 3))
++ ctx->glsl_version_to_use = 130;
++ else if (COGL_CHECK_GL_VERSION (ctx->glsl_major, ctx->glsl_minor, 1, 2))
+ ctx->glsl_version_to_use = 120;
+ else
+ ctx->glsl_version_to_use = 110;
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2eabe05785da
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,57 @@
+# Maintainer: Patrick Glandien <patrick@pagla.de>
+# Contributor: Ionut Biru <ibiru@archlinux.org>
+
+_pkgname=cogl
+pkgname=$_pkgname-amdgpu-pro
+pkgver=1.22.2
+pkgrel=1
+pkgdesc="cogl with support for amdgpu-pro"
+arch=('i686' 'x86_64')
+url="http://www.clutter-project.org/"
+license=('GPL2')
+depends=('mesa' 'libdrm' 'libxext' 'libxdamage' 'libxcomposite' 'gdk-pixbuf2' 'pango' 'libxrandr')
+makedepends=('gobject-introspection' 'git' 'gtk-doc')
+optdepends=('amdgpu-pro: hybrid driver for AMDGPU cards')
+options=(!emptydirs)
+provides=("${_pkgname}")
+conflicts=("${_pkgname}")
+replaces=("${_pkgname}")
+_commit=f38cda9046913c3627c52108467ba90e53d18c33
+source=("git://git.gnome.org/cogl#commit=$_commit"
+ '0001-fix-glsl-version.patch')
+sha256sums=('SKIP'
+ '1766949fb76a45c218dffaf191f70362791a5547aa72cbc3f51249f0379f3469')
+
+pkgver() {
+ cd $_pkgname
+ git describe | sed 's/-/+/g'
+}
+
+prepare() {
+ cd $_pkgname
+
+ # Apply shader fix (thanks @ashleysommer)
+ patch -p1 -i "${srcdir}/0001-fix-glsl-version.patch"
+
+ NOCONFIGURE=1 ./autogen.sh
+}
+
+build() {
+ cd "$_pkgname"
+ ./configure --prefix=/usr \
+ --enable-gles{1,2} \
+ --enable-{kms,wayland}-egl-platform \
+ --enable-wayland-egl-server
+
+ # https://bugzilla.gnome.org/show_bug.cgi?id=655517
+ sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
+
+ make -j1
+}
+
+package() {
+ cd "$_pkgname"
+ make DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 et: