Skip to content

Commit

Permalink
Merge branch 'jb46708' into 'master'
Browse files Browse the repository at this point in the history
[gettext] Remove html docs which use groff. Contributes JB#46708

See merge request mer-core/gettext!6
  • Loading branch information
xfade committed Aug 9, 2019
2 parents 5852e5f + 73592af commit c51d34f
Show file tree
Hide file tree
Showing 2 changed files with 245 additions and 2 deletions.
242 changes: 242 additions & 0 deletions rpm/0001-Remove-html-docs.patch
@@ -0,0 +1,242 @@
From 2bee447d1069ae8eb28e33f22475b2a334f2118d Mon Sep 17 00:00:00 2001
From: Niels Breet <niels.breet@jolla.com>
Date: Thu, 8 Aug 2019 17:46:39 +0300
Subject: [PATCH] Remove html docs

---
gettext-runtime/man/Makefile.am | 98 ++---------------------------------------
gettext-tools/man/Makefile.am | 74 +------------------------------
2 files changed, 4 insertions(+), 168 deletions(-)

diff --git a/gettext-runtime/man/Makefile.am b/gettext-runtime/man/Makefile.am
index f575194..bf63e4d 100644
--- a/gettext-runtime/man/Makefile.am
+++ b/gettext-runtime/man/Makefile.am
@@ -40,20 +40,10 @@ man_MAN3LINK = dgettext.3 dcgettext.3 dngettext.3 dcngettext.3
man_MANS = $(man_MAN1)
notrans_man_MANS = $(man_MAN3) $(man_MAN3LINK)

-man_HTML1GEN = gettext.1.html ngettext.1.html
-man_HTML1IN = gettext.1.html.in ngettext.1.html.in
-man_HTML1OTHER = envsubst.1.html
-man_HTML1 = $(man_HTML1GEN) $(man_HTML1OTHER)
-man_HTML3 = gettext.3.html ngettext.3.html \
-textdomain.3.html bindtextdomain.3.html bind_textdomain_codeset.3.html
-man_HTML = $(man_HTML1) $(man_HTML3)
-
EXTRA_DIST += help2man $(man_aux) $(man_MAN1IN) $(man_MAN1OTHER) \
-$(man_MAN3) $(man_MAN3IN) $(man_MAN3LINK) \
-$(man_HTML1IN) $(man_HTML1OTHER) $(man_HTML3)
-CLEANFILES = $(man_MAN1GEN) $(man_HTML1GEN)
-MAINTAINERCLEANFILES = $(man_MAN1IN) $(man_MAN1OTHER) $(man_MAN3) \
-$(man_HTML1IN) $(man_HTML1OTHER) $(man_HTML3)
+$(man_MAN3) $(man_MAN3IN) $(man_MAN3LINK)
+CLEANFILES = $(man_MAN1GEN)
+MAINTAINERCLEANFILES = $(man_MAN1IN) $(man_MAN1OTHER) $(man_MAN3)

PERL = @PERL@
RM = rm -f
@@ -61,31 +51,12 @@ RM = rm -f
# help2man 1.24 or newer.
HELP2MAN = $(PERL) -w -- $(srcdir)/help2man

-# groff 1.17 or newer.
-MAN2HTML = groff -mandoc -Thtml
-
UPDATEMODE =


-gt_man2html = \
- if test -f $${srcdir}$$m; then \
- $(MAN2HTML) $${srcdir}$$m > t-$@ && \
- sed -e '/CreationDate:/d' < t-$@ > t2-$@ && \
- mv t2-$@ $@; \
- rm -f t-$@ t2-$@; \
- fi
-
-
# We distribute both the man pages and their HTML equivalent.
# The user can generate the parts, via
# make man
-# make html
-
-all-local: html-local
-install-data-local: install-html
-installdirs-local: installdirs-html
-uninstall-local: uninstall-html
-

# Man pages.

