mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
angelscript: new recipe (#7077)
This commit is contained in:
64
dev-libs/angelscript/angelscript-2.35.1.recipe
Normal file
64
dev-libs/angelscript/angelscript-2.35.1.recipe
Normal file
@@ -0,0 +1,64 @@
|
||||
SUMMARY="A flexible cross-platform scripting library"
|
||||
DESCRIPTION="The AngelCode Scripting Library, or AngelScript as it is also known, \
|
||||
is an extremely flexible cross-platform scripting library designed to allow applications to \
|
||||
extend their functionality through external scripts. It has been designed from the beginning \
|
||||
to be an easy to use component, both for the application programmer and the script writer"
|
||||
HOMEPAGE="http://www.angelcode.com/angelscript/"
|
||||
COPYRIGHT="2003-2021 Andreas Jönsson"
|
||||
LICENSE="Zlib"
|
||||
REVISION="1"
|
||||
SOURCE_URI="http://www.angelcode.com/angelscript/sdk/files/angelscript_$portVersion.zip"
|
||||
CHECKSUM_SHA256="5c1096b6d6cf50c7e77ae93c736d35b69b07b1e5047161c7816bca25b413a18b"
|
||||
SOURCE_DIR="sdk"
|
||||
PATCHES="angelscript-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
angelscript$secondaryArchSuffix = $portVersion
|
||||
lib:libangelscript$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
angelscript${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libangelscript$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_devel="
|
||||
angelscript$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
defineDebugInfoPackage angelscript$secondaryArchSuffix \
|
||||
"$libDir"/libangelscript.so \
|
||||
"$libDir"/libangelscript.so.${portVersion}
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cd angelscript/projects/cmake
|
||||
cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
$cmakeDirArgs \
|
||||
-DCMAKE_INSTALL_LIBDIR="$libDir" -DBUILD_SHARED_LIBS=ON
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd angelscript/projects/cmake
|
||||
make install
|
||||
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$libDir/cmake
|
||||
}
|
||||
50
dev-libs/angelscript/patches/angelscript-2.35.1.patchset
Normal file
50
dev-libs/angelscript/patches/angelscript-2.35.1.patchset
Normal file
@@ -0,0 +1,50 @@
|
||||
From dc1e8454539eff1871310c764ac9a1cce66537bc Mon Sep 17 00:00:00 2001
|
||||
From: Victor Gamper <victor@wenzeslaus.de>
|
||||
Date: Sat, 27 Aug 2022 19:03:59 +0200
|
||||
Subject: angelscript: add install directory options
|
||||
|
||||
|
||||
diff --git a/angelscript/projects/cmake/CMakeLists.txt b/angelscript/projects/cmake/CMakeLists.txt
|
||||
index a4f200b..a2363e2 100644
|
||||
--- a/angelscript/projects/cmake/CMakeLists.txt
|
||||
+++ b/angelscript/projects/cmake/CMakeLists.txt
|
||||
@@ -4,6 +4,8 @@ project(angelscript)
|
||||
|
||||
option(BUILD_SHARED_LIBS "Build shared library" OFF)
|
||||
option(AS_NO_EXCEPTIONS "Disable exception handling in script context" OFF)
|
||||
+set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE STRING "The include directory to install to")
|
||||
+set(CMAKE_INSTALL_LIBDIR "lib" CACHE STRING "The library directory to install to")
|
||||
|
||||
if(MSVC)
|
||||
option(MSVC_COMPILE_FLAGS "Compiler flags to use with MSVC" "/MP")
|
||||
@@ -192,14 +194,14 @@ endif()
|
||||
#See https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#creating-packages for a detailed explanation about this part
|
||||
install(TARGETS ${ANGELSCRIPT_LIBRARY_NAME} EXPORT AngelscriptTargets
|
||||
RUNTIME DESTINATION bin
|
||||
- LIBRARY DESTINATION lib
|
||||
- ARCHIVE DESTINATION lib
|
||||
- INCLUDES DESTINATION include
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
||||
|
||||
install(FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../include/angelscript.h
|
||||
- DESTINATION include
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
COMPONENT Devel
|
||||
)
|
||||
|
||||
@@ -219,7 +221,7 @@ configure_file(cmake/AngelscriptConfig.cmake
|
||||
COPYONLY
|
||||
)
|
||||
|
||||
-set(ConfigPackageLocation lib/cmake/Angelscript)
|
||||
+set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/Angelscript)
|
||||
install(EXPORT AngelscriptTargets
|
||||
FILE AngelscriptTargets.cmake
|
||||
NAMESPACE Angelscript::
|
||||
--
|
||||
2.36.1
|
||||
|
||||
Reference in New Issue
Block a user