1 |
commit: 2842c96af47895e2a3c0cf562677bd0eaf05f587 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 4 12:36:41 2019 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 11 17:57:39 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2842c96a |
7 |
|
8 |
app-text/openjade: Use sgml-catalog-r1, cleanup |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
app-text/openjade/openjade-1.3.2-r9.ebuild | 153 +++++++++++++++++++++++++++++ |
13 |
1 file changed, 153 insertions(+) |
14 |
|
15 |
diff --git a/app-text/openjade/openjade-1.3.2-r9.ebuild b/app-text/openjade/openjade-1.3.2-r9.ebuild |
16 |
new file mode 100644 |
17 |
index 00000000000..2d63798c3d7 |
18 |
--- /dev/null |
19 |
+++ b/app-text/openjade/openjade-1.3.2-r9.ebuild |
20 |
@@ -0,0 +1,153 @@ |
21 |
+# Copyright 1999-2019 Gentoo Authors |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=7 |
25 |
+inherit autotools flag-o-matic sgml-catalog-r1 toolchain-funcs |
26 |
+ |
27 |
+DESCRIPTION="Jade is an implementation of DSSSL for formatting SGML and XML documents" |
28 |
+HOMEPAGE="http://openjade.sourceforge.net" |
29 |
+SRC_URI="https://downloads.sourceforge.net/project/${PN}/${PN}/${PV}/${P}.tar.gz" |
30 |
+ |
31 |
+LICENSE="MIT" |
32 |
+SLOT="0" |
33 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" |
34 |
+IUSE="" |
35 |
+ |
36 |
+RDEPEND=" |
37 |
+ app-text/sgml-common |
38 |
+ >=app-text/opensp-1.5.1 |
39 |
+" |
40 |
+DEPEND="${RDEPEND} |
41 |
+ dev-lang/perl |
42 |
+" |
43 |
+ |
44 |
+src_prepare() { |
45 |
+ default |
46 |
+ |
47 |
+ eapply "${FILESDIR}"/${P}-deplibs.patch |
48 |
+ eapply "${FILESDIR}"/${P}-ldflags.patch |
49 |
+ eapply "${FILESDIR}"/${P}-msggen.pl.patch |
50 |
+ eapply "${FILESDIR}"/${P}-respect-ldflags.patch |
51 |
+ eapply "${FILESDIR}"/${P}-libosp-la.patch |
52 |
+ eapply "${FILESDIR}"/${P}-gcc46.patch |
53 |
+ eapply "${FILESDIR}"/${P}-no-undefined.patch |
54 |
+ eapply "${FILESDIR}"/${P}-wchar_t-uint.patch |
55 |
+ eapply "${FILESDIR}"/${P}-chmod.patch #487218 |
56 |
+ |
57 |
+ # Please note! Opts are disabled. If you know what you're doing |
58 |
+ # feel free to remove this line. It may cause problems with |
59 |
+ # docbook-sgml-utils among other things. |
60 |
+ #ALLOWED_FLAGS="-O -O1 -O2 -pipe -g -march" |
61 |
+ strip-flags |
62 |
+ |
63 |
+ # Default CFLAGS and CXXFLAGS is -O2 but this make openjade segfault |
64 |
+ # on hppa. Using -O1 works fine. So I force it here. |
65 |
+ use hppa && replace-flags -O2 -O1 |
66 |
+ |
67 |
+ ln -s config/configure.in configure.ac || die |
68 |
+ cp "${FILESDIR}"/${P}-acinclude.m4 acinclude.m4 || die |
69 |
+ rm config/missing || die |
70 |
+ |
71 |
+ AT_NOEAUTOMAKE=yes \ |
72 |
+ eautoreconf |
73 |
+} |
74 |
+ |
75 |
+src_configure() { |
76 |
+ # avoids dead-store elimination optimization |
77 |
+ # leading to segfaults on GCC 6 |
78 |
+ # bug #592590 #596506 |
79 |
+ tc-is-clang || append-cxxflags $(test-flags-CXX -fno-lifetime-dse) |
80 |
+ |
81 |
+ # We need Prefix env, bug #287358 |
82 |
+ CONFIG_SHELL="${CONFIG_SHELL:-${BASH}}" \ |
83 |
+ econf \ |
84 |
+ --enable-http \ |
85 |
+ --enable-default-catalog="${EPREFIX}"/etc/sgml/catalog \ |
86 |
+ --enable-default-search-path="${EPREFIX}"/usr/share/sgml \ |
87 |
+ --enable-splibdir="${EPREFIX}"/usr/$(get_libdir) \ |
88 |
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \ |
89 |
+ --datadir="${EPREFIX}"/usr/share/sgml/${P} \ |
90 |
+ --disable-static |
91 |
+} |
92 |
+ |
93 |
+src_compile() { |
94 |
+ unset INCLUDE #412725 |
95 |
+ emake -j1 SHELL="${BASH}" |
96 |
+} |
97 |
+ |
98 |
+src_install() { |
99 |
+ #dodir /usr/$(get_libdir) |
100 |
+ |
101 |
+ make DESTDIR="${D}" \ |
102 |
+ SHELL="${BASH}" \ |
103 |
+ libdir="${EPREFIX}"/usr/$(get_libdir) \ |
104 |
+ install install-man |
105 |
+ |
106 |
+ find "${D}" -name '*.la' -delete || die |
107 |
+ |
108 |
+ dosym openjade /usr/bin/jade |
109 |
+ dosym onsgmls /usr/bin/nsgmls |
110 |
+ dosym osgmlnorm /usr/bin/sgmlnorm |
111 |
+ dosym ospam /usr/bin/spam |
112 |
+ dosym ospent /usr/bin/spent |
113 |
+ dosym osx /usr/bin/sgml2xml |
114 |
+ |
115 |
+ insinto /usr/share/sgml/${P} |
116 |
+ doins dsssl/builtins.dsl |
117 |
+ |
118 |
+ newins - catalog <<-EOF |
119 |
+ SYSTEM "builtins.dsl" "builtins.dsl" |
120 |
+ EOF |
121 |
+ doins -r pubtext |
122 |
+ insinto /usr/share/sgml/${P}/dsssl |
123 |
+ doins dsssl/{dsssl.dtd,style-sheet.dtd,fot.dtd} |
124 |
+ newins "${FILESDIR}"/${P}.dsssl-catalog catalog |
125 |
+ |
126 |
+ # Breaks sgml2xml among other things |
127 |
+ #insinto /usr/share/sgml/${P}/unicode |
128 |
+ #doins unicode/{catalog,unicode.sd,unicode.syn,gensyntax.pl} |
129 |
+ |
130 |
+ insinto /etc/sgml |
131 |
+ newins - "${P}.cat" <<-EOF |
132 |
+ CATALOG "${EPREFIX}/usr/share/sgml/openjade-${PV}/catalog" |
133 |
+ CATALOG "${EPREFIX}/usr/share/sgml/openjade-${PV}/dsssl/catalog" |
134 |
+ EOF |
135 |
+ |
136 |
+ local HTML_DOCS=( doc/*.htm ) |
137 |
+ einstalldocs |
138 |
+ dodoc -r jadedoc |
139 |
+} |
140 |
+ |
141 |
+pkg_preinst() { |
142 |
+ # work-around old revision removing it |
143 |
+ cp "${ED}"/etc/sgml/${P}.cat "${T}" || die |
144 |
+} |
145 |
+ |
146 |
+pkg_postinst() { |
147 |
+ if [[ ! -f ${EROOT}/etc/sgml/${P}.cat ]]; then |
148 |
+ cp "${T}"/${P}.cat "${EROOT}"/etc/sgml/ || die |
149 |
+ fi |
150 |
+ # this one's shared with docbook-dsssl, so we need to do it in postinst |
151 |
+ if ! grep -q -s ${P}.cat \ |
152 |
+ "${EROOT}"/etc/sgml/sgml-docbook.cat; then |
153 |
+ ebegin "Adding ${P}.cat to /etc/sgml/sgml-docbook.cat" |
154 |
+ cat >> "${EROOT}"/etc/sgml/sgml-docbook.cat <<-EOF |
155 |
+ CATALOG "${EPREFIX}/etc/sgml/${P}.cat" |
156 |
+ EOF |
157 |
+ eend |
158 |
+ fi |
159 |
+ sgml-catalog-r1_pkg_postinst |
160 |
+} |
161 |
+ |
162 |
+pkg_postrm() { |
163 |
+ if [[ -z ${REPLACED_BY_VERSION} ]]; then |
164 |
+ ebegin "Removing ${P}.cat from /etc/sgml/sgml-docbook.cat" |
165 |
+ sed -i -e '/${P}/d' \ |
166 |
+ "${EROOT}"/etc/sgml/sgml-docbook.cat |
167 |
+ eend |
168 |
+ if [[ ! -s ${EROOT}/etc/sgml/sgml-docbook.cat ]]; then |
169 |
+ rm -f "${EROOT}"/etc/sgml/sgml-docbook.cat |
170 |
+ fi |
171 |
+ fi |
172 |
+ sgml-catalog-r1_pkg_postrm |
173 |
+} |