archrelease: copy trunk to extra-x86_64
[arch-packages.git] / gettext / repos / core-x86_64 / gettext-0.21-disable-libtextstyle.patch
blob66271ad6ec62f36909bffbba53d632cae5569cf9
1 diff --git a/Makefile.am b/Makefile.am
2 index 815e3c7..e897de7 100644
3 --- a/Makefile.am
4 +++ b/Makefile.am
5 @@ -19,7 +19,7 @@
6 AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
7 ACLOCAL_AMFLAGS = -I m4
9 -SUBDIRS = gnulib-local gettext-runtime libtextstyle gettext-tools
10 +SUBDIRS = gnulib-local gettext-runtime gettext-tools
12 changelog_etc = \
13 gettext-runtime/ChangeLog.0 \
14 @@ -123,7 +123,6 @@ distcheck-hook:
15 test "`sed 1,16d $(srcdir)/gettext-runtime/intl/xsize.h | md5sum`" = "`sed 1,16d $(srcdir)/gettext-tools/gnulib-lib/xsize.h | md5sum`"
16 cmp -s $(srcdir)/gettext-runtime/man/help2man $(srcdir)/gettext-tools/man/help2man
17 cmp -s $(srcdir)/gettext-runtime/man/x-to-1.in $(srcdir)/gettext-tools/man/x-to-1.in
18 - cmp -s $(srcdir)/libtextstyle/m4/libtextstyle.m4 $(srcdir)/gettext-tools/gnulib-m4/libtextstyle.m4
19 cmp -s $(srcdir)/gettext-tools/examples/hello-java-awt/m4/TestAWT.java $(srcdir)/gettext-tools/examples/hello-java-swing/m4/TestAWT.java
20 cmp -s $(srcdir)/gettext-tools/examples/hello-java-awt/m4/TestAWT.class $(srcdir)/gettext-tools/examples/hello-java-swing/m4/TestAWT.class
21 test "`sed 1,15d $(srcdir)/gnulib-local/lib/alloca.in.h | md5sum`" = "`sed 1,15d $(srcdir)/gettext-runtime/libasprintf/alloca.in.h | md5sum`"
22 diff --git a/configure.ac b/configure.ac
23 index 49689fb..2d23b44 100644
24 --- a/configure.ac
25 +++ b/configure.ac
26 @@ -37,7 +37,7 @@ dnl Checks for typedefs, structures, and compiler characteristics.
28 dnl Checks for library functions.
30 -AC_CONFIG_SUBDIRS([gettext-runtime libtextstyle gettext-tools])
31 +AC_CONFIG_SUBDIRS([gettext-runtime gettext-tools])
33 AM_EXTRA_RECURSIVE_TARGETS([maintainer-update-po])
35 @@ -49,7 +49,7 @@ AC_CANONICAL_HOST
36 dnl Optional Features: AC_ARG_ENABLE calls
37 dnl Optional Packages: AC_ARG_WITH calls
38 dnl Some influential environment variables: AC_ARG_VAR calls
39 -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 ])
40 +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 ])
42 AC_CONFIG_FILES([Makefile])
44 diff --git a/gettext-tools/Makefile.am b/gettext-tools/Makefile.am
45 index 449a797..c5719c2 100644
46 --- a/gettext-tools/Makefile.am
47 +++ b/gettext-tools/Makefile.am
48 @@ -19,7 +19,7 @@
49 AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
50 ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4
52 -SUBDIRS = intl gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc
53 +SUBDIRS = intl gnulib-lib libgrep libgettextpo src po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc
55 EXTRA_DIST = misc/DISCLAIM
56 MOSTLYCLEANFILES = core *.stackdump
57 diff --git a/gettext-tools/libgettextpo/textstyle.in.h b/gettext-tools/libgettextpo/textstyle.in.h
58 index 536b51b..585ce66 100644
59 --- a/gettext-tools/libgettextpo/textstyle.in.h
60 +++ b/gettext-tools/libgettextpo/textstyle.in.h
61 @@ -213,7 +213,8 @@ typedef ostream_t file_ostream_t;
62 static inline file_ostream_t
63 file_ostream_create (FILE *fp)
65 - return fp;
66 + /* Closing the stream we return should not close 'fp'. */
67 + return fdopen (dup (fileno (fp)), "w");
70 /* --------------------------- From fd-ostream.h --------------------------- */
71 @@ -413,6 +414,30 @@ html_styled_ostream_create (ostream_t destination _GL_UNUSED,
72 return NULL;
75 +/* ----------------------- From noop-styled-ostream.h ----------------------- */
77 +/* noop_styled_ostream_t is a subtype of ostream_t. */
78 +typedef ostream_t noop_styled_ostream_t;
80 +#define noop_styled_ostream_write_mem ostream_write_mem
81 +#define noop_styled_ostream_flush ostream_flush
82 +#define noop_styled_ostream_free ostream_free
83 +#define noop_styled_ostream_begin_use_class styled_ostream_begin_use_class
84 +#define noop_styled_ostream_end_use_class styled_ostream_end_use_class
85 +#define noop_styled_ostream_get_hyperlink_ref styled_ostream_get_hyperlink_ref
86 +#define noop_styled_ostream_get_hyperlink_id styled_ostream_get_hyperlink_id
87 +#define noop_styled_ostream_set_hyperlink styled_ostream_set_hyperlink
88 +#define noop_styled_ostream_flush_to_current_style styled_ostream_flush_to_current_style
90 +static inline ostream_t
91 +noop_styled_ostream_create (ostream_t destination, bool pass_ownership)
93 + if (pass_ownership)
94 + return destination;
95 + else
96 + return fdopen (dup (fileno (destination)), "w");
99 /* ------------------------------ From color.h ------------------------------ */
101 #define color_test_mode false
102 diff --git a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am
103 index 764ffad..eccfbbd 100644
104 --- a/gettext-tools/src/Makefile.am
105 +++ b/gettext-tools/src/Makefile.am
106 @@ -292,19 +292,9 @@ cldr_plurals_SOURCES = cldr-plural.y cldr-plural-exp.c cldr-plurals.c
107 cldr_plurals_CFLAGS = $(AM_CFLAGS) $(INCXML)
108 cldr_plurals_LDADD = libgettextsrc.la $(LDADD)
110 -if USE_INSTALLED_LIBTEXTSTYLE
111 -LT_LIBTEXTSTYLE = @LTLIBTEXTSTYLE@
112 -else
113 -# How to get the include files of libtextstyle.
114 -textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h:
115 - here=`pwd`; \
116 - cd ../../libtextstyle/lib && \
117 - $(MAKE) install-nobase_includeHEADERS install-nobase_nodist_includeHEADERS includedir="$$here"
118 -BUILT_SOURCES += textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h
119 -MOSTLYCLEANFILES += textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h
120 -# Where to find the built libtextstyle library.
121 -LT_LIBTEXTSTYLE = ../../libtextstyle/lib/libtextstyle.la
122 -endif
123 +# Use the dummy libtextstyle from gnulib, as libgettextpo does.
124 +LT_LIBTEXTSTYLE =
125 +AM_CPPFLAGS += -I../libgettextpo -I$(top_srcdir)/libgettextpo
127 # How to build libgettextsrc.la.
128 # Need ../gnulib-lib/libgettextlib.la.