Merge pull request #178 from kinvolk/tormath1/gettext-0.21

sys-devel/gettext: sync with gentoo upstream
This commit is contained in:
Mathieu Tortuyaux 2021-06-24 17:29:22 +02:00 committed by GitHub
commit f28dd3815e
12 changed files with 544 additions and 146 deletions

View File

@ -1,29 +1 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
AUX lrzsz-0.12.20-automake-1.12.patch 793 SHA256 da14545c343544d9c35cb20d9574f1f16cb39a057be1cb0af79998a5c0960455 SHA512 8e55cec506a494f97e7bd0c7bf910a0f49ab56485fe916e6d9e7dec7c6ff0f14aadd2b88d393ea16493c1780405e69ec7876490bf93fd05a8c51a3f58666a4a0 WHIRLPOOL 2494d8e15ee9d08f1001f512fca0bbf13646aead8d73100a003d56c99954fff133ff3c475dd13d458d8eca035949ee0c4c9d4d4f590f72fa55a7c6dbd9c8be6b
AUX lrzsz-0.12.20-automake-1.13.patch 454 SHA256 e25ebcc294beb5628e9801142a5dc4efb3ed1590f9afb89512cd0e51d2db5a72 SHA512 75b0f707704bb4f788de9f2fbb82c29daaa4b748e151271ba2617d24d759a84dea323f2f160b727e2c94675df78ffe1bd8368dd593d4582cbb567643717ec68e WHIRLPOOL 866e2c9300e69e44948bcc2537e8726148cbb06fcf1a4eefd0fbf9437853a740f8ca1e9d0299df6d557481f88b155c8ddf928edefb0e6ef384367117065894cc
AUX lrzsz-autotools.patch 8725 SHA256 05efb70cbe0a72a4ff3bfc89f9af05c79c215d7b4ffc7a883cd8ece56e605eb2 SHA512 4ba98fb4a72d8fcc654741d57992598d56eded61e7b89c54d44edd7a609149e15d9948d777d70bf41137daa0b860c67e1212a3f38519434cb5d44546bfb94909 WHIRLPOOL f37457903b0fb0638401edb084aac1ca64bb7e41473c8e25c624c3b0ba363d26b1b61a0334db67f10225696e5e69a0464084ca2a5ce3200ea9e17b0af4773d7e
AUX lrzsz-implicit-decl.patch 428 SHA256 867e4dc69fc83d0f96bb46d11d44b9575106e199506cf7098be0a5d2d9e39d81 SHA512 7dd642aa6701671986e6ab1635935c7a8088ad5ee74131b7c486e2e87d748fc835798d1a8a291e85a80ba3f88328ce4f293a8dafb1ebd9924f1f31fb2bd3a7d7 WHIRLPOOL f896657ad15689eec5d586e2b2954d32bed9a45583b1c545a80c5a97d4ac1f16cdebbf5232630c5480b55ae71eb841cace4701cbc095eda36809516387480d0c
DIST lrzsz-0.12.20.tar.gz 280938 SHA256 c28b36b14bddb014d9e9c97c52459852f97bd405f89113f30bee45ed92728ff1 SHA512 9bce64036f1f1c65f5910f19802aecaf3dc5ffeab0feeca10fa8d2fe1b83e212391cce23056d22fd0eda52df89e12ede68eb5d22ffcf22f935910d2af7399f12 WHIRLPOOL 17934730db44d11c08b700cd68d8a1e619612bf158db106ef8e7fc54e623b0c5e98a133870cf8cd0b8f824c3cf24b24f7102725dcf438d307a2e1d3839e0d1d5
EBUILD lrzsz-0.12.20-r3.ebuild 1724 SHA256 69235bdee88152dc4de51402bd20197c57711248bbcf2dad7aa283869376867b SHA512 d7c24632ee366d59852dffd51191d8d0988f5af563749fe99b2f8d0f0429be98ecc71966413b1b2633586024e92a431df7784778399058d63bed5837545b4fac WHIRLPOOL 6e8554eb3540e3c47d99c71ab7bcb65cd249319ef72385f98cb913c2be8b87e5ad632f9a799877dad03838febf7f2c1d2c6af87c97f3b5b2e817ad15e68e435a
MISC ChangeLog 6389 SHA256 5dd07ea33de701dbfea7d8b896874ceefcd67708b2bdf672baf3ab93d001d67e SHA512 90d54acb6cafc47e2291feb8f13c2664b6e879071510c0e0a35e6f7ad00c0d006573396a4749ad21170f4c32bbcdfe5b1084832f40b5adad7acf8c614bbd2dae WHIRLPOOL 9d30aef5977179c77f7628e8958247aa1e2077d09e99fe2d10ae7ff11e94083887ad173be0707ac012a17ea4c4d05ce7e8f588dbc927fdcc1c5b0cd0ab1c3b83
MISC metadata.xml 275 SHA256 e398d119aa44aee1268aeba20f0ff50ce658a9d0011d476c9f3f7e060aac3d0d SHA512 71e87aef3131e0835223a9deca5ffeff8fd5e18d5ba2cdd2d53a9faf07c6e41d8a8131637d77ff77f52ebfe0493f7aebd870082627e69cb966077032c17af256 WHIRLPOOL 72cb28b728a06068fcdab9120951db2220420a914d7c004bf7a5b3929e235ef3ce56283777945ba13192a0c0cbfe76e27255f1623d19402fb8b11da653e29456
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: GPGTools - https://gpgtools.org
iQIcBAEBCAAGBQJT3dBHAAoJED/EDWHtqUmqX8gP/R8aPcwIkbbn8HfXqkmhwvTD
1Y+UGjPOo9cgmzJSJnUFuvUYWMV1KTEqULnrlO1n/XuwM6ArYvs4anuBej75St5Z
nu3ys6lsm5zzagQoJwXv1ZIp0L7ThzJUbXBuxnSnL6McqibXw6FH7CFhjshT/NG7
6MYJa0o7EJQAGN2NamU9CaAhPyXHTzMuvDRopzkIsN28JFwyUJ8dO7ZfEzjTvs91
TdKR7JZebNDafj5WVk5mcGu8ZVUASIjOoOWWGaH66uvK+l6jJWOG467TSfWSzMJd
mQeyryeJ71GSPa/PbevKEJsmgGNnWvbL86B/jrZe44cwPco2pD0Oke09FC0BIIfC
sgv7Lhb8ccCbw93684a3Dc61+ArgRwGPsYLgoEHFid+QdQjs78SnNZ2vEpz2yqj8
FWa2jFnc9MtXGvVxSrmg7+ypofFzYOpUKw2PdmCBgGAq/J9PoZXUH59jW80kdxLj
9yfiMDh3GZ3rCQOsdVnX3cvT5je+qSM0N90M4+DoS6yBuljMUTeLM/htUtyTiNwu
pQii8ZYZBPgJNxIJEfp0VXmmlsIpDzDRUyB3j2+ZdhhaXzqgslJPTABoFaLp2bLF
OcLxxB6c6vUyn6OtOtKCOQuoWsFxplxH1kPyZZ5Xg3td/Yfibj5fnLtu2BaL4IyJ
VGd1M5ov+jN/1IjENrtl
=65yx
-----END PGP SIGNATURE-----
DIST lrzsz-0.12.20.tar.gz 280938 BLAKE2B 86511ab112da849f5894f18c045f2c8a9dd4c4e97426c1d98c5b91aade6c39e26f4a7e5674e057c9596a240dfd3ef32053fcdc8ee58b33654cf15eec64779b1e SHA512 9bce64036f1f1c65f5910f19802aecaf3dc5ffeab0feeca10fa8d2fe1b83e212391cce23056d22fd0eda52df89e12ede68eb5d22ffcf22f935910d2af7399f12

