mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
xmake, new recipe (#9893)
This commit is contained in:
committed by
GitHub
parent
1cebc48d9b
commit
1f39c5f8ca
55
dev-util/xmake/patches/xmake-2.8.5.patchset
Normal file
55
dev-util/xmake/patches/xmake-2.8.5.patchset
Normal file
@@ -0,0 +1,55 @@
|
||||
From 5ce1f116e81b981daac2e58d5c3c07557b574214 Mon Sep 17 00:00:00 2001
|
||||
From: Christof Meerwald <cmeerw@cmeerw.org>
|
||||
Date: Fri, 15 Dec 2023 14:56:01 +0000
|
||||
Subject: [PATCH] adjust fallback for Haiku OS
|
||||
|
||||
---
|
||||
core/src/xmake/engine.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/core/src/xmake/engine.c b/core/src/xmake/engine.c
|
||||
index f1b0b381b..7469e7878 100644
|
||||
--- a/core/src/xmake/engine.c
|
||||
+++ b/core/src/xmake/engine.c
|
||||
@@ -682,8 +682,13 @@ static tb_size_t xm_engine_get_program_file(xm_engine_t* engine, tb_char_t* path
|
||||
static tb_char_t const* s_paths[] =
|
||||
{
|
||||
"~/.local/bin/xmake",
|
||||
+#if defined(TB_CONFIG_OS_HAIKU)
|
||||
+ "~/config/bin/xmake",
|
||||
+ "/boot/system/bin/xmake"
|
||||
+#else
|
||||
"/usr/local/bin/xmake",
|
||||
"/usr/bin/xmake"
|
||||
+#endif
|
||||
};
|
||||
for (tb_size_t i = 0; i < tb_arrayn(s_paths); i++)
|
||||
{
|
||||
--
|
||||
2.42.0
|
||||
|
||||
From 6666b40bd8952d198b510dad0c24a912ce66350e Mon Sep 17 00:00:00 2001
|
||||
From: Christof Meerwald <cmeerw@cmeerw.org>
|
||||
Date: Fri, 15 Dec 2023 21:32:27 +0000
|
||||
Subject: [PATCH] disable root user check for Haiku
|
||||
|
||||
---
|
||||
xmake/core/main.lua | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/xmake/core/main.lua b/xmake/core/main.lua
|
||||
index db284c431..f3412d1d1 100644
|
||||
--- a/xmake/core/main.lua
|
||||
+++ b/xmake/core/main.lua
|
||||
@@ -266,7 +266,7 @@ function main.entry()
|
||||
end
|
||||
|
||||
-- check run command as root
|
||||
- if not option.get("root") and os.getenv("XMAKE_ROOT") ~= 'y' then
|
||||
+ if not option.get("root") and os.getenv("XMAKE_ROOT") ~= 'y' and os.host() ~= 'haiku' then
|
||||
if os.isroot() then
|
||||
errors = [[Running xmake as root is extremely dangerous and no longer supported.
|
||||
As xmake does not drop privileges on installation you would be giving all
|
||||
--
|
||||
2.42.0
|
||||
|
||||
53
dev-util/xmake/xmake-2.8.5.recipe
Normal file
53
dev-util/xmake/xmake-2.8.5.recipe
Normal file
@@ -0,0 +1,53 @@
|
||||
SUMMARY="A cross-platform build utility based on Lua"
|
||||
DESCRIPTION="What is Xmake?
|
||||
1. Xmake is a cross-platform build utility based on the Lua scripting language.
|
||||
2. Xmake is very lightweight and has no dependencies outside of the standard library.
|
||||
3. Uses the \`xmake.lua\` file to maintain project builds with a simple and readable syntax.
|
||||
Xmake can be used to directly build source code (like with Make or Ninja), or it can generate \
|
||||
project source files like CMake or Meson. It also has a built-in package management system to help \
|
||||
users integrate C/C++ dependencies."
|
||||
HOMEPAGE="https://xmake.io/"
|
||||
COPYRIGHT="2015-2023 TBOOX Open Source Group"
|
||||
LICENSE="Apache v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/xmake-io/xmake/releases/download/v$portVersion/xmake-v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="19c67be3bcfcbda96ca87a18effac39bfccc443fbb3754c7bbc01511decd24af"
|
||||
PATCHES="xmake-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
|
||||
PROVIDES="
|
||||
xmake = $portVersion
|
||||
cmd:xmake = $portVersion
|
||||
cmd:xrepo = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
lib:libatomic
|
||||
lib:libncurses >= 6
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
devel:libatomic
|
||||
devel:libncurses >= 6
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:awk
|
||||
cmd:find
|
||||
cmd:gcc
|
||||
cmd:ld
|
||||
cmd:make
|
||||
cmd:pkg_config
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
runConfigure ./configure
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
}
|
||||
Reference in New Issue
Block a user