Commit a3bfabc9 authored by Luca Giambonini's avatar Luca Giambonini

wxgtk splitted to wxgtk2 and wxgtk3 [skip-ci]

parent 0d40a1ba
Pipeline #3483 skipped
pkgname=python2-wxpython
pkgver=3.0.2.0
pkgrel=3
pkgdesc="A wxWidgets GUI toolkit for Python"
arch=('x86_64')
url="https://www.wxpython.org"
license=('custom:wxWindows')
depends=('wxgtk' 'python2')
makedepends=('mesa' 'glu')
conflicts=(wxpython)
replaces=(wxpython)
provides=(wxpython=$pkgver)
options=('!emptydirs')
source=("https://downloads.sourceforge.net/wxpython/wxPython-src-${pkgver}.tar.bz2"
"fix-plot.patch")
sha256sums=('d54129e5fbea4fb8091c87b2980760b72c22a386cb3b9dd2eebc928ef5e8df61'
'2d8b2bdbf55172738c7bf93955e552aac61842800c3b8b0a2e1f07f4314abc65')
prepare() {
find . -type f -exec sed -i 's/env python/env python2/' {} \;
cd wxPython-src-${pkgver}/wxPython
# Fix plot library (FS#42807)
patch -Np1 -i ../../fix-plot.patch
}
build() {
cd wxPython-src-${pkgver}
./configure --prefix=/usr \
--libdir=/usr/lib \
--includedir=/usr/include \
--with-gtk=2 \
--with-opengl \
--enable-unicode \
--enable-graphics_ctx \
--with-libpng=sys \
--with-libxpm=sys \
--with-libjpeg=sys \
--with-libtiff=sys \
--disable-precomp-headers \
--without-gconf
cd "${srcdir}/wxPython-src-${pkgver}/wxPython"
python2 setup.py WXPORT=gtk2 UNICODE=1 build
}
package() {
cd "${srcdir}/wxPython-src-${pkgver}/wxPython"
python2 setup.py WXPORT=gtk2 UNICODE=1 install --root="${pkgdir}"
install -D -m644 ../docs/licence.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
From 25bcbf15615b64e095da75e934ea4d254998ec24 Mon Sep 17 00:00:00 2001
From: Robin Dunn <robin@alldunn.com>
Date: Wed, 11 Mar 2015 14:37:20 -0700
Subject: [PATCH] We need to use wx.CursorFromImage on Classic
---
wx/lib/plot.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/wx/lib/plot.py b/wx/lib/plot.py
index 94696c56b7..e166645863 100644
--- a/wx/lib/plot.py
+++ b/wx/lib/plot.py
@@ -595,9 +595,9 @@ def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition,
# set curser as cross-hairs
self.canvas.SetCursor(wx.CROSS_CURSOR)
- self.HandCursor = wx.Cursor(Hand.GetImage())
- self.GrabHandCursor = wx.Cursor(GrabHand.GetImage())
- self.MagCursor = wx.Cursor(MagPlus.GetImage())
+ self.HandCursor = wx.CursorFromImage(Hand.GetImage())
+ self.GrabHandCursor = wx.CursorFromImage(GrabHand.GetImage())
+ self.MagCursor = wx.CursorFromImage(MagPlus.GetImage())
# Things for printing
self._print_data = None
From 30bc07d80ae1c81d70b4de2daac62ecd7996d703 Mon Sep 17 00:00:00 2001
From: Robin Dunn <robin@alldunn.com>
Date: Wed, 25 Mar 2015 15:34:49 -0700
Subject: [PATCH] Revert some more Phoenix-only changes.
---
wx/lib/plot.py | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/wx/lib/plot.py b/wx/lib/plot.py
index e166645863..102c35cc84 100644
--- a/wx/lib/plot.py
+++ b/wx/lib/plot.py
@@ -237,7 +237,7 @@ def __init__(self, points, **attr):
:keyword `attr`: keyword attributes, default to:
========================== ================================
- 'colour'= 'black' wx.Pen Colour any wx.Colour
+ 'colour'= 'black' wx.Pen Colour any wx.NamedColour
'width'= 1 Pen width
'style'= wx.PENSTYLE_SOLID wx.Pen style
'legend'= '' Line Legend to display
@@ -251,7 +251,7 @@ def draw(self, dc, printerScale, coord=None):
width = self.attributes['width'] * printerScale * self._pointSize[0]
style = self.attributes['style']
if not isinstance(colour, wx.Colour):
- colour = wx.Colour(colour)
+ colour = wx.NamedColour(colour)
pen = wx.Pen(colour, width, style)
pen.SetCap(wx.CAP_BUTT)
dc.SetPen(pen)
@@ -287,7 +287,7 @@ def __init__(self, points, **attr):
:keyword `attr`: keyword attributes, default to:
========================== ================================
- 'colour'= 'black' wx.Pen Colour any wx.Colour
+ 'colour'= 'black' wx.Pen Colour any wx.NamedColour
'width'= 1 Pen width
'style'= wx.PENSTYLE_SOLID wx.Pen style
'legend'= '' Line Legend to display
@@ -301,7 +301,7 @@ def draw(self, dc, printerScale, coord=None):
width = self.attributes['width'] * printerScale * self._pointSize[0]
style = self.attributes['style']
if not isinstance(colour, wx.Colour):
- colour = wx.Colour(colour)
+ colour = wx.NamedColour(colour)
pen = wx.Pen(colour, width, style)
pen.SetCap(wx.CAP_ROUND)
dc.SetPen(pen)
@@ -334,10 +334,10 @@ def __init__(self, points, **attr):
:keyword `attr`: keyword attributes, default to:
================================ ================================
- 'colour'= 'black' wx.Pen Colour any wx.Colour
+ 'colour'= 'black' wx.Pen Colour any wx.NamedColour
'width'= 1 Pen width
'size'= 2 Marker size
- 'fillcolour'= same as colour wx.Brush Colour any wx.Colour
+ 'fillcolour'= same as colour wx.Brush Colour any wx.NamedColour
'fillstyle'= wx.BRUSHSTYLE_SOLID wx.Brush fill style (use wx.BRUSHSTYLE_TRANSPARENT for no fill)
'style'= wx.FONTFAMILY_SOLID wx.Pen style
'marker'= 'circle' Marker shape
@@ -365,10 +365,10 @@ def draw(self, dc, printerScale, coord=None):
marker = self.attributes['marker']
if colour and not isinstance(colour, wx.Colour):
- colour = wx.Colour(colour)
+ colour = wx.NamedColour(colour)
if fillcolour and not isinstance(fillcolour, wx.Colour):
- fillcolour = wx.Colour(fillcolour)
-
+ fillcolour = wx.NamedColour(fillcolour)
+
dc.SetPen(wx.Pen(colour, width))
if fillcolour:
dc.SetBrush(wx.Brush(fillcolour, fillstyle))
@@ -681,8 +681,9 @@ def SetGridColour(self, colour):
if isinstance(colour, wx.Colour):
self._gridColour = colour
else:
- self._gridColour = wx.Colour(colour)
+ self._gridColour = wx.NamedColour(colour)
+
# SaveFile
def SaveFile(self, fileName=''):
"""Saves the file to the type specified in the extension. If no file
@@ -1513,7 +1514,7 @@ def OnSize(self, event):
# Make new offscreen bitmap: this bitmap will always have the
# current drawing in it, so it can be used to save the image to
# a file, or whatever.
- self._Buffer = wx.Bitmap(Size.width, Size.height)
+ self._Buffer = wx.EmptyBitmap(Size.width, Size.height)
self._setSize()
self.last_PointLabel = None # reset pointLabel
@@ -1578,7 +1579,7 @@ def _drawPointLabel(self, mDataDict):
width = self._Buffer.GetWidth()
height = self._Buffer.GetHeight()
if sys.platform != "darwin":
- tmp_Buffer = wx.Bitmap(width, height)
+ tmp_Buffer = wx.EmptyBitmap(width,height)
dcs = wx.MemoryDC()
dcs.SelectObject(tmp_Buffer)
dcs.Clear()
# Maintainer: Eric Bélanger <eric@archlinux.org>
pkgname=python3-wxpython
_pkgname=wxPython
pkgver=4.0.4
pkgrel=1
pkgdesc="Phoenix wxWidgets GUI toolkit for Python"
arch=('x86_64')
license=('custom:wxWindows')
url="https://www.wxpython.org"
depends=('wxgtk3' 'python3-setuptools' 'python3-six') #'python3-pypubsub')
makedepends=('mesa' 'glu' 'webkit2gtk')
checkdepends=('xorg-server-xvfb' 'python3-pytest' 'python3-numpy')
source=("https://files.pythonhosted.org/packages/source/w/wxPython/wxPython-${pkgver}.tar.gz")
sha512sums=('48895f191150c63c253eb4136b78ff7803b6df566ca92b9fcf3c3fff3c893a57ff52a51b331333cf2200a053b8d0ea7facb39d7bfb581a78e009a24c31437cae')
prepare() {
sed -i "s|WX_CONFIG = 'wx-config'|WX_CONFIG = 'wx-config-gtk3'|" $_pkgname-$pkgver/build.py
}
build() {
cd $_pkgname-$pkgver
python3 build.py build --use_syswx --release
}
check() {
cd $_pkgname-$pkgver
xvfb-run python3 build.py test
}
package() {
cd $_pkgname-$pkgver
python3 build.py install --destdir="$pkgdir"
install -Dm 644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
find "$pkgdir/usr/lib" -type f | xargs chmod 644
}
From 1eb0f5aad704c07de45e5092dde04c8051e421ae Mon Sep 17 00:00:00 2001
From: Robin Dunn <robin@alldunn.com>
Date: Sat, 5 May 2018 21:03:30 -0700
Subject: [PATCH 1/2] Update waf to version 2.0.7
---
build.py | 4 ++--
wscript | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/build.py b/build.py
index 41ed39ac..a56d3e22 100755
--- a/build.py
+++ b/build.py
@@ -83,8 +83,8 @@ sipMD5 = {
'linux64' : 'b349127a4d46452936e4181d96b12c2d',
}
-wafCurrentVersion = '1.7.15-p1'
-wafMD5 = 'e44003373c965f4221bbdc4c9b846128'
+wafCurrentVersion = '2.0.7'
+wafMD5 = '48ac1250bcccd0674cf461937875ce9a'
doxygenCurrentVersion = '1.8.8'
doxygenMD5 = {
diff --git a/wscript b/wscript
index d051ebbc..c4bc96fd 100644
--- a/wscript
+++ b/wscript
@@ -30,7 +30,7 @@ def options(opt):
if isWindows:
opt.load('msvc')
else:
- opt.load('compiler_cc compiler_cxx')
+ opt.load('compiler_c compiler_cxx')
opt.load('python')
opt.add_option('--debug', dest='debug', action='store_true', default=False,
@@ -78,7 +78,7 @@ def configure(conf):
conf.env['MSVC_TARGETS'] = [conf.options.msvc_arch]
conf.load('msvc')
else:
- conf.load('compiler_cc compiler_cxx')
+ conf.load('compiler_c compiler_cxx')
if conf.options.python:
conf.env.PYTHON = conf.options.python
--
2.18.0
From bbcd9a029d42b5c66e122676bcdc8d7149415388 Mon Sep 17 00:00:00 2001
From: Eli Schwartz <eschwartz@archlinux.org>
Date: Thu, 26 Jul 2018 19:33:31 +0000
Subject: [PATCH 2/2] Manually backport update waf to 2.0.8
- e0cde8741295d08b599f39f33a2a95eef5fd5b87
- b910acaef120cce61508fc57eab07bb0286a29ec
- e1679ca2016a5160e12513e0c3c2d37030e431af
---
build.py | 4 ++--
wscript | 8 ++++++++
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/build.py b/build.py
index a56d3e22..67aa813d 100755
--- a/build.py
+++ b/build.py
@@ -83,8 +83,8 @@ sipMD5 = {
'linux64' : 'b349127a4d46452936e4181d96b12c2d',
}
-wafCurrentVersion = '2.0.7'
-wafMD5 = '48ac1250bcccd0674cf461937875ce9a'
+wafCurrentVersion = '2.0.8'
+wafMD5 = 'bc393f29337cd00aef25d54280ca22e1'
doxygenCurrentVersion = '1.8.8'
doxygenMD5 = {
diff --git a/wscript b/wscript
index c4bc96fd..388749e8 100644
--- a/wscript
+++ b/wscript
@@ -286,6 +286,14 @@ def configure(conf):
for key in flags:
_cleanFlags(conf, key)
+ # Waf 2 is now calling pythonX.Y-config for fetching libs and flags,
+ # and it may be outputting flags that will cause an explicit link to
+ # Python's lib, which we don't want as that could tie us to that
+ # specific Python instance instead of the one that is loading the
+ # wxPython extension modules. That's okay for PYEMBED but not for PYEXT
+ # configs.
+ conf.env.LIBPATH_PYEXT = []
+ conf.env.LIB_PYEXT = []
# Use the same compilers that wxWidgets used
if cfg.CC:
--
2.18.0
pkgname=wxgtk
# Maintainer: Eric Bélanger <eric@archlinux.org>
pkgbase=wxgtk
pkgname=(wxgtk2 wxgtk3 wxgtk-common)
pkgver=3.0.4
pkgrel=2
pkgdesc="GTK+ implementation of wxWidgets API for GUI"
pkgrel=4
arch=('x86_64')
url="http://wxwidgets.org"
url="https://wxwidgets.org"
license=('custom:wxWindows')
depends=('gtk2' 'libgl' 'gst-plugins-base-libs' 'libsm' 'libxxf86vm' 'libnotify')
makedepends=('gst-plugins-base' 'glu' 'libwebkit-gtk2')
optdepends=('libwebkit-gtk2: for webview support')
makedepends=('gst-plugins-base' 'glu' 'libnotify' 'gtk2' 'libwebkit-gtk2')
options=('!emptydirs')
source=(https://github.com/wxWidgets/wxWidgets/releases/download/v$pkgver/wxWidgets-$pkgver.tar.bz2
'make-abicheck-non-fatal.patch')
make-abicheck-non-fatal.patch)
sha256sums=('96157f988d261b7368e5340afa1a0cad943768f35929c22841f62c25b17bf7f0'
'46a1bb97d69163547da13d5e23a4c73e68de27ee601da5d2fb5bc5c417931453')
......@@ -21,33 +21,64 @@ prepare() {
# https://bugzilla.redhat.com/show_bug.cgi?id=1200611
patch -Np1 -i ../make-abicheck-non-fatal.patch
./autogen.sh
cd ..
cp -r wxWidgets-${pkgver} wxWidgets-${pkgver}-gtk3
}
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 \
--without-gconf
./autogen.sh
./configure --prefix=/usr --libdir=/usr/lib --with-gtk=2 --with-opengl --enable-unicode \
--enable-graphics_ctx --enable-mediactrl --with-regex=builtin \
--with-libpng=sys --with-libxpm=sys --with-libjpeg=sys --with-libtiff=sys \
--disable-precomp-headers --without-gconf
make
make -C locale allmo
cd ../wxWidgets-${pkgver}-gtk3
./autogen.sh
./configure --prefix=/usr --libdir=/usr/lib --with-gtk=3 --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 --without-gconf
make
}
package_wxgtk-common() {
pkgdesc='Common libraries and headers for wxgtk2 and wxgtk3'
depends=('zlib' 'gcc-libs' 'expat')
cd wxWidgets-${pkgver}
make DESTDIR="${pkgdir}" install
rm -r "$pkgdir"/usr/{bin/wx-config,lib/{wx,libwx_gtk*}}
install -D -m644 docs/licence.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
package() {
package_wxgtk2() {
pkgdesc='GTK+2 implementation of wxWidgets API for GUI'
depends=('gtk2' 'libgl' 'gst-plugins-base-libs' 'libsm' 'libxxf86vm' 'wxgtk-common' 'libnotify')
conflicts=('wxgtk')
provides=('wxgtk')
replaces=('wxgtk')
cd wxWidgets-${pkgver}
make DESTDIR="${pkgdir}" install
install -Dm644 docs/licence.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
rm -r "$pkgdir"/usr/{include,share,lib/libwx_base*,bin/wxrc*}
install -D -m644 docs/licence.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
package_wxgtk3() {
pkgdesc='GTK+3 implementation of wxWidgets API for GUI'
depends=('gtk3' 'gst-plugins-base-libs' 'libsm' 'libxxf86vm' 'wxgtk-common' 'libnotify')
optdepends=('webkit2gtk: for webview support')
conflicts=('wxgtk<3.0.3.1-2')
cd wxWidgets-${pkgver}-gtk3
make DESTDIR="${pkgdir}" install
rm -r "$pkgdir"/usr/{include,share,lib/libwx_base*,bin/wxrc*}
mv "$pkgdir"/usr/bin/wx-config{,-gtk3}
install -D -m644 docs/licence.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment