SmallerC: new recipe

This commit is contained in:
PulkoMandy
2025-06-22 22:38:16 +02:00
parent 02a90de531
commit b53a4f74d0

View File

@@ -0,0 +1,59 @@
SUMMARY="Simple C compiler"
DESCRIPTION="Smaller C is a simple and small single-pass C compiler, \
currently supporting most of the C language common between C89/ANSI C \
and C99 (minus some C89 and plus some C99 features).
Currently it generates 16-bit and 32-bit 80386+ assembly code for NASM \
that can then be assembled and linked into DOS, Windows, Linux and Mac OS X \
programs. \
(You may use YASM or FASM instead of NASM)
Code generation for MIPS CPUs is also supported (primarily for RetroBSD)."
HOMEPAGE="https://github.com/alexfru/SmallerC"
COPYRIGHT="2012-2024, Alexey Frunze"
LICENSE="BSD (2-clause)"
SOURCE_URI="https://github.com/alexfru/SmallerC/archive/refs/tags/v1.0.2+dos.win.b120a9c.tar.gz"
SOURCE_DIR="SmallerC-1.0.2-dos.win.b120a9c"
CHECKSUM_SHA256="1e26ed8da461614da26379b7be1510f0e39f52a292fd0d9e54d747664f0c7ef4"
REVISION="1"
ARCHITECTURES="all"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
smallerc$secondaryArchSuffix = $portVersion
cmd:n2f
cmd:smlrc
cmd:smlrcc
cmd:smlrl
cmd:smlrpp
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:awk
cmd:make
cmd:nasm
cmd:gcc$secondaryArchSuffix
"
BUILD()
{
runConfigure ./configure
make prefix=$developDir/tools/smlrc $jobArgs
}
INSTALL()
{
make prefix=$developDir/tools/smlrc install
mkdir -p $prefix/bin
for tool in n2f smlrc smlrcc smlrl smlrpp ; do
symlinkRelative -sfn $developDir/tools/smlrc/bin/$tool $prefix/bin
done
}