[packages/opensp] - autotools cleanup and fixes to install locale files to actually used gettext domain
qboosh
qboosh at pld-linux.org
Sun Mar 15 17:35:00 CET 2026
commit d857f5f370d8065edd367b86082628ce135419ce
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Mar 15 17:19:28 2026 +0100
- autotools cleanup and fixes to install locale files to actually used gettext domain
opensp-gettext.patch | 32 ++++++++++++++++++++++++++++++++
opensp.spec | 43 +++++++++++++++++++++++--------------------
2 files changed, 55 insertions(+), 20 deletions(-)
---
diff --git a/opensp.spec b/opensp.spec
index 0993927..1cace4b 100644
--- a/opensp.spec
+++ b/opensp.spec
@@ -4,18 +4,18 @@ Name: opensp
Version: 1.5.2
Release: 8
Epoch: 2
-License: Free (Copyright (C) 1999 The OpenJade group)
+License: MIT-like
Group: Applications/Publishing/SGML
Source0: https://downloads.sourceforge.net/openjade/OpenSP-%{version}.tar.gz
# Source0-md5: 670b223c5d12cee40c9137be86b6c39b
Patch0: %{name}-nolibnsl.patch
Patch1: %{name}-localedir.patch
Patch2: %{name}-automake.patch
+Patch3: %{name}-gettext.patch
URL: https://openjade.sourceforge.net/
-BuildRequires: autoconf
+BuildRequires: autoconf >= 2.53
BuildRequires: automake
-BuildRequires: gettext-autopoint
-BuildRequires: gettext-tools >= 0.14.4
+BuildRequires: gettext-tools >= 0.14.5
BuildRequires: libstdc++-devel
BuildRequires: libtool >= 2:1.4d
BuildRequires: xmlto
@@ -65,15 +65,15 @@ Biblioteki statyczne OpenSP.
%patch -P0 -p1
%patch -P1 -p1
%patch -P2 -p1
+%patch -P3 -p1
%build
-%{__autopoint}
+%{__gettextize}
%{__libtoolize}
%{__aclocal} -I m4
%{__autoconf}
%{__autoheader}
%{__automake}
-cp -f /usr/share/automake/config.sub .
%configure \
--enable-default-catalog=%{_sysconfdir}/sgml/catalog \
--enable-default-search-path=%{sgmldir} \
@@ -91,19 +91,19 @@ rm -rf $RPM_BUILD_ROOT
# tidy at mozilla-firefox
install -d $RPM_BUILD_ROOT%{_includedir}/OpenSP/nsgmls
-install nsgmls/NsgmlsMessages.h $RPM_BUILD_ROOT%{_includedir}/OpenSP/nsgmls
+cp -p nsgmls/NsgmlsMessages.h $RPM_BUILD_ROOT%{_includedir}/OpenSP/nsgmls
install -d $RPM_BUILD_ROOT%{_includedir}/OpenSP/lib
-install lib/Parser.h $RPM_BUILD_ROOT%{_includedir}/OpenSP/lib
-install lib/ParserState.h $RPM_BUILD_ROOT%{_includedir}/OpenSP/lib
-install lib/Undo.h $RPM_BUILD_ROOT%{_includedir}/OpenSP/lib
-install lib/EventQueue.h $RPM_BUILD_ROOT%{_includedir}/OpenSP/lib
-install lib/Id.h $RPM_BUILD_ROOT%{_includedir}/OpenSP/lib
-install lib/OutputState.h $RPM_BUILD_ROOT%{_includedir}/OpenSP/lib
-install lib/Recognizer.h $RPM_BUILD_ROOT%{_includedir}/OpenSP/lib
-install lib/LpdEntityRef.h $RPM_BUILD_ROOT%{_includedir}/OpenSP/lib
-install lib/events.h $RPM_BUILD_ROOT%{_includedir}/OpenSP/lib
-install lib/Trie.h $RPM_BUILD_ROOT%{_includedir}/OpenSP/lib
-install lib/Priority.h $RPM_BUILD_ROOT%{_includedir}/OpenSP/lib
+cp -p lib/Parser.h $RPM_BUILD_ROOT%{_includedir}/OpenSP/lib
+cp -p lib/ParserState.h $RPM_BUILD_ROOT%{_includedir}/OpenSP/lib
+cp -p lib/Undo.h $RPM_BUILD_ROOT%{_includedir}/OpenSP/lib
+cp -p lib/EventQueue.h $RPM_BUILD_ROOT%{_includedir}/OpenSP/lib
+cp -p lib/Id.h $RPM_BUILD_ROOT%{_includedir}/OpenSP/lib
+cp -p lib/OutputState.h $RPM_BUILD_ROOT%{_includedir}/OpenSP/lib
+cp -p lib/Recognizer.h $RPM_BUILD_ROOT%{_includedir}/OpenSP/lib
+cp -p lib/LpdEntityRef.h $RPM_BUILD_ROOT%{_includedir}/OpenSP/lib
+cp -p lib/events.h $RPM_BUILD_ROOT%{_includedir}/OpenSP/lib
+cp -p lib/Trie.h $RPM_BUILD_ROOT%{_includedir}/OpenSP/lib
+cp -p lib/Priority.h $RPM_BUILD_ROOT%{_includedir}/OpenSP/lib
for i in nsgmls sgmlnorm spam spcat spent; do
ln -sf o$i $RPM_BUILD_ROOT%{_bindir}/$i
@@ -112,7 +112,10 @@ done
# sx conficts with sx from lrzsz package
ln -sf osx $RPM_BUILD_ROOT%{_bindir}/sgml2xml
-%find_lang OpenSP
+# generic file
+%{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/ABOUT-NLS
+
+%find_lang sp5
%clean
rm -rf $RPM_BUILD_ROOT
@@ -120,7 +123,7 @@ rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
-%files -f OpenSP.lang
+%files -f sp5.lang
%defattr(644,root,root,755)
%{_docdir}/%{name}-%{version}
%attr(755,root,root) %{_bindir}/onsgmls
diff --git a/opensp-gettext.patch b/opensp-gettext.patch
new file mode 100644
index 0000000..3fd5476
--- /dev/null
+++ b/opensp-gettext.patch
@@ -0,0 +1,32 @@
+--- OpenSP-1.5.2/po/Makevars.orig 2005-08-26 22:34:42.000000000 +0200
++++ OpenSP-1.5.2/po/Makevars 2026-03-15 16:48:20.986980488 +0100
+@@ -1,7 +1,8 @@
+ # Makefile variables for PO directory in any package using GNU gettext.
+
+ # Usually the message domain is the same as the package name.
+-DOMAIN = $(PACKAGE)
++# keep in sync with SP_MESSAGE_DOMAIN in configure.in! (no easy way to pass to po/Makefile)
++DOMAIN = sp5
+
+ # These two variables depend on the location of this directory.
+ subdir = po
+--- OpenSP-1.5.2/configure.in.orig 2026-03-15 16:50:35.346252602 +0100
++++ OpenSP-1.5.2/configure.in 2026-03-15 16:51:07.059414131 +0100
+@@ -240,7 +240,7 @@ AC_CHECK_LIB(pthread,pthread_create,,AC_
+
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ AC_SUBST(MKINSTALLDIRS)
+-AM_GNU_GETTEXT
++AM_GNU_GETTEXT([external])
+ AM_GNU_GETTEXT_VERSION([0.14.5])
+ AC_CHECK_HEADERS(locale.h)
+ AC_DEFINE_UNQUOTED(SP_LOCALE_DIR, "${prefix}/share/locale", [location of message catalogs])
+@@ -491,7 +491,7 @@ AC_CONFIG_FILES([${PACKAGE}-${VERSION}.s
+ lib/Makefile nsgmls/Makefile spent/Makefile
+ spam/Makefile sgmlnorm/Makefile sx/Makefile spcat/Makefile
+ include/Makefile include/config.h.old generic/Makefile doc/Makefile
+- pubtext/Makefile tests/Makefile unicode/Makefile intl/Makefile
++ pubtext/Makefile tests/Makefile unicode/Makefile
+ po/Makefile.in])
+
+ BUILDDOCS=yes
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/opensp.git/commitdiff/275e9b5160c04f86be2861959adb67be82d8b80a
More information about the pld-cvs-commit
mailing list