1 |
commit: ece7f4be67e6d3cd3c75bee6ca1db73b12efd232 |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Aug 2 14:43:37 2016 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 2 14:43:53 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ece7f4be |
7 |
|
8 |
app-text/convertlit: new revision fixing -Wformat-security warnings. |
9 |
|
10 |
Gentoo-Bug: 521246 |
11 |
|
12 |
Package-Manager: portage-2.2.28 |
13 |
|
14 |
app-text/convertlit/convertlit-1.8-r2.ebuild | 44 ++++++++++++++++++++++ |
15 |
.../files/convertlit-1.8-respectflags-r1.patch | 28 ++++++++++++++ |
16 |
.../files/fix-Wformat-security-warnings.patch | 34 +++++++++++++++++ |
17 |
3 files changed, 106 insertions(+) |
18 |
|
19 |
diff --git a/app-text/convertlit/convertlit-1.8-r2.ebuild b/app-text/convertlit/convertlit-1.8-r2.ebuild |
20 |
new file mode 100644 |
21 |
index 0000000..29ada51 |
22 |
--- /dev/null |
23 |
+++ b/app-text/convertlit/convertlit-1.8-r2.ebuild |
24 |
@@ -0,0 +1,44 @@ |
25 |
+# Copyright 1999-2016 Gentoo Foundation |
26 |
+# Distributed under the terms of the GNU General Public License v2 |
27 |
+# $Id$ |
28 |
+ |
29 |
+EAPI=6 |
30 |
+ |
31 |
+inherit toolchain-funcs |
32 |
+ |
33 |
+MY_P="clit${PV//./}" |
34 |
+ |
35 |
+DESCRIPTION="CLit converts MS ebook .lit files to .opf (xml+html+png+jpg)" |
36 |
+HOMEPAGE="http://www.convertlit.com/" |
37 |
+SRC_URI="http://www.convertlit.com/${MY_P}src.zip" |
38 |
+ |
39 |
+LICENSE="GPL-2" |
40 |
+SLOT="0" |
41 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos" |
42 |
+IUSE="" |
43 |
+ |
44 |
+RDEPEND=">=dev-libs/libtommath-0.36-r1" |
45 |
+ |
46 |
+DEPEND="${RDEPEND} |
47 |
+ app-arch/unzip" |
48 |
+ |
49 |
+S="${WORKDIR}" |
50 |
+ |
51 |
+PATCHES=( |
52 |
+ "${FILESDIR}/${P}-respectflags-r1.patch" |
53 |
+ "${FILESDIR}/fix-Wformat-security-warnings.patch" |
54 |
+) |
55 |
+ |
56 |
+src_compile() { |
57 |
+ tc-export CC |
58 |
+ |
59 |
+ cd "${S}/lib" || die "failed to change into ${S}/lib directory" |
60 |
+ emake |
61 |
+ cd "${S}/${MY_P}" || die "failed to change into ${S}/${MY_P} directory" |
62 |
+ emake |
63 |
+} |
64 |
+ |
65 |
+src_install() { |
66 |
+ einstalldocs |
67 |
+ dobin "${MY_P}/clit" |
68 |
+} |
69 |
|
70 |
diff --git a/app-text/convertlit/files/convertlit-1.8-respectflags-r1.patch b/app-text/convertlit/files/convertlit-1.8-respectflags-r1.patch |
71 |
new file mode 100644 |
72 |
index 0000000..faedfa0 |
73 |
--- /dev/null |
74 |
+++ b/app-text/convertlit/files/convertlit-1.8-respectflags-r1.patch |
75 |
@@ -0,0 +1,28 @@ |
76 |
+Index: clit18/Makefile |
77 |
+=================================================================== |
78 |
+--- a/clit18/Makefile |
79 |
++++ b/clit18/Makefile |
80 |
+@@ -1,9 +1,9 @@ |
81 |
+ all: clit |
82 |
+ |
83 |
+-CFLAGS=-funsigned-char -Wall -O2 -I ../libtommath-0.30/ -I ../lib -I ../lib/des -I . |
84 |
++CFLAGS+=-funsigned-char -I ../lib -I ../lib/des -I . |
85 |
+ clean: |
86 |
+ rm -f *.o clit |
87 |
+ |
88 |
+ clit: clit.o hexdump.o drm5.o explode.o transmute.o display.o utils.o manifest.o ../lib/openclit.a |
89 |
+- gcc -o clit $^ ../libtommath-0.30/libtommath.a |
90 |
++ $(CC) $(LDFLAGS) -o clit $^ -ltommath |
91 |
+ |
92 |
+Index: lib/Makefile |
93 |
+=================================================================== |
94 |
+--- a/lib/Makefile |
95 |
++++ b/lib/Makefile |
96 |
+@@ -1,6 +1,6 @@ |
97 |
+ all: openclit.a |
98 |
+ |
99 |
+-CFLAGS=-O3 -Wall -Ides -Isha -Inewlzx -I. |
100 |
++CFLAGS+=-Ides -Isha -Inewlzx -I. |
101 |
+ clean: |
102 |
+ rm -f *.o openclit.a des/*.o lzx/*.o sha/*.o |
103 |
+ |
104 |
|
105 |
diff --git a/app-text/convertlit/files/fix-Wformat-security-warnings.patch b/app-text/convertlit/files/fix-Wformat-security-warnings.patch |
106 |
new file mode 100644 |
107 |
index 0000000..78410a9 |
108 |
--- /dev/null |
109 |
+++ b/app-text/convertlit/files/fix-Wformat-security-warnings.patch |
110 |
@@ -0,0 +1,34 @@ |
111 |
+From 79ab07db8d91b6c6e0c36358c8030893c28510ba Mon Sep 17 00:00:00 2001 |
112 |
+From: Michael Orlitzky <michael@××××××××.com> |
113 |
+Date: Tue, 2 Aug 2016 10:32:53 -0400 |
114 |
+Subject: [PATCH 1/1] clit.c: fix -Wformat-security warnings. |
115 |
+ |
116 |
+Two uses of printf() in clit.c were triggering -Wformat-security |
117 |
+warnings due to a missing "%s" format string. This was causing |
118 |
+compilation to fail with -Werror=format-security, so they have |
119 |
+been fixed. |
120 |
+ |
121 |
+Gentoo-Bug: 521246 |
122 |
+--- |
123 |
+ clit18/clit.c | 4 ++-- |
124 |
+ 1 file changed, 2 insertions(+), 2 deletions(-) |
125 |
+ |
126 |
+diff --git a/clit18/clit.c b/clit18/clit.c |
127 |
+index c13a75d..48b749f 100644 |
128 |
+--- a/clit18/clit.c |
129 |
++++ b/clit18/clit.c |
130 |
+@@ -125,9 +125,9 @@ int main(int argc, char ** argv) |
131 |
+ dir_program[i+1] = '\0'; break; |
132 |
+ } |
133 |
+ } |
134 |
+- printf(sTitle); |
135 |
++ printf("%s", sTitle); |
136 |
+ if (argc < 3) { |
137 |
+- printf(sUsage); |
138 |
++ printf("%s", sUsage); |
139 |
+ return -1; |
140 |
+ } |
141 |
+ base = 1; |
142 |
+-- |
143 |
+2.7.3 |
144 |
+ |