@@ -123,66 +94,3 @@ ngettext.3: ngettext.3.in
textdomain.3: textdomain.3.in
bindtextdomain.3: bindtextdomain.3.in
bind_textdomain_codeset.3: bind_textdomain_codeset.3.in
-
-
-# Man pages in HTML format.
-
-html-local: $(man_HTML)
-
-$(man_HTML1GEN): Makefile
- srcdir=''; \
- test -f ./$@.in || srcdir=$(srcdir)/; \
- if test -f $${srcdir}$@.in; then \
- sed -e 's|@''localedir''@|$(localedir)|g' $${srcdir}$@.in > t-$@ && \
- mv t-$@ $@; \
- fi
-
-gettext.1.html: gettext.1.html.in
-ngettext.1.html: ngettext.1.html.in
-
-$(man_HTML1IN):
- srcdir=''; \
- progname=`echo $@ | sed -e 's/\.1\.html\.in$$//'`; \
- m=$${progname}.1.in; \
- test -f ./$$m || srcdir=$(srcdir)/; \
- $(gt_man2html)
-
-gettext.1.html.in: gettext.1.in
-ngettext.1.html.in: ngettext.1.in
-
-$(man_HTML1OTHER):
- srcdir=''; \
- progname=`echo $@ | sed -e 's/\.1\.html$$//'`; \
- m=$${progname}.1; \
- test -f ./$$m || srcdir=$(srcdir)/; \
- $(gt_man2html)
-
-envsubst.1.html: envsubst.1
-
-$(man_HTML3):
- srcdir=''; \
- progname=`echo $@ | sed -e 's/\.3\.html$$//'`; \
- m=$${progname}.3.in; \
- test -f ./$$m || srcdir=$(srcdir)/; \
- $(gt_man2html)
-
-gettext.3.html: gettext.3.in
-ngettext.3.html: ngettext.3.in
-textdomain.3.html: textdomain.3.in
-bindtextdomain.3.html: bindtextdomain.3.in
-bind_textdomain_codeset.3.html: bind_textdomain_codeset.3.in
-
-install-html-local:
- $(MKDIR_P) $(DESTDIR)$(htmldir)
- for file in $(man_HTML); do \
- if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
- $(INSTALL_DATA) $$dir/$$file $(DESTDIR)$(htmldir)/$$file; \
- done
-
-installdirs-html:
- $(MKDIR_P) $(DESTDIR)$(htmldir)
-
-uninstall-html:
- for file in $(man_HTML); do \
- $(RM) $(DESTDIR)$(htmldir)/$$file; \
- done
diff --git a/gettext-tools/man/Makefile.am b/gettext-tools/man/Makefile.am
index e50b2eb..c5e1290 100644
--- a/gettext-tools/man/Makefile.am
+++ b/gettext-tools/man/Makefile.am
@@ -43,15 +43,7 @@ gettextize.1 autopoint.1
man_MAN1 = $(man_MAN1SRC) $(man_MAN1MISC)
man_MANS = $(man_MAN1)

-man_HTML = \
-msgcmp.1.html msgfmt.1.html msgmerge.1.html msgunfmt.1.html xgettext.1.html \
-msgattrib.1.html msgcat.1.html msgcomm.1.html msgconv.1.html msgen.1.html \
-msgexec.1.html msgfilter.1.html msggrep.1.html msginit.1.html msguniq.1.html \
-recode-sr-latin.1.html \
-gettextize.1.html autopoint.1.html
-
-EXTRA_DIST += help2man $(man_aux) $(man_MANS) $(man_HTML)
-MAINTAINERCLEANFILES = $(man_MANS) $(man_HTML)
+MAINTAINERCLEANFILES = $(man_MANS)

PERL = @PERL@
RM = rm -f
@@ -59,31 +51,12 @@ RM = rm -f
# help2man 1.24 or newer.
HELP2MAN = $(PERL) -w -- $(srcdir)/help2man

-# groff 1.17 or newer.
-MAN2HTML = groff -mandoc -Thtml
-
UPDATEMODE =


