1 |
commit: e88a07653f941c6326cce8d45fccb654eaeab1d1 |
2 |
Author: Lucas Ramage <ramage.lucas <AT> protonmail <DOT> com> |
3 |
AuthorDate: Sat Jan 5 23:34:05 2019 +0000 |
4 |
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jun 23 18:10:00 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e88a0765 |
7 |
|
8 |
app-doc/devmanual: Fix assets for offline browsing |
9 |
|
10 |
Closes: https://bugs.gentoo.org/617724 |
11 |
Closes: https://github.com/gentoo/gentoo/pull/10974 |
12 |
Signed-off-by: Lucas Ramage <ramage.lucas <AT> protonmail.com> |
13 |
[sed tweaks converted to patch] |
14 |
Package-Manager: Portage-2.3.67, Repoman-2.3.15 |
15 |
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> |
16 |
|
17 |
app-doc/devmanual/devmanual-9999.ebuild | 13 +++-- |
18 |
app-doc/devmanual/files/devmanual-fallback.patch | 60 ++++++++++++++++++++++++ |
19 |
app-doc/devmanual/metadata.xml | 3 ++ |
20 |
3 files changed, 72 insertions(+), 4 deletions(-) |
21 |
|
22 |
diff --git a/app-doc/devmanual/devmanual-9999.ebuild b/app-doc/devmanual/devmanual-9999.ebuild |
23 |
index b71b4782005..8ad5f06a357 100644 |
24 |
--- a/app-doc/devmanual/devmanual-9999.ebuild |
25 |
+++ b/app-doc/devmanual/devmanual-9999.ebuild |
26 |
@@ -1,7 +1,7 @@ |
27 |
# Copyright 1999-2019 Gentoo Authors |
28 |
# Distributed under the terms of the GNU General Public License v2 |
29 |
|
30 |
-EAPI=6 |
31 |
+EAPI=7 |
32 |
|
33 |
inherit readme.gentoo-r1 |
34 |
|
35 |
@@ -10,7 +10,7 @@ HOMEPAGE="https://devmanual.gentoo.org/" |
36 |
|
37 |
if [[ ${PV} == *9999 ]]; then |
38 |
inherit git-r3 |
39 |
- EGIT_REPO_URI="git://anongit.gentoo.org/proj/devmanual.git" |
40 |
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/devmanual.git" |
41 |
else |
42 |
SRC_URI="https://dev.gentoo.org/~hwoarang/distfiles/${P}.tar.gz" |
43 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-macos" |
44 |
@@ -18,11 +18,16 @@ fi |
45 |
|
46 |
LICENSE="CC-BY-SA-3.0" |
47 |
SLOT="0" |
48 |
-IUSE="" |
49 |
+IUSE="+fallback" |
50 |
|
51 |
-DEPEND="dev-libs/libxslt |
52 |
+BDEPEND="dev-libs/libxslt |
53 |
media-gfx/imagemagick[truetype,svg,png]" |
54 |
|
55 |
+src_prepare() { |
56 |
+ default |
57 |
+ use fallback && eapply "${FILESDIR}"/${PN}-fallback.patch |
58 |
+} |
59 |
+ |
60 |
src_compile() { |
61 |
# Imagemagick uses inkscape (if present) to delegate |
62 |
# svg conversions. |
63 |
|
64 |
diff --git a/app-doc/devmanual/files/devmanual-fallback.patch b/app-doc/devmanual/files/devmanual-fallback.patch |
65 |
new file mode 100644 |
66 |
index 00000000000..789451d13b2 |
67 |
--- /dev/null |
68 |
+++ b/app-doc/devmanual/files/devmanual-fallback.patch |
69 |
@@ -0,0 +1,60 @@ |
70 |
+Fix assets for offline browsing. |
71 |
+https://bugs.gentoo.org/617724 |
72 |
+ |
73 |
+--- a/devbook.xsl |
74 |
++++ b/devbook.xsl |
75 |
+@@ -439,11 +439,9 @@ |
76 |
+ <xsl:with-param name="append">../</xsl:with-param> |
77 |
+ </xsl:call-template> |
78 |
+ </xsl:variable> |
79 |
+- <link rel="stylesheet" href="{$relative_path_depth_recursion}devmanual.css" type="text/css" /> |
80 |
++ <link rel="stylesheet" href="{$relative_path_depth_recursion}fallback.css" type="text/css" /> |
81 |
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
82 |
+ <meta name="description" content="The Gentoo Devmanual is a technical manual which covers topics such as writing ebuilds and eclasses, and policies that developers should be abiding by." /> |
83 |
+- <link href="https://assets.gentoo.org/tyrian/bootstrap.min.css" rel="stylesheet" media="screen" /> |
84 |
+- <link href="https://assets.gentoo.org/tyrian/tyrian.min.css" rel="stylesheet" media="screen" /> |
85 |
+ <link rel="icon" href="https://www.gentoo.org/favicon.ico" type="image/x-icon" /> |
86 |
+ </head> |
87 |
+ <body> |
88 |
+@@ -476,9 +474,6 @@ |
89 |
+ </div> |
90 |
+ <div class="logo"> |
91 |
+ <a href="/" title="Back to the homepage" class="site-logo"> |
92 |
+- <object data="https://assets.gentoo.org/tyrian/site-logo.svg" type="image/svg+xml"> |
93 |
+- <img src="https://assets.gentoo.org/tyrian/site-logo.png" alt="Gentoo Linux Logo" /> |
94 |
+- </object> |
95 |
+ </a> |
96 |
+ <span class="site-label">Development Guide</span> |
97 |
+ </div> |
98 |
+@@ -566,8 +561,6 @@ |
99 |
+ </div> |
100 |
+ </div> |
101 |
+ </footer> |
102 |
+- <script src="https://assets.gentoo.org/tyrian/jquery.min.js"></script> |
103 |
+- <script src="https://assets.gentoo.org/tyrian/bootstrap.min.js"></script> |
104 |
+ </body> |
105 |
+ </html> |
106 |
+ </xsl:template> |
107 |
+--- /dev/null |
108 |
++++ b/fallback.css |
109 |
+@@ -0,0 +1,20 @@ |
110 |
++body { |
111 |
++ margin: 40px auto; |
112 |
++ max-width: 650px; |
113 |
++ line-height: 1.6; |
114 |
++ font-size: 18px; |
115 |
++ color: #454545; |
116 |
++ padding: 0 10px; |
117 |
++} |
118 |
++ |
119 |
++h1,h2,h3,h4,h5,h6 { |
120 |
++ line-height: 1.2; |
121 |
++} |
122 |
++ |
123 |
++.divider, |
124 |
++.footerlinks, |
125 |
++.navbar-toggle, |
126 |
++.site-title, |
127 |
++.tyrian-navbar { |
128 |
++ display: none; |
129 |
++} |
130 |
|
131 |
diff --git a/app-doc/devmanual/metadata.xml b/app-doc/devmanual/metadata.xml |
132 |
index 182bdeb954f..6179f643632 100644 |
133 |
--- a/app-doc/devmanual/metadata.xml |
134 |
+++ b/app-doc/devmanual/metadata.xml |
135 |
@@ -12,4 +12,7 @@ |
136 |
devmanual@g.o |
137 |
</description> |
138 |
</maintainer> |
139 |
+ <use> |
140 |
+ <flag name="fallback">Use alternative minimal stylesheet instead of tyrian theme.</flag> |
141 |
+ </use> |
142 |
</pkgmetadata> |