1 |
commit: d04e07e6802ef5474190d53ffbd12aaf811e17ae |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 20 21:48:29 2020 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 20 22:03:58 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d04e07e6 |
7 |
|
8 |
media-gfx/gqview: don't compress README, bug #30111 |
9 |
|
10 |
While at it: |
11 |
- bump to EAPI=7 |
12 |
- add myself as a maintainer |
13 |
- tweak docs installation path |
14 |
- fix infelicity detected by -Werror=format-security |
15 |
|
16 |
Reported-by: crusaderky <AT> gmail.com |
17 |
Closes: https://bugs.gentoo.org/30111 |
18 |
Reported-by: Agostino Sarubbo |
19 |
Closes: https://bugs.gentoo.org/530630 |
20 |
Package-Manager: Portage-2.3.84, Repoman-2.3.20 |
21 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
22 |
|
23 |
.../files/gqview-2.1.5-format-security.patch | 56 +++++++++++++++++++ |
24 |
media-gfx/gqview/files/gqview-2.1.5-gcc-10.patch | 9 ++++ |
25 |
media-gfx/gqview/files/gqview-2.1.5-helpdir.patch | 23 ++++++++ |
26 |
.../gqview/files/gqview-2.1.5-readmedir.patch | 11 ++++ |
27 |
media-gfx/gqview/gqview-2.1.5-r2.ebuild | 62 ++++++++++++++++++++++ |
28 |
media-gfx/gqview/metadata.xml | 4 ++ |
29 |
6 files changed, 165 insertions(+) |
30 |
|
31 |
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 |
32 |
new file mode 100644 |
33 |
index 00000000000..baf88993a1f |
34 |
--- /dev/null |
35 |
+++ b/media-gfx/gqview/files/gqview-2.1.5-format-security.patch |
36 |
@@ -0,0 +1,56 @@ |
37 |
+Don't pass external input as format string. Detected by -Werror=format-security. |
38 |
+ |
39 |
+https://bugs.gentoo.org/530630 |
40 |
+--- a/src/print.c |
41 |
++++ b/src/print.c |
42 |
+@@ -1220,7 +1220,7 @@ static void print_job_ps_page_image_pixel(FILE *f, guchar *pix) |
43 |
+ } |
44 |
+ text[6] = '\0'; |
45 |
+ |
46 |
+- fprintf(f, text); |
47 |
++ fprintf(f, "%s", text); |
48 |
+ } |
49 |
+ static gint print_job_ps_page_image(PrintWindow *pw, GdkPixbuf *pixbuf, |
50 |
+ gdouble x, gdouble y, gdouble w, gdouble h, |
51 |
+@@ -1345,7 +1345,7 @@ static const gchar *ps_text_to_hex_array(FILE *f, const gchar *text, gdouble x, |
52 |
+ text[1] = hex_digits[*p & 0xf]; |
53 |
+ text[2] = '\0'; |
54 |
+ |
55 |
+- fprintf(f, text); |
56 |
++ fprintf(f, "%s", text); |
57 |
+ |
58 |
+ p++; |
59 |
+ } |
60 |
+--- a/src/ui_fileops.c |
61 |
++++ b/src/ui_fileops.c |
62 |
+@@ -44,7 +44,7 @@ void print_term(const gchar *text_utf8) |
63 |
+ gchar *text_l; |
64 |
+ |
65 |
+ text_l = g_locale_from_utf8(text_utf8, -1, NULL, NULL, NULL); |
66 |
+- printf((text_l) ? text_l : text_utf8); |
67 |
++ printf("%s", (text_l) ? text_l : text_utf8); |
68 |
+ g_free(text_l); |
69 |
+ } |
70 |
+ |
71 |
+--- a/src/view_file_icon.c |
72 |
++++ b/src/view_file_icon.c |
73 |
+@@ -614,7 +614,7 @@ static void vficon_dnd_get(GtkWidget *widget, GdkDragContext *context, |
74 |
+ uri_text = uri_text_from_list(list, &total, (info == TARGET_TEXT_PLAIN)); |
75 |
+ path_list_free(list); |
76 |
+ |
77 |
+- if (debug) printf(uri_text); |
78 |
++ if (debug) printf("%s", uri_text); |
79 |
+ |
80 |
+ gtk_selection_data_set(selection_data, selection_data->target, |
81 |
+ 8, (guchar *)uri_text, total); |
82 |
+--- a/src/view_file_list.c |
83 |
++++ b/src/view_file_list.c |
84 |
+@@ -136,7 +136,7 @@ static void vflist_dnd_get(GtkWidget *widget, GdkDragContext *context, |
85 |
+ uri_text = uri_text_from_list(list, &total, (info == TARGET_TEXT_PLAIN)); |
86 |
+ path_list_free(list); |
87 |
+ |
88 |
+- if (debug) printf(uri_text); |
89 |
++ if (debug) printf("%s", uri_text); |
90 |
+ |
91 |
+ gtk_selection_data_set(selection_data, selection_data->target, |
92 |
+ 8, (guchar *)uri_text, total); |
93 |
|
94 |
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 |
95 |
new file mode 100644 |
96 |
index 00000000000..567237ce7b3 |
97 |
--- /dev/null |
98 |
+++ b/media-gfx/gqview/files/gqview-2.1.5-gcc-10.patch |
99 |
@@ -0,0 +1,9 @@ |
100 |
+--- a/src/bar_exif.h |
101 |
++++ b/src/bar_exif.h |
102 |
+@@ -26,4 +26,4 @@ gint bar_exif_is_advanced(GtkWidget *bar); |
103 |
+ |
104 |
+-const gchar **bar_exif_key_list; |
105 |
+-const gint bar_exif_key_count; |
106 |
++extern const gchar **bar_exif_key_list; |
107 |
++extern const gint bar_exif_key_count; |
108 |
+ |
109 |
|
110 |
diff --git a/media-gfx/gqview/files/gqview-2.1.5-helpdir.patch b/media-gfx/gqview/files/gqview-2.1.5-helpdir.patch |
111 |
new file mode 100644 |
112 |
index 00000000000..e72ea05a213 |
113 |
--- /dev/null |
114 |
+++ b/media-gfx/gqview/files/gqview-2.1.5-helpdir.patch |
115 |
@@ -0,0 +1,23 @@ |
116 |
+--- a/configure.in |
117 |
++++ b/configure.in |
118 |
+@@ -19,8 +19,8 @@ fi |
119 |
+ |
120 |
+ AM_PATH_GTK_2_0(2.4.0,,AC_MSG_ERROR(GTK+ >= 2.4.0 not installed.)) |
121 |
+ |
122 |
+-AC_DEFINE_UNQUOTED(GQVIEW_HELPDIR, "$prefix/share/doc/gqview-$VERSION", [Location of documentation files]) |
123 |
+-AC_DEFINE_UNQUOTED(GQVIEW_HTMLDIR, "$prefix/share/doc/gqview-$VERSION/html", [Location of html documentation]) |
124 |
++AC_DEFINE_UNQUOTED(GQVIEW_HELPDIR, "$docdir", [Location of documentation files]) |
125 |
++AC_DEFINE_UNQUOTED(GQVIEW_HTMLDIR, "$docdir/html", [Location of html documentation]) |
126 |
+ |
127 |
+ dnl checks for functions |
128 |
+ AC_CHECK_FUNCS(strverscmp) |
129 |
+--- a/doc/Makefile.am |
130 |
++++ b/doc/Makefile.am |
131 |
+@@ -1,6 +1,6 @@ |
132 |
+ ## Process this file with automake to produce Makefile.in. |
133 |
+ |
134 |
+-helpdir = $(datadir)/doc/gqview-$(VERSION)/html |
135 |
++helpdir = $(docdir)/html |
136 |
+ help_DATA = \ |
137 |
+ gnu_fdl.txt \ |
138 |
+ gqview_faq.html \ |
139 |
|
140 |
diff --git a/media-gfx/gqview/files/gqview-2.1.5-readmedir.patch b/media-gfx/gqview/files/gqview-2.1.5-readmedir.patch |
141 |
new file mode 100644 |
142 |
index 00000000000..22d244b8c91 |
143 |
--- /dev/null |
144 |
+++ b/media-gfx/gqview/files/gqview-2.1.5-readmedir.patch |
145 |
@@ -0,0 +1,11 @@ |
146 |
+--- a/Makefile.am |
147 |
++++ b/Makefile.am |
148 |
+@@ -5,7 +5,7 @@ DIST_SUBDIRS = src po doc |
149 |
+ |
150 |
+ man_MANS = gqview.1 |
151 |
+ |
152 |
+-readmedir = $(datadir)/doc/gqview-$(VERSION) |
153 |
++readmedir = $(docdir) |
154 |
+ readme_DATA = README COPYING ChangeLog TODO |
155 |
+ |
156 |
+ desktopdir = $(datadir)/applications |
157 |
|
158 |
diff --git a/media-gfx/gqview/gqview-2.1.5-r2.ebuild b/media-gfx/gqview/gqview-2.1.5-r2.ebuild |
159 |
new file mode 100644 |
160 |
index 00000000000..f64729a5a87 |
161 |
--- /dev/null |
162 |
+++ b/media-gfx/gqview/gqview-2.1.5-r2.ebuild |
163 |
@@ -0,0 +1,62 @@ |
164 |
+# Copyright 1999-2020 Gentoo Authors |
165 |
+# Distributed under the terms of the GNU General Public License v2 |
166 |
+ |
167 |
+EAPI=7 |
168 |
+inherit autotools xdg-utils |
169 |
+ |
170 |
+DESCRIPTION="A GTK-based image browser" |
171 |
+HOMEPAGE="http://gqview.sourceforge.net/" |
172 |
+SRC_URI="mirror://sourceforge/gqview/${P}.tar.gz" |
173 |
+ |
174 |
+LICENSE="GPL-2" |
175 |
+SLOT="0" |
176 |
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" |
177 |
+IUSE="" |
178 |
+ |
179 |
+RDEPEND=">=x11-libs/gtk+-2.4:2 |
180 |
+ virtual/libintl" |
181 |
+ |
182 |
+DEPEND="${RDEPEND} |
183 |
+ virtual/pkgconfig |
184 |
+ sys-devel/gettext" |
185 |
+ |
186 |
+PATCHES=( |
187 |
+ "${FILESDIR}"/${P}-windows.patch |
188 |
+ "${FILESDIR}"/${P}-glibc.patch |
189 |
+ "${FILESDIR}"/${P}-gcc-10.patch |
190 |
+ "${FILESDIR}"/${P}-helpdir.patch |
191 |
+ "${FILESDIR}"/${P}-readmedir.patch |
192 |
+ "${FILESDIR}"/${P}-format-security.patch |
193 |
+) |
194 |
+ |
195 |
+src_prepare() { |
196 |
+ default |
197 |
+ |
198 |
+ sed -i \ |
199 |
+ -e '/^Encoding/d' \ |
200 |
+ -e '/^Icon/s/\.png//' \ |
201 |
+ -e '/^Categories/s/Application;//' \ |
202 |
+ gqview.desktop || die |
203 |
+ mv configure.in configure.ac || die |
204 |
+ eautoreconf |
205 |
+} |
206 |
+ |
207 |
+src_configure() { |
208 |
+ econf \ |
209 |
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \ |
210 |
+ --without-lcms |
211 |
+} |
212 |
+ |
213 |
+src_install() { |
214 |
+ default |
215 |
+ # bug #30111 |
216 |
+ docompress -x /usr/share/doc/${PF}/README |
217 |
+} |
218 |
+ |
219 |
+pkg_postinst() { |
220 |
+ xdg_desktop_database_update |
221 |
+} |
222 |
+ |
223 |
+pkg_postrm() { |
224 |
+ xdg_desktop_database_update |
225 |
+} |
226 |
|
227 |
diff --git a/media-gfx/gqview/metadata.xml b/media-gfx/gqview/metadata.xml |
228 |
index 7a971df7374..c5c6c04060e 100644 |
229 |
--- a/media-gfx/gqview/metadata.xml |
230 |
+++ b/media-gfx/gqview/metadata.xml |
231 |
@@ -5,6 +5,10 @@ |
232 |
<email>graphics@g.o</email> |
233 |
<name>Gentoo Graphics Project</name> |
234 |
</maintainer> |
235 |
+ <maintainer type="person"> |
236 |
+ <email>slyfox@g.o</email> |
237 |
+ <name>Sergei Trofimovich</name> |
238 |
+ </maintainer> |
239 |
<upstream> |
240 |
<remote-id type="sourceforge">gqview</remote-id> |
241 |
</upstream> |