-gt_man2html = \
- if test -f $${srcdir}$$m; then \
- $(MAN2HTML) $${srcdir}$$m > t-$@ && \
- sed -e '/CreationDate:/d' < t-$@ > t2-$@ && \
- mv t2-$@ $@; \
- rm -f t-$@ t2-$@; \
- fi
-
-
# We distribute both the man pages and their HTML equivalent.
# The user can generate the parts, via
# make man
-# make html
-
-all-local: html-local
-install-data-local: install-html
-installdirs-local: installdirs-html
-uninstall-local: uninstall-html
-

# Man pages.

@@ -122,48 +95,3 @@ $(man_MAN1MISC): help2man $(top_srcdir)/../.version
gettextize.1: gettextize.x ../misc/gettextize.in
autopoint.1: autopoint.x ../misc/autopoint.in

-
-# Man pages in HTML format.
-
-html-local: $(man_HTML)
-
-$(man_HTML):
- srcdir=''; \
- progname=`echo $@ | sed -e 's/\.1\.html$$//'`; \
- m=$${progname}.1; \
- test -f ./$$m || srcdir=$(srcdir)/; \
- $(gt_man2html)
-
-msgcmp.1.html: msgcmp.1
-msgfmt.1.html: msgfmt.1
-msgmerge.1.html: msgmerge.1
-msgunfmt.1.html: msgunfmt.1
-xgettext.1.html: xgettext.1
-msgattrib.1.html: msgattrib.1
-msgcat.1.html: msgcat.1
-msgcomm.1.html: msgcomm.1
-msgconv.1.html: msgconv.1
-msgen.1.html: msgen.1
-msgexec.1.html: msgexec.1
-msgfilter.1.html: msgfilter.1
-msggrep.1.html: msggrep.1
-msginit.1.html: msginit.1
-msguniq.1.html: msguniq.1
-recode-sr-latin.1.html: recode-sr-latin.1
-gettextize.1.html: gettextize.1
-autopoint.1.html: autopoint.1
-
-install-html-local:
- $(MKDIR_P) $(DESTDIR)$(htmldir)
- for file in $(man_HTML); do \
- if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
- $(INSTALL_DATA) $$dir/$$file $(DESTDIR)$(htmldir)/$$file; \
- done
-
-installdirs-html:
- $(MKDIR_P) $(DESTDIR)$(htmldir)
-
-uninstall-html:
- for file in $(man_HTML); do \
- $(RM) $(DESTDIR)$(htmldir)/$$file; \
- done
--
1.9.1

5 changes: 3 additions & 2 deletions rpm/gettext.spec
Expand Up @@ -18,6 +18,7 @@ Url: http://www.gnu.org/software/gettext/
Group: Development/Tools
Source: ftp://ftp.gnu.org/gnu/gettext/%{name}-%{version}.tar.gz
Source2: msghack.py
Patch0: 0001-Remove-html-docs.patch

# Bootstrapping
BuildRequires: autoconf >= 2.5
Expand Down Expand Up @@ -99,6 +100,7 @@ This package contains libraries used internationalization support.

%prep
%setup -q -n %{name}-%{version}/%{name}
%patch0 -p1

%build
echo %{version} | cut -d '+' -f 1 > .tarball-version
Expand Down Expand Up @@ -219,7 +221,7 @@ fi
%defattr(-,root,root,-)
%doc NEWS THANKS
%doc COPYING gettext-tools/misc/DISCLAIM README
%doc gettext-runtime/man/*.3.html ChangeLog
%doc ChangeLog
%doc %{_infodir}/autosprintf*
%doc %{_infodir}/gettext*
%doc gettext-runtime/intl-java/javadoc*
Expand Down Expand Up @@ -300,6 +302,5 @@ fi
%doc %{_mandir}/man1/gettext.1.gz
%doc %{_mandir}/man1/ngettext.1.gz
%doc %{_mandir}/man1/envsubst.1.gz
%doc gettext-runtime/man/*.1.html
%doc %{_mandir}/man3/*
%{_libdir}/libasprintf.so.*

0 comments on commit c51d34f

Please sign in to comment.