dev-libs/md4c: new package, add 0.5.2

moved from ::guru, with some fixes and added test

Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org>
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Alexey Sokolov
2025-03-26 00:42:13 +00:00
committed by Sam James
parent c25c4c9888
commit e13dada4ff
3 changed files with 68 additions and 0 deletions

1
dev-libs/md4c/Manifest Normal file
View File

@@ -0,0 +1 @@
DIST md4c-0.5.2.tar.gz 237973 BLAKE2B 7f3f80c1bcfa3040b4458876abc8eabbad387242fbdcde08b34d9a279da56e4c2264a591deb6ad3061c951b4ca547f896589682aa5c6b50febfc03b89c61be3e SHA512 30607ba39d6c59329f5a56a90cd816ff60b82ea752ac2b9df356d756529cfc49170019fae5df32fa94afc0e2a186c66eaf56fa6373d18436c06ace670675ba85

View File

@@ -0,0 +1,50 @@
# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..13} )
inherit cmake python-any-r1
DESCRIPTION="C Markdown parser. Fast, SAX-like interface, CommonMark Compliant."
HOMEPAGE="https://github.com/mity/md4c"
# TODO(NRK):
# - useflag for static lib (?)
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/mity/md4c.git"
else
SRC_URI="https://github.com/mity/md4c/archive/refs/tags/release-${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/md4c-release-${PV}"
KEYWORDS="~amd64"
fi
LICENSE="MIT test? ( CC-BY-SA-4.0 )"
SLOT="0"
IUSE="+md2html test"
REQUIRED_USE="test? ( md2html )"
RESTRICT="!test? ( test )"
BDEPEND="test? ( ${PYTHON_DEPS} )"
pkg_setup() {
use test && python-any-r1_pkg_setup
}
src_configure() {
mycmakeargs=(
-DBUILD_SHARED_LIBS=ON
-DBUILD_MD2HTML_EXECUTABLE=$(usex md2html)
)
cmake_src_configure
}
src_test() {
pushd "${BUILD_DIR}" || die
# Uses python internally
"${S}"/scripts/run-tests.sh || die
popd
}

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person" proxied="yes">
<email>nrk@disroot.org</email>
</maintainer>
<maintainer type="project" proxied="proxy">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
<use>
<flag name="md2html">Build the md2html cli tool</flag>
</use>
<upstream>
<remote-id type="github">mity/md4c</remote-id>
</upstream>
</pkgmetadata>