Antonio Rojas pushed to branch main at Arch Linux / Packaging / Packages / 
convertlit


Commits:
1f55cab5 by Antonio Rojas at 2024-07-01T23:17:00+02:00
upgpkg: 1.8-12: Rebuild for missing .SRCINFO, use system CFLAGS

- - - - -


3 changed files:

- + .SRCINFO
- PKGBUILD
- + Wformat-security.patch


Changes:

=====================================
.SRCINFO
=====================================
@@ -0,0 +1,15 @@
+pkgbase = convertlit
+       pkgdesc = An extractor/converter for .LIT eBooks
+       pkgver = 1.8
+       pkgrel = 12
+       url = http://www.convertlit.com/
+       arch = x86_64
+       license = GPL-2.0-or-later
+       depends = glibc
+       depends = libtommath
+       source = http://www.convertlit.com/clit18src.zip
+       source = Wformat-security.patch
+       sha256sums = 
d70a85f5b945104340d56f48ec17bcf544e3bb3c35b1b3d58d230be699e557ba
+       sha256sums = 
79c587cda8d7639f362d83756508af15f8e7b24c9388eebca2df6e3956544e3a
+
+pkgname = convertlit


=====================================
PKGBUILD
=====================================
@@ -4,30 +4,36 @@
 
 pkgname=convertlit
 pkgver=1.8
-pkgrel=11
+pkgrel=12
 pkgdesc='An extractor/converter for .LIT eBooks'
 arch=(x86_64)
 url='http://www.convertlit.com/'
-license=(GPL)
-depends=(libtommath)
-source=(http://www.convertlit.com/clit18src.zip)
-sha256sums=('d70a85f5b945104340d56f48ec17bcf544e3bb3c35b1b3d58d230be699e557ba')
+license=(GPL-2.0-or-later)
+depends=(glibc
+         libtommath)
+source=(http://www.convertlit.com/clit18src.zip
+        Wformat-security.patch)
+sha256sums=('d70a85f5b945104340d56f48ec17bcf544e3bb3c35b1b3d58d230be699e557ba'
+            '79c587cda8d7639f362d83756508af15f8e7b24c9388eebca2df6e3956544e3a')
 
 prepare() {
+# Fix build with -Wformat-security (Gentoo)
+  patch -p1 < Wformat-security.patch
 # Link to shared libtommath and use system LDFLAGS
-  sed -i 's|../libtommath-0.30/libtommath.a|/usr/lib/libtommath.so 
${LDFLAGS}|' clit18/Makefile
+  sed -e 's|../libtommath-0.30/libtommath.a|/usr/lib/libtommath.so 
${LDFLAGS}|' -i clit18/Makefile
+# Use system CFLAGS
+  sed -e 's|CFLAGS=-O3 -Wall|CFLAGS+=|' -i lib/Makefile
+  sed -e 's|CFLAGS=-funsigned-char -Wall -O2|CFLAGS+=|' -i clit18/Makefile
 }
 
 build() {
-  cd lib
-  make 
+  export CFLAGS+=" -Wno-implicit-function-declaration"
 
-  cd ../clit18
-  make
+  cd lib && make
+  cd ../clit18 && make
 }
 
 package() {
   cd clit18
-
-  install -Dm755 clit "$pkgdir/usr/bin/clit"
+  install -Dm755 clit -t "$pkgdir"/usr/bin
 }


=====================================
Wformat-security.patch
=====================================
@@ -0,0 +1,34 @@
+From 79ab07db8d91b6c6e0c36358c8030893c28510ba Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <mich...@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
+



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/convertlit/-/commit/1f55cab58eee598d239b33e351828bbee647c928

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/convertlit/-/commit/1f55cab58eee598d239b33e351828bbee647c928
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to