On Fri, 29 Apr 2016, Scott Talbert wrote:

This is probably why this is currently commented out - things need
sorting out such that only python-wxgtk-webview3.0 pulls in
libwxgtk-webview3.0-0v5 (like how only python-wxgtk-media3.0 pulls in
libwxgtk-media3.0-0v5, though the mechanism to achieve this might not
be the same).

Right.  I'll see if I can figure out the best way to do this.

Cool - debian/patches/wxpython-media-optional.patch is how we do it for
the media stuff, which might be a good place to start.

This seems to do the trick.

Here's a better version of the changes - added a DEP-3 header to the patch.

Scott
From 4f2c81b37e20e54b59af49f08daffee66e6922bd Mon Sep 17 00:00:00 2001
From: Scott Talbert <s...@techie.net>
Date: Fri, 29 Apr 2016 21:50:17 -0400
Subject: [PATCH] Add binary package python-wxgtk-webview3.0 for wx.html2. 
 (Closes: #821934)

---
 debian/changelog                               |  6 ++++++
 debian/control                                 | 13 ++++++++++++-
 debian/patches/series                          |  1 +
 debian/patches/wxpython-webview-optional.patch | 23 +++++++++++++++++++++++
 debian/python-wxgtk-webview3.0.install         |  2 ++
 debian/rules                                   |  3 +++
 6 files changed, 47 insertions(+), 1 deletion(-)
 create mode 100644 debian/patches/wxpython-webview-optional.patch
 create mode 100644 debian/python-wxgtk-webview3.0.install

diff --git a/debian/changelog b/debian/changelog
index 4666e69..dccb31e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+wxpython3.0 (3.0.2.0+dfsg-1.1) UNRELEASED; urgency=medium
+
+  * Add binary package python-wxgtk-webview3.0 for wx.html2.  (Closes: #821934)
+
+ -- Scott Talbert <s...@techie.net>  Wed, 27 Apr 2016 20:38:52 -0400
+
 wxpython3.0 (3.0.2.0+dfsg-1) unstable; urgency=medium
 
   * New upstream release:
diff --git a/debian/control b/debian/control
index 01fe23e..e21029b 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,7 @@ Build-Depends:
     libgtk2.0-dev,
     libwxgtk3.0-dev,
     libwxgtk-media3.0-dev,
-#    libwxgtk-webview3.0-dev,
+    libwxgtk-webview3.0-dev,
     python-all,
     python-all-dev
 Standards-Version: 3.9.6
@@ -51,6 +51,17 @@ Description: Python interface to the wxWidgets Cross-platform C++ GUI toolkit (w
  .
  This package provides a Python interface to wxMediaCtrl.
 
+Package: python-wxgtk-webview3.0
+Architecture: any
+Depends: python-wxgtk3.0, ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Provides: ${python:Provides}
+Description: Python interface to the wxWidgets Cross-platform C++ GUI toolkit (wx.html2)
+ wxWidgets (formerly known as wxWindows) is a class library for C++ providing
+ GUI components and other facilities on several popular platforms (and some
+ unpopular ones as well).
+ .
+ This package provides a Python interface to wxWebView.
+
 Package: python-wxversion
 Architecture: all
 Depends: ${python:Depends}, ${misc:Depends}
diff --git a/debian/patches/series b/debian/patches/series
index fda3eea..09e5333 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,4 @@ wxpython-missing-format-strings.patch
 suppress_warning_about_release_version_mismatch.patch
 wxpython-media-optional.patch
 pypubsub-for-taskcoach.patch
+wxpython-webview-optional.patch
diff --git a/debian/patches/wxpython-webview-optional.patch b/debian/patches/wxpython-webview-optional.patch
new file mode 100644
index 0000000..555dc44
--- /dev/null
+++ b/debian/patches/wxpython-webview-optional.patch
@@ -0,0 +1,23 @@
+Description: Allow wx.html2 to be packaged separately
+ Installing it drags in the "libwxgtk-webview3.0-0v5" runtime package which
+ drags in rather a lot of packages.
+Author: Scott Talbert <s...@techie.net>
+Bug-Debian: http://bugs.debian.org/821934
+Forwarded: not-needed
+Last-Update: 2016-04-30
+
+diff -up wxpython3.0-3.0.2.0+dfsg/wxPython/config.py.webview wxpython3.0-3.0.2.0+dfsg/wxPython/config.py
+--- wxpython3.0-3.0.2.0+dfsg/wxPython/config.py.webview	2016-04-29 00:06:26.000000000 -0400
++++ wxpython3.0-3.0.2.0+dfsg/wxPython/config.py	2016-04-29 20:14:59.830690131 -0400
+@@ -660,7 +660,10 @@ def adjustLFLAGS(lflags, libdirs, libs):
+         if flag[:2] == '-L':
+             libdirs.append(flag[2:])
+         elif flag[:2] == '-l':
+-            libs.append(flag[2:])
++            # Remove 'webview' from the default libs so we don't always link
++            # with it.  It gets added specifically for html2 elsewhere.
++            if flag[2:] != makeLibName('webview')[0]:
++                libs.append(flag[2:])
+         else:
+             newLFLAGS.append(flag)
+     return removeDuplicates(newLFLAGS) 
diff --git a/debian/python-wxgtk-webview3.0.install b/debian/python-wxgtk-webview3.0.install
new file mode 100644
index 0000000..79fbce7
--- /dev/null
+++ b/debian/python-wxgtk-webview3.0.install
@@ -0,0 +1,2 @@
+debian/tmp/usr/lib/python*/dist-packages/wx-*-gtk*/wx/_html2.*so
+debian/tmp/usr/lib/python*/dist-packages/wx-*-gtk*/wx/html2.py
diff --git a/debian/rules b/debian/rules
index e9d03f0..2f7315b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -42,3 +42,6 @@ override_dh_install:
 	# These are packaged in the -media subpackage:
 	rm -f debian/python-wxgtk3.0/usr/lib/python*/dist-packages/wx-*-gtk*/wx/_media.*so \
 	      debian/python-wxgtk3.0/usr/lib/python*/dist-packages/wx-*-gtk*/wx/media.py
+	# These are packaged in the -webview subpackage:
+	rm -f debian/python-wxgtk3.0/usr/lib/python*/dist-packages/wx-*-gtk*/wx/_html2.*so \
+	      debian/python-wxgtk3.0/usr/lib/python*/dist-packages/wx-*-gtk*/wx/html2.py
-- 
2.8.1

Reply via email to