From 9fae6fa4304969e92bdaa7b40b2d7252f0218d78 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Fri, 14 Sep 2007 12:19:34 +0000 Subject: [PATCH] remove gettext-xglade-include-expat-285701.patch, add gettext-xglade-define-xml-major-version-285701.patch to determine XML_MAJOR_VERSION from expat.h and define it in config.h (#285701) --- ...lade-define-xml-major-version-285701.patch | 26 +++++++++++++++++++ gettext-xglade-include-expat-285701.patch | 17 ------------ gettext.spec | 17 +++++++++--- 3 files changed, 40 insertions(+), 20 deletions(-) create mode 100644 gettext-xglade-define-xml-major-version-285701.patch delete mode 100644 gettext-xglade-include-expat-285701.patch diff --git a/gettext-xglade-define-xml-major-version-285701.patch b/gettext-xglade-define-xml-major-version-285701.patch new file mode 100644 index 0000000..e75ba95 --- /dev/null +++ b/gettext-xglade-define-xml-major-version-285701.patch @@ -0,0 +1,26 @@ +diff -up gettext-0.16.1/gettext-tools/configure.ac.4-expat~ gettext-0.16.1/gettext-tools/configure.ac +--- gettext-0.16.1/gettext-tools/configure.ac.4-expat~ 2006-11-27 18:02:01.000000000 +0100 ++++ gettext-0.16.1/gettext-tools/configure.ac 2007-09-14 13:55:28.000000000 +0200 +@@ -238,6 +238,22 @@ case "$host_os" in + LTLIBEXPAT="-ldl" + AC_SUBST(LIBEXPAT) + AC_SUBST(LTLIBEXPAT) ++ AC_CHECK_HEADER([expat.h],[ ++ cat > xml_major_version.c << EOF ++#include ++#include ++int main (void) { printf ("%d\n", XML_MAJOR_VERSION); } ++EOF ++ AC_MSG_CHECKING([for libexpat XML_MAJOR_VERSION]) ++ $CC -o xml_major_version xml_major_version.c ++ XML_MAJOR_VERSION=$(./xml_major_version) ++ rm -f ./xml_major_version ./xml_major_version.c ++ AC_MSG_RESULT([$XML_MAJOR_VERSION]) ++ AC_SUBST(XML_MAJOR_VERSION) ++ AC_DEFINE([XML_MAJOR_VERSION],$XML_MAJOR_VERSION,[The API version of the expat library found during compilation.]) ++ ],[ ++ AC_ERROR([cannot determine version of expat library, expat.h is missing]) ++ ]) + ;; + *) + AC_LIB_HAVE_LINKFLAGS([expat], [], diff --git a/gettext-xglade-include-expat-285701.patch b/gettext-xglade-include-expat-285701.patch deleted file mode 100644 index 13197b1..0000000 --- a/gettext-xglade-include-expat-285701.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -up gettext-0.16.1/gettext-tools/src/x-glade.c~ gettext-0.16.1/gettext-tools/src/x-glade.c ---- gettext-0.16.1/gettext-tools/src/x-glade.c~ 2006-11-28 03:02:08.000000000 +1000 -+++ gettext-0.16.1/gettext-tools/src/x-glade.c 2007-09-12 22:40:26.000000000 +1000 -@@ -28,10 +28,9 @@ - #include - #if DYNLOAD_LIBEXPAT - # include --#else --# if HAVE_LIBEXPAT --# include --# endif -+#endif -+#if HAVE_LIBEXPAT -+# include - #endif - - #include "message.h" diff --git a/gettext.spec b/gettext.spec index 69e89ff..5e5be6b 100644 --- a/gettext.spec +++ b/gettext.spec @@ -4,7 +4,7 @@ Summary: GNU libraries and utilities for producing multi-lingual messages Name: gettext Version: 0.16.1 -Release: 10%{?dist} +Release: 11%{?dist} License: GPLv2+ and LGPLv2+ Group: Development/Tools Source: ftp://ftp.gnu.org/gnu/gettext/%{name}-%{version}.tar.gz @@ -14,8 +14,9 @@ Source2: msghack.py Requires(post): /sbin/install-info Requires(preun): /sbin/install-info %ifarch x86_64 ppc64 s390x -BuildRequires: automake >= 1.8, autoconf >= 2.5 +BuildRequires: automake >= 1.8 %endif +BuildRequires: autoconf >= 2.5 BuildRequires: libtool, bison, gcc-c++, gcc-java, libgcj # need expat for xgettext on glade Buildrequires: expat-devel @@ -28,7 +29,7 @@ Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) Patch1: gettext-tools-tests-lang-gawk-fail.patch Patch2: gettext-php-headers.patch Patch3: gettext-php-prinf-output-237241.patch -Patch4: gettext-xglade-include-expat-285701.patch +Patch4: gettext-xglade-define-xml-major-version-285701.patch %description The GNU gettext package provides a set of tools and documentation for @@ -69,6 +70,11 @@ want to add gettext support for your project. %build +pushd gettext-tools +autoconf +autoheader +popd + [ -f %{_datadir}/automake/depcomp ] && cp -f %{_datadir}/automake/{depcomp,ylwrap} . export JAVAC=gcj @@ -231,6 +237,11 @@ fi %changelog +* Fri Sep 14 2007 Jens Petersen - 0.16.1-11 +- remove gettext-xglade-include-expat-285701.patch, add + gettext-xglade-define-xml-major-version-285701.patch to determine + XML_MAJOR_VERSION from expat.h and define it in config.h (#285701) + * Wed Sep 12 2007 Jens Petersen - 0.16.1-10 - buildrequire expat-devel - add gettext-xglade-include-expat-285701.patch to include expat.h