[arch-commits] Commit in gettext/repos (3 files)
Allan McRae
allan at archlinux.org
Tue Nov 6 13:56:38 UTC 2018
Date: Tuesday, November 6, 2018 @ 13:56:38
Author: allan
Revision: 337933
archrelease: copy trunk to testing-x86_64
Added:
gettext/repos/testing-x86_64/
gettext/repos/testing-x86_64/PKGBUILD
(from rev 337932, gettext/trunk/PKGBUILD)
gettext/repos/testing-x86_64/gettext-0.19.8-its-segfault.patch
(from rev 337932, gettext/trunk/gettext-0.19.8-its-segfault.patch)
-----------------------------------+
PKGBUILD | 50 ++++++++++++++++++++++++++++++++++++
gettext-0.19.8-its-segfault.patch | 43 ++++++++++++++++++++++++++++++
2 files changed, 93 insertions(+)
Copied: gettext/repos/testing-x86_64/PKGBUILD (from rev 337932, gettext/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2018-11-06 13:56:38 UTC (rev 337933)
@@ -0,0 +1,50 @@
+# Maintainer:
+
+pkgname=gettext
+pkgver=0.19.8.1
+pkgrel=3
+pkgdesc="GNU internationalization library"
+url="https://www.gnu.org/software/gettext/"
+arch=(x86_64)
+license=(GPL)
+groups=(base base-devel)
+depends=(gcc-libs acl sh glib2 libunistring libcroco)
+makedepends=(gettext emacs git)
+optdepends=('git: for autopoint infrastructure updates')
+options=(!docs)
+source=(https://ftp.gnu.org/pub/gnu/gettext/$pkgname-$pkgver.tar.gz{,.sig}
+ gettext-0.19.8-its-segfault.patch)
+sha256sums=('ff942af0e438ced4a8b0ea4b0b6e0d6d657157c5e2364de57baa279c1c125c43'
+ 'SKIP'
+ '0e3b19ea94e956a6a484ca4c4ecea32a01a83f10a413e586183de464c51f158d')
+validpgpkeys=('462225C3B46F34879FC8496CD605848ED7E69871') # Daiki Ueno
+
+prepare() {
+ cd $pkgname-$pkgver
+ patch -Np1 -i ../gettext-0.19.8-its-segfault.patch
+}
+
+build() {
+ cd $pkgname-$pkgver
+ ./configure \
+ --prefix=/usr \
+ --enable-csharp \
+ --enable-nls \
+ --with-xz \
+ --without-included-gettext
+
+ sed -e 's/ -shared / -Wl,-O1,--as-needed\0/g' \
+ -i gettext-{tools,runtime,runtime/libasprintf}/libtool
+
+ make
+}
+
+check() {
+ cd $pkgname-$pkgver
+ make check
+}
+
+package() {
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+}
Copied: gettext/repos/testing-x86_64/gettext-0.19.8-its-segfault.patch (from rev 337932, gettext/trunk/gettext-0.19.8-its-segfault.patch)
===================================================================
--- testing-x86_64/gettext-0.19.8-its-segfault.patch (rev 0)
+++ testing-x86_64/gettext-0.19.8-its-segfault.patch 2018-11-06 13:56:38 UTC (rev 337933)
@@ -0,0 +1,43 @@
+From a0cab23332a254e3500cac2a3a984472d02180e5 Mon Sep 17 00:00:00 2001
+From: Bruno Haible <bruno at clisp.org>
+Date: Fri, 9 Dec 2016 21:04:31 +0100
+Subject: [PATCH] Fix crash of xgettext with --its option.
+
+* gettext-tools/src/xgettext.c (main): Free contents of its_dirs only when it
+was initialized. Fixes bug introduced on 2016-05-16.
+---
+ gettext-tools/src/xgettext.c | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/gettext-tools/src/xgettext.c b/gettext-tools/src/xgettext.c
+index f848d76d1..a80ee51ac 100644
+--- a/gettext-tools/src/xgettext.c
++++ b/gettext-tools/src/xgettext.c
+@@ -330,7 +330,7 @@ main (int argc, char *argv[])
+ bool sort_by_msgid = false;
+ bool sort_by_filepos = false;
+ char **dirs;
+- char **its_dirs;
++ char **its_dirs = NULL;
+ char *explicit_its_filename = NULL;
+ const char *file_name;
+ const char *files_from = NULL;
+@@ -1016,9 +1016,12 @@ warning: file '%s' extension '%s' is unknown; will try C"), filename, extension)
+ if (its_locating_rules)
+ locating_rule_list_free (its_locating_rules);
+
+- for (i = 0; its_dirs[i] != NULL; i++)
+- free (its_dirs[i]);
+- free (its_dirs);
++ if (its_dirs != NULL)
++ {
++ for (i = 0; its_dirs[i] != NULL; i++)
++ free (its_dirs[i]);
++ free (its_dirs);
++ }
+
+ exit (EXIT_SUCCESS);
+ }
+--
+2.14.3
+
More information about the arch-commits
mailing list