Colm+ragel (#2163)

This commit is contained in:
miqlas
2018-02-14 01:47:10 +01:00
committed by waddlesplash
parent 7eafec092d
commit 3874bad10d
2 changed files with 167 additions and 0 deletions

View File

@@ -0,0 +1,77 @@
SUMMARY="COmputer Language Manipulation"
DESCRIPTION="Colm is a programming language designed for the analysis and \
transformation of computer languages. Colm is influenced primarily by TXL. It \
is in the family of program transformation languages."
HOMEPAGE="https://www.colm.net/open-source/colm/"
COPYRIGHT="2006-2016 Adrian Thurston"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://www.colm.net/files/colm/colm-$portVersion.tar.gz"
CHECKSUM_SHA256="33e624677176958eaad76ebe6c391a68a0b4728fec8cc039efa1316f525f408c"
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
SECONDARY_ARCHITECTURES="?x86"
commandBinDir=$binDir
commandSuffix=$secondaryArchSuffix
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandBinDir=$prefix/bin
commandSuffix=
fi
PROVIDES="
colm$secondaryArchSuffix = $portVersion
cmd:colm$commandSuffix = $binVersionCompat
lib:libcolm_$portVersion$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
colm${secondaryArchSuffix}_devel = $portVersion
devel:libcolm$secondaryArchSuffix = $portVersion
"
REQUIRES_devel="
colm$secondaryArchSuffix == $portVersion base
haiku${secondaryArchSuffix}_devel
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:asciidoc
cmd:autoreconf
cmd:awk
cmd:grep
cmd:g++$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:sed
"
defineDebugInfoPackage colm$secondaryArchSuffix \
$commandBinDir/colm \
$libDir/libcolm-$portVersion.so
BUILD()
{
autoreconf -i
runConfigure --omit-dirs "binDir" ./configure \
--bindir=$commandBinDir
make $jobArgs
}
INSTALL()
{
make install
rm $libDir/libcolm.la
prepareInstalledDevelLib libcolm
fixPkgconfig
packageEntries devel $developDir
}

View File

@@ -0,0 +1,90 @@
SUMMARY="Compiles executable finite state machines from regular languages"
DESCRIPTION="Ragel compiles executable finite state machines from regular \
languages. Ragel targets C, C++, Objective-C, C#, D, Java, Ruby, OCaml and Go.
Ragel state machines can not only recognize byte sequences as regular \
expression machines do, but can also execute code at arbitrary points in the \
recognition of a regular language.
Code embedding is done using inline operators that do not disrupt the regular \
language syntax."
HOMEPAGE="https://www.colm.net/open-source/ragel/"
COPYRIGHT="2001-2016 Adrian Thurston
2007 Victor Hugo Borja
2011 Josef Goettgens"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://www.colm.net/files/ragel/ragel-$portVersion.tar.gz"
CHECKSUM_SHA256="40562bcac66a22dbea8357a35745bbcb1ab596c262d8691145ee11aafa6f8dec"
ARCHITECTURES="?x86_gcc2 ?x86 x86_64"
SECONDARY_ARCHITECTURES="?x86"
commandBinDir=$binDir
commandSuffix=$secondaryArchSuffix
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandBinDir=$prefix/bin
commandSuffix=
fi
binVersionCompat="$portVersion compat >= ${portVersion%.*.*}"
libVersion="0.0.0"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
ragel$secondaryArchSuffix = $portVersion
cmd:ragel$commandSuffix = $binVersionCompat
lib:libfsm$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
colm$secondaryArchSuffix
"
PROVIDES_devel="
ragel${secondaryArchSuffix}_devel = $portVersion
devel:libfsm$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
ragel$secondaryArchSuffix == $portVersion base
haiku${secondaryArchSuffix}_devel
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcolm$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:asciidoc
cmd:autoreconf
cmd:awk
cmd:colm
cmd:grep
cmd:g++$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:sed
"
defineDebugInfoPackage ragel$secondaryArchSuffix \
$commandBinDir/ragel \
$libDir/libfsm.so.$libVersion
BUILD()
{
autoreconf -i
runConfigure --omit-dirs "binDir" ./configure \
--bindir=$commandBinDir
make $jobArgs
}
INSTALL()
{
make install
rm $libDir/libfsm.la
prepareInstalledDevelLib libfsm
fixPkgconfig
packageEntries devel $developDir
}