View File

@ -0,0 +1,10 @@
--- a/configure.in
+++ b/configure.in
@@ -95,6 +95,7 @@ AC_PROG_GCC_TRADITIONAL
dnl AC_PROG_INSTALL included in AM_INIT_AUTOMAKE
dnl AC_PROG_MAKE_SET included in AM_INIT_AUTOMAKE
AC_PROG_RANLIB
+AM_PROG_AR
AC_ISC_POSIX
AC_USE_SYSTEM_EXTENSIONS
AM_GNU_GETTEXT

View File

@ -0,0 +1,23 @@
diff -udr a/configure.in b/configure.in
--- a/configure.in 1998-12-30 08:50:07.000000000 +0100
+++ b/configure.in 2019-06-01 20:38:54.918650170 +0200
@@ -1,3 +1,4 @@
+m4_pattern_allow(.*)
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/crctab.c)
AM_INIT_AUTOMAKE(lrzsz, 0.12.20)
diff -udr lrzsz-0.12.20.orig/po/Makefile.in.in lrzsz-0.12.20/po/Makefile.in.in
--- a/po/Makefile.in.in 1998-04-26 15:22:40.000000000 +0200
+++ b/po/Makefile.in.in 2019-06-01 20:48:09.020703542 +0200
@@ -110,9 +110,9 @@
install-data-no: all
install-data-yes: all
if test -r $(MKINSTALLDIRS); then \
- $(MKINSTALLDIRS) $(datadir); \
+ $(MKINSTALLDIRS) $(DATADIR); \
else \
- $(top_srcdir)/mkinstalldirs $(datadir); \
+ $(top_srcdir)/mkinstalldirs $(DATADIR); \
fi
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \

View File

