editorconfig-core-c: new recipe (#9998)

* editorconfig-core-c: new recipe

For potential editorconfig support in Genio

* editorconfig-core-c: x86 fixes

* fixup whitespace

* add missing requirement to the devel package
This commit is contained in:
Joachim Mairböck
2024-01-18 11:21:05 +01:00
committed by GitHub
parent c7f751c15e
commit beafe6a38f

View File

@@ -0,0 +1,91 @@
SUMMARY="EditorConfig core library written in C"
DESCRIPTION="EditorConfig makes it easy to maintain the correct coding style when switching \
between different text editors and between different projects. The EditorConfig project maintains \
a file format and plugins for various text editors which allow this file format to be read and \
used by those editors. For information on the file format and supported text editors, see the \
EditorConfig website."
HOMEPAGE="http://editorconfig.org/"
COPYRIGHT="2011-2013 EditorConfig Team, including Hong Xu and Trey Hunner
2014 Hong Xu"
LICENSE="BSD (2-clause)"
REVISION="1"
SOURCE_URI="https://sourceforge.net/projects/editorconfig/files/EditorConfig-C-Core/$portVersion/Source/editorconfig-core-c.tar.gz"
CHECKSUM_SHA256="8c18dea5faa5105f83466ebee88f1cbc262d8912f546f8b33f547541c821446d"
SOURCE_DIR="editorconfig-core-c"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
PROVIDES="
editorconfig_core_c$secondaryArchSuffix = $portVersion
cmd:editorconfig$commandSuffix = $portVersion
cmd:editorconfig_$portVersion$commandSuffix = $portVersion
lib:libeditorconfig$secondaryArchSuffix = $portVersion compat >= 0
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libpcre2_8$secondaryArchSuffix
"
PROVIDES_devel="
editorconfig_core_c${secondaryArchSuffix}_devel = $portVersion
devel:libeditorconfig$secondaryArchSuffix = $portVersion compat >= 0
"
REQUIRES_devel="
editorconfig_core_c$secondaryArchSuffix == $portVersion base
devel:libpcre2_8$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libpcre2_8$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:dot
cmd:doxygen
cmd:gcc$secondaryArchSuffix
cmd:make
"
BUILD()
{
cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \
$cmakeDirArgs -DCMAKE_INSTALL_BINDIR=$commandBinDir \
-DINSTALL_HTML_DOC=ON
make -C build $jobArgs
}
INSTALL()
{
make -C build install
# remove static library
rm $libDir/libeditorconfig_static.a
prepareInstalledDevelLib libeditorconfig
fixPkgconfig
# move html docs to the correct place
mkdir -p $(getPackagePrefix devel)/$relativeDocDir
mv $dataDir/doc/editorconfig/* $(getPackagePrefix devel)/$relativeDocDir
rm -r $dataDir/doc
packageEntries devel \
$developDir \
$libDir/cmake \
$manDir/man3
}
TEST()
{
make -C build test
}