Mail archive
alpine-aports

[alpine-aports] [PATCH] community/libstaroffice: upgrade to 0.0.6, modernize

From: alpine-mips-patches <info_at_mobile-stream.com>
Date: Wed, 22 Nov 2018 15:03:04 +0000

Another package that suffers from stricter -Werror in gcc8.

Instead of trying to fix massive -Werror=parentheses case with upstream commit
abf19de1ad394523ccb8825e49d719063b2ea27f (35 changed files, 972 additions/deletions),
just upgrade to the next version and shut up a single -Werror=maybe-uninitialized failure.

Test still passes on x86_64 and mipsel at least.
---
 community/libstaroffice/APKBUILD                 | 16 +++++++++-------
 .../libstaroffice/fix-maybe-uninitialized.patch  | 11 +++++++++++
 2 files changed, 20 insertions(+), 7 deletions(-)
 create mode 100644 community/libstaroffice/fix-maybe-uninitialized.patch
diff --git a/community/libstaroffice/APKBUILD b/community/libstaroffice/APKBUILD
index cda0f8fac0..0dc76bee93 100644
--- a/community/libstaroffice/APKBUILD
+++ b/community/libstaroffice/APKBUILD
_at_@ -1,7 +1,7 @@
 # Contributor: Timo Teräs <timo.teras_at_iki.fi>
 # Maintainer: Timo Teräs <timo.teras_at_iki.fi>
 pkgname=libstaroffice
-pkgver=0.0.5
+pkgver=0.0.6
 pkgrel=0
 pkgdesc="Import filter for StarOffice documents"
 url="https://github.com/fosnola/libstaroffice"
_at_@ -12,7 +12,9 @@ depends_dev="zlib-dev boost-dev"
 makedepends="$depends_dev librevenge-dev doxygen"
 install=""
 subpackages="$pkgname-dev $pkgname-doc"
-source="https://github.com/fosnola/libstaroffice/releases/download/$pkgver/libstaroffice-$pkgver.tar.xz"
+source="https://github.com/fosnola/libstaroffice/releases/download/$pkgver/libstaroffice-$pkgver.tar.xz
+	fix-maybe-uninitialized.patch
+	"
 builddir="$srcdir/libstaroffice-$pkgver"
 
 build() {
_at_@ -23,14 +25,14 @@ build() {
 		--prefix=/usr \
 		--sysconfdir=/etc \
 		--mandir=/usr/share/man \
-		--localstatedir=/var \
-		|| return 1
-	make || return 1
+		--localstatedir=/var
+	make
 }
 
 package() {
 	cd "$builddir"
-	make DESTDIR="$pkgdir" install || return 1
+	make DESTDIR="$pkgdir" install
 }
 
-sha512sums="937fc618bef79c9e25957f25f39bc829621b0a2da0213cbfb1b56c2b00d44f61bcd9db67d3e6329a4bd700a2c88fc743088381f58a96a87712b040c0ffc17fde  libstaroffice-0.0.5.tar.xz"
+sha512sums="9b5313a069e29265875f2e744b6b39c261f578d72f67fdefe1454c092aaa28399e1b3dfcb3a2f881f9a60674e0115a29350fba3ee37fb442f0a837982077f324  libstaroffice-0.0.6.tar.xz
+db7129b9bc0ef6fbf33ab43c647c9c48296791853ca5fce80fa2791351aafb16f654858db64d5c3f740083ffb900e241ee2ca461382ae42c008d8b74df9f94a5  fix-maybe-uninitialized.patch"
diff --git a/community/libstaroffice/fix-maybe-uninitialized.patch b/community/libstaroffice/fix-maybe-uninitialized.patch
new file mode 100644
index 0000000000..b4f1ec9385
--- /dev/null
+++ b/community/libstaroffice/fix-maybe-uninitialized.patch
_at_@ -0,0 +1,11 @@
+--- a/src/lib/StarGraphicStruct.cxx
++++ b/src/lib/StarGraphicStruct.cxx
+_at_@ -152,7 +152,7 @@
+ {
+   if (!pattern) return false;
+   STOFFVec2i sz(8,8);
+-  unsigned tmpBufferPosition, tmpDIBFileSize;
++  unsigned tmpBufferPosition, tmpDIBFileSize = 0;
+   auto tmpDIBBuffer=createAndInitBMPData(sz, tmpDIBFileSize, tmpBufferPosition);
+   if (!tmpDIBBuffer) return false;
+ 
-- 
2.19.1
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Thu Nov 22 2018 - 15:03:04 UTC