diff options
author | jgmdev | 2016-10-06 03:44:00 -0400 |
---|---|---|
committer | jgmdev | 2016-10-06 03:44:00 -0400 |
commit | 5a12088e9c57361142a1dafa8020558355dead7c (patch) | |
tree | 40ea5fee2b074626b191265bdf00f0ca585dd99e | |
parent | fee66a0e555953bf787666b84a01b20847d17b5d (diff) | |
download | aur-5a12088e9c57361142a1dafa8020558355dead7c.tar.gz |
Fixed to build again by using the php56 package and patches for wxwidgets found on wxgtk package.
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 165 | ||||
-rw-r--r-- | make-abicheck-non-fatal.patch | 15 | ||||
-rw-r--r-- | wxgtk-gcc6.patch | 39 |
5 files changed, 156 insertions, 80 deletions
@@ -1,6 +1,8 @@ +# Generated by mksrcinfo v8 +# Thu Oct 6 07:42:24 UTC 2016 pkgbase = php-wxwidgets-git pkgdesc = PHP bindings to the cross-platform wxWidgets GUI Toolkit library. - pkgver = v3.0.2.0.r5.gb1ea750 + pkgver = v3.0.2.0.r208.g0560d4f pkgrel = 1 url = http://wxphp.org install = php-wxwidgets-git.install @@ -13,7 +15,7 @@ pkgbase = php-wxwidgets-git makedepends = gstreamer makedepends = sdl makedepends = sdl_sound - makedepends = php + makedepends = php56 makedepends = webkitgtk depends = gtk3 depends = libgl @@ -22,12 +24,16 @@ pkgbase = php-wxwidgets-git depends = sdl depends = sdl_sound depends = gstreamer - depends = php + depends = php56 depends = webkitgtk source = http://downloads.sourceforge.net/wxwindows/wxWidgets-3.0.2.tar.bz2 source = git://github.com/wxphp/wxphp.git + source = make-abicheck-non-fatal.patch + source = wxgtk-gcc6.patch sha1sums = 6461eab4428c0a8b9e41781b8787510484dea800 sha1sums = SKIP + sha1sums = dfe38650c655395b90bf082b5734c4093508bfa3 + sha1sums = 498202334c69d49c1ebbc9d36ad382cfa237f3f8 pkgname = php-wxwidgets-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..62241f7ce839 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +wxphp/ +pkg/ +src/ +*.tar.xz +*.tar.bz2 @@ -2,7 +2,7 @@ pkgname=php-wxwidgets-git _gitname=wxphp -pkgver=v3.0.2.0.r5.gb1ea750 +pkgver=v3.0.2.0.r208.g0560d4f _pkgver=3.0.2 pkgrel=1 pkgdesc="PHP bindings to the cross-platform wxWidgets GUI Toolkit library." @@ -10,15 +10,19 @@ arch=('i686' 'x86_64') url="http://wxphp.org" install=php-wxwidgets-git.install license=('PHP') -depends=('gtk3' 'libgl' 'libxxf86vm' 'libsm' 'sdl' 'sdl_sound' 'gstreamer' 'php' 'webkitgtk') -makedepends=('mesa' 'glu' 'libxt' 'gstreamer' 'sdl' 'sdl_sound' 'php' 'webkitgtk') +depends=('gtk3' 'libgl' 'libxxf86vm' 'libsm' 'sdl' 'sdl_sound' 'gstreamer' 'php56' 'webkitgtk') +makedepends=('mesa' 'glu' 'libxt' 'gstreamer' 'sdl' 'sdl_sound' 'php56' 'webkitgtk') source=( - "http://downloads.sourceforge.net/wxwindows/wxWidgets-${_pkgver}.tar.bz2" - "git://github.com/wxphp/${_gitname}.git" + "http://downloads.sourceforge.net/wxwindows/wxWidgets-${_pkgver}.tar.bz2" + "git://github.com/wxphp/${_gitname}.git" + "make-abicheck-non-fatal.patch" + "wxgtk-gcc6.patch" ) sha1sums=( - '6461eab4428c0a8b9e41781b8787510484dea800' - 'SKIP' + '6461eab4428c0a8b9e41781b8787510484dea800' + 'SKIP' + 'dfe38650c655395b90bf082b5734c4093508bfa3' + '498202334c69d49c1ebbc9d36ad382cfa237f3f8' ) pkgver() { @@ -27,80 +31,87 @@ pkgver() { } prepare() { - cd "${srcdir}/${_gitname}" - phpize + cd "${srcdir}/${_gitname}" + phpize56 } build() { - if [ ! -e "${srcdir}/wxWidgets-${_pkgver}-static" ]; then - cd "${srcdir}/wxWidgets-${_pkgver}" - - CFLAGS="-fPIC -O2 -Wall -W" CXXFLAGS="-fPIC -O2" \ - ./configure --prefix="${srcdir}/wxWidgets-${_pkgver}-static" \ - --with-{gtk=3,libjpeg=sys,libpng=sys,libtiff=sys,libxpm=sys,opengl,regex=builtin,sdl} \ - --enable-{graphics_ctx,unicode,monolithic} \ - --disable-shared - - make - make -C locale allmo - make install - fi - - cd "${srcdir}/${_gitname}" - - php tools/reference_generator.php - - ./configure \ - --with-wxwidgets="${srcdir}/wxWidgets-${_pkgver}-static" \ - --enable-wxwidgets-monolithic \ - --enable-wxwidgets-static - - make + if [ ! -e "${srcdir}/wxWidgets-${_pkgver}-static" ]; then + cd "${srcdir}/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 "${srcdir}/../make-abicheck-non-fatal.patch" + + # Fix build with GCC 6 + patch -p1 -i "${srcdir}/../wxgtk-gcc6.patch" + + CFLAGS="-fPIC -O2 -Wall -W" CXXFLAGS="-fPIC -O2" \ + ./configure --prefix="${srcdir}/wxWidgets-${_pkgver}-static" \ + --with-{gtk=3,libjpeg=sys,libpng=sys,libtiff=sys,libxpm=sys,opengl,regex=builtin,sdl} \ + --enable-{graphics_ctx,unicode,monolithic} \ + --disable-shared + + make + make -C locale allmo + make install + fi + + cd "${srcdir}/${_gitname}" + + php56 tools/reference_generator.php + + ./configure \ + --with-wxwidgets="${srcdir}/wxWidgets-${_pkgver}-static" \ + --enable-wxwidgets-monolithic \ + --enable-wxwidgets-static + + make } package() { - mkdir -p "${pkgdir}/usr/bin" - mkdir -p "${pkgdir}/usr/lib/wxphp" - mkdir -p "${pkgdir}/usr/share/applications/" - mkdir -p "${pkgdir}/usr/share/doc/${pkgname}" - mkdir -p "${pkgdir}/usr/share/icons/hicolor/48x48/apps/" - mkdir -p "${pkgdir}/usr/share/icons/hicolor/scalable/apps/" - - # Add documentation to package - cd "${srcdir}/${_gitname}" - cp -rf doc/* "${pkgdir}/usr/share/doc/${pkgname}/" - - # Add wxphp shell script to package - echo "#!/bin/sh" > "${pkgdir}/usr/bin/wxphp" - echo "exec /usr/bin/php -d extension=wxwidgets.so \"\$@\"" >> "${pkgdir}/usr/bin/wxphp" - chmod 0755 "${pkgdir}/usr/bin/wxphp" - - # Add desktop file - echo "[Desktop Entry]" > "${pkgdir}/usr/share/applications/wxphp.desktop" - echo "Name=wxPHP Shell" >> "${pkgdir}/usr/share/applications/wxphp.desktop" - echo "GenericName=wxPHP Shell" >> "${pkgdir}/usr/share/applications/wxphp.desktop" - echo "Comment=Shell for launching wxphp scripts." >> "${pkgdir}/usr/share/applications/wxphp.desktop" - echo "Exec=/usr/lib/wxphp/launcher.sh" >> "${pkgdir}/usr/share/applications/wxphp.desktop" - echo "Icon=wxphp" >> "${pkgdir}/usr/share/applications/wxphp.desktop" - echo "Categories=Development;" >> "${pkgdir}/usr/share/applications/wxphp.desktop" - echo "Version=1.0" >> "${pkgdir}/usr/share/applications/wxphp.desktop" - echo "Type=Application" >> "${pkgdir}/usr/share/applications/wxphp.desktop" - echo "Terminal=false" >> "${pkgdir}/usr/share/applications/wxphp.desktop" - - # Copy wxphp shell launcher scripts - cp -rf tools/linux_shell/* "${pkgdir}/usr/lib/wxphp/" - chmod -R 0755 $pkgdir/usr/lib/wxphp/* - chmod 0644 "${pkgdir}/usr/lib/wxphp/README" - - # Copy icons - cp artwork/icon.png "${pkgdir}/usr/share/icons/hicolor/48x48/apps/wxphp.png" - cp artwork/icon.svg "${pkgdir}/usr/share/icons/hicolor/scalable/apps/wxphp.svg" - - # Copy wxwidgets php module - EXTENSIONS_DIR=`php-config --extension-dir` - CHROOT_EXTENSION_DIR="${pkgdir}${EXTENSIONS_DIR}" - - mkdir -p "${CHROOT_EXTENSION_DIR}" - strip -s modules/wxwidgets.so - cp -rf modules/wxwidgets.so "${CHROOT_EXTENSION_DIR}" + mkdir -p "${pkgdir}/usr/bin" + mkdir -p "${pkgdir}/usr/lib/wxphp" + mkdir -p "${pkgdir}/usr/share/applications/" + mkdir -p "${pkgdir}/usr/share/doc/${pkgname}" + mkdir -p "${pkgdir}/usr/share/icons/hicolor/48x48/apps/" + mkdir -p "${pkgdir}/usr/share/icons/hicolor/scalable/apps/" + + # Add documentation to package + cd "${srcdir}/${_gitname}" + cp -rf doc/* "${pkgdir}/usr/share/doc/${pkgname}/" + + # Add wxphp shell script to package + echo "#!/bin/sh" > "${pkgdir}/usr/bin/wxphp" + echo "exec /usr/bin/php56 -d extension=wxwidgets.so \"\$@\"" >> "${pkgdir}/usr/bin/wxphp" + chmod 0755 "${pkgdir}/usr/bin/wxphp" + + # Add desktop file + echo "[Desktop Entry]" > "${pkgdir}/usr/share/applications/wxphp.desktop" + echo "Name=wxPHP Shell" >> "${pkgdir}/usr/share/applications/wxphp.desktop" + echo "GenericName=wxPHP Shell" >> "${pkgdir}/usr/share/applications/wxphp.desktop" + echo "Comment=Shell for launching wxphp scripts." >> "${pkgdir}/usr/share/applications/wxphp.desktop" + echo "Exec=/usr/lib/wxphp/launcher.sh" >> "${pkgdir}/usr/share/applications/wxphp.desktop" + echo "Icon=wxphp" >> "${pkgdir}/usr/share/applications/wxphp.desktop" + echo "Categories=Development;" >> "${pkgdir}/usr/share/applications/wxphp.desktop" + echo "Version=1.0" >> "${pkgdir}/usr/share/applications/wxphp.desktop" + echo "Type=Application" >> "${pkgdir}/usr/share/applications/wxphp.desktop" + echo "Terminal=false" >> "${pkgdir}/usr/share/applications/wxphp.desktop" + + # Copy wxphp shell launcher scripts + cp -rf tools/linux_shell/* "${pkgdir}/usr/lib/wxphp/" + chmod -R 0755 $pkgdir/usr/lib/wxphp/* + chmod 0644 "${pkgdir}/usr/lib/wxphp/README" + + # Copy icons + cp artwork/icon.png "${pkgdir}/usr/share/icons/hicolor/48x48/apps/wxphp.png" + cp artwork/icon.svg "${pkgdir}/usr/share/icons/hicolor/scalable/apps/wxphp.svg" + + # Copy wxwidgets php module + EXTENSIONS_DIR=`php-config56 --extension-dir` + CHROOT_EXTENSION_DIR="${pkgdir}${EXTENSIONS_DIR}" + + mkdir -p "${CHROOT_EXTENSION_DIR}" + strip -s modules/wxwidgets.so + cp -rf modules/wxwidgets.so "${CHROOT_EXTENSION_DIR}" } 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/wxgtk-gcc6.patch b/wxgtk-gcc6.patch new file mode 100644 index 000000000000..119175c624d2 --- /dev/null +++ b/wxgtk-gcc6.patch @@ -0,0 +1,39 @@ +From 73e9e18ea09ffffcaac50237def0d9728a213c02 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 + +Use std::abs() from <cmath> instead of abs() from <math.h> to avoid problems +with ambiguous overloads. + +Closes #17147. + +Closes https://github.com/wxWidgets/wxWidgets/pull/222 +--- + 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; + } |