From 48ca75555522716f0f686dcae3dd6cf3d8ad714d Mon Sep 17 00:00:00 2001 From: davidovski Date: Tue, 31 May 2022 11:05:19 +0100 Subject: removed idea of repos --- repo/gettext/fix-xgettext-version-string.patch | 11 +++++++++++ repo/gettext/flip-macro-logic.patch | 20 +++++++++++++++++++ repo/gettext/gettext.xibuild | 27 ++++++++++++++++++++++++++ repo/gettext/line-length.patch | 15 ++++++++++++++ repo/gettext/respect-cflags.patch | 11 +++++++++++ 5 files changed, 84 insertions(+) create mode 100644 repo/gettext/fix-xgettext-version-string.patch create mode 100644 repo/gettext/flip-macro-logic.patch create mode 100644 repo/gettext/gettext.xibuild create mode 100644 repo/gettext/line-length.patch create mode 100644 repo/gettext/respect-cflags.patch (limited to 'repo/gettext') diff --git a/repo/gettext/fix-xgettext-version-string.patch b/repo/gettext/fix-xgettext-version-string.patch new file mode 100644 index 0000000..de35749 --- /dev/null +++ b/repo/gettext/fix-xgettext-version-string.patch @@ -0,0 +1,11 @@ +--- a/src/xgettext.sh 2020-04-06 11:43:29.000000000 +0100 ++++ b/src/xgettext.sh 2020-04-06 11:43:29.000000000 +0100 +@@ -16,7 +16,7 @@ + } + + show_version() { +- printf "%s\n", "xgettext (GNU gettext-tools compatible) 99.9999.9999\n" ++ printf "%s\n\n" "xgettext (GNU gettext-tools) 0.19.8.1" + exit 0 + } + diff --git a/repo/gettext/flip-macro-logic.patch b/repo/gettext/flip-macro-logic.patch new file mode 100644 index 0000000..277bc7a --- /dev/null +++ b/repo/gettext/flip-macro-logic.patch @@ -0,0 +1,20 @@ +--- gettext-tiny-0.2.0/include/libintl.h.old 2017-08-02 06:14:20.000000000 -0500 ++++ gettext-tiny-0.2.0/include/libintl.h 2018-06-15 02:31:14.241446687 -0500 +@@ -34,14 +34,14 @@ + #undef gettext_noop + #define gettext_noop(X) X + +-#ifndef LIBINTL_NO_MACROS ++#ifdef LIBINTL_MACROS + /* if these macros are defined, configure checks will detect libintl as + * built into the libc because test programs will work without -lintl. + * for example: + * checking for ngettext in libc ... yes + * the consequence is that -lintl will not be added to the LDFLAGS. +- * so if for some reason you want that libintl.a gets linked, +- * add -DLIBINTL_NO_MACROS=1 to your CPPFLAGS. */ ++ * so if for some reason you dont want that libintl.a gets linked, ++ * add -DLIBINTL_MACROS=1 to your CPPFLAGS. */ + + #define gettext(X) ((char*) (X)) + #define dgettext(dom, X) ((void)(dom), (char*) (X)) diff --git a/repo/gettext/gettext.xibuild b/repo/gettext/gettext.xibuild new file mode 100644 index 0000000..8da13a5 --- /dev/null +++ b/repo/gettext/gettext.xibuild @@ -0,0 +1,27 @@ +#!/bin/sh + +MAKEDEPS="make" +DEPS="acl sh" + +PKG_VER=0.3.2 +SOURCE=https://ftp.barfooze.de/pub/sabotage/tarballs/gettext-tiny-$PKG_VER.tar.xz +DESC="Lightweight replacement for tools used in the GNU gettext suite" + +ADDITIONAL=" + line-length.patch + respect-cflags.patch + flip-macro-logic.patch + fix-xgettext-version-string.patch +" + +prepare () { + apply_patches +} + +build () { + LIBINTL=MUSL prefix=/usr make +} + +package () { + make LIBINTL=MUSL prefix=/usr DESTDIR=$PKG_DEST install +} diff --git a/repo/gettext/line-length.patch b/repo/gettext/line-length.patch new file mode 100644 index 0000000..0ba9781 --- /dev/null +++ b/repo/gettext/line-length.patch @@ -0,0 +1,15 @@ +https://github.com/sabotage-linux/gettext-tiny/issues/50 + +We're losing the battle of the bulge; someone really should make this use malloc. + +--- gettext-tiny-0.3.1_git20191130/src/msgfmt.c.old 2020-01-14 08:03:11.000000000 +0000 ++++ gettext-tiny-0.3.1_git20191130/src/msgfmt.c 2020-01-21 18:58:28.257709860 +0000 +@@ -160,7 +160,7 @@ + + int process(FILE *in, FILE *out, bool strict) { + struct mo_hdr mohdr = def_hdr; +- char line[8192]; char *lp; ++ char line[12288]; char *lp; + size_t off, i; + enum po_error t; + char convbuf[32768]; diff --git a/repo/gettext/respect-cflags.patch b/repo/gettext/respect-cflags.patch new file mode 100644 index 0000000..dd1cf3f --- /dev/null +++ b/repo/gettext/respect-cflags.patch @@ -0,0 +1,11 @@ +--- gettext-tiny-0.2.0/Makefile.old 2017-08-02 06:14:20.000000000 -0500 ++++ gettext-tiny-0.2.0/Makefile 2018-06-16 21:21:57.148735892 -0500 +@@ -32,7 +32,7 @@ + ALL_M4S=$(sort $(wildcard m4/*.m4)) + ALL_DATA=$(sort $(wildcard data/*)) + +-CFLAGS=-O0 -fPIC ++CFLAGS ?= -O0 -fPIC + + AR ?= $(CROSS_COMPILE)ar + RANLIB ?= $(CROSS_COMPILE)ranlib -- cgit v1.2.1