md4c: bump to version 0.4.8 (#7251)

* md4c: bump to version 0.4.8

* md4c: Updated package description. No functional change.

* Recipe cleanups/improvements after Begasus suggestions.
This commit is contained in:
OscarL
2022-10-09 11:00:10 -03:00
committed by GitHub
parent 7cf43be6ce
commit 83fc1d287d
2 changed files with 90 additions and 73 deletions

View File

@@ -1,73 +0,0 @@
SUMMARY="A C Markdown parser"
DESCRIPTION="MD4C is C Markdown parser which: \
* aims to be compliant to the latest version of the CommonMark specification, \
* supports some commonly requested and accepted extensions, \
* is implemented in one source file and one header file, \
* is easy to reuse in other projects, \
* parses the complete document and calls callback functions, \
* is performant"
HOMEPAGE="https://github.com/mity/md4c/"
COPYRIGHT="2016-2019 Martin Mitáš"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="$HOMEPAGE/archive/release-$portVersion.tar.gz"
CHECKSUM_SHA256="cf3f6b75d4b1304551a68272d3b403e4cd0952d976a280e8b7db68090354486f"
SOURCE_DIR="md4c-release-$portVersion"
ARCHITECTURES="all !x86_gcc2 ?x86"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
md4c$secondaryArchSuffix = $portVersion
cmd:md2html$secondaryArchSuffix
lib:libmd4c$secondaryArchSuffix = $portVersion compat >= 0
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
md4c${secondaryArchSuffix}_devel = $portVersion
devel:libmd4c$secondaryArchSuffix = $portVersion compat >= 0
"
REQUIRES_devel="
md4c$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
"
BUILD()
{
mkdir -p build
cd build
cmake .. $cmakeDirArgs
make $jobArgs
}
INSTALL()
{
cd build
make install
prepareInstalledDevelLibs libmd4c
fixPkgconfig
# devel package
packageEntries devel \
$developDir \
$libDir/cmake
}
TEST()
{
cd build
make check
}

View File

@@ -0,0 +1,90 @@
SUMMARY="A C Markdown parser"
DESCRIPTION="MD4C is Markdown parser implementation in C, with the following features:
* Compliance: Generally, MD4C aims to be compliant to the latest version of CommonMark specification. Currently, we are fully compliant to CommonMark 0.30.
* Extensions: MD4C supports some commonly requested and accepted extensions.
* Performance: MD4C is very fast.
* Compactness: MD4C parser is implemented in one source file and one header file. There are no dependencies other than standard C library.
* Embedding: MD4C parser is easy to reuse in other projects, its API is very straightforward: There is actually just one function, md_parse().
* Push model: MD4C parses the complete document and calls few callback functions provided by the application to inform it about a start/end of every block, a start/end of every span, and with any textual contents.
* Portability: MD4C builds and works on Windows and POSIX-compliant OSes.
* Encoding: MD4C by default expects UTF-8 encoding of the input document.
* Permissive license: MD4C is available under the MIT license.
"
HOMEPAGE="https://github.com/mity/md4c/"
COPYRIGHT="2016-2021 Martin Mitáš"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="$HOMEPAGE/archive/release-$portVersion.tar.gz"
CHECKSUM_SHA256="4a457df853425b6bb6e3457aa1d1a13bccec587a04c38c622b1013a0da41439f"
SOURCE_DIR="md4c-release-$portVersion"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
commandBinDir=$binDir
commandSuffix=$secondaryArchSuffix
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandBinDir=$prefix/bin
commandSuffix=
fi
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
md4c$secondaryArchSuffix = $portVersion
cmd:md2html$commandSuffix
lib:libmd4c$secondaryArchSuffix = $libVersionCompat
lib:libmd4c_html$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
md4c${secondaryArchSuffix}_devel = $portVersion
devel:libmd4c$secondaryArchSuffix = $portVersion compat >= 0
devel:libmd4c_html$secondaryArchSuffix = $portVersion compat >= 0
"
REQUIRES_devel="
md4c$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
"
TEST_REQUIRES="
cmd:python3
"
BUILD()
{
cmake -B build -S . $cmakeDirArgs -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_BINDIR=$commandBinDir
make -C build $jobArgs
}
INSTALL()
{
make -C build install
prepareInstalledDevelLibs libmd4c libmd4c-html
fixPkgconfig
# devel package
packageEntries devel \
$developDir \
$libDir/cmake
}
TEST()
{
cd build
../scripts/run-tests.sh
}