Add the recipe to build ninja
This commit is contained in:
parent
8c125a6b47
commit
2cbd170dc2
11
builder
11
builder
|
@ -54,6 +54,13 @@ function _create() {
|
||||||
--profile:host="../../profiles/stage$1" \
|
--profile:host="../../profiles/stage$1" \
|
||||||
. "${@:2}"
|
. "${@:2}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _build() {
|
||||||
|
_push "packages/$1/"
|
||||||
|
_create "${@:2}"
|
||||||
|
_pop
|
||||||
|
|
||||||
|
}
|
||||||
function llvm-source() { ## Build the llvm source pkg
|
function llvm-source() { ## Build the llvm source pkg
|
||||||
_push "packages/sources/llvm/"
|
_push "packages/sources/llvm/"
|
||||||
_create "$@"
|
_create "$@"
|
||||||
|
@ -72,6 +79,10 @@ function gcc() { ## Build the gcc package
|
||||||
_pop
|
_pop
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function ninja() { ## Build the gcc package
|
||||||
|
_build ninja "$@"
|
||||||
|
}
|
||||||
|
|
||||||
function help() { ## Print out this help message
|
function help() { ## Print out this help message
|
||||||
echo "Commands:"
|
echo "Commands:"
|
||||||
grep -E '^function [a-zA-Z0-9_-]+\(\) \{ ## .*$$' "$0" | \
|
grep -E '^function [a-zA-Z0-9_-]+\(\) \{ ## .*$$' "$0" | \
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
lxsameer@majin.15395:1678886450
|
|
|
@ -17,7 +17,6 @@
|
||||||
from conan import ConanFile
|
from conan import ConanFile
|
||||||
from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps
|
from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps
|
||||||
from conan.tools.files import get
|
from conan.tools.files import get
|
||||||
from conan.tools.env import VirtualBuildEnv
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
|
@ -17,38 +17,46 @@
|
||||||
from conan import ConanFile
|
from conan import ConanFile
|
||||||
from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps
|
from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps
|
||||||
from conan.tools.files import get
|
from conan.tools.files import get
|
||||||
from conan.tools.env import VirtualBuildEnv
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
class Cmake(ConanFile):
|
class Ninja(ConanFile):
|
||||||
name = "cmake"
|
name = "ninja"
|
||||||
version = "3.26.0"
|
version = "1.11.1"
|
||||||
settings = "os", "arch", "build_type", "compiler"
|
settings = "os", "arch", "build_type", "compiler"
|
||||||
|
|
||||||
def requirements(self):
|
def requirements(self):
|
||||||
if self.settings.compiler == "gcc":
|
if self.settings.compiler == "gcc":
|
||||||
self.requires(f"gcc/latest@{self.user}/{self.channel}")
|
self.requires(f"gcc/latest@{self.user}/{self.channel}")
|
||||||
self.tool_requires(f"gcc/latest@{self.user}/{self.channel}")
|
self.tool_requires(f"gcc/latest@{self.user}/{self.channel}")
|
||||||
|
|
||||||
|
self.tool_requires(f"cmake/3.26.0@{self.user}/{self.channel}")
|
||||||
|
|
||||||
def source(self):
|
def source(self):
|
||||||
get(
|
get(
|
||||||
self,
|
self,
|
||||||
f"https://github.com/Kitware/CMake/archive/v{self.version}.tar.gz",
|
f"https://github.com/ninja-build/ninja/archive/v{self.version}.tar.gz",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def configure(self):
|
||||||
|
self.settings.rm_safe("compiler.cppstd")
|
||||||
|
|
||||||
def generate(self):
|
def generate(self):
|
||||||
tc = CMakeToolchain(self)
|
tc = CMakeToolchain(self)
|
||||||
tc.generate()
|
tc.generate()
|
||||||
deps = CMakeDeps(self)
|
deps = CMakeDeps(self)
|
||||||
deps.generate()
|
deps.generate()
|
||||||
|
|
||||||
|
def package_id(self):
|
||||||
|
# No need to delete those settings here, they were already deleted
|
||||||
|
pass
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
cmake = CMake(self)
|
cmake = CMake(self)
|
||||||
cmake.configure(
|
cmake.configure(
|
||||||
{"CMAKE_USE_OPENSSL": "OFF", "BUILD_TESTING": "OFF"},
|
{},
|
||||||
build_script_folder=f"CMake-{self.version}",
|
build_script_folder=f"Ninja-{self.version}",
|
||||||
)
|
)
|
||||||
cmake.build()
|
cmake.build()
|
||||||
cmake.install()
|
cmake.install()
|
|
@ -1,3 +0,0 @@
|
||||||
[conf]
|
|
||||||
core.download:parallel=10
|
|
||||||
tools.build:jobs=2
|
|
|
@ -1,4 +1,3 @@
|
||||||
include(conf)
|
|
||||||
{% set gcc_triple = "x86_64-linux-musl" %}
|
{% set gcc_triple = "x86_64-linux-musl" %}
|
||||||
|
|
||||||
[settings]
|
[settings]
|
||||||
|
|
Loading…
Reference in New Issue