From d4ad46303a0fc4b9676add15b5b36c600ac44702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Fri, 31 Mar 2017 09:27:41 +0200 Subject: New multiarch-libc.patch --- debian/changelog | 4 ++ debian/debian/patches/multiarch-libc.patch | 52 +++++++++++++++++++ debian/patches/0100-float-endian-detection.patch | 63 ++++++++++++++++++++++++ debian/patches/0700-multiarch-libc.patch | 52 +++++++++++++++++++ debian/patches/float-endian-detection.patch | 63 ------------------------ debian/patches/series | 3 +- 6 files changed, 173 insertions(+), 64 deletions(-) create mode 100644 debian/debian/patches/multiarch-libc.patch create mode 100644 debian/patches/0100-float-endian-detection.patch create mode 100644 debian/patches/0700-multiarch-libc.patch delete mode 100644 debian/patches/float-endian-detection.patch diff --git a/debian/changelog b/debian/changelog index 4d7781e..0be788a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,10 @@ libunistring (0.9.7-1) UNRELEASED; urgency=medium * debian/copyright: - Add myself to debian/*. - Renew licenses and dates. + * New debian/patches/0700-multiarch-libc.patch (Closes: #857708). + - Use multiarched libc-dev header. + Thanks to Helmut Grohne . + * Refresh and renumber the patch float-endian-detection.patch. -- Jörg Frings-Fürst Mon, 27 Mar 2017 21:42:44 +0200 diff --git a/debian/debian/patches/multiarch-libc.patch b/debian/debian/patches/multiarch-libc.patch new file mode 100644 index 0000000..055d57c --- /dev/null +++ b/debian/debian/patches/multiarch-libc.patch @@ -0,0 +1,52 @@ +From: Helmut Grohne +Subject: fix @HAVE_STDINT_H@ once stdint.h moves to /usr/include/ + +Index: libunistring-0.9.6+really0.9.3/lib/Makefile.am +=================================================================== +--- libunistring-0.9.6+really0.9.3.orig/lib/Makefile.am ++++ libunistring-0.9.6+really0.9.3/lib/Makefile.am +@@ -98,28 +98,13 @@ + echo '#if __GLIBC__ >= 2'; \ + echo '#include '; \ + echo '#else'; \ +- if test -f /usr/include/stdint.h; then \ +- HAVE_STDINT_H='1'; \ +- else \ +- HAVE_STDINT_H='defined __MINGW32__ || defined __HAIKU__'; \ +- 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 -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''@||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: libunistring-0.9.6+really0.9.3/configure.ac +=================================================================== +--- libunistring-0.9.6+really0.9.3.orig/configure.ac ++++ libunistring-0.9.6+really0.9.3/configure.ac +@@ -136,6 +136,8 @@ + HEXVERSION=0x`$AWK 'BEGIN { printf("%02d%02d"',"$version_major","$version_minor"') }'` + 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/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 +Author: Colin Watson +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..a732d42 --- /dev/null +++ b/debian/patches/0700-multiarch-libc.patch @@ -0,0 +1,52 @@ +From: Helmut Grohne +Subject: fix @HAVE_STDINT_H@ once stdint.h moves to /usr/include/ + +Index: trunk/lib/Makefile.am +=================================================================== +--- trunk.orig/lib/Makefile.am ++++ trunk/lib/Makefile.am +@@ -100,28 +100,13 @@ unistring/stdint.h : $(STDINT_H) stdint. + echo '#if __GLIBC__ >= 2'; \ + echo '#include '; \ + echo '#else'; \ +- if test -f /usr/include/stdint.h; then \ +- HAVE_STDINT_H='1'; \ +- else \ +- HAVE_STDINT_H='defined __MINGW32__ || defined __HAIKU__'; \ +- 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 -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''@||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/float-endian-detection.patch b/debian/patches/float-endian-detection.patch deleted file mode 100644 index d094516..0000000 --- a/debian/patches/float-endian-detection.patch +++ /dev/null @@ -1,63 +0,0 @@ -Description: Fix detection of floating point endianness - See https://lists.gnu.org/archive/html/bug-gnulib/2013-12/msg00104.html -Author: Alan Modra -Author: Colin Watson -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/series b/debian/patches/series index c1d7c66..f107ca4 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ -float-endian-detection.patch +0100-float-endian-detection.patch +0700-multiarch-libc.patch -- cgit v1.2.3