36 lines
696 B
Python
36 lines
696 B
Python
import subprocess
|
|
import os
|
|
|
|
from lib.make import *
|
|
|
|
|
|
version("1.12.0")
|
|
description("The Meson Build System")
|
|
maintainer("sisungo <[email protected]>")
|
|
source_managed("github://mesonbuild/meson#1.12.0")
|
|
|
|
builddep("python (>=3.10.0")
|
|
|
|
|
|
def build():
|
|
if os.path.exists("meson"):
|
|
os.remove("meson")
|
|
subprocess.run([
|
|
"python3", "./packaging/create_zipapp.py",
|
|
"--outfile", "meson",
|
|
"--interpreter", "/bin/python3",
|
|
])
|
|
os.chmod("meson", 0o555)
|
|
|
|
on_build(build)
|
|
|
|
|
|
def pack_meson(composer):
|
|
composer.makedir("bin")
|
|
composer.addfile("meson", "bin/meson")
|
|
|
|
package("meson")
|
|
dep("python (>=3.10.0) @same-arch")
|
|
recommend("ninja")
|
|
on_pack(pack_meson)
|