Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/linuxdoc-tools/, app-text/linuxdoc-tools/files/
Date: Thu, 26 Nov 2015 10:07:48
Message-Id: 1448501146.d10298f46a9f35fe22b59be9b3a8370a5cce1e0a.monsieurp@gentoo
1 commit: d10298f46a9f35fe22b59be9b3a8370a5cce1e0a
2 Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
3 AuthorDate: Thu Nov 26 01:22:23 2015 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 26 01:25:46 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d10298f4
7
8 app-text/linuxdoc-tools: fix parallel doc build
9
10 Addresses QA warning when built with '+doc' USE. Minor ebuild cleanups.
11
12 ...uxdoc-tools-0.9.71-fix-parallel-doc-build.patch | 185 +++++++++++++++++++++
13 .../linuxdoc-tools/linuxdoc-tools-0.9.71-r1.ebuild | 8 +-
14 2 files changed, 190 insertions(+), 3 deletions(-)
15
16 diff --git a/app-text/linuxdoc-tools/files/linuxdoc-tools-0.9.71-fix-parallel-doc-build.patch b/app-text/linuxdoc-tools/files/linuxdoc-tools-0.9.71-fix-parallel-doc-build.patch
17 new file mode 100644
18 index 0000000..76256da
19 --- /dev/null
20 +++ b/app-text/linuxdoc-tools/files/linuxdoc-tools-0.9.71-fix-parallel-doc-build.patch
21 @@ -0,0 +1,185 @@
22 +See https://gitlab.com/agmartin/linuxdoc-tools/issues/4
23 +
24 +diff --git a/Makefile.in b/Makefile.in
25 +index adb85d0..7038d97 100644
26 +--- a/Makefile.in
27 ++++ b/Makefile.in
28 +@@ -83,13 +83,14 @@ ifneq ($(BUILDDOC_FORMATS),)
29 + # -- Build documentation
30 + @echo "Building documentation ..."
31 + (cd doc; \
32 ++ MAKE="$(MAKE)" \
33 + PREFIX=$(prefix) \
34 + BUILD_ISO_ENTITIES=$(BUILD_ISO_ENTITIES) \
35 + BUILD_ENTITY_MAP=$(BUILD_ENTITY_MAP) \
36 +- PKGPERL5LIB=$(CURDIR)/perl5lib \
37 +- PKGDATADIR=$(CURDIR)/lib \
38 ++ PKGPERL5LIB=$(CURDIR)/perl5lib \
39 ++ PKGDATADIR=$(CURDIR)/lib \
40 + PKGENTITYMAPDIR=$(CURDIR)/entity-map \
41 +- BUILDDOC_FORMATS="$(BUILDDOC_FORMATS)" \
42 ++ BUILDDOC_FORMATS="$(BUILDDOC_FORMATS)" \
43 + sh Makedoc.sh)
44 + endif
45 +
46 +diff --git a/doc/Makedoc.sh b/doc/Makedoc.sh
47 +index b7e2efb..da4be99 100644
48 +--- a/doc/Makedoc.sh
49 ++++ b/doc/Makedoc.sh
50 +@@ -33,7 +33,7 @@ if [ "${BUILD_ENTITY_MAP}" = "true" ]; then
51 + # Create a modified EntityMap.pm with entity-map location in doc
52 + # build temporary dir. Need to properly install entity-map there.
53 + mkdir $TMPDIR/Text
54 +- make -C ../entity-map install DESTDIR="$TMPDIR"
55 ++ ${MAKE} -C ../entity-map install DESTDIR="$TMPDIR"
56 + sed < ../entity-map/EntityMap.pm.in > $TMPDIR/Text/EntityMap.pm \
57 + -e 's|\@localentitymapdir\@|'${TMPDIR}'/usr/share/entity-map|g' \
58 + -e 's|\@entitymapdir\@|'${TMPDIR}'/usr/share/entity-map/0.1.0|g'
59 +@@ -49,7 +49,7 @@ fi
60 + if [ "${BUILD_ISO_ENTITIES}" = "true" ]; then
61 + # --without-installed-iso-entities: Install iso-entities in
62 + # "$TMPDIR/usr" and set it as iso-entities prefix.
63 +- make -C ../iso-entities install DESTDIR="$TMPDIR"
64 ++ ${MAKE} -C ../iso-entities install DESTDIR="$TMPDIR"
65 + ISOENTITIES_PREFIX="${TMPDIR}/usr"
66 + else
67 + # --with-installed-iso-entities: Use system prefix.
68 +@@ -88,45 +88,42 @@ fi
69 +
70 + # Build actual documentation
71 + echo "- Building documentation for formats: ${BUILDDOC_FORMATS}" >&2
72 ++BUILDDOC_MAKE=""
73 + for docformat in ${BUILDDOC_FORMATS}; do
74 + case ${docformat} in
75 + txt)
76 +- echo "- Building txt docs" >&2
77 + if [ -n "`which groff`" ]; then
78 +- $TMPDIR/linuxdoc --backend=txt --filter --blanks=1 ./guide.sgml
79 ++ echo "- Add to build list: guide.txt" >&2
80 ++ BUILDDOC_MAKE="${BUILDDOC_MAKE} guide.txt"
81 + else
82 + echo "- ++ Warning: groff not available, cannot build \"${docformat}\" format." >&2
83 + fi
84 + ;;
85 + pdf)
86 +- echo "- Building pdf docs" >&2
87 +- $TMPDIR/linuxdoc --backend=latex --output=pdf \
88 +- --pass="\usepackage{times}" ./guide.sgml
89 ++ echo "- Add to build list: guide.pdf" >&2
90 ++ BUILDDOC_MAKE="${BUILDDOC_MAKE} guide.pdf"
91 + ;;
92 + info)
93 +- echo "- Building info docs" >&2
94 +- $TMPDIR/linuxdoc --backend=info ./guide.sgml
95 ++ echo "- Add to build list: guide.info" >&2
96 ++ BUILDDOC_MAKE="${BUILDDOC_MAKE} guide.info"
97 + ;;
98 + lyx)
99 +- echo "- Building lyx docs" >&2
100 +- $TMPDIR/linuxdoc --backend=lyx ./guide.sgml
101 ++ echo "- Add to build list: guide.lyx" >&2
102 ++ BUILDDOC_MAKE="${BUILDDOC_MAKE} guide.lyx"
103 + ;;
104 + html)
105 +- echo "- Building html docs" >&2
106 +- $TMPDIR/linuxdoc --imagebuttons --backend=html ./guide.sgml \
107 +- && mv -f ./guide*.html ./html
108 ++ echo "- Add to build list: guide.html" >&2
109 ++ BUILDDOC_MAKE="${BUILDDOC_MAKE} html/guide.html"
110 + ;;
111 + rtf)
112 +- echo "- Building rtf docs" >&2
113 +- $TMPDIR/linuxdoc --backend=rtf ./guide.sgml && if [ ! -d ./rtf ]; \
114 +- then mkdir -m 755 ./rtf; fi && mv -f ./guide*.rtf ./rtf
115 ++ echo "- Add to build list: guide.rtf" >&2
116 ++ BUILDDOC_MAKE="${BUILDDOC_MAKE} rtf/guide.rtf"
117 + ;;
118 + dvi+ps)
119 + echo "- Building latex docs" >&2
120 + if [ -n "`which latex`" ]; then
121 +- echo "- Building dvi docs" >&2
122 +- $TMPDIR/linuxdoc --backend=latex --output=dvi \
123 +- --pass="\usepackage{times}" ./guide.sgml
124 ++ echo "- Add to build list: guide.dvi" >&2
125 ++ BUILDDOC_MAKE="${BUILDDOC_MAKE} guide.dvi"
126 +
127 + if [ -n "`which dvips`" ]; then
128 + echo " + dvips" >&2
129 +@@ -137,9 +134,13 @@ for docformat in ${BUILDDOC_FORMATS}; do
130 + DVIPS_PAPER="letter"
131 + fi
132 + fi
133 +- dvips -t ${DVIPS_PAPER} -o ./guide.ps ./guide.dvi
134 +- if [ -n "`which gzip`" -a -f ./guide.ps ]; then
135 +- gzip -fn ./guide.ps
136 ++
137 ++ if [ -n "`which gzip`" ]; then
138 ++ echo "- Add to build list: guide.ps.gz" >&2
139 ++ BUILDDOC_MAKE="${BUILDDOC_MAKE} guide.ps.gz"
140 ++ else
141 ++ echo "- Add to build list: guide.ps" >&2
142 ++ BUILDDOC_MAKE="${BUILDDOC_MAKE} guide.ps"
143 + fi
144 + else
145 + echo "- ++ Warning: dvips not available, cannot build \"guide.ps\"." >&2
146 +@@ -156,7 +157,9 @@ for docformat in ${BUILDDOC_FORMATS}; do
147 + esac
148 + done
149 +
150 ++${MAKE} TMPDIR="${TMPDIR}" DVIPS_PAPER="${DVIPS_PAPER}" ${BUILDDOC_MAKE}
151 ++
152 + # Remove temporary directory.
153 +-rm -rf $TMPDIR
154 ++rm -rf "${TMPDIR}"
155 +
156 + exit 0
157 +diff --git a/doc/Makefile b/doc/Makefile
158 +new file mode 100644
159 +index 0000000..79c5382
160 +--- /dev/null
161 ++++ b/doc/Makefile
162 +@@ -0,0 +1,44 @@
163 ++
164 ++
165 ++%.txt: %.sgml
166 ++ @echo "- Building txt docs" >&2
167 ++ $(TMPDIR)/linuxdoc --backend=txt --filter --blanks=1 $<
168 ++
169 ++%.pdf: %.sgml
170 ++ @echo "- Building pdf docs" >&2
171 ++ $(TMPDIR)/linuxdoc --backend=latex \
172 ++ --output=pdf \
173 ++ --pass="\usepackage{times}" $<
174 ++
175 ++%.info: %.sgml
176 ++ @echo "- Building info docs" >&2
177 ++ $(TMPDIR)/linuxdoc --backend=info $<
178 ++
179 ++%.lyx: %.sgml
180 ++ @echo "- Building lyx docs" >&2
181 ++ $(TMPDIR)/linuxdoc --backend=lyx $<
182 ++
183 ++html/%.html: %.sgml
184 ++ @echo "- Building html docs" >&2
185 ++ $(TMPDIR)/linuxdoc --imagebuttons --backend=html $<
186 ++ mv -f ./guide*.html ./html
187 ++
188 ++rtf/%.rtf: %.sgml
189 ++ @echo "- Building rtf docs" >&2
190 ++ $(TMPDIR)/linuxdoc --backend=rtf $<
191 ++ mkdir -m 755 -p ./rtf
192 ++ mv -f ./guide*.rtf ./rtf
193 ++
194 ++%.dvi: %.sgml
195 ++ @echo "- Building dvi docs" >&2
196 ++ $(TMPDIR)/linuxdoc --backend=latex \
197 ++ --output=dvi \
198 ++ --pass="\usepackage{times}" $<
199 ++
200 ++%.ps: %.dvi
201 ++ @echo "- Building ps docs" >&2
202 ++ dvips -t $(DVIPS_PAPER) -o $@ $<
203 ++
204 ++%.ps.gz: %.ps
205 ++ @echo "- Building ps.gz docs" >&2
206 ++ gzip -fn $<
207
208 diff --git a/app-text/linuxdoc-tools/linuxdoc-tools-0.9.71-r1.ebuild b/app-text/linuxdoc-tools/linuxdoc-tools-0.9.71-r1.ebuild
209 index b9883e7..5283862 100644
210 --- a/app-text/linuxdoc-tools/linuxdoc-tools-0.9.71-r1.ebuild
211 +++ b/app-text/linuxdoc-tools/linuxdoc-tools-0.9.71-r1.ebuild
212 @@ -37,14 +37,14 @@ DEPEND="${RDEPEND}
213
214 DOCS=( ChangeLog README )
215
216 -S="${WORKDIR}/${PN}-upstream/${PV}-${GIT_SHA1}"
217 +PATCHES=( "${FILESDIR}/${P}-fix-parallel-doc-build.patch" )
218
219 -sgml-catalog_cat_include "/etc/sgml/linuxdoc.cat" "/usr/share/${PN}/${PN}.catalog"
220 +S="${WORKDIR}/${PN}-upstream/${PV}-${GIT_SHA1}"
221
222 src_prepare() {
223 # Use Gentoo doc install path.
224 sed -i \
225 - -e "s%/share/doc/linuxdoc-tools%/share/doc/${PF}%" \
226 + -e "s%/share/doc/${PN}%/share/doc/${PF}%" \
227 Makefile.in || die
228
229 autotools-utils_src_prepare
230 @@ -75,6 +75,8 @@ src_install() {
231 autotools-utils_src_install
232 }
233
234 +sgml-catalog_cat_include "/etc/sgml/linuxdoc.cat" "/usr/share/${PN}/${PN}.catalog"
235 +
236 pkg_postinst() {
237 latex-package_pkg_postinst
238 sgml-catalog_pkg_postinst