public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-doc/devmanual/, app-doc/devmanual/files/
@ 2019-06-23 18:10 Ulrich Müller
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Müller @ 2019-06-23 18:10 UTC (permalink / raw
  To: gentoo-commits

commit:     e88a07653f941c6326cce8d45fccb654eaeab1d1
Author:     Lucas Ramage <ramage.lucas <AT> protonmail <DOT> com>
AuthorDate: Sat Jan  5 23:34:05 2019 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Jun 23 18:10:00 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e88a0765

app-doc/devmanual: Fix assets for offline browsing

Closes: https://bugs.gentoo.org/617724
Closes: https://github.com/gentoo/gentoo/pull/10974
Signed-off-by: Lucas Ramage <ramage.lucas <AT> protonmail.com>
[sed tweaks converted to patch]
Package-Manager: Portage-2.3.67, Repoman-2.3.15
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 app-doc/devmanual/devmanual-9999.ebuild          | 13 +++--
 app-doc/devmanual/files/devmanual-fallback.patch | 60 ++++++++++++++++++++++++
 app-doc/devmanual/metadata.xml                   |  3 ++
 3 files changed, 72 insertions(+), 4 deletions(-)

diff --git a/app-doc/devmanual/devmanual-9999.ebuild b/app-doc/devmanual/devmanual-9999.ebuild
index b71b4782005..8ad5f06a357 100644
--- a/app-doc/devmanual/devmanual-9999.ebuild
+++ b/app-doc/devmanual/devmanual-9999.ebuild
@@ -1,7 +1,7 @@
 # Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
 inherit readme.gentoo-r1
 
@@ -10,7 +10,7 @@ HOMEPAGE="https://devmanual.gentoo.org/"
 
 if [[ ${PV} == *9999 ]]; then
 	inherit git-r3
-	EGIT_REPO_URI="git://anongit.gentoo.org/proj/devmanual.git"
+	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/devmanual.git"
 else
 	SRC_URI="https://dev.gentoo.org/~hwoarang/distfiles/${P}.tar.gz"
 	KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-macos"
@@ -18,11 +18,16 @@ fi
 
 LICENSE="CC-BY-SA-3.0"
 SLOT="0"
-IUSE=""
+IUSE="+fallback"
 
-DEPEND="dev-libs/libxslt
+BDEPEND="dev-libs/libxslt
 	media-gfx/imagemagick[truetype,svg,png]"
 
+src_prepare() {
+	default
+	use fallback && eapply "${FILESDIR}"/${PN}-fallback.patch
+}
+
 src_compile() {
 	# Imagemagick uses inkscape (if present) to delegate
 	# svg conversions.

diff --git a/app-doc/devmanual/files/devmanual-fallback.patch b/app-doc/devmanual/files/devmanual-fallback.patch
new file mode 100644
index 00000000000..789451d13b2
--- /dev/null
+++ b/app-doc/devmanual/files/devmanual-fallback.patch
@@ -0,0 +1,60 @@
+Fix assets for offline browsing.
+https://bugs.gentoo.org/617724
+
+--- a/devbook.xsl
++++ b/devbook.xsl
+@@ -439,11 +439,9 @@
+           <xsl:with-param name="append">../</xsl:with-param>
+         </xsl:call-template>
+       </xsl:variable>
+-      <link rel="stylesheet" href="{$relative_path_depth_recursion}devmanual.css" type="text/css" />
++      <link rel="stylesheet" href="{$relative_path_depth_recursion}fallback.css" type="text/css" />
+       <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+       <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." />
+-      <link href="https://assets.gentoo.org/tyrian/bootstrap.min.css" rel="stylesheet" media="screen" />
+-      <link href="https://assets.gentoo.org/tyrian/tyrian.min.css" rel="stylesheet" media="screen" />
+       <link rel="icon" href="https://www.gentoo.org/favicon.ico" type="image/x-icon" />
+     </head>
+     <body>
+@@ -476,9 +474,6 @@
+               </div>
+               <div class="logo">
+                 <a href="/" title="Back to the homepage" class="site-logo">
+-                  <object data="https://assets.gentoo.org/tyrian/site-logo.svg" type="image/svg+xml">
+-                    <img src="https://assets.gentoo.org/tyrian/site-logo.png" alt="Gentoo Linux Logo" />
+-                  </object>
+                 </a>
+                 <span class="site-label">Development Guide</span>
+               </div>
+@@ -566,8 +561,6 @@
+           </div>
+         </div>
+       </footer>
+-      <script src="https://assets.gentoo.org/tyrian/jquery.min.js"></script>
+-      <script src="https://assets.gentoo.org/tyrian/bootstrap.min.js"></script>
+     </body>
+     </html>
+   </xsl:template>
+--- /dev/null
++++ b/fallback.css
+@@ -0,0 +1,20 @@
++body {
++    margin: 40px auto;
++    max-width: 650px;
++    line-height: 1.6;
++    font-size: 18px;
++    color: #454545;
++    padding: 0 10px;
++}
++
++h1,h2,h3,h4,h5,h6 {
++    line-height: 1.2;
++}
++
++.divider,
++.footerlinks,
++.navbar-toggle,
++.site-title,
++.tyrian-navbar {
++    display: none;
++}

diff --git a/app-doc/devmanual/metadata.xml b/app-doc/devmanual/metadata.xml
index 182bdeb954f..6179f643632 100644
--- a/app-doc/devmanual/metadata.xml
+++ b/app-doc/devmanual/metadata.xml
@@ -12,4 +12,7 @@
 			devmanual@gentoo.org
 		</description>
 	</maintainer>
+	<use>
+		<flag name="fallback">Use alternative minimal stylesheet instead of tyrian theme.</flag>
+	</use>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-doc/devmanual/, app-doc/devmanual/files/
@ 2020-01-27 21:21 Ulrich Müller
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Müller @ 2020-01-27 21:21 UTC (permalink / raw
  To: gentoo-commits

commit:     49c7c98657b29a3ea8865e4280b150c20b40c249
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 27 21:20:53 2020 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Mon Jan 27 21:21:12 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49c7c986

app-doc/devmanual: Update the live ebuild.

This accounts for several changes in the devmanual repository.

Package-Manager: Portage-2.3.85, Repoman-2.3.20
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 app-doc/devmanual/devmanual-9999.ebuild          | 24 ++++-----
 app-doc/devmanual/files/devmanual-eclasses.patch | 20 +++++++
 app-doc/devmanual/files/devmanual-fallback.patch | 69 +++++++++++++++++++++---
 3 files changed, 94 insertions(+), 19 deletions(-)

diff --git a/app-doc/devmanual/devmanual-9999.ebuild b/app-doc/devmanual/devmanual-9999.ebuild
index 8ad5f06a357..0cd5087804b 100644
--- a/app-doc/devmanual/devmanual-9999.ebuild
+++ b/app-doc/devmanual/devmanual-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -16,12 +16,16 @@ else
 	KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-macos"
 fi
 
-LICENSE="CC-BY-SA-3.0"
+LICENSE="CC-BY-SA-4.0"
 SLOT="0"
 IUSE="+fallback"
 
-BDEPEND="dev-libs/libxslt
-	media-gfx/imagemagick[truetype,svg,png]"
+BDEPEND="dev-libs/libxml2
+	dev-libs/libxslt
+	gnome-base/librsvg
+	media-fonts/open-sans"
+
+PATCHES=( "${FILESDIR}"/${PN}-eclasses.patch )
 
 src_prepare() {
 	default
@@ -29,22 +33,18 @@ src_prepare() {
 }
 
 src_compile() {
-	# Imagemagick uses inkscape (if present) to delegate
-	# svg conversions.
-	# Inkscape uses g_get_user_config_dir () which in turn
-	# uses XDG_CONFIG_HOME to get the config directory for this
-	# user. See bug 463380
-	export XDG_CONFIG_HOME="${T}/inkscape_home"
-	emake
+	emake build
+	use fallback || emake documents.js
 }
 
 src_install() {
 	# clean out XML/XSL before installing
 	find . \( \
 		-iname '*.xml' -o \
+		-iname '*.dtd' -o \
 		-iname '*.xsl' -o \
 		-iname '*.svg' \) -delete || die
-	rm -r README.md xsl LICENSE Makefile || die
+	rm -r bin xsl .git* LICENSE Makefile README.md || die
 
 	local HTML_DOCS=( . )
 	einstalldocs

diff --git a/app-doc/devmanual/files/devmanual-eclasses.patch b/app-doc/devmanual/files/devmanual-eclasses.patch
new file mode 100644
index 00000000000..88b2322c25b
--- /dev/null
+++ b/app-doc/devmanual/files/devmanual-eclasses.patch
@@ -0,0 +1,20 @@
+The offline version doesn't generate eclass manpages.
+Add a dummy file, otherwise internal links would be broken.
+
+--- /dev/null
++++ b/eclass-reference/text.xml
+@@ -0,0 +1,14 @@
++<?xml version="1.0"?>
++<guide self="eclass-reference/">
++<chapter>
++<title>Eclass Reference</title>
++<body>
++
++<note>
++The offline version of the devmanual does not include the documentation for the
++eclasses. If you need it, emerge <c>app-doc/eclass-manpages</c>.
++</note>
++
++</body>
++</chapter>
++</guide>

diff --git a/app-doc/devmanual/files/devmanual-fallback.patch b/app-doc/devmanual/files/devmanual-fallback.patch
index 789451d13b2..9e86cca39c8 100644
--- a/app-doc/devmanual/files/devmanual-fallback.patch
+++ b/app-doc/devmanual/files/devmanual-fallback.patch
@@ -3,20 +3,18 @@ https://bugs.gentoo.org/617724
 
 --- a/devbook.xsl
 +++ b/devbook.xsl
-@@ -439,11 +439,9 @@
-           <xsl:with-param name="append">../</xsl:with-param>
-         </xsl:call-template>
+@@ -451,9 +451,7 @@
        </xsl:variable>
--      <link rel="stylesheet" href="{$relative_path_depth_recursion}devmanual.css" type="text/css" />
-+      <link rel="stylesheet" href="{$relative_path_depth_recursion}fallback.css" type="text/css" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <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." />
 -      <link href="https://assets.gentoo.org/tyrian/bootstrap.min.css" rel="stylesheet" media="screen" />
 -      <link href="https://assets.gentoo.org/tyrian/tyrian.min.css" rel="stylesheet" media="screen" />
+-      <link rel="stylesheet" href="{$relative_path_depth_recursion}devmanual.css" type="text/css" />
++      <link rel="stylesheet" href="{$relative_path_depth_recursion}fallback.css" type="text/css" />
        <link rel="icon" href="https://www.gentoo.org/favicon.ico" type="image/x-icon" />
      </head>
      <body>
-@@ -476,9 +474,6 @@
+@@ -486,9 +484,6 @@
                </div>
                <div class="logo">
                  <a href="/" title="Back to the homepage" class="site-logo">
@@ -26,15 +24,72 @@ https://bugs.gentoo.org/617724
                  </a>
                  <span class="site-label">Development Guide</span>
                </div>
-@@ -566,8 +561,6 @@
+@@ -530,45 +525,7 @@
+             </div>
+           </div>
+         </nav>
+-        <nav class="navbar navbar-grey navbar-stick" id="devmanual-actions" role="navigation">
+-          <div class="container">
+-            <div class="row">
+-              <div class="navbar-header">
+-                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#gw-toolbar">
+-                  <span class="sr-only">Toggle navigation</span>
+-                  <span class="icon-bar"></span>
+-                  <span class="icon-bar"></span>
+-                  <span class="icon-bar"></span>
+-                </button>
+-              </div>
+-              <div class="collapse navbar-collapse" id="gw-toolbar">
+-              <div class="input-group">
+-                <input type="search" name="search" placeholder="Search" title="Search Gentoo Developer Manual [f]" accesskey="f" id="searchInput" class="form-control" onclick="fetchDocuments()"/>
+-                <div class="input-group-btn">
+-                  <input type="submit" name="fulltext" value="Search" title="Search the pages for this text" id="mw-searchButton" class="searchButton btn btn-default" onclick="search()"/>
+-                </div>
+-              </div>
+-            </div>
+-          </div>
+-        </div>
+-      </nav>
+       </header>
+-      <div id="searchResults" class="modal fade" role="dialog">
+-        <div class="modal-dialog">
+-          <div class="modal-content">
+-            <div class="modal-header">
+-              <button type="button" class="close" data-dismiss="modal">x</button>
+-              <h4 class="modal-title">Search Results</h4>
+-            </div>
+-            <div class="modal-body">
+-              <p>No results found.</p>
+-            </div>
+-            <div class="modal-footer">
+-              <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
+-            </div>
+-          </div>
+-        </div>
+-      </div>
+       <div class="container">
+         <div class="row">
+           <div class="col-md010">
+@@ -613,19 +570,7 @@
            </div>
          </div>
        </footer>
 -      <script src="https://assets.gentoo.org/tyrian/jquery.min.js"></script>
 -      <script src="https://assets.gentoo.org/tyrian/bootstrap.min.js"></script>
+-      <script src="https://assets.gentoo.org/lunr/lunr.min.js"></script>
+-      <xsl:variable name="relative_path_depth" select="string-length(/guide/@self)-string-length(translate(/guide/@self, '/' , ''))"/>
+-      <xsl:variable name="relative_path_depth_recursion">
+-          <xsl:call-template name="str:repeatString">
+-            <xsl:with-param name="count" select="$relative_path_depth"/>
+-            <xsl:with-param name="append">../</xsl:with-param>
+-          </xsl:call-template>
+-      </xsl:variable>
+-      <script><xsl:text>var documentsSrc = "</xsl:text><xsl:value-of select="$relative_path_depth_recursion"/><xsl:text>documents.js"</xsl:text></script>
+-      <script src="{$relative_path_depth_recursion}search.js"></script>
      </body>
      </html>
    </xsl:template>
+ 
 --- /dev/null
 +++ b/fallback.css
 @@ -0,0 +1,20 @@


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-27 21:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-27 21:21 [gentoo-commits] repo/gentoo:master commit in: app-doc/devmanual/, app-doc/devmanual/files/ Ulrich Müller
  -- strict thread matches above, loose matches on Subject: below --
2019-06-23 18:10 Ulrich Müller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox