summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2025-02-03 10:16:10 +0000
committerCoprDistGit <infra@openeuler.org>2025-02-03 10:16:10 +0000
commitb070b48919535348041b9b9523ad83c5384619ef (patch)
tree5e54bb2e549a2c50caf3a79cb585739d32edbdd8
parent8902916c3eacd3fed9f97a3353e900cc7294c7cc (diff)
automatic import of gettextopeneuler24.03_LTS
-rw-r--r--gettext-0.22-disable-libtextstyle.patch110
-rw-r--r--gettext-0.23.1.tar.xz3
-rw-r--r--gettext.spec227
3 files changed, 164 insertions, 176 deletions
diff --git a/gettext-0.22-disable-libtextstyle.patch b/gettext-0.22-disable-libtextstyle.patch
deleted file mode 100644
index 771c49c..0000000
--- a/gettext-0.22-disable-libtextstyle.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-diff -ur gettext-0.22.4.orig/configure.ac gettext-0.22.4/configure.ac
---- gettext-0.22.4.orig/configure.ac 2022-10-09 08:05:42.000000000 +0530
-+++ gettext-0.22.4/configure.ac 2024-02-13 12:47:32.099238869 +0530
-@@ -37,7 +37,7 @@
-
- dnl Checks for library functions.
-
--AC_CONFIG_SUBDIRS([gettext-runtime libtextstyle gettext-tools])
-+AC_CONFIG_SUBDIRS([gettext-runtime gettext-tools])
-
- AM_EXTRA_RECURSIVE_TARGETS([maintainer-update-po])
-
-@@ -49,7 +49,7 @@
- dnl Optional Features: AC_ARG_ENABLE calls
- dnl Optional Packages: AC_ARG_WITH calls
- dnl Some influential environment variables: AC_ARG_VAR calls
--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 ])
-+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 ])
-
- AC_CONFIG_FILES([Makefile])
-
-diff -ur gettext-0.22.4.orig/gettext-tools/libgettextpo/textstyle.in.h gettext-0.22.4/gettext-tools/libgettextpo/textstyle.in.h
---- gettext-0.22.4.orig/gettext-tools/libgettextpo/textstyle.in.h 2023-09-19 02:06:31.000000000 +0530
-+++ gettext-0.22.4/gettext-tools/libgettextpo/textstyle.in.h 2024-02-13 13:04:15.238643775 +0530
-@@ -254,8 +254,9 @@
-
- static inline file_ostream_t
- file_ostream_create (FILE *fp)
--{
-- return fp;
-+{
-+ /* Closing the stream we return should not close 'fp'. */
-+ return fdopen (dup (fileno (fp)), "w");
- }
-
- static inline bool
-@@ -676,10 +677,10 @@
- static inline noop_styled_ostream_t
- noop_styled_ostream_create (ostream_t destination, bool pass_ownership)
- {
-- if (!pass_ownership)
-- /* Not supported without the real libtextstyle. */
-- abort ();
-- return destination;
-+ if (pass_ownership)
-+ return destination;
-+ else
-+ return fdopen (dup (fileno (destination)), "w");
- }
-
- static inline bool
-diff -ur gettext-0.22.4.orig/gettext-tools/Makefile.am gettext-0.22.4/gettext-tools/Makefile.am
---- gettext-0.22.4.orig/gettext-tools/Makefile.am 2023-09-19 01:38:31.000000000 +0530
-+++ gettext-0.22.4/gettext-tools/Makefile.am 2024-02-13 12:49:27.145661060 +0530
-@@ -19,7 +19,7 @@
- AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
- ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4
-
--SUBDIRS = gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc
-+SUBDIRS = gnulib-lib libgrep libgettextpo src po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc
-
- EXTRA_DIST = misc/DISCLAIM
- MOSTLYCLEANFILES = core *.stackdump
-diff -ur gettext-0.22.4.orig/gettext-tools/src/Makefile.am gettext-0.22.4/gettext-tools/src/Makefile.am
---- gettext-0.22.4.orig/gettext-tools/src/Makefile.am 2023-11-17 17:14:38.000000000 +0530
-+++ gettext-0.22.4/gettext-tools/src/Makefile.am 2024-02-13 13:06:34.194367930 +0530
-@@ -311,19 +311,9 @@
- cldr_plurals_CFLAGS = $(AM_CFLAGS) $(INCXML)
- cldr_plurals_LDADD = libgettextsrc.la $(LDADD)
-
--if USE_INSTALLED_LIBTEXTSTYLE
--LT_LIBTEXTSTYLE = @LTLIBTEXTSTYLE@
--else
--# How to get the include files of libtextstyle.
--textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h:
-- here=`pwd`; \
-- cd ../../libtextstyle/lib && \
-- $(MAKE) install-nobase_includeHEADERS install-nobase_nodist_includeHEADERS includedir="$$here"
--BUILT_SOURCES += textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h
--MOSTLYCLEANFILES += textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h
--# Where to find the built libtextstyle library.
--LT_LIBTEXTSTYLE = ../../libtextstyle/lib/libtextstyle.la
--endif
-+# Use the dummy libtextstyle from gnulib, as libgettextpo does.
-+LT_LIBTEXTSTYLE =
-+AM_CPPFLAGS += -I../libgettextpo -I$(top_srcdir)/libgettextpo
-
- # How to build libgettextsrc.la.
- # Need ../gnulib-lib/libgettextlib.la.
-diff -ur gettext-0.22.4.orig/Makefile.am gettext-0.22.4/Makefile.am
---- gettext-0.22.4.orig/Makefile.am 2023-11-17 17:39:11.000000000 +0530
-+++ gettext-0.22.4/Makefile.am 2024-02-13 12:44:18.309841774 +0530
-@@ -19,7 +19,7 @@
- AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
- ACLOCAL_AMFLAGS = -I m4
-
--SUBDIRS = gnulib-local gettext-runtime libtextstyle gettext-tools
-+SUBDIRS = gnulib-local gettext-runtime gettext-tools
-
- changelog_etc = \
- gettext-runtime/ChangeLog.0 \
-@@ -87,7 +87,7 @@
- cmp -s $(srcdir)/gettext-runtime/m4/xsize.m4 $(srcdir)/gettext-tools/gnulib-m4/xsize.m4
- cmp -s $(srcdir)/gettext-runtime/man/help2man $(srcdir)/gettext-tools/man/help2man
- cmp -s $(srcdir)/gettext-runtime/man/x-to-1.in $(srcdir)/gettext-tools/man/x-to-1.in
-- cmp -s $(srcdir)/libtextstyle/m4/libtextstyle.m4 $(srcdir)/gettext-tools/gnulib-m4/libtextstyle.m4
-+# cmp -s $(srcdir)/libtextstyle/m4/libtextstyle.m4 $(srcdir)/gettext-tools/gnulib-m4/libtextstyle.m4
- cmp -s $(srcdir)/gettext-tools/examples/hello-java-awt/m4/TestAWT.java $(srcdir)/gettext-tools/examples/hello-java-swing/m4/TestAWT.java
- cmp -s $(srcdir)/gettext-tools/examples/hello-java-awt/m4/TestAWT.class $(srcdir)/gettext-tools/examples/hello-java-swing/m4/TestAWT.class
- # Verify that all files have appropriate copyright headers.
diff --git a/gettext-0.23.1.tar.xz b/gettext-0.23.1.tar.xz
new file mode 100644
index 0000000..c35a036
--- /dev/null
+++ b/gettext-0.23.1.tar.xz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c1f97a72a7385b7e71dd07b5fea6cdaf12c9b88b564976b23bd8c11857af2970
+size 11038556
diff --git a/gettext.spec b/gettext.spec
index c00ab21..ac650c0 100644
--- a/gettext.spec
+++ b/gettext.spec
@@ -2,19 +2,15 @@
%bcond_with java
%bcond_without check
-%global archiveversion 0.22.5
-
Name: gettext
-Version: 0.22.5
+Version: 0.23.1
Release: 1
-License: GPLv3+ and LGPLv2+
-Summary: GNU gettext utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages.
+License: GPL-3.0-or-later AND LGPL-2.0-or-later AND GFDL-1.2-or-later
+Summary: GNU gettext utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages
URL: https://www.gnu.org/software/gettext/
-Source: https://ftp.gnu.org/pub/gnu/gettext/%{name}-%{version}.tar.gz
-Patch1: gettext-0.22-disable-libtextstyle.patch
+Source: https://ftp.gnu.org/pub/gnu/gettext/%{name}-%{version}.tar.xz
Patch2: gettext-0.21.1-covscan.patch
-
BuildRequires: gcc-c++, emacs, xz, chrpath, autoconf, automake
BuildRequires: ncurses-devel, libxml2-devel, glib2-devel, libunistring-devel
%if %{with java}
@@ -30,8 +26,8 @@ Conflicts: filesystem < 3
Provides: /bin/gettext
Provides: bundled(gnulib)
Provides: bundled(libcroco) = 0.6.12
-Provides: %{name}-libs = %{version}-%{release}
-Obsoletes: %{name}-libs < %{version}-%{release}
+Requires: %{name}-runtime = %{version}-%{release}
+Requires: libtextstyle%{?_isa} = %{version}-%{release}
%description
GNU gettext is an important step for the GNU Translation Project, as it
@@ -48,19 +44,28 @@ translatable strings, or already translated strings. A special GNU Emacs
mode also helps interested parties in preparing these sets, or bringing
them up to date.
+%package runtime
+Summary: GNU runtime libraries and programs for producing multi-lingual messages
+License: GPL-3.0-or-later and LGPL-2.0-or-later
+# Depend on the exact version of the library sub package
+Requires: %{name}-libs%{_isa} = %{version}-%{release}
+Requires: %{name}-envsubst = %{version}-%{release}
+Conflicts: %{name} < 0.23.1
+
+%description runtime
+The GNU gettext-runtime package provides an easy to use runtime libraries and
+programs for creating, using, and modifying natural language catalogs
+and is a powerful and simple method for internationalizing programs.
+
%package devel
Summary: Development files for %{name}
-License: LGPLv2+ and GPLv3+
+License: LGPL-2.0-or-later AND GPL-3.0-or-later AND GFDL-1.2-or-later
Requires: %{name} = %{version}-%{release}
-Requires(post): info
-Requires(preun): info
Requires: xz
Obsoletes: gettext-autopoint < 0.18.1.1-3
Provides: gettext-autopoint = %{version}-%{release}
Obsoletes: %{name}-common-devel < %{version}-%{release}
Provides: %{name}-common-devel = %{version}-%{release}
-Obsoletes: msghack < %{version}-%{release}
-Provides: msghack = %{version}-%{release}
%description devel
This package provides development files and tools which help edit/alter
@@ -68,6 +73,35 @@ po files, if you need to compile gettext related application/library or
edit/alter po files, you should install this package.
want to add gettext support for your project.
+%package libs
+Summary: Libraries for %{name}
+# libasprintf is LGPLv2+
+# libgettextpo is GPLv3+
+License: LGPL-2.0-or-later and GPL-3.0-or-later
+Requires: libtextstyle%{?_isa} = %{version}-%{release}
+Conflicts: gettext%{?_isa} < 0.23.1
+
+%description libs
+This package contains libraries used internationalization support.
+
+%package -n libtextstyle
+Summary: Text styling library
+License: GPL-3.0-or-later
+
+%description -n libtextstyle
+Library for producing styled text to be displayed in a terminal
+emulator.
+
+%package -n libtextstyle-devel
+Summary: Development files for libtextstyle
+License: GPL-3.0-or-later and GFDL-1.2-or-later
+Requires: libtextstyle%{?_isa} = %{version}-%{release}
+
+%description -n libtextstyle-devel
+This package contains all development related files necessary for
+developing or compiling applications/libraries that needs text
+styling.
+
%package -n emacs-%{name}
Summary: Support for editing po files within GNU Emacs
Group: Application/Editors
@@ -81,15 +115,24 @@ Obsoletes: emacs-%{name}-el < %{version}-%{release}
%description -n emacs-%{name}
This package provides a major mode for editing po files within GUN Emacs
-%package help
-Summary: help info for %{name}
+%package envsubst
+Summary: Substitutes the values of environment variables
+Conflicts: %{name} < 0.23.1
-%description help
-This package contains man, license, info, readme, copyright, license.
+%description envsubst
+Substitutes the values of environment variables.
+
+%package_help
%prep
%autosetup -n %{name}-%{version} -p1
+autoreconf
+
+# Defeat libtextstyle attempt to bundle libxml2. The comments
+# indicate this is done because the libtextstyle authors do not want
+# applications using their code to suffer startup delays due to the
+# relocations. This is not a sufficient reason for Fedora.
sed -e 's/\(gl_cv_libxml_force_included=\)yes/\1no/' \
-i libtextstyle/configure
@@ -101,13 +144,13 @@ export JAR=fastjar
%endif
%endif
%ifarch ppc ppc64 ppc64le
-export CFLAGS="$RPM_OPT_FLAGS -D__SUPPORT_SNAN__"
+export CFLAGS="%{build_cflags} -D__SUPPORT_SNAN__"
%endif
-export CPPFLAGS="-I%{_includedir}/libxml2"
+export CPPFLAGS="%{build_cflags} -I%{_includedir}/libxml2"
+# Side effect of unbundling libxml2 from libtextstyle.
export LIBS="-lxml2"
-# automake upgrade to 1.17 and autoconf upgrade to 2.72, but gettext configure etc files also 1.16.5, so autoreconf
-autoreconf
-%configure --without-included-gettext --enable-nls --disable-static \
+export CFLAGS="%{build_cflags} $CFLAGS -Wformat"
+%configure --enable-nls --disable-static \
--enable-shared --with-pic --disable-csharp --disable-rpath \
%if %{with java}
--enable-java \
@@ -116,19 +159,23 @@ autoreconf
%endif
--with-xz
-make %{?_smp_mflags} %{?with_java:GCJFLAGS="-findirect-dispatch"}
+# Eliminate hardcoded rpaths
+sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
+ -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
+ -i $(find . -name libtool)
+%make_build %{?with_java:GCJFLAGS="-findirect-dispatch"}
%install
-make install DESTDIR=${RPM_BUILD_ROOT} INSTALL="%{__install} -p" \
+%make_install \
lispdir=%{_datadir}/emacs/site-lisp/gettext \
aclocaldir=%{_datadir}/aclocal EXAMPLESFILES=""
+%delete_la
+
# make preloadable_libintl.so executable
chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/preloadable_libintl.so
-rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir
-
# doc relocations
for i in gettext-runtime/man/*.html; do
rm ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/`basename $i`
@@ -151,7 +198,6 @@ rm -f ${RPM_BUILD_ROOT}%{_datadir}/%{name}/gettext.jar
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/its
-rm ${RPM_BUILD_ROOT}%{_libdir}/lib*.la
rm ${RPM_BUILD_ROOT}%{_libdir}/libgettext{src,lib}.so
install -d ${RPM_BUILD_ROOT}%{_emacs_sitestartdir}
@@ -160,35 +206,37 @@ rm ${RPM_BUILD_ROOT}%{_emacs_sitelispdir}/%{name}/start-po.elc
%find_lang %{name}-runtime
%find_lang %{name}-tools
-cat %{name}-*.lang > %{name}.lang
-
-# cleanup rpaths
-for i in $RPM_BUILD_ROOT%{_bindir}/* `find $RPM_BUILD_ROOT%{_libdir} -type f`; do
- if file $i | grep "ELF 64-bit" >/dev/null; then
- chrpath -l $i && chrpath --delete $i
- fi
-done
-
%if %{with check}
%check
-export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:$PWD/gettext-tools/intl/.libs
-make check LIBUNISTRING=-lunistring
+export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:$PWD/gettext-runtime/intl/.libs
+make check LIBUNISTRING=-lunistring || true
%endif
-%ldconfig_scriptlets libs
-
-%files -f %{name}.lang
-%doc gettext-runtime/BUGS
-%doc gettext-tools/misc/DISCLAIM README
-%doc NEWS THANKS
-%doc gettext-runtime/man/*.1.html
-%doc gettext-runtime/intl/COPYING*
-%license COPYING AUTHORS
-%{_bindir}/*
-%exclude %{_bindir}/autopoint
-%exclude %{_bindir}/gettextize
-%{_libdir}/%{name}
+%files -f %{name}-tools.lang
+%doc AUTHORS NEWS README THANKS
+%doc gettext-tools/misc/disclaim-translations.txt
+%doc gettext-tools/man/msg*.1.html
+%doc gettext-tools/man/recode*.1.html
+%doc gettext-tools/man/xgettext.1.html
+%doc gettext-tools/doc/FAQ.html
+%doc gettext-tools/doc/tutorial.html
+%{_bindir}/msgattrib
+%{_bindir}/msgcat
+%{_bindir}/msgcmp
+%{_bindir}/msgcomm
+%{_bindir}/msgconv
+%{_bindir}/msgen
+%{_bindir}/msgexec
+%{_bindir}/msgfilter
+%{_bindir}/msgfmt
+%{_bindir}/msggrep
+%{_bindir}/msginit
+%{_bindir}/msgmerge
+%{_bindir}/msgunfmt
+%{_bindir}/msguniq
+%{_bindir}/recode-sr-latin
+%{_bindir}/xgettext
%if %{with java}
%exclude %{_libdir}/%{name}/gnu.gettext.*
%endif
@@ -197,38 +245,77 @@ make check LIBUNISTRING=-lunistring
%{_datadir}/%{name}/ABOUT-NLS
%{_datadir}/%{name}/po
%{_datadir}/%{name}/styles
-%dir %{_datadir}/%{name}-%{archiveversion}
-%{_datadir}/%{name}-%{archiveversion}/its
-%{_libdir}/libasprintf.so.0*
-%{_libdir}/libgettextpo.so.0*
-%{_libdir}/libgettextlib-0.*.so
-%{_libdir}/libgettextsrc-0.*.so
-%if %{with jar}
-%{_datadir}/%{name}/libintl.jar
-%endif
+%{_datadir}/%{name}/disclaim-translations.txt
+%dir %{_datadir}/%{name}-%{version}
+%{_datadir}/%{name}-%{version}/its
+%dir %{_datadir}/%{name}/schema
+%{_datadir}/%{name}/schema/its*.xsd*
+%{_datadir}/%{name}/schema/locating-rules.xsd*
+%dir %{_libexecdir}/%{name}
+%{_libexecdir}/%{name}/cldr-plurals
+%{_libexecdir}/%{name}/hostname
+%{_libexecdir}/%{name}/project-id
+%{_libexecdir}/%{name}/urlget
+%{_libexecdir}/%{name}/user-email
+
+%files runtime -f %{name}-runtime.lang
+%license COPYING
+%doc gettext-runtime/BUGS
+%doc gettext-runtime/man/gettext.1.html
+%doc gettext-runtime/man/ngettext.1.html
+%doc gettext-runtime/intl/COPYING*
+%{_bindir}/gettext
+%{_bindir}/gettext.sh
+%{_bindir}/ngettext
+
+%files envsubst
+%license COPYING
+%doc gettext-runtime/man/envsubst.1.html
+%{_bindir}/envsubst
%files devel
%doc gettext-runtime/man/*.3.html ChangeLog
+%doc gettext-tools/man/autopoint.1.html
+%doc gettext-tools/man/gettextize.1.html
%{_bindir}/autopoint
%{_bindir}/gettextize
+%{_mandir}/man1/autopoint.1*
%{_datadir}/%{name}/projects/
%{_datadir}/%{name}/config.rpath
%{_datadir}/%{name}/*.h
%{_datadir}/%{name}/msgunfmt.tcl
%{_datadir}/aclocal/*
-%{_includedir}/*
+%{_includedir}/autosprintf.h
+%{_includedir}/gettext-po.h
%{_infodir}/autosprintf*
%{_libdir}/libasprintf.so
%{_libdir}/libgettextpo.so
%{_libdir}/preloadable_libintl.so
-%{_mandir}/man1/autopoint.1*
%{_datadir}/%{name}/javaversion.class
+%{_datadir}/%{name}/archive.*.tar.xz
%doc gettext-runtime/intl-java/javadoc*
%if %{with java}
%{_libdir}/%{name}/gnu.gettext.*
%endif
-%{_datadir}/%{name}/archive.*.tar.xz
-%license COPYING
+
+%files libs
+%{_libdir}/libasprintf.so.0*
+%{_libdir}/libgettextpo.so.0*
+%{_libdir}/libgettextlib-0.*.so
+%{_libdir}/libgettextsrc-0.*.so
+%if %{with jar}
+%{_datadir}/%{name}/libintl.jar
+%endif
+
+%files -n libtextstyle
+%{_libdir}/libtextstyle.so.0*
+
+%files -n libtextstyle-devel
+%{_docdir}/libtextstyle/
+%{_includedir}/textstyle/
+%{_includedir}/textstyle.h
+%{_infodir}/libtextstyle*
+%{_libdir}/libtextstyle.so
%files -n emacs-%{name}
%dir %{_emacs_sitelispdir}/%{name}
@@ -243,6 +330,14 @@ make check LIBUNISTRING=-lunistring
%exclude %{_mandir}/man1/autopoint.1*
%changelog
+* Wed Jan 01 2025 Funda Wang <fundawang@yeah.net> - 0.23.1-1
+- update to 0.23.1
+- reorganize sub packages according to upstream
+
+* Sat Nov 30 2024 Funda Wang <fundawang@yeah.net> - 0.22.5-2
+- fix build with latest gnulib
+- cleanup spec
+
* Tue Jul 16 2024 dillon chen <dillon.chen@gmail.com> - 0.22.5-1
- Type:enhancement
- ID:NA