@ -0,0 +1,64 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools flag-o-matic toolchain-funcs
DESCRIPTION="Communication package providing the X, Y, and ZMODEM file transfer protocols"
HOMEPAGE="https://www.ohse.de/uwe/software/lrzsz.html"
SRC_URI="https://www.ohse.de/uwe/releases/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux"
IUSE="nls"
DEPEND="nls? ( virtual/libintl )"
PATCHES=(
"${FILESDIR}"/${PN}-autotools.patch
"${FILESDIR}"/${PN}-implicit-decl.patch
"${FILESDIR}"/${P}-automake-1.12.patch
"${FILESDIR}"/${P}-automake-1.13.patch
"${FILESDIR}"/${P}-gettext-0.20.patch
"${FILESDIR}"/${P}-AR.patch
)
DOCS=( AUTHORS COMPATABILITY ChangeLog NEWS \
README{,.cvs,.gettext,.isdn4linux,.tests} THANKS TODO )
src_prepare() {
default
# automake is unhappy if this is missing
>> config.rpath || die
# This is too old. Remove it so automake puts in a newer copy.
rm -f missing || die
# Autoheader does not like seeing this file.
rm -f acconfig.h || die
eautoreconf
}
src_configure() {
tc-export CC
append-flags -Wstrict-prototypes
econf $(use_enable nls)
}
src_test() {
#Don't use check target.
#See bug #120748 before changing this function.
make vcheck || die "tests failed"
}
src_install() {
default
local x
for x in {r,s}{b,x,z} ; do
dosym l${x} /usr/bin/${x}
dosym l${x:0:1}z.1 /usr/share/man/man1/${x}.1
[ "${x:1:1}" = "z" ] || dosym l${x:0:1}z.1 /usr/share/man/man1/l${x}.1
done
}

View File

@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>net-dialup</herd>
<longdescription>Communication package providing the X, Y, and ZMODEM file transfer protocols</longdescription>
<maintainer type="project">
<email>embedded@gentoo.org</email>
<name>Embedded Gentoo</name>
</maintainer>
</pkgmetadata>

View File

@ -1 +1 @@
DIST gettext-0.19.8.1.tar.gz 19704011 BLAKE2B 17dc7aad338a26d71b818fea51e46a47dccf14744ee575ce86b591becaea402e36d64dc018e1a84113c356122ffef367cf2fa424e51ebc9720350040b4960091 SHA512 073042fa2dc48804c58e76f036130a669e19612c25427b0ab14d0b366b549a63751bf3af03bfd0745d7c4f72497a4b2aab26a3cc6de83189ce111679073878e1
DIST gettext-0.21.tar.gz 24181849 BLAKE2B 2eae99d0916b00b2af6fbc6bf7e309076519a10fea16cd49e7aa29fe8aec1ee7c784c6277281b764dc4abacf400cd3fe461129586303c8cd337db15c76cb4b87 SHA512 bbe590c5dd3580c75bf30ff768da99a88eb8d466ec1ac9eea20be4cab4357ecf72448e6b81b47425e39d50fa6320ba426632914d7898dfebb4f159abc39c31d1

View File

