Blame SOURCES/gettext-0.21-disable-libtextstyle.patch

617411
diff --git a/Makefile.am b/Makefile.am
617411
index 815e3c7..e897de7 100644
617411
--- a/Makefile.am
617411
+++ b/Makefile.am
617411
@@ -19,7 +19,7 @@
617411
 AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
617411
 ACLOCAL_AMFLAGS = -I m4
617411
 
617411
-SUBDIRS = gnulib-local gettext-runtime libtextstyle gettext-tools
617411
+SUBDIRS = gnulib-local gettext-runtime gettext-tools
617411
 
617411
 changelog_etc = \
617411
   gettext-runtime/ChangeLog.0 \
617411
@@ -123,7 +123,6 @@ distcheck-hook:
617411
 	test "`sed 1,16d $(srcdir)/gettext-runtime/intl/xsize.h | md5sum`" = "`sed 1,16d $(srcdir)/gettext-tools/gnulib-lib/xsize.h | md5sum`"
617411
 	cmp -s $(srcdir)/gettext-runtime/man/help2man $(srcdir)/gettext-tools/man/help2man
617411
 	cmp -s $(srcdir)/gettext-runtime/man/x-to-1.in $(srcdir)/gettext-tools/man/x-to-1.in
617411
-	cmp -s $(srcdir)/libtextstyle/m4/libtextstyle.m4 $(srcdir)/gettext-tools/gnulib-m4/libtextstyle.m4
617411
 	cmp -s $(srcdir)/gettext-tools/examples/hello-java-awt/m4/TestAWT.java $(srcdir)/gettext-tools/examples/hello-java-swing/m4/TestAWT.java
617411
 	cmp -s $(srcdir)/gettext-tools/examples/hello-java-awt/m4/TestAWT.class $(srcdir)/gettext-tools/examples/hello-java-swing/m4/TestAWT.class
617411
 	test "`sed 1,15d $(srcdir)/gnulib-local/lib/alloca.in.h | md5sum`" = "`sed 1,15d $(srcdir)/gettext-runtime/libasprintf/alloca.in.h | md5sum`"
617411
diff --git a/configure.ac b/configure.ac
617411
index 49689fb..2d23b44 100644
617411
--- a/configure.ac
617411
+++ b/configure.ac
617411
@@ -37,7 +37,7 @@ dnl Checks for typedefs, structures, and compiler characteristics.
617411
 
617411
 dnl Checks for library functions.
617411
 
617411
-AC_CONFIG_SUBDIRS([gettext-runtime libtextstyle gettext-tools])
617411
+AC_CONFIG_SUBDIRS([gettext-runtime gettext-tools])
617411
 
617411
 AM_EXTRA_RECURSIVE_TARGETS([maintainer-update-po])
617411
 
617411
@@ -49,7 +49,7 @@ AC_CANONICAL_HOST
617411
 dnl Optional Features: AC_ARG_ENABLE calls
617411
 dnl Optional Packages: AC_ARG_WITH calls
617411
 dnl Some influential environment variables: AC_ARG_VAR calls
617411
-esyscmd([{ cd gettext-runtime && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; cd libtextstyle && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; { cd gettext-tools && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; } | grep -v installed.libtextstyle | grep -v installed.csharp | grep -v 'installed C#'; } | sed -f build-aux/ac-help.sed ])
617411
+esyscmd([{ cd gettext-runtime && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; { cd gettext-tools && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; } | grep -v installed.csharp | grep -v 'installed C#'; } | sed -f build-aux/ac-help.sed ])
617411
 
617411
 AC_CONFIG_FILES([Makefile])
617411
 
617411
diff --git a/gettext-tools/Makefile.am b/gettext-tools/Makefile.am
617411
index 449a797..c5719c2 100644
617411
--- a/gettext-tools/Makefile.am
617411
+++ b/gettext-tools/Makefile.am
617411
@@ -19,7 +19,7 @@
617411
 AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
617411
 ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4
617411
 
617411
-SUBDIRS = intl gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc
617411
+SUBDIRS = intl gnulib-lib libgrep libgettextpo src po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc
617411
 
617411
 EXTRA_DIST = misc/DISCLAIM
