From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/ghostscript-gpl/files/, app-text/ghostscript-gpl/
Date: Sun, 4 Nov 2018 20:33:56 +0000 (UTC) [thread overview]
Message-ID: <1541363620.c86e7dd1c1a9d872c40589d1cb62856256b5648c.asturm@gentoo> (raw)
commit: c86e7dd1c1a9d872c40589d1cb62856256b5648c
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 4 16:29:43 2018 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Nov 4 20:33:40 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c86e7dd1
app-text/ghostscript-gpl: Fix build w/o gtk+:3
Reported-by: Tom Dexter <digitalaudiorock <AT> gmail.com>
Bug: https://bugs.gentoo.org/668160
Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../files/ghostscript-gpl-9.25-no-gtk3.patch | 43 ++++++++++++++++++++++
.../ghostscript-gpl/ghostscript-gpl-9.25-r1.ebuild | 11 ++++--
2 files changed, 50 insertions(+), 4 deletions(-)
diff --git a/app-text/ghostscript-gpl/files/ghostscript-gpl-9.25-no-gtk3.patch b/app-text/ghostscript-gpl/files/ghostscript-gpl-9.25-no-gtk3.patch
new file mode 100644
index 00000000000..34cc2ec88c1
--- /dev/null
+++ b/app-text/ghostscript-gpl/files/ghostscript-gpl-9.25-no-gtk3.patch
@@ -0,0 +1,43 @@
+From a73071b87a61acf1237da5ad9da59bae9316fb8c Mon Sep 17 00:00:00 2001
+From: Chris Liddell <chris.liddell@artifex.com>
+Date: Mon, 8 Oct 2018 09:24:22 +0100
+Subject: [PATCH] Bug 699907: Reinstate GTK+ 2.x.x code.
+
+The fix (from March 2018) for deprecated API calls in the GTK+ 3.x.x API
+didn't account for the new, supported methods not being available in
+GTK+ 2.x.x. Handle both cases, as we do elsewhere.
+---
+ psi/dxmain.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/psi/dxmain.c b/psi/dxmain.c
+index 72c060e..250269a 100644
+--- a/psi/dxmain.c
++++ b/psi/dxmain.c
+@@ -354,17 +354,23 @@ static void window_resize(IMAGE *img)
+ #endif
+
+ if (!visible) {
+- guint width, height;
+ /* We haven't yet shown the window, so set a default size
+ * which is smaller than the desktop to allow room for
+ * desktop toolbars, and if possible a little larger than
+ * the image to allow room for the scroll bars.
+ * We don't know the width of the scroll bars, so just guess. */
++#if !GTK_CHECK_VERSION(3, 0, 0)
++ gtk_window_set_default_size(GTK_WINDOW(img->window),
++ min(gdk_screen_width()-96, img->width+24),
++ min(gdk_screen_height()-96, img->height+24));
++#else
++ guint width, height;
+ width = gtk_widget_get_allocated_width (img->window) - 96;
+ height = gtk_widget_get_allocated_height (img->window) - 96;
+ gtk_window_set_default_size(GTK_WINDOW(img->window),
+ min(width, img->width+24),
+ min(height, img->height+24));
++#endif
+ }
+ }
+
+--
+2.9.1
diff --git a/app-text/ghostscript-gpl/ghostscript-gpl-9.25-r1.ebuild b/app-text/ghostscript-gpl/ghostscript-gpl-9.25-r1.ebuild
index 028d4480726..29eea9194c5 100644
--- a/app-text/ghostscript-gpl/ghostscript-gpl-9.25-r1.ebuild
+++ b/app-text/ghostscript-gpl/ghostscript-gpl-9.25-r1.ebuild
@@ -58,7 +58,14 @@ RDEPEND="${DEPEND}
S="${WORKDIR}/${MY_P}"
+PATCHES=(
+ "${FILESDIR}/${P}-no-gtk3.patch" # bug 668160
+)
+
src_prepare() {
+ # apply various patches, many borrowed from Fedora
+ # http://pkgs.fedoraproject.org/cgit/ghostscript.git
+ eapply "${WORKDIR}/patches/"*.patch
default
# remove internal copies of various libraries
@@ -74,10 +81,6 @@ src_prepare() {
# remove internal CMaps (CMaps from poppler-data are used instead)
rm -r Resource/CMap || die
- # apply various patches, many borrowed from Fedora
- # http://pkgs.fedoraproject.org/cgit/ghostscript.git
- eapply "${WORKDIR}/patches/"*.patch
-
if ! use gtk ; then
sed -e "s:\$(GSSOX)::" \
-e "s:.*\$(GSSOX_XENAME)$::" \
next reply other threads:[~2018-11-04 20:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-04 20:33 Andreas Sturmlechner [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-09-28 2:50 [gentoo-commits] repo/gentoo:master commit in: app-text/ghostscript-gpl/files/, app-text/ghostscript-gpl/ Sam James
2022-01-15 14:15 Andreas Sturmlechner
2022-04-17 12:09 Sam James
2022-12-18 7:48 Sam James
2023-12-04 9:25 Sam James
2024-01-19 10:47 Sam James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1541363620.c86e7dd1c1a9d872c40589d1cb62856256b5648c.asturm@gentoo \
--to=asturm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox