summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/0005-fix_build_musl.patch21
-rw-r--r--debian/patches/0010-AC_INIT.patch30
-rw-r--r--debian/patches/0100-float-endian-detection.patch63
-rw-r--r--debian/patches/0700-multiarch-libc.patch54
-rw-r--r--debian/patches/0705-gcc-9.patch19
-rw-r--r--debian/patches/series5
6 files changed, 192 insertions, 0 deletions
diff --git a/debian/patches/0005-fix_build_musl.patch b/debian/patches/0005-fix_build_musl.patch
new file mode 100644
index 0000000..6c0c0a2
--- /dev/null
+++ b/debian/patches/0005-fix_build_musl.patch
@@ -0,0 +1,21 @@
+Description: Fix build for musl
+Author: Helmut Grohne <helmut@subdivi.de>
+Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=987609
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=987609
+Forwarded: not-needed
+Last-Update: 2021-04-26
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/lib/Makefile.gnulib
+===================================================================
+--- trunk.orig/lib/Makefile.gnulib
++++ trunk/lib/Makefile.gnulib
+@@ -461,7 +461,7 @@ install-exec-localcharset: all-local
+ case '$(host_os)' in \
+ darwin[56]*) \
+ need_charset_alias=true ;; \
+- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ need_charset_alias=false ;; \
+ *) \
+ need_charset_alias=true ;; \
diff --git a/debian/patches/0010-AC_INIT.patch b/debian/patches/0010-AC_INIT.patch
new file mode 100644
index 0000000..d967829
--- /dev/null
+++ b/debian/patches/0010-AC_INIT.patch
@@ -0,0 +1,30 @@
+Description: Fix AC_INIT handling
+Author: Jörg Frings-Fürst <debian@jff.email>
+Bug: <bug-libunistring@gnu.org>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=992281
+Forwarded: yes
+Last-Update: 2021-08-16
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/configure.ac
+===================================================================
+--- trunk.orig/configure.ac
++++ trunk/configure.ac
+@@ -16,12 +16,14 @@ dnl along with this program. If not, se
+
+ dnl Process this file with autoconf to produce a configure script.
+
++
++
+ AC_PREREQ([2.63])
+-AC_INIT
++. $srcdir/version.sh
++AC_INIT([libunistring],[m4_esyscmd_s([$VERSION_NUMBER])])
+ AC_CONFIG_SRCDIR([lib/unistring/version.in.h])
+ AC_CONFIG_AUX_DIR([build-aux])
+-. $srcdir/version.sh
+-gl_INIT_PACKAGE([libunistring], [$VERSION_NUMBER])
++dnl AM_INIT_AUTOMAKE
+ AM_INIT_AUTOMAKE([silent-rules dist-xz])
+ AM_CONFIG_HEADER([config.h])
+
diff --git a/debian/patches/0100-float-endian-detection.patch b/debian/patches/0100-float-endian-detection.patch
new file mode 100644
index 0000000..d094516
--- /dev/null
+++ b/debian/patches/0100-float-endian-detection.patch
@@ -0,0 +1,63 @@
+Description: Fix detection of floating point endianness
+ See https://lists.gnu.org/archive/html/bug-gnulib/2013-12/msg00104.html
+Author: Alan Modra <amodra@gmail.com>
+Author: Colin Watson <cjwatson@ubuntu.com>
+Forwarded: no
+Last-Update: 2013-12-18
+
+--- a/tests/test-isnanl.h
++++ b/tests/test-isnanl.h
+@@ -24,6 +24,12 @@
+ #include "nan.h"
+ #include "macros.h"
+
++#ifdef __FLOAT_WORD_ORDER__
++# define FLOAT_BIG_ENDIAN (__FLOAT_WORD_ORDER__ != __ORDER_LITTLE_ENDIAN__)
++#else
++# define FLOAT_BIG_ENDIAN (LDBL_EXPBIT0_WORD < NWORDS / 2)
++#endif
++
+ int
+ main ()
+ {
+@@ -65,10 +71,10 @@
+ # if LDBL_EXPBIT0_BIT > 0
+ m.word[LDBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (LDBL_EXPBIT0_BIT - 1);
+ # else
+- m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
++ m.word[LDBL_EXPBIT0_WORD + (FLOAT_BIG_ENDIAN ? 1 : - 1)]
+ ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
+ # endif
+- m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
++ m.word[LDBL_EXPBIT0_WORD + (FLOAT_BIG_ENDIAN ? 1 : - 1)]
+ |= (unsigned int) 1 << LDBL_EXPBIT0_BIT;
+ ASSERT (isnanl (m.value));
+ }
+--- a/tests/test-signbit.c
++++ b/tests/test-signbit.c
+@@ -36,6 +36,12 @@
+ double zerod = 0.0;
+ long double zerol = 0.0L;
+
++#ifdef __FLOAT_WORD_ORDER__
++# define FLOAT_BIG_ENDIAN (__FLOAT_WORD_ORDER__ != __ORDER_LITTLE_ENDIAN__)
++#else
++# define FLOAT_BIG_ENDIAN (LDBL_EXPBIT0_WORD < NWORDS / 2)
++#endif
++
+ static void
+ test_signbitf ()
+ {
+@@ -166,10 +172,10 @@
+ # if LDBL_EXPBIT0_BIT > 0
+ m.word[LDBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (LDBL_EXPBIT0_BIT - 1);
+ # else
+- m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
++ m.word[LDBL_EXPBIT0_WORD + (FLOAT_BIG_ENDIAN ? 1 : - 1)]
+ ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
+ # endif
+- m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
++ m.word[LDBL_EXPBIT0_WORD + (FLOAT_BIG_ENDIAN ? 1 : - 1)]
+ |= (unsigned int) 1 << LDBL_EXPBIT0_BIT;
+ (void) signbit (m.value);
+ #undef NWORDS
diff --git a/debian/patches/0700-multiarch-libc.patch b/debian/patches/0700-multiarch-libc.patch
new file mode 100644
index 0000000..1686bcb
--- /dev/null
+++ b/debian/patches/0700-multiarch-libc.patch
@@ -0,0 +1,54 @@
+From: Helmut Grohne <helmut@subdivi.de>
+Subject: fix @HAVE_STDINT_H@ once stdint.h moves to /usr/include/<triplet>
+
+Index: trunk/lib/Makefile.am
+===================================================================
+--- trunk.orig/lib/Makefile.am
++++ trunk/lib/Makefile.am
+@@ -101,30 +101,15 @@ unistring/stdint.h : $(STDINT_H) stdint.
+ echo '#if __GLIBC__ >= 2'; \
+ echo '#include <stdint.h>'; \
+ echo '#else'; \
+- if test -f /usr/include/stdint.h; then \
+- HAVE_STDINT_H='1'; \
+- else \
+- HAVE_STDINT_H='defined __MINGW32__ || defined __HAIKU__ || ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) && !defined __NetBSD__)'; \
+- fi; \
+- if test -f /usr/include/inttypes.h; then \
+- HAVE_INTTYPES_H='1'; \
+- else \
+- HAVE_INTTYPES_H='defined __MINGW32__ || defined __HAIKU__'; \
+- fi; \
+- if test -f /usr/include/sys/inttypes.h; then \
+- HAVE_SYS_INTTYPES_H='1'; \
+- else \
+- HAVE_SYS_INTTYPES_H='0'; \
+- fi; \
+ sed_escape_ampersands='s/&/\\&/g'; \
+ HAVE_STDINT_H=`echo "$$HAVE_STDINT_H" | sed -e "$$sed_escape_ampersands"`; \
+- sed -e 's/@''HAVE_STDINT_H''@/'"$$HAVE_STDINT_H"'/g' \
++ sed -e 's/@''HAVE_STDINT_H''@/$(or @HAVE_STDINT_H@,0)/g' \
+ -e 's|@''INCLUDE_NEXT''@|include|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@||g' \
+ -e 's|@''NEXT_STDINT_H''@|<stdint.h>|g' \
+ -e 's/@''HAVE_SYS_TYPES_H''@/1/g' \
+- -e 's/@''HAVE_INTTYPES_H''@/'"$$HAVE_INTTYPES_H"'/g' \
+- -e 's/@''HAVE_SYS_INTTYPES_H''@/'"$$HAVE_SYS_INTTYPES_H"'/g' \
++ -e 's/@''HAVE_INTTYPES_H''@/$(or @HAVE_INTTYPES_H@,0)/g' \
++ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(or @HAVE_SYS_INTTYPES_H@,0)/g' \
+ -e 's/@''HAVE_SYS_BITYPES_H''@/0/g' \
+ < $(srcdir)/stdint.mini.h; \
+ echo '#endif'; \
+Index: trunk/configure.ac
+===================================================================
+--- trunk.orig/configure.ac
++++ trunk/configure.ac
+@@ -142,6 +142,8 @@ version_subminor=`echo "${VERSION}" | se
+ HEXVERSION=0x`$AWK 'BEGIN { printf("%02X%02X%02X"',"$version_major","$version_minor","$version_subminor"') }'`
+ AC_SUBST([HEXVERSION])
+
++AC_CHECK_HEADERS_ONCE(stdint.h inttypes.h sys/inttypes.h)
++
+ dnl Check for tools needed for formatting the documentation.
+ ac_aux_dir_abs=`cd $ac_aux_dir && pwd`
+ AC_PATH_PROG([TEXI2DVI], [texi2dvi], [$ac_aux_dir_abs/missing texi2dvi])
diff --git a/debian/patches/0705-gcc-9.patch b/debian/patches/0705-gcc-9.patch
new file mode 100644
index 0000000..986e741
--- /dev/null
+++ b/debian/patches/0705-gcc-9.patch
@@ -0,0 +1,19 @@
+Description: Patch for gcc-9 compat
+Author: based on an patch from Bruno Haible <bruno@clisp.org>
+Bug-Debian:https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=925762
+Last-Update: 2019-07-11
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/tests/glthread/thread.h
+===================================================================
+--- trunk.orig/tests/glthread/thread.h
++++ trunk/tests/glthread/thread.h
+@@ -133,7 +133,7 @@ extern int glthread_in_use (void);
+ call to foo(...) in the same function. To avoid this, we test the
+ address of a function in libpthread that we don't use. */
+
+-# pragma weak pthread_create
++/*# pragma weak pthread_create */
+
+ # ifndef pthread_sigmask /* Do not declare rpl_pthread_sigmask weak. */
+ # pragma weak pthread_sigmask
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..d6c7caa
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,5 @@
+0005-fix_build_musl.patch
+0100-float-endian-detection.patch
+0700-multiarch-libc.patch
+0705-gcc-9.patch
+0010-AC_INIT.patch