mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-20 22:27:17 -08:00
app-text/convertlit: new revision fixing -Wformat-security warnings.
Gentoo-Bug: 521246 Package-Manager: portage-2.2.28
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit toolchain-funcs
|
||||
|
||||
MY_P="clit${PV//./}"
|
||||
|
||||
DESCRIPTION="CLit converts MS ebook .lit files to .opf (xml+html+png+jpg)"
|
||||
HOMEPAGE="http://www.convertlit.com/"
|
||||
SRC_URI="http://www.convertlit.com/${MY_P}src.zip"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND=">=dev-libs/libtommath-0.36-r1"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
app-arch/unzip"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${P}-respectflags-r1.patch"
|
||||
"${FILESDIR}/fix-Wformat-security-warnings.patch"
|
||||
)
|
||||
|
||||
src_compile() {
|
||||
tc-export CC
|
||||
|
||||
cd "${S}/lib" || die "failed to change into ${S}/lib directory"
|
||||
emake
|
||||
cd "${S}/${MY_P}" || die "failed to change into ${S}/${MY_P} directory"
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
einstalldocs
|
||||
dobin "${MY_P}/clit"
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
Index: clit18/Makefile
|
||||
===================================================================
|
||||
--- a/clit18/Makefile
|
||||
+++ b/clit18/Makefile
|
||||
@@ -1,9 +1,9 @@
|
||||
all: clit
|
||||
|
||||
-CFLAGS=-funsigned-char -Wall -O2 -I ../libtommath-0.30/ -I ../lib -I ../lib/des -I .
|
||||
+CFLAGS+=-funsigned-char -I ../lib -I ../lib/des -I .
|
||||
clean:
|
||||
rm -f *.o clit
|
||||
|
||||
clit: clit.o hexdump.o drm5.o explode.o transmute.o display.o utils.o manifest.o ../lib/openclit.a
|
||||
- gcc -o clit $^ ../libtommath-0.30/libtommath.a
|
||||
+ $(CC) $(LDFLAGS) -o clit $^ -ltommath
|
||||
|
||||
Index: lib/Makefile
|
||||
===================================================================
|
||||
--- a/lib/Makefile
|
||||
+++ b/lib/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
all: openclit.a
|
||||
|
||||
-CFLAGS=-O3 -Wall -Ides -Isha -Inewlzx -I.
|
||||
+CFLAGS+=-Ides -Isha -Inewlzx -I.
|
||||
clean:
|
||||
rm -f *.o openclit.a des/*.o lzx/*.o sha/*.o
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From 79ab07db8d91b6c6e0c36358c8030893c28510ba Mon Sep 17 00:00:00 2001
|
||||
From: Michael Orlitzky <michael@orlitzky.com>
|
||||
Date: Tue, 2 Aug 2016 10:32:53 -0400
|
||||
Subject: [PATCH 1/1] clit.c: fix -Wformat-security warnings.
|
||||
|
||||
Two uses of printf() in clit.c were triggering -Wformat-security
|
||||
warnings due to a missing "%s" format string. This was causing
|
||||
compilation to fail with -Werror=format-security, so they have
|
||||
been fixed.
|
||||
|
||||
Gentoo-Bug: 521246
|
||||
---
|
||||
clit18/clit.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/clit18/clit.c b/clit18/clit.c
|
||||
index c13a75d..48b749f 100644
|
||||
--- a/clit18/clit.c
|
||||
+++ b/clit18/clit.c
|
||||
@@ -125,9 +125,9 @@ int main(int argc, char ** argv)
|
||||
dir_program[i+1] = '\0'; break;
|
||||
}
|
||||
}
|
||||
- printf(sTitle);
|
||||
+ printf("%s", sTitle);
|
||||
if (argc < 3) {
|
||||
- printf(sUsage);
|
||||
+ printf("%s", sUsage);
|
||||
return -1;
|
||||
}
|
||||
base = 1;
|
||||
--
|
||||
2.7.3
|
||||
|
||||
Reference in New Issue
Block a user