summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Puntiy2016-08-31 18:47:31 +0300
committerIvan Puntiy2016-08-31 18:47:31 +0300
commit68bbb519550f62284988ef9b082adbcc7ac51d76 (patch)
treec23a609b07783261550d7a68969873ff98fd192c
parent5eb311ccd9ea8a18833d890183c44b53e559a7d0 (diff)
downloadaur-68bbb519550f62284988ef9b082adbcc7ac51d76.tar.gz
GCC6 fix && PKGBUILD cleanup
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD133
-rw-r--r--PR222.patch34
3 files changed, 101 insertions, 75 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e87e13b476d0..5b623b6ba4a4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,14 @@
+# Generated by mksrcinfo v8
+# Wed Aug 31 14:45:35 UTC 2016
pkgbase = mingw-w64-wxmsw
pkgdesc = Win32 implementation of wxWidgets API for GUI (mingw-w64)
pkgver = 3.0.2
- pkgrel = 1
+ pkgrel = 2
epoch = 1
url = http://wxwidgets.org
arch = any
license = custom:wxWindows
- makedepends = mingw-w64-gcc
+ makedepends = mingw-w64-configure
depends = mingw-w64-crt
depends = mingw-w64-libpng
depends = mingw-w64-libjpeg-turbo
@@ -15,12 +17,13 @@ pkgbase = mingw-w64-wxmsw
provides = mingw-w64-wxmsw-static
conflicts = mingw-w64-wxmsw2.9
conflicts = mingw-w64-wxmsw-static
- replaces = mingw-w64-wxmsw2.9
options = staticlibs
options = !strip
options = !buildflags
source = http://downloads.sourceforge.net/wxwindows/wxWidgets-3.0.2.tar.bz2
+ source = PR222.patch
sha1sums = 6461eab4428c0a8b9e41781b8787510484dea800
+ sha1sums = 118ca9fb5c299a118e0c87a0cc18a98e5030077b
pkgname = mingw-w64-wxmsw
diff --git a/PKGBUILD b/PKGBUILD
index a64e467e9054..ee18bdef3acf 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,92 +4,81 @@
pkgname=mingw-w64-wxmsw
epoch=1
pkgver=3.0.2
-pkgrel=1
+pkgrel=2
pkgdesc="Win32 implementation of wxWidgets API for GUI (mingw-w64)"
arch=(any)
url="http://wxwidgets.org"
license=("custom:wxWindows")
-makedepends=(mingw-w64-gcc)
+makedepends=(mingw-w64-configure)
depends=(mingw-w64-crt mingw-w64-libpng mingw-w64-libjpeg-turbo mingw-w64-libtiff)
options=(staticlibs !strip !buildflags)
conflicts=(mingw-w64-wxmsw2.9 mingw-w64-wxmsw-static)
provides=(mingw-w64-wxmsw2.9 mingw-w64-wxmsw-static)
-replaces=(mingw-w64-wxmsw2.9)
-source=("http://downloads.sourceforge.net/wxwindows/wxWidgets-${pkgver}.tar.bz2")
-sha1sums=('6461eab4428c0a8b9e41781b8787510484dea800')
+source=(
+ "http://downloads.sourceforge.net/wxwindows/wxWidgets-${pkgver}.tar.bz2"
+ 'PR222.patch' # https://github.com/wxWidgets/wxWidgets/pull/222
+)
+sha1sums=('6461eab4428c0a8b9e41781b8787510484dea800'
+ '118ca9fb5c299a118e0c87a0cc18a98e5030077b')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+prepare() {
+ cd "${srcdir}/wxWidgets-${pkgver}/"
+
+ # fix errors with GCC 6
+ patch -p1 -i "${srcdir}/PR222.patch"
+}
+
build() {
- # monolithic shared builds
- for _arch in ${_architectures}; do
- unset LDFLAGS
- mkdir -p "${srcdir}/${pkgname}-${pkgver}-build-shared-${_arch}"
- cd "${srcdir}/${pkgname}-${pkgver}-build-shared-${_arch}"
- "${srcdir}"/wxWidgets-$pkgver/configure \
- --prefix=/usr/${_arch} \
- --build=$CHOST \
- --host=${_arch} \
- --with-msw \
- --with-opengl \
- --disable-mslu \
- --enable-unicode \
- --enable-shared \
- --enable-monolithic \
- --enable-stl \
- --with-regex=builtin \
- --disable-precomp-headers \
- --enable-graphics_ctx \
- --enable-webview \
- --enable-mediactrl \
- --with-libpng=sys \
- --with-libxpm=builtin \
- --with-libjpeg=sys \
- --with-libtiff=sys
- make
- done
+ local _build_flags="\
+ --with-msw \
+ --with-opengl \
+ --disable-mslu \
+ --enable-unicode \
+ --with-regex=builtin \
+ --disable-precomp-headers \
+ --enable-graphics_ctx \
+ --enable-webview \
+ --enable-mediactrl \
+ --with-libpng=sys \
+ --with-libxpm=builtin \
+ --with-libjpeg=sys \
+ --with-libtiff=sys"
+
+ cd "${srcdir}/wxWidgets-${pkgver}"
+ for _arch in ${_architectures}; do
+ # shared build
+ mkdir -p build-shared-${_arch} && pushd build-shared-${_arch}
+ ${_arch}-configure ${_build_flags} ..
+ make
+ popd
- # static builds
- for _arch in ${_architectures}; do
- unset LDFLAGS
- mkdir -p "${srcdir}/${pkgname}-${pkgver}-build-static-${_arch}"
- cd "${srcdir}/${pkgname}-${pkgver}-build-static-${_arch}"
- "${srcdir}"/wxWidgets-$pkgver/configure \
- --prefix=/usr/${_arch} \
- --build=$CHOST \
- --host=${_arch} \
- --with-msw \
- --with-opengl \
- --disable-mslu \
- --enable-unicode \
- --disable-shared \
- --enable-stl \
- --with-regex=builtin \
- --disable-precomp-headers \
- --enable-graphics_ctx \
- --enable-webview \
- --enable-mediactrl \
- --with-libpng=sys \
- --with-libxpm=builtin \
- --with-libjpeg=sys \
- --with-libtiff=sys
- make
- done
+ # static build
+ mkdir -p build-static-${_arch} && pushd build-static-${_arch}
+ ${_arch}-configure ${_build_flags} --disable-shared ..
+ make
+ popd
+ done
}
package() {
- mkdir -p "$pkgdir/usr/bin"
- for _arch in ${_architectures}; do
- for _build in "shared" "static"; do
- cd "${srcdir}/${pkgname}-${pkgver}-build-${_build}-${_arch}"
- make DESTDIR="$pkgdir" install
- done
- mv "$pkgdir/usr/${_arch}/lib/"*.dll "$pkgdir/usr/${_arch}/bin"
- find "$pkgdir/usr/${_arch}" -name '*.exe' | xargs -rtl1 rm
- find "$pkgdir/usr/${_arch}" -name '*.dll' | xargs -rtl1 ${_arch}-strip --strip-unneeded
- find "$pkgdir/usr/${_arch}" -name '*.a' -o -name '*.dll' | xargs -rtl1 ${_arch}-strip -g
- ln -s "/usr/${_arch}/lib/wx/config/${_arch}-msw-unicode-${pkgver%.*}" "$pkgdir/usr/bin/${_arch}-wx-config"
- rm "$pkgdir/usr/${_arch}/bin/wxrc-3.0"
- rm -r "$pkgdir/usr/${_arch}/share"
- done
+ mkdir -p "${pkgdir}/usr/bin"
+ for _arch in ${_architectures}; do
+ for _build in shared static; do
+ cd "${srcdir}/wxWidgets-${pkgver}/build-${_build}-${_arch}"
+ make DESTDIR="${pkgdir}" install
+ done
+
+ mv "${pkgdir}/usr/${_arch}/lib/"*.dll "${pkgdir}/usr/${_arch}/bin/"
+ ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
+ ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
+
+ ln -s "/usr/${_arch}/lib/wx/config/${_arch}-msw-unicode-${pkgver%.*}" \
+ "$pkgdir/usr/bin/${_arch}-wx-config"
+
+ rm "${pkgdir}/usr/${_arch}/bin/"*.exe
+ rm "$pkgdir/usr/${_arch}/bin/wxrc-3.0"
+ # rm -r "$pkgdir/usr/${_arch}/share"
+ done
}
diff --git a/PR222.patch b/PR222.patch
new file mode 100644
index 000000000000..7d1b02288b3e
--- /dev/null
+++ b/PR222.patch
@@ -0,0 +1,34 @@
+From aae8432e4cc8557a4e6c2b189e2924d1ae3f7ea7 Mon Sep 17 00:00:00 2001
+From: Scott Talbert <swt@techie.net>
+Date: Sat, 20 Feb 2016 00:08:14 -0500
+Subject: [PATCH] Fix STC compilation with GCC6
+
+Closes #17147
+---
+ src/stc/scintilla/src/Editor.cxx | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/stc/scintilla/src/Editor.cxx b/src/stc/scintilla/src/Editor.cxx
+index cd72953..2081df2 100644
+--- a/src/stc/scintilla/src/Editor.cxx
++++ b/src/stc/scintilla/src/Editor.cxx
+@@ -11,6 +11,7 @@
+ #include <ctype.h>
+ #include <assert.h>
+
++#include <cmath>
+ #include <string>
+ #include <vector>
+ #include <map>
+@@ -5841,9 +5842,9 @@ void Editor::GoToLine(int lineNo) {
+ }
+
+ static bool Close(Point pt1, Point pt2) {
+- if (abs(pt1.x - pt2.x) > 3)
++ if (std::abs(pt1.x - pt2.x) > 3)
+ return false;
+- if (abs(pt1.y - pt2.y) > 3)
++ if (std::abs(pt1.y - pt2.y) > 3)
+ return false;
+ return true;
+ }