Date: Friday, March 17, 2023 @ 18:02:49
  Author: dvzrv
Revision: 471080

upgpkg: wv 1.2.9-6: Rebuild to fix format-security.

Remove unneeded quotes and curly braces.
Switch to (more) correct license (GPL2).
Add all required dependencies to depends.
Add provided library to provides.
Add patch to fix format-security problem.
Add configure options to local bash array for easier handling.

Added:
  wv/trunk/wv-1.2.9-format_security.patch
Modified:
  wv/trunk/PKGBUILD

--------------------------------+
 PKGBUILD                       |   50 ++++++++++++++++++++++++++++-----------
 wv-1.2.9-format_security.patch |   11 ++++++++
 2 files changed, 47 insertions(+), 14 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2023-03-17 17:38:01 UTC (rev 471079)
+++ PKGBUILD    2023-03-17 18:02:49 UTC (rev 471080)
@@ -1,28 +1,50 @@
-# Maintainer: Jan de Groot <[email protected]>
+# Maintainer:
+# Contributor: Jan de Groot <[email protected]>
 # Contributor: William Rea <[email protected]>
+
 pkgname=wv
 pkgver=1.2.9
-pkgrel=5
-pkgdesc="MSWord library can load and parse Word 2000, 97, 95 and 6 file 
formats"
-arch=('x86_64')
+pkgrel=6
+pkgdesc="MSWord library that can load and parse Word 2000, 97, 95 and 6 file 
formats"
+arch=(x86_64)
 url="https://sourceforge.net/projects/wvware";
-license=('GPL')
-depends=(libgsf libpng sh)
-source=(https://www.abisource.com/downloads/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz)
-md5sums=('dbccf2e9f747e50c913b7e3d126b73f7')
-sha1sums=('db4717a151742dbdb492318f104504a92075543a')
-sha512sums=('ae5c762012595ce8922bfda8749ad3e9cb055edab30152c3a5feaaf3ca6601f357d1e301b179e9a5860cd99452dd6e63e5f44f5bcc12f8db148bdd334e0200a5')
+license=(GPL2)
+depends=(
+  glib2
+  glibc
+  libgsf
+  libxml2
+  sh
+  zlib
+)
+provides=(libwv-1.2.so)
+source=(
+  http://www.abisource.com/downloads/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz
+  $pkgname-1.2.9-format_security.patch
+)
+sha512sums=('ae5c762012595ce8922bfda8749ad3e9cb055edab30152c3a5feaaf3ca6601f357d1e301b179e9a5860cd99452dd6e63e5f44f5bcc12f8db148bdd334e0200a5'
+            
'99fef3bec0f129ae2d138c50d1e3e9288d5309db87a72d9b1970d1d230e20be3469b423f0b74c5083a0a5cdca8fed0b2ca32ec1fefdca22f213e4a02a6bbd405')
+b2sums=('6a6aa6b5f87a934c703c8a74d85af3d7aa84dcd2bc613a3af7fb8d69a9339e71ba2618ae8f725b90c3fe0b0199f4b224bdb32a50c2b6b6614f84b6a14437633f'
+        
'18641a15c75a32250012771bd8ca8b0739f503ef8d1d2eebe23f2d378996aa3f6e2f0cfa72f8077add3db33f8ece86c57e80cc5b868719472b45ba1bed10a7d0')
 
+prepare() {
+  patch -Np1 -d $pkgname-$pkgver -i ../$pkgname-1.2.9-format_security.patch
+}
+
 build() {
+  local configure_options=(
+    --prefix=/usr
+    --mandir=/usr/share/man
+    --disable-static
+  )
   cd $pkgname-$pkgver
 
-  ./configure --prefix=/usr \
-    --mandir=/usr/share/man --disable-static
+  ./configure "${configure_options[@]}"
+  # prevent libtool from overlinking
   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
   make
 }
 
 package() {
-  cd $pkgname-$pkgver
-  make DESTDIR="${pkgdir}" install
+  make DESTDIR="$pkgdir" install -C $pkgname-$pkgver
 }

Added: wv-1.2.9-format_security.patch
===================================================================
--- wv-1.2.9-format_security.patch                              (rev 0)
+++ wv-1.2.9-format_security.patch      2023-03-17 18:02:49 UTC (rev 471080)
@@ -0,0 +1,11 @@
+--- wv-1.2.9/wvRTF.c.orig      2013-12-12 17:03:41.635612853 -0500
++++ wv-1.2.9/wvRTF.c   2013-12-12 17:04:05.528003832 -0500
+@@ -192,7 +192,7 @@
+     rtf_output_char ('{');
+ 
+     /* font color */
+-    rtf_output (rtfColors[ud->cCol]);
++    rtf_output ("%s", rtfColors[ud->cCol]);
+ 
+     /* font face */
+     rtf_output ("\\f%d", ud->cFont);

Reply via email to