summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Ascher2016-09-04 18:22:46 +0200
committerThomas Ascher2016-09-04 18:22:46 +0200
commitaaf2e070b3f234125c65b0f9ab0151a6abb2a8df (patch)
tree54660a853e4ab09afc8563a4dcc2b03e9af264fd
parent63f0bb7849276302c1e35f77d89375f204994476 (diff)
downloadaur-aaf2e070b3f234125c65b0f9ab0151a6abb2a8df.tar.gz
update for new glew version, desktop refresh
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD31
-rw-r--r--glew.patch82
3 files changed, 108 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5599c2580c42..cef319f52255 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = k3d
pkgdesc = A free 3D modelling and animation software
pkgver = 0.8.0.5
- pkgrel = 2
+ pkgrel = 3
url = http://www.k-3d.org
arch = x86_64
arch = i686
@@ -28,8 +28,10 @@ pkgbase = k3d
depends = openexr
source = git+https://github.com/K-3D/k3d.git#tag=k3d-0.8.0.5
source = cmake_paths_and_defs_fixes.patch
+ source = glew.patch
sha256sums = SKIP
sha256sums = fc8b7be14382b6b49fa908ff43773df5ec4e7b3401cc22629f6e2f6f7c4ee704
+ sha256sums = dbfb367e1a55b40e6e1c6a91f3d30d762e321128779e7fcf0557dbdf825b3b99
pkgname = k3d
diff --git a/PKGBUILD b/PKGBUILD
index 49135eacb889..900a38a6b12a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
# Contributor: Thomas Ascher <thomas.ascher@gmx.at>
pkgname=k3d
pkgver=0.8.0.5
-pkgrel=2
+pkgrel=3
pkgdesc="A free 3D modelling and animation software"
arch=('x86_64' 'i686')
url="http://www.k-3d.org"
@@ -28,20 +28,23 @@ makedepends=('asciidoc'
'graphviz'
'libxslt')
source=("git+https://github.com/K-3D/${pkgname}.git#tag=${pkgname}-${pkgver}"
- "cmake_paths_and_defs_fixes.patch")
+ "cmake_paths_and_defs_fixes.patch"
+ "glew.patch")
sha256sums=(SKIP
- 'fc8b7be14382b6b49fa908ff43773df5ec4e7b3401cc22629f6e2f6f7c4ee704')
+ 'fc8b7be14382b6b49fa908ff43773df5ec4e7b3401cc22629f6e2f6f7c4ee704'
+ 'dbfb367e1a55b40e6e1c6a91f3d30d762e321128779e7fcf0557dbdf825b3b99')
build() {
cd "${srcdir}/${pkgname}"
patch -Np1 -i "${srcdir}/cmake_paths_and_defs_fixes.patch"
+ patch -Np1 -i "${srcdir}/glew.patch"
mkdir -p "${srcdir}/${pkgname}-build"
cd "${srcdir}/${pkgname}-build"
- # aqsis module: AUR package build is broken and cmake package information missing
- # carve module: current library version is no longer compatible
- # collada io module: current library version is no longer compatible
- # google perftools module: upstream release is broken, cmake error
- # opencascade module: upstream release is broken, missing header
+ # aqsis: only required for Qt UI rendering preview
+ # carve: current library version is no longer compatible
+ # collada io: current library version is no longer compatible
+ # google perftools: current library version is no longer compatible
+ # opencascade: current library version is no longer compatible
cmake "${srcdir}/${pkgname}" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DK3D_BUILD_AQSIS_MODULE=OFF \
@@ -56,3 +59,15 @@ package() {
cd "${srcdir}/${pkgname}-build"
make DESTDIR="${pkgdir}/" install
}
+
+post_install() {
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install $1
+}
diff --git a/glew.patch b/glew.patch
new file mode 100644
index 000000000000..3f6cbd11cddf
--- /dev/null
+++ b/glew.patch
@@ -0,0 +1,82 @@
+diff --git a/cmake/modules/K3DFindOpenGL.cmake b/cmake/modules/K3DFindOpenGL.cmake
+index ea4cf71..0192557 100644
+--- a/cmake/modules/K3DFindOpenGL.cmake
++++ b/cmake/modules/K3DFindOpenGL.cmake
+@@ -2,15 +2,13 @@ SET(K3D_OPENGL_FOUND 0)
+
+ FIND_PACKAGE(OpenGL)
+
+-FIND_LIBRARY(K3D_GLEW_LIBRARY NAMES GLEWmx GLEW
+- DOC "The Glew shared library file"
+-)
+-
+-FIND_PATH(K3D_GLEW_INCLUDE_DIR GL/glew.h ${OPENGL_INCLUDE_DIR})
+-
+-IF(OPENGL_FOUND AND OPENGL_GLU_FOUND AND K3D_GLEW_LIBRARY AND K3D_GLEW_INCLUDE_DIR)
+- SET(K3D_OPENGL_INCLUDE_DIR ${OPENGL_INCLUDE_DIR} ${K3D_GLEW_INCLUDE_DIR})
+- SET(K3D_OPENGL_LIBRARIES ${K3D_GLEW_LIBRARY} ${OPENGL_LIBRARIES})
++pkg_search_module(GLEW glewmx glew)
++
++IF(OPENGL_FOUND AND OPENGL_GLU_FOUND AND GLEW_FOUND)
++ SET(K3D_OPENGL_INCLUDE_DIR ${OPENGL_INCLUDE_DIR} ${GLEW_INCLUDE_DIRS})
++ SET(K3D_OPENGL_LIBRARIES ${GLEW_LIBRARIES} ${OPENGL_LIBRARIES})
++ SET(K3D_GLEW_VERSION ${GLEW_VERSION})
++ string(REPLACE "." ";" GLEW_VERSION_LIST ${GLEW_VERSION})
++ list(GET GLEW_VERSION_LIST 0 K3D_GLEW_MAJOR_VERSION)
+ SET(K3D_OPENGL_FOUND 1)
+ ENDIF()
+-
+diff --git a/k3dsdk/gl/context.h b/k3dsdk/gl/context.h
+index 39057d1..6f3cbc6 100644
+--- a/k3dsdk/gl/context.h
++++ b/k3dsdk/gl/context.h
+@@ -27,6 +27,10 @@
+ #include <k3dsdk/iunknown.h>
+ #include <boost/scoped_ptr.hpp>
+
++#if K3D_GLEW_MAJOR_VERSION > 1
++ struct GLEWContext {};
++#endif
++
+ namespace k3d
+ {
+
+@@ -45,13 +49,13 @@ class context :
+
+ /// Returns the currently-active context, if any, or NULL.
+ static context* current();
+-
++
+ /// Returns the currently-active GLEW context, if any, or NULL. Mostly used internally by GLEW
+ static GLEWContext* current_glew_context();
+
+ /// If the context is double-buffered, swaps the front and back buffers. Otherwise, a no-op.
+ void end();
+-
++
+ /// Return the GLEW context associated with this context, or NULL if there is none
+ GLEWContext* glew_context();
+
+@@ -76,4 +80,3 @@ class context :
+ #define glewGetContext() k3d::gl::context::current_glew_context()
+
+ #endif // !K3DSDK_GL_CONTEXT_H
+-
+diff --git a/k3dsdk/k3d-platform-config.h.in b/k3dsdk/k3d-platform-config.h.in
+index 63fd3ca..68985e6 100644
+--- a/k3dsdk/k3d-platform-config.h.in
++++ b/k3dsdk/k3d-platform-config.h.in
+@@ -14,6 +14,8 @@
+ #cmakedefine K3D_UINT_T_32_BITS
+ #cmakedefine K3D_UINT_T_64_BITS
+
++#define K3D_GLEW_MAJOR_VERSION @K3D_GLEW_MAJOR_VERSION@
++
+ #define K3D_OSX_MAJOR_VERSION @K3D_OSX_MAJOR_VERSION@
+ #define K3D_OSX_MINOR_VERSION @K3D_OSX_MINOR_VERSION@
+
+@@ -26,4 +28,3 @@
+ #endif
+
+ #endif // !K3DSDK_PLATFORM_CONFIG_H
+-