surgescript, new recipe (#7001)

This commit is contained in:
Schrijvers Luc
2022-06-25 08:18:39 +02:00
committed by GitHub
parent 0a0f4b00a9
commit 958cde1076
2 changed files with 103 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
From c177556cc9b9fb0622426dcd9a5b80b2613ecc93 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Fri, 24 Jun 2022 15:07:20 +0200
Subject: surgescript, fix install path for the headers
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e65971e..65ba7d0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,6 +29,7 @@ option(WANT_STATIC "Build SurgeScript as a static library" ON)
option(WANT_EXECUTABLE "Build the surgescript executable" ON)
set(LIB_SUFFIX "" CACHE STRING "Suffix to append to 'lib' directories, e.g., '64'") # libs must be installed to "lib64" in some systems
set(PKGCONFIG_PATH "lib${LIB_SUFFIX}/pkgconfig" CACHE PATH "Destination folder of the pkg-config (.pc) file")
+set(INCLUDE_PATH "include" CACHE PATH "Destination for the header files")
if(UNIX)
set(METAINFO_PATH "share/metainfo" CACHE PATH "Destination folder of the metainfo file")
set(ICON_PATH "share/pixmaps" CACHE PATH "Destination folder of the icon file")
@@ -155,8 +156,8 @@ if(WANT_STATIC)
endif()
# Install headers
-install(DIRECTORY src/ DESTINATION include FILES_MATCHING PATTERN "*.h")
-install(DIRECTORY "${CMAKE_BINARY_DIR}/src/" DESTINATION include FILES_MATCHING PATTERN "*.h")
+install(DIRECTORY src/ DESTINATION ${INCLUDE_PATH} FILES_MATCHING PATTERN "*.h")
+install(DIRECTORY "${CMAKE_BINARY_DIR}/src/" DESTINATION ${INCLUDE_PATH} FILES_MATCHING PATTERN "*.h")
# Build the executable
if(WANT_EXECUTABLE)
--
2.36.1

View File

@@ -0,0 +1,71 @@
SUMMARY="A scripting language for games"
DESCRIPTION="SurgeScript is a scripting language for games.
Use it to unleash your creativity and build your own amazing interactive content!
It's such a joy to use SurgeScript! You will love it!"
HOMEPAGE="https://github.com/alemart/surgescript/"
COPYRIGHT="2016-2021 Alexandre Martins"
LICENSE="Apache v2"
REVISION="1"
SOURCE_URI="https://github.com/alemart/surgescript/archive/refs/tags/v$portVersion.tar.gz"
CHECKSUM_SHA256="c9f59131d5cd921a11fb1335fe93bd754f4b1eefa1ed95aaa0343a28437f3f78"
PATCHES="surgescript-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
surgescript$secondaryArchSuffix = $portVersion
cmd:surgescript
lib:libsurgescript$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
surgescript${secondaryArchSuffix}_devel = $portVersion
devel:libsurgescript$secondaryArchSuffix = $portVersion
devel:libsurgescript_static$secondaryArchSuffix = $portVersion
"
REQUIRES_devel="
surgescript$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 \
-DCMAKE_INSTALL_PREFIX=$prefix \
-DLIB_SUFFIX=$secondaryArchSubDir \
-DINCLUDE_PATH=$includeDir
make -C build $jobArgs
}
INSTALL()
{
make -C build install
rm -rf $prefix/share
prepareInstalledDevelLibs libsurgescript \
libsurgescript-static
fixPkgconfig
packageEntries devel \
$developDir
}
TEST()
{
make tests
}