617411
 MOSTLYCLEANFILES = core *.stackdump
617411
diff --git a/gettext-tools/libgettextpo/textstyle.in.h b/gettext-tools/libgettextpo/textstyle.in.h
617411
index 536b51b..585ce66 100644
617411
--- a/gettext-tools/libgettextpo/textstyle.in.h
617411
+++ b/gettext-tools/libgettextpo/textstyle.in.h
617411
@@ -213,7 +213,8 @@ typedef ostream_t file_ostream_t;
617411
 static inline file_ostream_t
617411
 file_ostream_create (FILE *fp)
617411
 {
617411
-  return fp;
617411
+  /* Closing the stream we return should not close 'fp'.  */
617411
+  return fdopen (dup (fileno (fp)), "w");
617411
 }
617411
 
617411
 /* --------------------------- From fd-ostream.h --------------------------- */
617411
@@ -413,6 +414,30 @@ html_styled_ostream_create (ostream_t destination _GL_UNUSED,
617411
   return NULL;
617411
 }
617411
 
617411
+/* ----------------------- From noop-styled-ostream.h ----------------------- */
617411
+
617411
+/* noop_styled_ostream_t is a subtype of ostream_t.  */
617411
+typedef ostream_t noop_styled_ostream_t;
617411
+
617411
+#define noop_styled_ostream_write_mem ostream_write_mem
617411
+#define noop_styled_ostream_flush ostream_flush
617411
+#define noop_styled_ostream_free ostream_free
617411
+#define noop_styled_ostream_begin_use_class styled_ostream_begin_use_class
617411
+#define noop_styled_ostream_end_use_class styled_ostream_end_use_class
617411
+#define noop_styled_ostream_get_hyperlink_ref styled_ostream_get_hyperlink_ref
617411
+#define noop_styled_ostream_get_hyperlink_id styled_ostream_get_hyperlink_id
617411
+#define noop_styled_ostream_set_hyperlink styled_ostream_set_hyperlink
617411
+#define noop_styled_ostream_flush_to_current_style styled_ostream_flush_to_current_style
617411
+
617411
+static inline ostream_t
617411
+noop_styled_ostream_create (ostream_t destination, bool pass_ownership)
617411
+{
617411
+  if (pass_ownership)
617411
+    return destination;
617411
+  else
617411
+    return fdopen (dup (fileno (destination)), "w");
617411
+}
617411
+
617411
 /* ------------------------------ From color.h ------------------------------ */
617411
 
617411
 #define color_test_mode false
617411
diff --git a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am
617411
index 764ffad..eccfbbd 100644
617411
--- a/gettext-tools/src/Makefile.am
617411
+++ b/gettext-tools/src/Makefile.am
617411
@@ -292,19 +292,9 @@ cldr_plurals_SOURCES = cldr-plural.y cldr-plural-exp.c cldr-plurals.c
617411
 cldr_plurals_CFLAGS = $(AM_CFLAGS) $(INCXML)
617411
 cldr_plurals_LDADD = libgettextsrc.la $(LDADD)
617411
 
617411
-if USE_INSTALLED_LIBTEXTSTYLE
617411
-LT_LIBTEXTSTYLE = @LTLIBTEXTSTYLE@
617411
-else
617411
-# How to get the include files of libtextstyle.
617411
-textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h:
617411
-	here=`pwd`; \
617411
-	cd ../../libtextstyle/lib && \
617411
-	  $(MAKE) install-nobase_includeHEADERS install-nobase_nodist_includeHEADERS includedir="$$here"
617411
-BUILT_SOURCES    += textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h
617411
-MOSTLYCLEANFILES += textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h
617411
-# Where to find the built libtextstyle library.
617411
-LT_LIBTEXTSTYLE = ../../libtextstyle/lib/libtextstyle.la
617411
-endif
617411
+# Use the dummy libtextstyle from gnulib, as libgettextpo does.
617411
+LT_LIBTEXTSTYLE =
617411
+AM_CPPFLAGS += -I../libgettextpo -I$(top_srcdir)/libgettextpo
617411
 
617411
 # How to build libgettextsrc.la.
617411
 # Need ../gnulib-lib/libgettextlib.la.