@ -1,87 +0,0 @@
From e546de65a333789e83f5485757967cee29ee3681 Mon Sep 17 00:00:00 2001
From: Robert Yang <liezhi.yang@windriver.com>
Date: Sun, 19 Feb 2017 23:32:46 -0800
Subject: [PATCH] cr-statement.c/timsort.h: fix formatting issues
Fixed when compile with "-Wformat -Wformat-security -Werror=format-security":
| gettext-tools/gnulib-lib/libcroco/cr-statement.c: In function 'cr_statement_dump_charset':
| gettext-tools/gnulib-lib/libcroco/cr-statement.c:2661:17: error: format not a string literal and no format arguments [-Werror=format-security]
| fprintf (a_fp, str) ;
And:
gettext-tools/gnulib-lib/libxml/timsort.h:326:80: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Wformat=]
fprintf(stderr, "Error allocating temporary storage for tim sort: need %lu bytes", sizeof(SORT_TYPE) * new_size);
Upstream-Status: Pending
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
gettext-tools/gnulib-lib/libcroco/cr-statement.c | 10 +++++-----
gettext-tools/gnulib-lib/libxml/timsort.h | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/gettext-tools/gnulib-lib/libcroco/cr-statement.c b/gettext-tools/gnulib-lib/libcroco/cr-statement.c
index 617520f..100104b 100644
--- a/gettext-tools/gnulib-lib/libcroco/cr-statement.c
+++ b/gettext-tools/gnulib-lib/libcroco/cr-statement.c
@@ -2607,7 +2607,7 @@ cr_statement_dump_ruleset (CRStatement * a_this, FILE * a_fp, glong a_indent)
g_return_if_fail (a_fp && a_this);
str = cr_statement_ruleset_to_string (a_this, a_indent);
if (str) {
- fprintf (a_fp, str);
+ fprintf (a_fp, "%s", str);
g_free (str);
str = NULL;
}
@@ -2658,7 +2658,7 @@ cr_statement_dump_charset (CRStatement * a_this, FILE * a_fp, gulong a_indent)
str = cr_statement_charset_to_string (a_this,
a_indent) ;
if (str) {
- fprintf (a_fp, str) ;
+ fprintf (a_fp, "%s", str) ;
g_free (str) ;
str = NULL ;
}
@@ -2685,7 +2685,7 @@ cr_statement_dump_page (CRStatement * a_this, FILE * a_fp, gulong a_indent)
str = cr_statement_at_page_rule_to_string (a_this, a_indent) ;
if (str) {
- fprintf (a_fp, str);
+ fprintf (a_fp, "%s", str);
g_free (str) ;
str = NULL ;
}
@@ -2711,7 +2711,7 @@ cr_statement_dump_media_rule (CRStatement * a_this,
str = cr_statement_media_rule_to_string (a_this, a_indent) ;
if (str) {
- fprintf (a_fp, str) ;
+ fprintf (a_fp, "%s", str) ;
g_free (str) ;
str = NULL ;
}
@@ -2737,7 +2737,7 @@ cr_statement_dump_import_rule (CRStatement * a_this, FILE * a_fp,
str = cr_statement_import_rule_to_string (a_this, a_indent) ;
if (str) {
- fprintf (a_fp, str) ;
+ fprintf (a_fp, "%s", str) ;
g_free (str) ;
str = NULL ;
}
diff --git a/gettext-tools/gnulib-lib/libxml/timsort.h b/gettext-tools/gnulib-lib/libxml/timsort.h
index 795f272..443918a 100644
--- a/gettext-tools/gnulib-lib/libxml/timsort.h
+++ b/gettext-tools/gnulib-lib/libxml/timsort.h
@@ -323,7 +323,7 @@ static void TIM_SORT_RESIZE(TEMP_STORAGE_T *store, const size_t new_size)
SORT_TYPE *tempstore = (SORT_TYPE *)realloc(store->storage, new_size * sizeof(SORT_TYPE));
if (tempstore == NULL)
{
- fprintf(stderr, "Error allocating temporary storage for tim sort: need %lu bytes", sizeof(SORT_TYPE) * new_size);
+ fprintf(stderr, "Error allocating temporary storage for tim sort: need %zu bytes", sizeof(SORT_TYPE) * new_size);
exit(1);
}
store->storage = tempstore;
--
2.10.2

View File

@ -0,0 +1,37 @@
From 829660df1583c6c3ee1d90291dd910f08e3b777e Mon Sep 17 00:00:00 2001
From: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Date: Fri, 10 May 2019 20:08:25 +0200
Subject: [PATCH] Fix parallel install issue
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
---
gettext-tools/src/Makefile.am | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am
index 09a3c153d..1ee49cdca 100644
--- a/gettext-tools/src/Makefile.am
+++ b/gettext-tools/src/Makefile.am
@@ -252,9 +252,16 @@ cldr_plurals_LDADD = libgettextsrc.la $(LDADD)
# How to get the include files of libtextstyle.
textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h:
- here=`pwd`; \
- cd ../../libtextstyle/lib && \
- $(MAKE) install-nobase_includeHEADERS install-nobase_nodist_includeHEADERS includedir="$$here"
+ cd "$(abs_top_builddir)/../libtextstyle/lib" && $(MAKE) $@
+ if test -f "$(abs_top_builddir)/../libtextstyle/lib/$@"; then \
+ file="$(abs_top_builddir)/../libtextstyle/lib/$@"; \
+ else \
+ file="$(abs_top_srcdir)/../libtextstyle/lib/$@"; \
+ fi; \
+ target_dir="$(abs_builddir)/$@"; \
+ target_dir="$${target_dir%/*}"; \
+ $(MKDIR_P) "$${target_dir}"; \
+ $(INSTALL_HEADER) "$$file" $@
BUILT_SOURCES += textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h
MOSTLYCLEANFILES += textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h
--
2.21.0

View File

@ -0,0 +1,335 @@
https://gitlab.gnome.org/GNOME/gnome-shell/-/commit/44cbd1e718d6a08e59b9300280c340218a84e089
--- a/libtextstyle/gnulib-local/lib/libcroco/cr-parser.c
+++ b/libtextstyle/gnulib-local/lib/libcroco/cr-parser.c
@@ -146,6 +146,8 @@ struct _CRParserPriv {
#define CHARS_TAB_SIZE 12
+#define RECURSIVE_CALLERS_LIMIT 100
+
/**
* IS_NUM:
*@a_char: the char to test.
@@ -354,9 +356,11 @@ static enum CRStatus cr_parser_parse_selector_core (CRParser * a_this);
static enum CRStatus cr_parser_parse_declaration_core (CRParser * a_this);
-static enum CRStatus cr_parser_parse_any_core (CRParser * a_this);
+static enum CRStatus cr_parser_parse_any_core (CRParser * a_this,
+ guint n_calls);
-static enum CRStatus cr_parser_parse_block_core (CRParser * a_this);
+static enum CRStatus cr_parser_parse_block_core (CRParser * a_this,
+ guint n_calls);
static enum CRStatus cr_parser_parse_value_core (CRParser * a_this);
@@ -794,7 +798,7 @@ cr_parser_parse_atrule_core (CRParser * a_this)
cr_parser_try_to_skip_spaces_and_comments (a_this);
do {
- status = cr_parser_parse_any_core (a_this);
+ status = cr_parser_parse_any_core (a_this, 0);
} while (status == CR_OK);
status = cr_tknzr_get_next_token (PRIVATE (a_this)->tknzr,
@@ -805,7 +809,7 @@ cr_parser_parse_atrule_core (CRParser * a_this)
cr_tknzr_unget_token (PRIVATE (a_this)->tknzr,
token);
token = NULL;
- status = cr_parser_parse_block_core (a_this);
+ status = cr_parser_parse_block_core (a_this, 0);
CHECK_PARSING_STATUS (status,
FALSE);
goto done;
@@ -940,11 +944,11 @@ cr_parser_parse_selector_core (CRParser * a_this)
RECORD_INITIAL_POS (a_this, &init_pos);
- status = cr_parser_parse_any_core (a_this);
+ status = cr_parser_parse_any_core (a_this, 0);
CHECK_PARSING_STATUS (status, FALSE);
do {
- status = cr_parser_parse_any_core (a_this);
+ status = cr_parser_parse_any_core (a_this, 0);
} while (status == CR_OK);
@@ -966,10 +970,12 @@ cr_parser_parse_selector_core (CRParser * a_this)
*in chapter 4.1 of the css2 spec.
*block ::= '{' S* [ any | block | ATKEYWORD S* | ';' ]* '}' S*;
*@param a_this the current instance of #CRParser.
+ *@param n_calls used to limit recursion depth
*FIXME: code this function.
*/
static enum CRStatus
-cr_parser_parse_block_core (CRParser * a_this)
+cr_parser_parse_block_core (CRParser * a_this,
+ guint n_calls)
{
CRToken *token = NULL;
CRInputPos init_pos;
@@ -977,6 +983,9 @@ cr_parser_parse_block_core (CRParser * a_this)
g_return_val_if_fail (a_this && PRIVATE (a_this), CR_BAD_PARAM_ERROR);
+ if (n_calls > RECURSIVE_CALLERS_LIMIT)
+ return CR_ERROR;
+
RECORD_INITIAL_POS (a_this, &init_pos);
status = cr_tknzr_get_next_token (PRIVATE (a_this)->tknzr, &token);
@@ -1006,13 +1015,13 @@ cr_parser_parse_block_core (CRParser * a_this)
} else if (token->type == CBO_TK) {
cr_tknzr_unget_token (PRIVATE (a_this)->tknzr, token);
token = NULL;
- status = cr_parser_parse_block_core (a_this);
+ status = cr_parser_parse_block_core (a_this, n_calls + 1);
CHECK_PARSING_STATUS (status, FALSE);
goto parse_block_content;
} else {
cr_tknzr_unget_token (PRIVATE (a_this)->tknzr, token);
token = NULL;
- status = cr_parser_parse_any_core (a_this);
+ status = cr_parser_parse_any_core (a_this, n_calls + 1);
CHECK_PARSING_STATUS (status, FALSE);
goto parse_block_content;
}
@@ -1119,7 +1128,7 @@ cr_parser_parse_value_core (CRParser * a_this)
status = cr_tknzr_unget_token (PRIVATE (a_this)->tknzr,
token);
token = NULL;
- status = cr_parser_parse_block_core (a_this);
+ status = cr_parser_parse_block_core (a_this, 0);
CHECK_PARSING_STATUS (status, FALSE);
ref++;
goto continue_parsing;
@@ -1133,7 +1142,7 @@ cr_parser_parse_value_core (CRParser * a_this)
status = cr_tknzr_unget_token (PRIVATE (a_this)->tknzr,
token);
token = NULL;
- status = cr_parser_parse_any_core (a_this);
+ status = cr_parser_parse_any_core (a_this, 0);
if (status == CR_OK) {
ref++;
goto continue_parsing;
@@ -1172,10 +1181,12 @@ cr_parser_parse_value_core (CRParser * a_this)
* | FUNCTION | DASHMATCH | '(' any* ')' | '[' any* ']' ] S*;
*
*@param a_this the current instance of #CRParser.
+ *@param n_calls used to limit recursion depth
*@return CR_OK upon successfull completion, an error code otherwise.
*/
static enum CRStatus
-cr_parser_parse_any_core (CRParser * a_this)
+cr_parser_parse_any_core (CRParser * a_this,
+ guint n_calls)
{
CRToken *token1 = NULL,
*token2 = NULL;
@@ -1184,6 +1195,9 @@ cr_parser_parse_any_core (CRParser * a_this)
g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
+ if (n_calls > RECURSIVE_CALLERS_LIMIT)
+ return CR_ERROR;
+
RECORD_INITIAL_POS (a_this, &init_pos);
status = cr_tknzr_get_next_token (PRIVATE (a_this)->tknzr, &token1);
@@ -1222,7 +1236,7 @@ cr_parser_parse_any_core (CRParser * a_this)
*We consider parameter as being an "any*" production.
*/
do {
- status = cr_parser_parse_any_core (a_this);
+ status = cr_parser_parse_any_core (a_this, n_calls + 1);
} while (status == CR_OK);
ENSURE_PARSING_COND (status == CR_PARSING_ERROR);
@@ -1247,7 +1261,7 @@ cr_parser_parse_any_core (CRParser * a_this)
}
do {
- status = cr_parser_parse_any_core (a_this);
+ status = cr_parser_parse_any_core (a_this, n_calls + 1);
} while (status == CR_OK);
ENSURE_PARSING_COND (status == CR_PARSING_ERROR);
@@ -1275,7 +1289,7 @@ cr_parser_parse_any_core (CRParser * a_this)
}
do {
- status = cr_parser_parse_any_core (a_this);
+ status = cr_parser_parse_any_core (a_this, n_calls + 1);
} while (status == CR_OK);
ENSURE_PARSING_COND (status == CR_PARSING_ERROR);
--- a/libtextstyle/lib/libcroco/cr-parser.c
+++ b/libtextstyle/lib/libcroco/cr-parser.c
@@ -146,6 +146,8 @@ struct _CRParserPriv {
#define CHARS_TAB_SIZE 12
+#define RECURSIVE_CALLERS_LIMIT 100
+
/**
* IS_NUM:
*@a_char: the char to test.
@@ -354,9 +356,11 @@ static enum CRStatus cr_parser_parse_selector_core (CRParser * a_this);
static enum CRStatus cr_parser_parse_declaration_core (CRParser * a_this);
-static enum CRStatus cr_parser_parse_any_core (CRParser * a_this);
+static enum CRStatus cr_parser_parse_any_core (CRParser * a_this,
+ guint n_calls);
-static enum CRStatus cr_parser_parse_block_core (CRParser * a_this);
+static enum CRStatus cr_parser_parse_block_core (CRParser * a_this,
+ guint n_calls);
static enum CRStatus cr_parser_parse_value_core (CRParser * a_this);
@@ -794,7 +798,7 @@ cr_parser_parse_atrule_core (CRParser * a_this)
cr_parser_try_to_skip_spaces_and_comments (a_this);
do {
- status = cr_parser_parse_any_core (a_this);
+ status = cr_parser_parse_any_core (a_this, 0);
} while (status == CR_OK);
status = cr_tknzr_get_next_token (PRIVATE (a_this)->tknzr,
@@ -805,7 +809,7 @@ cr_parser_parse_atrule_core (CRParser * a_this)
cr_tknzr_unget_token (PRIVATE (a_this)->tknzr,
token);
token = NULL;
- status = cr_parser_parse_block_core (a_this);
+ status = cr_parser_parse_block_core (a_this, 0);
CHECK_PARSING_STATUS (status,
FALSE);
goto done;
@@ -940,11 +944,11 @@ cr_parser_parse_selector_core (CRParser * a_this)
RECORD_INITIAL_POS (a_this, &init_pos);
- status = cr_parser_parse_any_core (a_this);
+ status = cr_parser_parse_any_core (a_this, 0);
CHECK_PARSING_STATUS (status, FALSE);
do {
- status = cr_parser_parse_any_core (a_this);
+ status = cr_parser_parse_any_core (a_this, 0);
} while (status == CR_OK);
@@ -966,10 +970,12 @@ cr_parser_parse_selector_core (CRParser * a_this)
*in chapter 4.1 of the css2 spec.
*block ::= '{' S* [ any | block | ATKEYWORD S* | ';' ]* '}' S*;
*@param a_this the current instance of #CRParser.
+ *@param n_calls used to limit recursion depth
*FIXME: code this function.
*/
static enum CRStatus
-cr_parser_parse_block_core (CRParser * a_this)
+cr_parser_parse_block_core (CRParser * a_this,
+ guint n_calls)
{
CRToken *token = NULL;
CRInputPos init_pos;
@@ -977,6 +983,9 @@ cr_parser_parse_block_core (CRParser * a_this)
g_return_val_if_fail (a_this && PRIVATE (a_this), CR_BAD_PARAM_ERROR);
+ if (n_calls > RECURSIVE_CALLERS_LIMIT)
+ return CR_ERROR;
+
RECORD_INITIAL_POS (a_this, &init_pos);
status = cr_tknzr_get_next_token (PRIVATE (a_this)->tknzr, &token);
@@ -1006,13 +1015,13 @@ cr_parser_parse_block_core (CRParser * a_this)
} else if (token->type == CBO_TK) {
cr_tknzr_unget_token (PRIVATE (a_this)->tknzr, token);
token = NULL;
- status = cr_parser_parse_block_core (a_this);
+ status = cr_parser_parse_block_core (a_this, n_calls + 1);
CHECK_PARSING_STATUS (status, FALSE);
goto parse_block_content;
} else {
cr_tknzr_unget_token (PRIVATE (a_this)->tknzr, token);
token = NULL;
- status = cr_parser_parse_any_core (a_this);
+ status = cr_parser_parse_any_core (a_this, n_calls + 1);
CHECK_PARSING_STATUS (status, FALSE);
goto parse_block_content;
}
@@ -1119,7 +1128,7 @@ cr_parser_parse_value_core (CRParser * a_this)
status = cr_tknzr_unget_token (PRIVATE (a_this)->tknzr,
token);
token = NULL;
- status = cr_parser_parse_block_core (a_this);
+ status = cr_parser_parse_block_core (a_this, 0);
CHECK_PARSING_STATUS (status, FALSE);
ref++;
goto continue_parsing;
@@ -1133,7 +1142,7 @@ cr_parser_parse_value_core (CRParser * a_this)
status = cr_tknzr_unget_token (PRIVATE (a_this)->tknzr,
token);
token = NULL;
- status = cr_parser_parse_any_core (a_this);
+ status = cr_parser_parse_any_core (a_this, 0);
if (status == CR_OK) {
ref++;
goto continue_parsing;
@@ -1172,10 +1181,12 @@ cr_parser_parse_value_core (CRParser * a_this)
* | FUNCTION | DASHMATCH | '(' any* ')' | '[' any* ']' ] S*;
*
*@param a_this the current instance of #CRParser.
+ *@param n_calls used to limit recursion depth
*@return CR_OK upon successfull completion, an error code otherwise.
*/
static enum CRStatus
-cr_parser_parse_any_core (CRParser * a_this)
+cr_parser_parse_any_core (CRParser * a_this,
+ guint n_calls)
{
CRToken *token1 = NULL,
*token2 = NULL;
@@ -1184,6 +1195,9 @@ cr_parser_parse_any_core (CRParser * a_this)
g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
+ if (n_calls > RECURSIVE_CALLERS_LIMIT)
+ return CR_ERROR;
+
RECORD_INITIAL_POS (a_this, &init_pos);
status = cr_tknzr_get_next_token (PRIVATE (a_this)->tknzr, &token1);
@@ -1222,7 +1236,7 @@ cr_parser_parse_any_core (CRParser * a_this)
*We consider parameter as being an "any*" production.
*/
do {
- status = cr_parser_parse_any_core (a_this);
+ status = cr_parser_parse_any_core (a_this, n_calls + 1);
} while (status == CR_OK);
ENSURE_PARSING_COND (status == CR_PARSING_ERROR);
@@ -1247,7 +1261,7 @@ cr_parser_parse_any_core (CRParser * a_this)
}
do {
- status = cr_parser_parse_any_core (a_this);
+ status = cr_parser_parse_any_core (a_this, n_calls + 1);
} while (status == CR_OK);
ENSURE_PARSING_COND (status == CR_PARSING_ERROR);
@@ -1275,7 +1289,7 @@ cr_parser_parse_any_core (CRParser * a_this)
}
do {
- status = cr_parser_parse_any_core (a_this);
+ status = cr_parser_parse_any_core (a_this, n_calls + 1);
} while (status == CR_OK);
ENSURE_PARSING_COND (status == CR_PARSING_ERROR);

View File

@ -0,0 +1,22 @@
--- gettext-0.21-rc1/gettext-tools/src/Makefile.in
+++ gettext-0.21-rc1/gettext-tools/src/Makefile.in
@@ -4106,9 +4106,16 @@
# How to get the include files of libtextstyle.
@USE_INSTALLED_LIBTEXTSTYLE_FALSE@textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h:
-@USE_INSTALLED_LIBTEXTSTYLE_FALSE@ here=`pwd`; \
-@USE_INSTALLED_LIBTEXTSTYLE_FALSE@ cd ../../libtextstyle/lib && \
-@USE_INSTALLED_LIBTEXTSTYLE_FALSE@ $(MAKE) install-nobase_includeHEADERS install-nobase_nodist_includeHEADERS includedir="$$here"
+@USE_INSTALLED_LIBTEXTSTYLE_FALSE@ cd "$(abs_top_builddir)/../libtextstyle/lib" && $(MAKE) $@
+@USE_INSTALLED_LIBTEXTSTYLE_FALSE@ if test -f "$(abs_top_builddir)/../libtextstyle/lib/$@"; then \
+@USE_INSTALLED_LIBTEXTSTYLE_FALSE@ file="$(abs_top_builddir)/../libtextstyle/lib/$@"; \
+@USE_INSTALLED_LIBTEXTSTYLE_FALSE@ else \
+@USE_INSTALLED_LIBTEXTSTYLE_FALSE@ file="$(abs_top_srcdir)/../libtextstyle/lib/$@"; \
+@USE_INSTALLED_LIBTEXTSTYLE_FALSE@ fi; \
+@USE_INSTALLED_LIBTEXTSTYLE_FALSE@ target_dir="$(abs_builddir)/$@"; \
+@USE_INSTALLED_LIBTEXTSTYLE_FALSE@ target_dir="$${target_dir%/*}"; \
+@USE_INSTALLED_LIBTEXTSTYLE_FALSE@ $(MKDIR_P) "$${target_dir}"; \
+@USE_INSTALLED_LIBTEXTSTYLE_FALSE@ $(INSTALL_HEADER) "$$file" $@
# No need to install libgettextsrc.a, except on AIX.
install-exec-hook: install-exec-clean

View File

@ -1,22 +1,26 @@
# Copyright 1999-2017 Gentoo Foundation
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Note: Keep version bumps in sync with dev-libs/libintl.
EAPI="5"
EAPI=7
inherit epatch epunt-cxx ltprune mono-env libtool java-pkg-opt-2 multilib-minimal
inherit mono-env libtool java-pkg-opt-2 multilib-minimal
DESCRIPTION="GNU locale utilities"
HOMEPAGE="https://www.gnu.org/software/gettext/"
if [[ "${PV}" == *_rc* ]] ; then
SRC_URI="https://alpha.gnu.org/gnu/${PN}/${P/_/-}.tar.bz2"
S="${WORKDIR}/${P/_/-}"
else
SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
fi
# Only libasprintf is under the LGPL (and libintl is in a sep package),
# so put that license behind USE=cxx.
LICENSE="GPL-3+ cxx? ( LGPL-2.1+ )"
SLOT="0"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
IUSE="acl -cvs +cxx doc emacs git java ncurses nls openmp static-libs"
IUSE="acl cvs +cxx doc emacs git java ncurses nls openmp static-libs"
# only runtime goes multilib
# Note: The version of libxml2 corresponds to the version bundled via gnulib.
@ -31,18 +35,36 @@ DEPEND=">=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
dev-libs/expat
acl? ( virtual/acl )
ncurses? ( sys-libs/ncurses:0= )
java? ( >=virtual/jdk-1.4:= )"
java? ( >=virtual/jdk-1.8:= )"
RDEPEND="${DEPEND}
!git? ( cvs? ( dev-vcs/cvs ) )
git? ( dev-vcs/git )
java? ( >=virtual/jre-1.4 )"
java? ( >=virtual/jre-1.8 )"
BDEPEND="
git? ( dev-vcs/git )
"
PDEPEND="emacs? ( app-emacs/po-mode )"
MULTILIB_WRAPPED_HEADERS=(
# only installed for native ABI
/usr/include/gettext-po.h
/usr/include/autosprintf.h
/usr/include/textstyle.h
/usr/include/textstyle/stdbool.h
/usr/include/textstyle/version.h
/usr/include/textstyle/woe32dll.h
)
PATCHES=(
"${FILESDIR}"/${PN}-0.19.7-disable-libintl.patch #564168
"${FILESDIR}"/${PN}-0.20-parallel_install.patch #685530
"${FILESDIR}"/${PN}-0.21_rc1-avoid_eautomake.patch
"${FILESDIR}"/${PN}-0.21-CVE-2020-12825.patch
)
QA_SONAME_NO_SYMLINK=".*/preloadable_libintl.so"
pkg_setup() {
mono-env_pkg_setup
java-pkg-opt-2_pkg_setup
@ -51,10 +73,8 @@ pkg_setup() {
src_prepare() {
java-pkg-opt-2_src_prepare
epatch "${FILESDIR}"/${PN}-0.19.7-disable-libintl.patch #564168
epatch "${FILESDIR}"/${PN}-0.19.8.1-format-security.patch
default
epunt_cxx
elibtoolize
}
@ -62,7 +82,7 @@ multilib_src_configure() {
local myconf=(
# switches common to runtime and top-level
--cache-file="${BUILD_DIR}"/config.cache
--docdir="\$(datarootdir)/doc/${PF}"
#--docdir="\$(datarootdir)/doc/${PF}"
# Emacs support is now in a separate package
--without-emacs
@ -91,7 +111,7 @@ multilib_src_configure() {
$(use_enable static-libs static)
)
local ECONF_SOURCE=${S}
local ECONF_SOURCE="${S}"
if ! multilib_is_native_abi ; then
# for non-native ABIs, we build runtime only
ECONF_SOURCE+=/gettext-runtime
@ -101,7 +121,7 @@ multilib_src_configure() {
}
multilib_src_install() {
default
emake DESTDIR="${D}" install
if multilib_is_native_abi ; then
dosym msgfmt /usr/bin/gmsgfmt #43435
@ -110,29 +130,26 @@ multilib_src_install() {
}
multilib_src_install_all() {
use nls || rm -r "${ED}"/usr/share/locale
use static-libs || prune_libtool_files --all
rm -f "${ED}"/usr/share/locale/locale.alias "${ED}"/usr/lib/charset.alias
find "${ED}" -type f -name "*.la" -delete || die
if use java ; then
java-pkg_dojar "${ED}"/usr/share/${PN}/*.jar
rm -f "${ED}"/usr/share/${PN}/*.jar
rm -f "${ED}"/usr/share/${PN}/*.class
rm "${ED}"/usr/share/${PN}/*.jar || die
rm "${ED}"/usr/share/${PN}/*.class || die
if use doc ; then
java-pkg_dojavadoc "${ED}"/usr/share/doc/${PF}/javadoc2
rm -rf "${ED}"/usr/share/doc/${PF}/javadoc2
java-pkg_dojavadoc "${ED}"/usr/share/doc/${PF}/html/javadoc2
fi
fi
dodoc AUTHORS ChangeLog NEWS README THANKS
if use doc ; then
dohtml "${ED}"/usr/share/doc/${PF}/*.html
docinto html
dodoc "${ED}"/usr/share/doc/${PF}/*.html
else
rm -rf "${ED}"/usr/share/doc/${PF}/{csharpdoc,examples,javadoc2,javadoc1}
fi
rm -f "${ED}"/usr/share/doc/${PF}/*.html
dodoc AUTHORS ChangeLog NEWS README THANKS
rm "${ED}"/usr/share/doc/${PF}/*.html || die
}
pkg_preinst() {

View File

@ -15,4 +15,7 @@
this requires git at runtime, but will be faster/smaller than raw archives
</flag>
</use>
<upstream>
<remote-id type="cpe">cpe:/a:gnu:gettext</remote-id>
</upstream>
</pkgmetadata>