SUMMARY="A light-weight scripting language" DESCRIPTION="Squirrel is a light weight programming language featuring higher-order \ functions, classes/inheritance, delegation, tail recursion, generators, \ cooperative threads, exception handling, reference counting and garbage \ collection on demand. C-like syntax." HOMEPAGE="http://www.squirrel-lang.org" COPYRIGHT="2003-2016 Alberto Demichelis" LICENSE="MIT" REVISION="1" SOURCE_URI="https://github.com/albertodemichelis/squirrel/archive/v$portVersion.tar.gz" CHECKSUM_SHA256="02805414cfadd5bbb921891d3599b83375a40650abd6404a8ab407dc5e86a996" # Grabbed from Gentoo PATCHES="squirrel-3.2-CVE-2022-30292.patch" ARCHITECTURES="all !x86_gcc2" SECONDARY_ARCHITECTURES="x86" commandBinDir=$binDir commandSuffix=$secondaryArchSuffix if [ "$targetArchitecture" = x86_gcc2 ]; then commandSuffix= commandBinDir=$prefix/bin fi libVersion="0.0.0" libVersionCompat="$libVersion compat >= ${libVersion%%.*}" PROVIDES=" squirrel$secondaryArchSuffix = $portVersion cmd:sq$commandSuffix = $portVersion lib:libsqstdlib$secondaryArchSuffix = $libVersionCompat lib:libsquirrel$secondaryArchSuffix = $libVersionCompat " REQUIRES=" haiku$secondaryArchSuffix " PROVIDES_devel=" squirrel${secondaryArchSuffix}_devel = $portVersion devel:libsqstdlib$secondaryArchSuffix = $libVersionCompat devel:libsquirrel$secondaryArchSuffix = $libVersionCompat " REQUIRES_devel=" squirrel$secondaryArchSuffix == $portVersion base " BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel " BUILD_PREREQUIRES=" cmd:cmake cmd:gcc$secondaryArchSuffix cmd:make " BUILD() { cmake -B build -S . -DCMAKE_BUILD_TYPE=Release \ $cmakeDirArgs \ -DCMAKE_INSTALL_BINDIR=$commandBinDir \ -DDISABLE_STATIC=ON make -C build $jobArgs } INSTALL() { make -C build install prepareInstalledDevelLibs libsqstdlib libsquirrel # Add pkgconfig file mkdir -p $developLibDir/pkgconfig cat > $developLibDir/pkgconfig/squirrel.pc << EOF bindir=$commandBinDir exec_prefix=$prefix libdir=$libDir includedir=$includeDir Name: squirrel Description: $SUMMARY Version: $portVersion Libs: -L${developLibDir} -lsqstdlib -lsquirrel Cflags: -I${includeDir} EOF packageEntries devel \ $developDir \ $libDir/cmake }