- update to 0.17 release

- update License field to GPLv3
- add gettext-0.17-open-args.patch to fix build from upstream
- gettext-tools-tests-lang-gawk-fail.patch, gettext-php-headers.patch,
    gettext-php-prinf-output-237241.patch, and
    gettext-xglade-define-xml-major-version-285701.patch are no longer
    needed
- drop superfluous po-mode-init.el source
- no need to run autoconf and autoheader when building
- pass -findirect-dispatch to gcj to make java binaries ABI independent
    (jakub,#427796)
- move autopoint, gettextize, and /usr/share/gettext/ to main package
This commit is contained in:
Jens Petersen 2008-01-24 07:37:30 +00:00
parent b4b8955f25
commit 49d7ad60bf
9 changed files with 57 additions and 164 deletions

View File

@ -1 +1 @@
gettext-0.16.1.tar.gz
gettext-0.17.tar.gz

View File

@ -0,0 +1,25 @@
2007-11-07 Jim Meyering <meyering@redhat.com>
Bruno Haible <bruno@clisp.org>
* write-catalog.c (msgdomain_list_print): Fix open() call.
--- gettext-tools/src/write-catalog.c 7 Oct 2007 19:35:31 -0000 1.4
+++ gettext-tools/src/write-catalog.c 7 Nov 2007 11:43:15 -0000
@@ -1,5 +1,5 @@
/* GNU gettext - internationalization aids
- Copyright (C) 1995-1998, 2000-2006 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000-2007 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -220,7 +220,9 @@
/* Open the output file. */
if (!to_stdout)
{
- fd = open (filename, O_WRONLY | O_CREAT);
+ fd = open (filename, O_WRONLY | O_CREAT | O_TRUNC,
+ /* 0666 in portable POSIX notation: */
+ S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
if (fd < 0)
{
const char *errno_description = strerror (errno);

View File

@ -1,33 +0,0 @@
--- ./gettext-tools/tests/xgettext-php-1.orig 2006-11-27 18:02:11.000000000 +0100
+++ ./gettext-tools/tests/xgettext-php-1 2007-03-18 16:03:40.000000000 +0100
@@ -7,7 +7,7 @@
tmpfiles="$tmpfiles xg-ph-1.php"
cat <<EOF > xg-ph-1.php
-<?
+<?php
// This comment will not be extracted.
echo _("help");
// TRANSLATORS: This is an extracted comment.
--- ./gettext-tools/tests/xgettext-php-2.orig 2006-05-15 14:23:49.000000000 +0200
+++ ./gettext-tools/tests/xgettext-php-2 2007-03-18 16:03:52.000000000 +0100
@@ -7,7 +7,7 @@
tmpfiles="$tmpfiles xg-ph-2.php"
cat <<EOF > xg-ph-2.php
-<?
+<?php
echo _("Egyptians");
echo <<<EOTMARKER
Ramses
--- ./gettext-tools/tests/lang-php.orig 2006-11-27 18:02:08.000000000 +0100
+++ ./gettext-tools/tests/lang-php 2007-03-18 16:04:42.000000000 +0100
@@ -9,7 +9,7 @@
tmpfiles="$tmpfiles prog.php"
cat <<\EOF > prog.php
-<?
+<?php
setlocale (LC_ALL, "");
textdomain ("prog");
bindtextdomain ("prog", ".");

View File

@ -1,11 +0,0 @@
--- gettext-0.16.1/gettext-tools/tests/lang-php~ 2006-11-28 03:02:08.000000000 +1000
+++ gettext-0.16.1/gettext-tools/tests/lang-php 2007-04-30 17:51:31.000000000 +1000
@@ -15,7 +15,7 @@
bindtextdomain ("prog", ".");
echo _("'Your command, please?', asked the waiter.");
echo "\n";
- echo printf(_("%s is replaced by %s."), "FF", "EUR");
+ printf(_("%s is replaced by %s."), "FF", "EUR");
echo "\n";
?>
EOF

View File

@ -1,30 +0,0 @@
diff -u gettext-0.16.1/gettext-tools/tests/lang-gawk~ gettext-0.16.1/gettext-tools/tests/lang-gawk
--- gettext-0.16.1/gettext-tools/tests/lang-gawk~ 2007-03-13 14:45:22.000000000 +1000
+++ gettext-0.16.1/gettext-tools/tests/lang-gawk 2007-03-13 14:45:22.000000000 +1000
@@ -152,16 +152,16 @@
EUR remplace FF.
EOF
-: ${LOCALE_FR=fr_FR}
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
-if test $LOCALE_FR != none; then
- LANGUAGE= LC_ALL=$LOCALE_FR gawk -v n=2 -f prog.awk > prog.out || exit 1
- ${DIFF} prog.ok prog.out || exit 1
-fi
-if test $LOCALE_FR_UTF8 != none; then
- LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 gawk -v n=2 -f prog.awk > prog.out || exit 1
- ${DIFF} prog.oku prog.out || exit 1
-fi
+#: ${LOCALE_FR=fr_FR}
+#: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+#if test $LOCALE_FR != none; then
+# LANGUAGE= LC_ALL=$LOCALE_FR gawk -v n=2 -f prog.awk > prog.out || exit 1
+# ${DIFF} prog.ok prog.out || exit 1
+#fi
+#if test $LOCALE_FR_UTF8 != none; then
+# LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 gawk -v n=2 -f prog.awk > prog.out || exit 1
+# ${DIFF} prog.oku prog.out || exit 1
+#fi
rm -fr $tmpfiles

View File

@ -1,37 +0,0 @@
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 15:03:43.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 <stdio.h>
+#include <expat.h>
+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_UNQUOTED([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 -up gettext-0.16.1/gettext-tools/src/x-glade.c.4-expat~ gettext-0.16.1/gettext-tools/src/x-glade.c
--- gettext-0.16.1/gettext-tools/src/x-glade.c.4-expat~ 2006-11-27 18:02:08.000000000 +0100
+++ gettext-0.16.1/gettext-tools/src/x-glade.c 2007-09-14 15:46:23.000000000 +0200
@@ -114,6 +114,7 @@ init_keywords ()
typedef void *XML_Parser;
typedef char XML_Char;
typedef char XML_LChar;
+typedef unsigned long XML_Size;
enum XML_Error { XML_ERROR_NONE };
typedef void (*XML_StartElementHandler) (void *userData, const XML_Char *name, const XML_Char **atts);
typedef void (*XML_EndElementHandler) (void *userData, const XML_Char *name);

View File

@ -3,13 +3,12 @@
Summary: GNU libraries and utilities for producing multi-lingual messages
Name: gettext
Version: 0.16.1
Release: 12%{?dist}
License: GPLv2+ and LGPLv2+
Version: 0.17
Release: 1%{?dist}
License: GPLv3 and LGPLv2+
Group: Development/Tools
Source: ftp://ftp.gnu.org/gnu/gettext/%{name}-%{version}.tar.gz
URL: http://www.gnu.org/software/gettext/
Source1: po-mode-init.el
Source: ftp://ftp.gnu.org/gnu/gettext/%{name}-%{version}.tar.gz
Source2: msghack.py
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
@ -26,10 +25,7 @@ BuildRequires: %{_bindir}/fastjar
BuildRequires: zip, unzip
%endif
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-define-xml-major-version-285701.patch
Patch5: gettext-0.17-open-args.patch
%description
The GNU gettext package provides a set of tools and documentation for
@ -72,18 +68,10 @@ This package contains libraries used internationalization support.
%prep
%setup -q
%patch1 -p1 -b .1-fails~
%patch2 -p0 -b .2-header~
%patch3 -p1 -b .3-printf~
%patch4 -p1 -b .4-expat~
%patch5 -p0 -b .5-open-args~
%build
pushd gettext-tools
autoconf
autoheader
popd
[ -f %{_datadir}/automake/depcomp ] && cp -f %{_datadir}/automake/{depcomp,ylwrap} .
export JAVAC=gcj
@ -92,7 +80,7 @@ export JAR=fastjar
%endif
%configure --without-included-gettext --enable-nls --disable-static \
--enable-shared --with-pic-=yes --disable-csharp --enable-java
make %{?_smp_mflags}
make %{?_smp_mflags} GCJFLAGS="-findirect-dispatch"
%install
@ -108,14 +96,11 @@ ln -s ../../bin/gettext ${RPM_BUILD_ROOT}%{_bindir}/gettext
install -pm 755 %SOURCE2 ${RPM_BUILD_ROOT}/%{_bindir}/msghack
# make preloadable_libintl.so
# make preloadable_libintl.so executable
chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/preloadable_libintl.so
rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/emacs/site-lisp/site-start.d
install -m 644 %{SOURCE1} ${RPM_BUILD_ROOT}%{_datadir}/emacs/site-lisp/site-start.d
# doc relocations
for i in gettext-runtime/man/*.html; do
rm ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/`basename $i`
@ -133,11 +118,11 @@ rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext
## note libintl.jar is not actually built now with gcj < 4.3
## since it would not be fully portable
%if %{buildjar}
## this is probably no longer needed if examples not packaged
# set timestamp of examples ChangeLog timestamp for brp-java-repack-jars
for i in `find ${RPM_BUILD_ROOT} examples -newer ChangeLog -type f -name ChangeLog`; do
touch -r ChangeLog $i
done
### this is no longer needed since examples not packaged
## set timestamp of examples ChangeLog timestamp for brp-java-repack-jars
#for i in `find ${RPM_BUILD_ROOT} examples -newer ChangeLog -type f -name ChangeLog`; do
# touch -r ChangeLog $i
#done
%endif
# remove unpackaged files from the buildroot
@ -199,16 +184,15 @@ fi
%doc gettext-runtime/intl/COPYING*
/bin/*
%{_bindir}/*
%exclude %{_bindir}/autopoint
%exclude %{_bindir}/gettextize
%{_libdir}/libgettextlib-%{version}.so
%{_libdir}/libgettextsrc-%{version}.so
%{_infodir}/gettext*
%{_mandir}/man1/*
%exclude %{_mandir}/man1/gettextize.1.gz
%exclude %{_mandir}/man1/autopoint.1.gz
%{_libdir}/%{name}
%exclude %{_libdir}/%{name}/gnu.gettext.*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/archive.tar.gz
%{_datadir}/%{name}/styles
%if %{buildjar}
%{_datadir}/%{name}/libintl.jar
%endif
@ -217,13 +201,8 @@ fi
%files devel
%defattr(-,root,root,-)
%doc gettext-runtime/man/*.3.html ChangeLog
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/projects
%{_bindir}/gettextize
%{_bindir}/autopoint
%{_datadir}/%{name}/ABOUT-NLS
%{_datadir}/%{name}/projects/*
%{_datadir}/%{name}/archive.tar.gz
%{_datadir}/%{name}/projects/
%{_datadir}/%{name}/config.rpath
%{_datadir}/%{name}/*.h
%{_datadir}/%{name}/intl
@ -237,8 +216,6 @@ fi
%{_libdir}/libgettextlib.so
%{_libdir}/libgettextsrc.so
%{_libdir}/preloadable_libintl.so
%{_mandir}/man1/gettextize.1.gz
%{_mandir}/man1/autopoint.1.gz
%{_mandir}/man3/*
%{_datadir}/%{name}/javaversion.class
%doc gettext-runtime/intl-java/javadoc*
@ -252,6 +229,19 @@ fi
%changelog
* Thu Jan 24 2008 Jens Petersen <petersen@redhat.com> - 0.17-1
- update to 0.17 release
- update License field to GPLv3
- add gettext-0.17-open-args.patch to fix build from upstream
- gettext-tools-tests-lang-gawk-fail.patch, gettext-php-headers.patch,
gettext-php-prinf-output-237241.patch, and
gettext-xglade-define-xml-major-version-285701.patch are no longer needed
- drop superfluous po-mode-init.el source
- no need to run autoconf and autoheader when building
- pass -findirect-dispatch to gcj to make java binaries ABI independent
(jakub,#427796)
- move autopoint, gettextize, and %{_datadir}/%{name}/ to main package
* Fri Sep 21 2007 Jens Petersen <petersen@redhat.com> - 0.16.1-12
- add a libs subpackage (suggested by Dwayne Bailey, #294891)
- move preloadable_libintl.so to the devel subpackage

View File

@ -1,11 +0,0 @@
;;; po-mode-init.el
(autoload 'po-mode "po-mode")
(setq auto-mode-alist (cons '("\\.po[tx]?\\'\\|\\.po\\." . po-mode)
auto-mode-alist))
;; autodetect coding-system
(autoload 'po-find-file-coding-system "po-mode")
(modify-coding-system-alist 'file "\\.po[tx]?\\'\\|\\.po\\."
'po-find-file-coding-system)

View File

@ -1 +1 @@
3d9ad24301c6d6b17ec30704a13fe127 gettext-0.16.1.tar.gz
58a2bc6d39c0ba57823034d55d65d606 gettext-0.17.tar.gz