summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCoşku Baş2016-09-17 18:40:18 +0300
committerCoşku Baş2016-09-17 18:40:18 +0300
commit011e902d6019ae9909db073a53140f1c4b652073 (patch)
treea75811f7a983e5de634fe9dba000f0af293e15d2
downloadaur-011e902d6019ae9909db073a53140f1c4b652073.tar.gz
Initial commit
-rw-r--r--.SRCINFO28
-rw-r--r--PKGBUILD51
-rw-r--r--make-abicheck-non-fatal.patch15
-rw-r--r--wxGLContext_ctor_x11Direct20160316.patch41
4 files changed, 135 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..2f7479179370
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,28 @@
+pkgbase = wxgtk-trenchbroom
+ pkgdesc = GTK+ implementation of wxWidgets API for GUI with TrenchBroom patches
+ pkgver = 3.1.0
+ pkgrel = 5
+ url = http://wxwidgets.org
+ arch = i686
+ arch = x86_64
+ license = custom:wxWindows
+ makedepends = gstreamer0.10-base-plugins
+ makedepends = gconf
+ makedepends = webkitgtk2
+ makedepends = glu
+ depends = gtk2
+ depends = gstreamer0.10-base
+ depends = libsm
+ optdepends = webkitgtk2: for webview support
+ provides = wxgtk
+ conflicts = wxgtk
+ options = !emptydirs
+ source = https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.0/wxWidgets-3.1.0.tar.bz2
+ source = make-abicheck-non-fatal.patch
+ source = wxGLContext_ctor_x11Direct20160316.patch
+ sha1sums = 2170839cfa9d9322e8ee8368b21a15a2497b4f11
+ sha1sums = dfe38650c655395b90bf082b5734c4093508bfa3
+ sha1sums = 6941a40b202f29f4ae36ff332fb8f1ff95244737
+
+pkgname = wxgtk-trenchbroom
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..0b3de5c5e5c4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Cosku Bas <cosku.bas@gmail.com>
+
+pkgname=wxgtk-trenchbroom
+pkgver=3.1.0
+pkgrel=5
+pkgdesc="GTK+ implementation of wxWidgets API for GUI with TrenchBroom patches"
+arch=('i686' 'x86_64')
+url="http://wxwidgets.org"
+license=('custom:wxWindows')
+
+depends=('gtk2' 'gstreamer0.10-base' 'libsm')
+makedepends=('gstreamer0.10-base-plugins' 'gconf' 'webkitgtk2' 'glu')
+optdepends=('webkitgtk2: for webview support')
+options=('!emptydirs')
+conflicts=('wxgtk')
+provides=('wxgtk')
+
+source=(https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.0/wxWidgets-${pkgver}.tar.bz2
+ make-abicheck-non-fatal.patch
+ wxGLContext_ctor_x11Direct20160316.patch)
+sha1sums=('2170839cfa9d9322e8ee8368b21a15a2497b4f11'
+ 'dfe38650c655395b90bf082b5734c4093508bfa3'
+ '6941a40b202f29f4ae36ff332fb8f1ff95244737')
+
+prepare() {
+ cd wxWidgets-${pkgver}
+
+ # C++ ABI check is too strict and breaks with GCC 5.1
+ # https://bugzilla.redhat.com/show_bug.cgi?id=1200611
+ patch -Np1 -i ../make-abicheck-non-fatal.patch
+
+ # Apply TrenchBroom patch
+ patch -p0 < ../wxGLContext_ctor_x11Direct20160316.patch
+}
+
+build() {
+ cd wxWidgets-${pkgver}
+ ./configure --prefix=/usr --libdir=/usr/lib --with-gtk=2 --with-opengl --enable-unicode \
+ --enable-graphics_ctx --enable-mediactrl --enable-webview --with-regex=builtin \
+ --with-libpng=sys --with-libxpm=sys --with-libjpeg=sys --with-libtiff=sys \
+ --disable-precomp-headers --disable-shared
+ make
+ make -C locale allmo
+}
+
+package() {
+ cd wxWidgets-${pkgver}
+ make DESTDIR="${pkgdir}" install
+ install -D -m644 docs/licence.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+
diff --git a/make-abicheck-non-fatal.patch b/make-abicheck-non-fatal.patch
new file mode 100644
index 000000000000..97055ba46fad
--- /dev/null
+++ b/make-abicheck-non-fatal.patch
@@ -0,0 +1,15 @@
+diff -up wxGTK-2.8.12/src/common/appbase.cpp.abicheck wxGTK-2.8.12/src/common/appbase.cpp
+--- wxGTK-2.8.12/src/common/appbase.cpp.abicheck 2015-03-12 17:15:18.000000000 +0100
++++ wxGTK-2.8.12/src/common/appbase.cpp 2015-03-12 17:15:57.000000000 +0100
+@@ -424,10 +424,7 @@ bool wxAppConsole::CheckBuildOptions(con
+ msg.Printf(_T("Mismatch between the program and library build versions detected.\nThe library used %s,\nand %s used %s."),
+ lib.c_str(), progName.c_str(), prog.c_str());
+
+- wxLogFatalError(msg.c_str());
+-
+- // normally wxLogFatalError doesn't return
+- return false;
++ wxLogWarning(msg.c_str());
+ }
+ #undef wxCMP
+
diff --git a/wxGLContext_ctor_x11Direct20160316.patch b/wxGLContext_ctor_x11Direct20160316.patch
new file mode 100644
index 000000000000..83f6283c383b
--- /dev/null
+++ b/wxGLContext_ctor_x11Direct20160316.patch
@@ -0,0 +1,41 @@
+diff --git src/unix/glx11.cpp src/unix/glx11.cpp
+index 6534601..90bfc93 100644
+--- src/unix/glx11.cpp
++++ src/unix/glx11.cpp
+@@ -486,18 +486,17 @@ wxGLContext::wxGLContext(wxGLCanvas *win,
+
+ // We need to create a temporary context to get the
+ // glXCreateContextAttribsARB function
+- GLXContext tempContext = glXCreateContext(dpy, vi, NULL,
+- win->GetGLCTXAttrs().x11Direct );
++ GLXContext tempContext = glXCreateContext(dpy, vi, NULL, x11Direct);
+ wxCHECK_RET(tempContext, "glXCreateContext failed" );
+
+- PFNGLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribsARB
++ PFNGLXCREATECONTEXTATTRIBSARBPROC wx_glXCreateContextAttribsARB
+ = (PFNGLXCREATECONTEXTATTRIBSARBPROC)
+ glXGetProcAddress((GLubyte *)"glXCreateContextAttribsARB");
+
+ glXDestroyContext( dpy, tempContext );
+
+ // The preferred way is using glXCreateContextAttribsARB, even for old context
+- if ( !glXCreateContextAttribsARB && needsARB ) // OpenGL 3 context creation
++ if ( !wx_glXCreateContextAttribsARB && needsARB ) // OpenGL 3 context creation
+ {
+ wxLogMessage(_("OpenGL 3.0 or later is not supported by the OpenGL driver."));
+ return;
+@@ -508,12 +507,12 @@ wxGLContext::wxGLContext(wxGLCanvas *win,
+ g_ctxErrorOccurred = false;
+ int (*oldHandler)(Display*, XErrorEvent*) = XSetErrorHandler(&CTXErrorHandler);
+
+- if ( glXCreateContextAttribsARB )
++ if ( wx_glXCreateContextAttribsARB )
+ {
+ GLXFBConfig *fbc = win->GetGLXFBConfig();
+ wxCHECK_RET( fbc, "Invalid GLXFBConfig for OpenGL" );
+
+- m_glContext = glXCreateContextAttribsARB( dpy, fbc[0],
++ m_glContext = wx_glXCreateContextAttribsARB( dpy, fbc[0],
+ other ? other->m_glContext : None,
+ x11Direct, contextAttribs );
+ }