* [gentoo-commits] repo/gentoo:master commit in: media-gfx/gqview/files/, media-gfx/gqview/
@ 2020-01-20 22:04 Sergei Trofimovich
0 siblings, 0 replies; only message in thread
From: Sergei Trofimovich @ 2020-01-20 22:04 UTC (permalink / raw
To: gentoo-commits
commit: d04e07e6802ef5474190d53ffbd12aaf811e17ae
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 20 21:48:29 2020 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Jan 20 22:03:58 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d04e07e6
media-gfx/gqview: don't compress README, bug #30111
While at it:
- bump to EAPI=7
- add myself as a maintainer
- tweak docs installation path
- fix infelicity detected by -Werror=format-security
Reported-by: crusaderky <AT> gmail.com
Closes: https://bugs.gentoo.org/30111
Reported-by: Agostino Sarubbo
Closes: https://bugs.gentoo.org/530630
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
.../files/gqview-2.1.5-format-security.patch | 56 +++++++++++++++++++
media-gfx/gqview/files/gqview-2.1.5-gcc-10.patch | 9 ++++
media-gfx/gqview/files/gqview-2.1.5-helpdir.patch | 23 ++++++++
.../gqview/files/gqview-2.1.5-readmedir.patch | 11 ++++
media-gfx/gqview/gqview-2.1.5-r2.ebuild | 62 ++++++++++++++++++++++
media-gfx/gqview/metadata.xml | 4 ++
6 files changed, 165 insertions(+)
diff --git a/media-gfx/gqview/files/gqview-2.1.5-format-security.patch b/media-gfx/gqview/files/gqview-2.1.5-format-security.patch
new file mode 100644
index 00000000000..baf88993a1f
--- /dev/null
+++ b/media-gfx/gqview/files/gqview-2.1.5-format-security.patch
@@ -0,0 +1,56 @@
+Don't pass external input as format string. Detected by -Werror=format-security.
+
+https://bugs.gentoo.org/530630
+--- a/src/print.c
++++ b/src/print.c
+@@ -1220,7 +1220,7 @@ static void print_job_ps_page_image_pixel(FILE *f, guchar *pix)
+ }
+ text[6] = '\0';
+
+- fprintf(f, text);
++ fprintf(f, "%s", text);
+ }
+ static gint print_job_ps_page_image(PrintWindow *pw, GdkPixbuf *pixbuf,
+ gdouble x, gdouble y, gdouble w, gdouble h,
+@@ -1345,7 +1345,7 @@ static const gchar *ps_text_to_hex_array(FILE *f, const gchar *text, gdouble x,
+ text[1] = hex_digits[*p & 0xf];
+ text[2] = '\0';
+
+- fprintf(f, text);
++ fprintf(f, "%s", text);
+
+ p++;
+ }
+--- a/src/ui_fileops.c
++++ b/src/ui_fileops.c
+@@ -44,7 +44,7 @@ void print_term(const gchar *text_utf8)
+ gchar *text_l;
+
+ text_l = g_locale_from_utf8(text_utf8, -1, NULL, NULL, NULL);
+- printf((text_l) ? text_l : text_utf8);
++ printf("%s", (text_l) ? text_l : text_utf8);
+ g_free(text_l);
+ }
+
+--- a/src/view_file_icon.c
++++ b/src/view_file_icon.c
+@@ -614,7 +614,7 @@ static void vficon_dnd_get(GtkWidget *widget, GdkDragContext *context,
+ uri_text = uri_text_from_list(list, &total, (info == TARGET_TEXT_PLAIN));
+ path_list_free(list);
+
+- if (debug) printf(uri_text);
++ if (debug) printf("%s", uri_text);
+
+ gtk_selection_data_set(selection_data, selection_data->target,
+ 8, (guchar *)uri_text, total);
+--- a/src/view_file_list.c
++++ b/src/view_file_list.c
+@@ -136,7 +136,7 @@ static void vflist_dnd_get(GtkWidget *widget, GdkDragContext *context,
+ uri_text = uri_text_from_list(list, &total, (info == TARGET_TEXT_PLAIN));
+ path_list_free(list);
+
+- if (debug) printf(uri_text);
++ if (debug) printf("%s", uri_text);
+
+ gtk_selection_data_set(selection_data, selection_data->target,
+ 8, (guchar *)uri_text, total);
diff --git a/media-gfx/gqview/files/gqview-2.1.5-gcc-10.patch b/media-gfx/gqview/files/gqview-2.1.5-gcc-10.patch
new file mode 100644
index 00000000000..567237ce7b3
--- /dev/null
+++ b/media-gfx/gqview/files/gqview-2.1.5-gcc-10.patch
@@ -0,0 +1,9 @@
+--- a/src/bar_exif.h
++++ b/src/bar_exif.h
+@@ -26,4 +26,4 @@ gint bar_exif_is_advanced(GtkWidget *bar);
+
+-const gchar **bar_exif_key_list;
+-const gint bar_exif_key_count;
++extern const gchar **bar_exif_key_list;
++extern const gint bar_exif_key_count;
+
diff --git a/media-gfx/gqview/files/gqview-2.1.5-helpdir.patch b/media-gfx/gqview/files/gqview-2.1.5-helpdir.patch
new file mode 100644
index 00000000000..e72ea05a213
--- /dev/null
+++ b/media-gfx/gqview/files/gqview-2.1.5-helpdir.patch
@@ -0,0 +1,23 @@
+--- a/configure.in
++++ b/configure.in
+@@ -19,8 +19,8 @@ fi
+
+ AM_PATH_GTK_2_0(2.4.0,,AC_MSG_ERROR(GTK+ >= 2.4.0 not installed.))
+
+-AC_DEFINE_UNQUOTED(GQVIEW_HELPDIR, "$prefix/share/doc/gqview-$VERSION", [Location of documentation files])
+-AC_DEFINE_UNQUOTED(GQVIEW_HTMLDIR, "$prefix/share/doc/gqview-$VERSION/html", [Location of html documentation])
++AC_DEFINE_UNQUOTED(GQVIEW_HELPDIR, "$docdir", [Location of documentation files])
++AC_DEFINE_UNQUOTED(GQVIEW_HTMLDIR, "$docdir/html", [Location of html documentation])
+
+ dnl checks for functions
+ AC_CHECK_FUNCS(strverscmp)
+--- a/doc/Makefile.am
++++ b/doc/Makefile.am
+@@ -1,6 +1,6 @@
+ ## Process this file with automake to produce Makefile.in.
+
+-helpdir = $(datadir)/doc/gqview-$(VERSION)/html
++helpdir = $(docdir)/html
+ help_DATA = \
+ gnu_fdl.txt \
+ gqview_faq.html \
diff --git a/media-gfx/gqview/files/gqview-2.1.5-readmedir.patch b/media-gfx/gqview/files/gqview-2.1.5-readmedir.patch
new file mode 100644
index 00000000000..22d244b8c91
--- /dev/null
+++ b/media-gfx/gqview/files/gqview-2.1.5-readmedir.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -5,7 +5,7 @@ DIST_SUBDIRS = src po doc
+
+ man_MANS = gqview.1
+
+-readmedir = $(datadir)/doc/gqview-$(VERSION)
++readmedir = $(docdir)
+ readme_DATA = README COPYING ChangeLog TODO
+
+ desktopdir = $(datadir)/applications
diff --git a/media-gfx/gqview/gqview-2.1.5-r2.ebuild b/media-gfx/gqview/gqview-2.1.5-r2.ebuild
new file mode 100644
index 00000000000..f64729a5a87
--- /dev/null
+++ b/media-gfx/gqview/gqview-2.1.5-r2.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools xdg-utils
+
+DESCRIPTION="A GTK-based image browser"
+HOMEPAGE="http://gqview.sourceforge.net/"
+SRC_URI="mirror://sourceforge/gqview/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE=""
+
+RDEPEND=">=x11-libs/gtk+-2.4:2
+ virtual/libintl"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ sys-devel/gettext"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-windows.patch
+ "${FILESDIR}"/${P}-glibc.patch
+ "${FILESDIR}"/${P}-gcc-10.patch
+ "${FILESDIR}"/${P}-helpdir.patch
+ "${FILESDIR}"/${P}-readmedir.patch
+ "${FILESDIR}"/${P}-format-security.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e '/^Encoding/d' \
+ -e '/^Icon/s/\.png//' \
+ -e '/^Categories/s/Application;//' \
+ gqview.desktop || die
+ mv configure.in configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ --without-lcms
+}
+
+src_install() {
+ default
+ # bug #30111
+ docompress -x /usr/share/doc/${PF}/README
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+}
diff --git a/media-gfx/gqview/metadata.xml b/media-gfx/gqview/metadata.xml
index 7a971df7374..c5c6c04060e 100644
--- a/media-gfx/gqview/metadata.xml
+++ b/media-gfx/gqview/metadata.xml
@@ -5,6 +5,10 @@
<email>graphics@gentoo.org</email>
<name>Gentoo Graphics Project</name>
</maintainer>
+ <maintainer type="person">
+ <email>slyfox@gentoo.org</email>
+ <name>Sergei Trofimovich</name>
+ </maintainer>
<upstream>
<remote-id type="sourceforge">gqview</remote-id>
</upstream>
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-01-20 22:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-20 22:04 [gentoo-commits] repo/gentoo:master commit in: media-gfx/gqview/files/, media-gfx/gqview/ Sergei Trofimovich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox