From cbabb1bd63739b4e0b902f2b478332ad696ee2d0 Mon Sep 17 00:00:00 2001 From: Alexey Pavlov Date: Sat, 24 Sep 2016 12:45:19 +0300 Subject: [PATCH] wxPython: Fix headers installation. Rebuild. --- mingw-w64-wxPython/001-mingw-python.patch | 45 ++++++++++++++++++----- mingw-w64-wxPython/PKGBUILD | 6 +-- 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/mingw-w64-wxPython/001-mingw-python.patch b/mingw-w64-wxPython/001-mingw-python.patch index 8e62061407..7c039a92ed 100644 --- a/mingw-w64-wxPython/001-mingw-python.patch +++ b/mingw-w64-wxPython/001-mingw-python.patch @@ -1,6 +1,14 @@ ---- a/wxPython/config.py.orig 2014-09-30 12:22:14.187740300 +0400 -+++ a/wxPython/config.py 2014-09-30 12:35:39.236109800 +0400 -@@ -311,10 +311,15 @@ +--- wxPython-src-3.0.2.0/wxPython/config.py.orig 2016-09-24 11:14:37.082854400 +0300 ++++ wxPython-src-3.0.2.0/wxPython/config.py 2016-09-24 11:44:18.791290600 +0300 +@@ -23,6 +23,7 @@ + import sys, os, glob, fnmatch, tempfile + import subprocess + import re ++from sysconfig import _POSIX_BUILD + + EGGing = 'bdist_egg' in sys.argv or 'egg_info' in sys.argv + if not EGGing: +@@ -311,10 +312,15 @@ flags += ' --version=%s.%s' % (VER_MAJOR, VER_MINOR) searchpath = os.environ["PATH"] @@ -17,7 +25,7 @@ msg("Found wx-config: " + fp) msg(" Using flags: " + flags) WX_CONFIG = fp + flags -@@ -330,7 +335,7 @@ +@@ -330,7 +336,7 @@ def getWxConfigValue(flag): @@ -26,7 +34,7 @@ value = os.popen(cmd, 'r').read()[:-1] return value -@@ -511,7 +511,7 @@ +@@ -506,21 +512,24 @@ distutils.command.install_headers.install_headers.finalize_options(self) def run(self): @@ -35,7 +43,26 @@ return headers = self.distribution.headers if not headers: -@@ -602,7 +602,7 @@ + return + + root = self.root ++ inst_prefix = WXPREFIX ++ if _POSIX_BUILD and "MSYSTEM" in os.environ: ++ inst_prefix = os.popen(' '.join(['cygpath', '--unix', inst_prefix])).readline().strip() + #print "WXPREFIX is %s, root is %s" % (WXPREFIX, root) + # hack for universal builds, which append i386/ppc + # to the root +- if root is None or WXPREFIX.startswith(os.path.dirname(root)): ++ if root is None or inst_prefix.startswith(os.path.dirname(root)): + root = '' + for header, location in headers: + install_dir = os.path.normpath(root + +- WXPREFIX + ++ inst_prefix + + '/include/wx-%d.%d/wx' % (VER_MAJOR, VER_MINOR) + + location) + self.mkpath(install_dir) +@@ -597,7 +606,7 @@ def findLib(name, libdirs): name = makeLibName(name)[0] if os.name == 'posix' or COMPILER == 'mingw32': @@ -44,7 +71,7 @@ lflags = lflags.split() # if wx-config --libs output does not start with -L, wx is -@@ -663,9 +663,11 @@ +@@ -658,9 +667,11 @@ newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': @@ -57,7 +84,7 @@ else: newLFLAGS.append(flag) return removeDuplicates(newLFLAGS) -@@ -856,14 +861,16 @@ +@@ -856,14 +867,16 @@ # gcc needs '.res' and '.rc' compiled to object files !!! try: #self.spawn(["windres", "-i", src, "-o", obj]) @@ -78,7 +105,7 @@ except DistutilsExecError, msg: raise CompileError, msg -@@ -1046,7 +1046,7 @@ +@@ -1039,7 +1052,7 @@ else: cflags.append('-O3') diff --git a/mingw-w64-wxPython/PKGBUILD b/mingw-w64-wxPython/PKGBUILD index 41c180cfe7..b1973b35a4 100644 --- a/mingw-w64-wxPython/PKGBUILD +++ b/mingw-w64-wxPython/PKGBUILD @@ -5,7 +5,7 @@ pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=3.0.2.0 _editraver=0.7.20 -pkgrel=4 +pkgrel=5 pkgdesc="A wxWidgets GUI toolkit for Python (mingw-w64)" arch=('any') license=("custom:wxWindows") @@ -20,7 +20,7 @@ source=(https://downloads.sourceforge.net/wxpython/${_realname}-src-${pkgver}.ta 002-system-includes.patch 003-fix-cast-error.patch) sha256sums=('d54129e5fbea4fb8091c87b2980760b72c22a386cb3b9dd2eebc928ef5e8df61' - 'd70072b916523aa86f2e5267fa601898de3538d32931e0d0dc4291532aca6986' + '61ca97f814b85b1274e751c694f9e3adc31ce1e22c56c9ca9c59e0337a36fef5' 'bea571dfdade2c7b15e1feaf260834d571f49c36101a420104b933c3597f7ebf' 'd7c4de5594149d2bba4a0ceb95d6a6a0c3c0e43ab9e876dce22440ccaad3b5f0') @@ -58,7 +58,7 @@ build() { --disable-precomp-headers cd wxPython - MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=;--install-headers=;-install-data=" \ ${MINGW_PREFIX}/bin/python2 setup.py WXPORT=msw BUILD_ACTIVEX=0 UNICODE=1 COMPILER=mingw32 build #make VERBOSE=1 }