commit:     7af5e5f49f30955e9e4f007cb7e8001664b4cd8c
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 18 00:14:13 2025 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Nov 18 01:43:03 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7af5e5f4

app-text/mdbook: add 0.5.0

This is a new major version with breaking changes that may require
migration and/or ebuild adjusting given it can create output files
in a different directory depending on how it is used.

Could've considered adding it masked/unkeyworded (or *gasp*, slotted)
but, given there is only one revdep, it can be easily adjusted.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 app-text/mdbook/Manifest            |  2 ++
 app-text/mdbook/mdbook-0.5.0.ebuild | 52 +++++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+)

diff --git a/app-text/mdbook/Manifest b/app-text/mdbook/Manifest
index b59518a45184..e650e519bbb4 100644
--- a/app-text/mdbook/Manifest
+++ b/app-text/mdbook/Manifest
@@ -1,2 +1,4 @@
 DIST mdbook-0.4.52-vendor.tar.xz 8394076 BLAKE2B 
d1e23df18d747cde8dae3b51ad300a4310f25ecd017a3524287f8c08266726298c1028ac8c57486f877d99b8afd0dcf7113836ae265348e8509cd76696dc5005
 SHA512 
9d83e68d9c06585220033ad4c92dae6af46f62297da7218acfb90818ca33a7a7e70a3e1152ff27a4587e82da3ee5da1bad0cffe7d140709ead078a6a3ef53eef
 DIST mdbook-0.4.52.tar.gz 1558690 BLAKE2B 
51a942768eec85156f62e65a9c99aa5b409db05ae60b2b1dca66d6b274f768cdf44f0cd3dd21a3cb17951f64f298626ab1838098073a86b2fdf8a7aec2ead782
 SHA512 
c7b706c5373571a2a55c0e09e79d822db55a150c33a267d60383113fa54ab031616cc90aa6a4240a78ff602f9116d84a20575f1fb8defc0529ad2d578a34cd71
+DIST mdbook-0.5.0-vendor.tar.xz 7823968 BLAKE2B 
320177583909d42f8d8593464409fec4769a7d23db4d5acce9910728df0c052dfcaad6ec31ff01ebde96f1abb87cb7290a4ae2c6a9db6d4e2a5a01b06883cf24
 SHA512 
151313ef892815716e093e56cef2ce75f354603394ab19a540c446bcd27b5c34e45313b5c6dd46d6245ef1f884f540570ccfcddda89ee12ff031742b33322c5a
+DIST mdbook-0.5.0.tar.gz 970041 BLAKE2B 
099ac299730e55c2c02472367b61906d5f80dc641aec6af38256ad577fff41cfc6a904b5c31a6797f1bf3f081b443b0f72fe3ffa749eaa5d54d5c024eb66e848
 SHA512 
2b206e1120a778c43aaf7ba311f8e308a56ac0af877c54c01ff573b3b886cd5ddb894c7722f3cba0e54df281a521a6df59eefbafa11e5901020ffb519e034e89

diff --git a/app-text/mdbook/mdbook-0.5.0.ebuild 
b/app-text/mdbook/mdbook-0.5.0.ebuild
new file mode 100644
index 000000000000..36d32f5365e8
--- /dev/null
+++ b/app-text/mdbook/mdbook-0.5.0.ebuild
@@ -0,0 +1,52 @@
+# Copyright 2021-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+RUST_MIN_VER=1.85.0
+inherit cargo toolchain-funcs
+
+DESCRIPTION="Create a book from markdown files"
+HOMEPAGE="https://rust-lang.github.io/mdBook/";
+SRC_URI="
+       https://github.com/rust-lang/mdBook/archive/refs/tags/v${PV}.tar.gz
+               -> ${P}.tar.gz
+       https://dev.gentoo.org/~ionen/distfiles/${P}-vendor.tar.xz
+"
+S=${WORKDIR}/${P/b/B}
+
+# OFL-1.1: embeds fonts inside the executable
+LICENSE="MPL-2.0 OFL-1.1"
+LICENSE+="
+       Apache-2.0 BSD CC-BY-4.0 CC0-1.0 ISC MIT MPL-2.0 Unicode-3.0
+" # crates
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="doc"
+
+QA_FLAGS_IGNORED="usr/bin/${PN}"
+
+src_compile() {
+       cargo_src_compile
+
+       if use doc; then
+               if tc-is-cross-compiler; then
+                       ewarn "html docs were skipped due to cross-compilation"
+               else
+                       "$(cargo_target_dir)"/${PN} build -d "${T}"/html guide 
|| die
+               fi
+       fi
+}
+
+src_test() {
+       local -x COLUMNS=100 #960393
+
+       cargo_src_test
+}
+
+src_install() {
+       cargo_src_install
+
+       dodoc CHANGELOG.md README.md
+       use doc && ! tc-is-cross-compiler && dodoc -r "${T}"/html
+}

Reply via email to