Files
haikuports/dev-cpp/antlr-cpp/antlr_cpp-4.11.1.recipe
Joachim Mairböck 91ce40611b antlr: new recipes antlr_tool, antlr_runtime and antlr_cpp (#7834)
* antlr_tool is the grammar compiler
 * antlr_runtime is the Java runtime (this is also part of antlr_tool)
 * antlr_cpp is the C++ runtime

antlr_tool and antlr_runtime are not built from source, they just repack the downloaded JAR files.
2023-02-11 09:21:20 +01:00

74 lines
1.6 KiB
Bash

SUMMARY="The ANTLR Parser Generator (C++ runtime)"
DESCRIPTION="ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for \
reading, processing, executing, or translating structured text or binary files. It's widely used \
to build languages, tools, and frameworks. From a grammar, ANTLR generates a parser that can \
build and walk parse trees."
HOMEPAGE="https://www.antlr.org/"
COPYRIGHT="2012-2022 The ANTLR Project"
LICENSE="BSD (3-clause)"
REVISION="1"
SOURCE_URI="https://www.antlr.org/download/antlr4-cpp-runtime-$portVersion-source.zip"
CHECKSUM_SHA256="8018c335316e61bb768e5bd4a743a9303070af4e1a8577fa902cd053c17249da"
SOURCE_DIR=""
PATCHES="antlr_cpp-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
antlr_cpp$secondaryArchSuffix = $portVersion
lib:libantlr4_runtime$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
antlr_cpp${secondaryArchSuffix}_devel = $portVersion
devel:libantlr4_runtime$secondaryArchSuffix = $portVersion
"
REQUIRES_devel="
antlr_cpp$secondaryArchSuffix == $portVersion base
cmd:antlr4
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libgtest$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:find # required for fixCMake
cmd:make
cmd:gcc$secondaryArchSuffix
"
BUILD()
{
mkdir -p build
cd build
cmake .. $cmakeDirArgs \
-DCMAKE_BUILD_TYPE=Release \
-DANTLR_BUILD_STATIC=OFF \
-DANTLR4_INSTALL=ON
make $jobArgs
}
INSTALL()
{
cd build
make install
prepareInstalledDevelLib libantlr4-runtime
fixCMake
packageEntries devel \
$developDir
}
TEST()
{
cd build
make test
}