[arch-commits] Commit in xchm/trunk (PKGBUILD xchm-wx3.0-compat.patch)
Antonio Rojas
arojas at archlinux.org
Sun Jan 22 22:07:59 UTC 2017
Date: Sunday, January 22, 2017 @ 22:07:58
Author: arojas
Revision: 208444
Port to WxGTK 3
Added:
xchm/trunk/xchm-wx3.0-compat.patch
Modified:
xchm/trunk/PKGBUILD
-------------------------+
PKGBUILD | 23 +++++++++++++++--------
xchm-wx3.0-compat.patch | 32 ++++++++++++++++++++++++++++++++
2 files changed, 47 insertions(+), 8 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-01-22 21:10:58 UTC (rev 208443)
+++ PKGBUILD 2017-01-22 22:07:58 UTC (rev 208444)
@@ -3,30 +3,37 @@
pkgname=xchm
pkgver=1.23
-pkgrel=4
+pkgrel=5
pkgdesc="A cross-platform GUI front-end to chmlib"
arch=('i686' 'x86_64')
url="http://xchm.sourceforge.net/"
license=('GPL')
-depends=('chmlib' 'wxgtk2.8' 'desktop-file-utils')
+depends=('chmlib' 'wxgtk')
source=("http://downloads.sourceforge.net/sourceforge/xchm/${pkgname}-${pkgver}.tar.gz"
'xchm.desktop'
- 'xchm.xml')
+ 'xchm.xml'
+ xchm-wx3.0-compat.patch)
md5sums=('486d029bd81071a2d04e7181909b1602'
'31fb9692b9ee9f2a205f58b9ff4bc4fe'
- '4102b0a393f5c60236143cc034664dd0')
+ '4102b0a393f5c60236143cc034664dd0'
+ '80fa0eec2acb73860ccadff21aa5c71c')
+prepare() {
+ cd $pkgname-$pkgver
+# Fix build with WxGTK 3 (Debian)
+ patch -p1 -i ../xchm-wx3.0-compat.patch
+}
+
build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
+ cd ${pkgname}-${pkgver}
export CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
- #export WX_CONFIG_PATH=/usr/bin/wx-config-2.8
- ./configure --prefix=/usr --with-wx-config=wx-config-2.8
+ ./configure --prefix=/usr
make
}
package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
+ cd ${pkgname}-${pkgver}
make DESTDIR=${pkgdir} install
install -D -m644 ${srcdir}/xchm.desktop "${pkgdir}/usr/share/applications/xchm.desktop"
Added: xchm-wx3.0-compat.patch
===================================================================
--- xchm-wx3.0-compat.patch (rev 0)
+++ xchm-wx3.0-compat.patch 2017-01-22 22:07:58 UTC (rev 208444)
@@ -0,0 +1,32 @@
+Description: Fix code to compile with wxwidgets 3.0
+ Drops support for wx < 2.7, which is just not relevant now. And in fact
+ configure.ac checks for at least 2.8.0.
+Author: Olly Betts <olly at survex.com>
+Last-Update: 2014-03-07
+
+--- xchm-1.23.orig/src/chmframe.cpp
++++ xchm-1.23/src/chmframe.cpp
+@@ -265,11 +265,7 @@ void CHMFrame::OnChangeFonts(wxCommandEv
+ enu.EnumerateFacenames();
+ _normalFonts = new wxArrayString;
+
+-#if wxMAJOR_VERSION == 2 && wxMINOR_VERSION >= 7
+ *_normalFonts = enu.GetFacenames();
+-#else
+- *_normalFonts = *enu.GetFacenames();
+-#endif
+ _normalFonts->Sort();
+ }
+
+@@ -278,11 +274,7 @@ void CHMFrame::OnChangeFonts(wxCommandEv
+ enu.EnumerateFacenames(wxFONTENCODING_SYSTEM, TRUE);
+ _fixedFonts = new wxArrayString;
+
+-#if wxMAJOR_VERSION == 2 && wxMINOR_VERSION >= 7
+ *_fixedFonts = enu.GetFacenames();
+-#else
+- *_fixedFonts = *enu.GetFacenames();
+-#endif
+ _fixedFonts->Sort();
+ }
+
More information about the arch-commits
mailing list