[arch-commits] Commit in pinfo/trunk (PKGBUILD gcc10-stringop.diff)

Kyle Keen kkeen at archlinux.org
Wed Jul 29 23:27:43 UTC 2020


    Date: Wednesday, July 29, 2020 @ 23:27:43
  Author: kkeen
Revision: 665853

upgpkg: pinfo 0.6.13-1

Added:
  pinfo/trunk/gcc10-stringop.diff
Modified:
  pinfo/trunk/PKGBUILD

---------------------+
 PKGBUILD            |   22 ++++++++++++++++------
 gcc10-stringop.diff |   28 ++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-07-29 23:19:56 UTC (rev 665852)
+++ PKGBUILD	2020-07-29 23:27:43 UTC (rev 665853)
@@ -1,9 +1,10 @@
-# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
+# Maintainer: Kyle Keen <keenerd at gmail.com>
+# Contributor: Sergej Pupykin <pupykin.s+arch at gmail.com>
 # Contributor: Jaroslaw Swierczynski <swiergot at aur.archlinux.org>
 
 pkgname=pinfo
-pkgver=0.6.10
-pkgrel=9
+pkgver=0.6.13
+pkgrel=1
 pkgdesc="A hypertext info file viewer"
 arch=('x86_64')
 url="http://pinfo.sourceforge.net/"
@@ -12,11 +13,20 @@
 depends=('ncurses' 'readline')
 #source=("https://alioth.debian.org/frs/download.php/file/3351/$pkgname-$pkgver.tar.bz2")
 #source=("https://arch.p5n.pp.ru/~sergej/dl/2014/pinfo-$pkgver.tar.bz2")
-source=("https://fossies.org/linux/misc/old/pinfo-$pkgver.tar.bz2")
-sha256sums=('122180a0c23d11bc9eb569a4de3ff97d3052af96e32466fa62f2daf46ff61c5d')
+#source=("https://fossies.org/linux/misc/old/pinfo-$pkgver.tar.bz2")
+source=("pinfo-$pkgver.tgz::https://github.com/baszoetekouw/pinfo/archive/v$pkgver.tar.gz"
+        gcc10-stringop.diff)
+sha256sums=('9dc5e848a7a86cb665a885bc5f0fdf6d09ad60e814d75e78019ae3accb42c217'
+            '876fd9e3fbb6e129abe183dceb4db03cbd152467e7f0b7edd7cb03c5bc201c32')
 
+prepare() {
+  cd "$srcdir/$pkgname-$pkgver"
+  # remove on 0.6.14
+  patch -Np1 -i ../gcc10-stringop.diff
+}
+
 build() {
-  cd "$srcdir"/$pkgname-$pkgver
+  cd "$srcdir/$pkgname-$pkgver"
   CFLAGS+=' -fcommon' # https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common
   unset LDFLAGS
   [ -x configure ] || ./autogen.sh

Added: gcc10-stringop.diff
===================================================================
--- gcc10-stringop.diff	                        (rev 0)
+++ gcc10-stringop.diff	2020-07-29 23:27:43 UTC (rev 665853)
@@ -0,0 +1,28 @@
+diff --git a/src/utils.c b/src/utils.c
+index cb2fe76..2e4139c 100644
+--- a/src/utils.c
++++ b/src/utils.c
+@@ -848,10 +848,9 @@ char *
+ make_tempfile()
+ {
+ 	char *filename;
+-	size_t len;
+ 
+ 	/* TODO: fix hardcoded /tmp */
+-	char tmpfile_template[] = "/tmp/pinfo.XXXXXX";
++	char tmpfile_template[32] = "/tmp/pinfo.XXXXXX";
+ 
+ 	/* create a tmpfile */
+ 	int fd = mkstemp(tmpfile_template);
+@@ -864,9 +863,8 @@ make_tempfile()
+ 	}
+ 
+ 	/* allocate a new string and copy the filename there */
+-	len = strlen(tmpfile_template)+1;
+-	filename = xmalloc(len+1); /* guarenteerd to be set to \0's */
+-	strncpy(filename, tmpfile_template, len);
++	filename = xmalloc(33); /* guarenteerd to be set to \0's */
++	strncpy(filename, tmpfile_template, 32);
+ 
+ 	/* close the file */
+ 	close(fd);



More information about the arch-commits mailing list