forked from semios/ports
Compare commits
1
Commits
| Author | SHA256 | Date | |
|---|---|---|---|
|
|
27fb8be562 |
@@ -41,16 +41,6 @@ def autolink_share_pkgconfig():
|
|||||||
if i.is_file():
|
if i.is_file():
|
||||||
make.link(f"share/pkgconfig/{i.name}", "/share/pkgconfig/" + i.name)
|
make.link(f"share/pkgconfig/{i.name}", "/share/pkgconfig/" + i.name)
|
||||||
|
|
||||||
def autolink_services():
|
|
||||||
for i in common.treedir("share/services"):
|
|
||||||
if i.is_file() and os.access(i.path, os.F_OK):
|
|
||||||
make.link(f"share/services/{i.name}", "/share/services/" + i.name)
|
|
||||||
|
|
||||||
def autolink_milestones():
|
|
||||||
for i in common.treedir("share/milestones"):
|
|
||||||
if i.is_file() and os.access(i.path, os.F_OK):
|
|
||||||
make.link(f"share/milestones/{i.name}", "/share/milestones/" + i.name)
|
|
||||||
|
|
||||||
|
|
||||||
def autolink(composer: pkgcomposer.PkgComposer):
|
def autolink(composer: pkgcomposer.PkgComposer):
|
||||||
os.chdir(composer.workdir + "/bundle/")
|
os.chdir(composer.workdir + "/bundle/")
|
||||||
@@ -74,13 +64,3 @@ def autolink(composer: pkgcomposer.PkgComposer):
|
|||||||
autolink_share_pkgconfig()
|
autolink_share_pkgconfig()
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
try:
|
|
||||||
autolink_services()
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
try:
|
|
||||||
autolink_milestones()
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"os_name": "\u001b[36;4mSemiOS\u001b[0m",
|
"os_name": "\u001b[36;4mSemiOS\u001b[0m",
|
||||||
"config_dir": "/var/config/airup",
|
"config_dir": "/var/config/airup",
|
||||||
"service_dir": "/share/services",
|
"service_dir": "/share/airup/services",
|
||||||
"milestone_dir": "/share/milestones",
|
"milestone_dir": "/share/airup/milestones",
|
||||||
"runtime_dir": "/run/airup",
|
"runtime_dir": "/run/airup",
|
||||||
"env_vars": {},
|
"env_vars": {},
|
||||||
"early_cmds": []
|
"early_cmds": []
|
||||||
|
|||||||
@@ -16,30 +16,14 @@ def build():
|
|||||||
shutil.copy2("../../build_manifest.json", "build_manifest.json")
|
shutil.copy2("../../build_manifest.json", "build_manifest.json")
|
||||||
rust.build()
|
rust.build()
|
||||||
|
|
||||||
|
|
||||||
on_build(build)
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
def patch_logger_airs(path):
|
|
||||||
with open(path) as fd:
|
|
||||||
content = fd.read()
|
|
||||||
content = content.replace(
|
|
||||||
"/usr/libexec/airup/airup-fallback-logger",
|
|
||||||
get_prefix('airup') + "/libexec/airup-fallback-logger",
|
|
||||||
)
|
|
||||||
with open(path, 'wt+') as fd:
|
|
||||||
fd.write(content)
|
|
||||||
|
|
||||||
|
|
||||||
def pack_airup(composer):
|
def pack_airup(composer):
|
||||||
|
os.chdir(rust.artifacts_dir())
|
||||||
composer.makedir("bin")
|
composer.makedir("bin")
|
||||||
composer.makedir("libexec")
|
composer.makedir("libexec")
|
||||||
composer.makedirs("share/services")
|
|
||||||
|
|
||||||
patch_logger_airs("docs/resources/airup-fallback-logger.airs")
|
|
||||||
composer.addfile("docs/resources/airup-fallback-logger.airs", "share/services/airup-fallback-logger.airs")
|
|
||||||
composer.addfile("docs/resources/airupd.airs", "share/services/airupd.airs")
|
|
||||||
|
|
||||||
os.chdir(rust.artifacts_dir())
|
|
||||||
composer.addfile("airup", "bin/airup")
|
composer.addfile("airup", "bin/airup")
|
||||||
composer.addfile("airupd", "bin/airupd")
|
composer.addfile("airupd", "bin/airupd")
|
||||||
composer.addfile("airup-fallback-logger", "libexec/airup-fallback-logger")
|
composer.addfile("airup-fallback-logger", "libexec/airup-fallback-logger")
|
||||||
@@ -48,4 +32,3 @@ def pack_airup(composer):
|
|||||||
package("airup")
|
package("airup")
|
||||||
on_pack(pack_airup)
|
on_pack(pack_airup)
|
||||||
dep("semi-libc @same-arch")
|
dep("semi-libc @same-arch")
|
||||||
link("bin/airupd", "/bin/init")
|
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
from lib import cpp
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
|
||||||
|
version("1.0.16")
|
||||||
|
description("The Free Implementation of the Unicode Bidirectional Algorithm.")
|
||||||
|
maintainer("sisungo <[email protected]>")
|
||||||
|
source_url("https://github.com/fribidi/fribidi/releases/download/v1.0.16/fribidi-1.0.16.tar.xz")
|
||||||
|
|
||||||
|
builddep("shortcut/c")
|
||||||
|
builddep("shortcut/autotools")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.configure([
|
||||||
|
f"--libdir={get_prefix('libfribidi')}/lib",
|
||||||
|
f"--bindir={get_prefix('fribidi')}/bin",
|
||||||
|
f"--includedir={get_prefix('libfribidi-dev')}/include",
|
||||||
|
"--disable-deprecated",
|
||||||
|
])
|
||||||
|
cpp.make()
|
||||||
|
cpp.make_install()
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
package("libfribidi")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
cpp.use_auto_pack(["lib"])
|
||||||
|
|
||||||
|
package("fribidi")
|
||||||
|
dep("libfribidi (same)")
|
||||||
|
cpp.use_auto_pack(["bin"])
|
||||||
|
|
||||||
|
package("libfribidi-dev")
|
||||||
|
dep("libfribidi (same)")
|
||||||
|
dep("semi-libc-dev @same-arch")
|
||||||
|
cpp.use_auto_pack(["dev"])
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
import glob
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
|
||||||
|
from lib.make import *
|
||||||
|
from lib import cpp
|
||||||
|
|
||||||
|
|
||||||
|
version("14.3.1")
|
||||||
|
description("HarfBuzz text shaping engine")
|
||||||
|
maintainer("sisungo <[email protected]>")
|
||||||
|
source_url("https://github.com/harfbuzz/harfbuzz/releases/download/14.3.1/harfbuzz-14.3.1.tar.xz")
|
||||||
|
|
||||||
|
builddep("shortcut/meson")
|
||||||
|
builddep("shortcut/c++")
|
||||||
|
builddep("glib-dev @target")
|
||||||
|
builddep("libicu4c-dev @target")
|
||||||
|
builddep("libcairo-dev @target")
|
||||||
|
builddep("gobject-introspection @target")
|
||||||
|
builddep("glib-tools")
|
||||||
|
|
||||||
|
|
||||||
|
def fix_pc(newpkgname):
|
||||||
|
path = f"lib/pkgconfig/harfbuzz-{newpkgname}.pc"
|
||||||
|
with open(path, 'r') as file:
|
||||||
|
content = file.read()
|
||||||
|
content = content.replace(
|
||||||
|
"-I${includedir}/harfbuzz",
|
||||||
|
f"-I${{includedir}}/harfbuzz -I{get_prefix(f'libharfbuzz-{newpkgname}-dev')}/include/harfbuzz"
|
||||||
|
)
|
||||||
|
content = content.replace("-L${libdir}", f"-L${{libdir}} -L{get_prefix(f'libharfbuzz-{newpkgname}')}/lib")
|
||||||
|
with open(path, 'wt+') as file:
|
||||||
|
file.write(content)
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.meson_setup([
|
||||||
|
"--prefix=/",
|
||||||
|
f"--libdir={get_prefix('libharfbuzz')}/lib",
|
||||||
|
f"--includedir={get_prefix('libharfbuzz-dev')}/include",
|
||||||
|
f"-Dcmakepackagedir={get_prefix('libharfbuzz-dev')}/lib/cmake",
|
||||||
|
"-Dglib=disabled",
|
||||||
|
"-Dgobject=enabled",
|
||||||
|
"-Dcairo=enabled",
|
||||||
|
"-Dicu=enabled",
|
||||||
|
"-Dfreetype=enabled",
|
||||||
|
"-Dintrospection=enabled",
|
||||||
|
"-Dtests=disabled",
|
||||||
|
])
|
||||||
|
cpp.meson_compile()
|
||||||
|
if os.path.exists("../cpp_install"):
|
||||||
|
shutil.rmtree("../cpp_install")
|
||||||
|
cpp.meson_install()
|
||||||
|
os.mkdir("include/gir")
|
||||||
|
os.rename("share/gir-1.0", "include/gir/gir-1.0")
|
||||||
|
fix_pc("gobject")
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
def pack_glob(composer, globs, excluded_kw=[]):
|
||||||
|
for iglob in globs:
|
||||||
|
for i in glob.glob(iglob):
|
||||||
|
if any(excluded_pattern in i for excluded_pattern in excluded_kw):
|
||||||
|
continue
|
||||||
|
composer.makedirs(os.path.dirname(i))
|
||||||
|
if os.path.islink(i) or os.path.isfile(i):
|
||||||
|
composer.addfile(i)
|
||||||
|
else:
|
||||||
|
composer.add_dir(i)
|
||||||
|
|
||||||
|
|
||||||
|
package("libharfbuzz")
|
||||||
|
dep("libfreetype @same-arch")
|
||||||
|
dep("libcairo @same-arch")
|
||||||
|
dep("libicu4c @same-arch")
|
||||||
|
dep("libpng @same-arch")
|
||||||
|
dep("libz @same-arch")
|
||||||
|
on_pack(lambda c: pack_glob(c, ["lib/*.so*"], ["gobject"]))
|
||||||
|
|
||||||
|
package("libharfbuzz-dev")
|
||||||
|
dep("libharfbuzz (same)")
|
||||||
|
dep("libfreetype-dev @same-arch")
|
||||||
|
dep("libcairo-dev @same-arch")
|
||||||
|
dep("libicu4c-dev @same-arch")
|
||||||
|
dep("libpng-dev @same-arch")
|
||||||
|
dep("libz-dev @same-arch")
|
||||||
|
on_pack(lambda c: pack_glob(c, ["lib/cmake", "lib/pkgconfig/*", "include/harfbuzz/*"], ["gobject"]))
|
||||||
|
|
||||||
|
package("libharfbuzz-gobject")
|
||||||
|
dep("libharfbuzz (same)")
|
||||||
|
dep("libglib @same-arch")
|
||||||
|
dep("libgobject @same-arch")
|
||||||
|
on_pack(lambda c: pack_glob(c, ["lib/*gobject*", "lib/girepository-1.0"]))
|
||||||
|
|
||||||
|
package("libharfbuzz-gobject-dev")
|
||||||
|
dep("libharfbuzz-gobject (same)")
|
||||||
|
dep("libharfbuzz-dev (same)")
|
||||||
|
dep("glib-dev @same-arch")
|
||||||
|
on_pack(lambda c: pack_glob(c, ["lib/pkgconfig/*gobject*", "include/harfbuzz/*gobject*", "include/gir"]))
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
import subprocess
|
|
||||||
import os
|
|
||||||
import lib
|
|
||||||
|
|
||||||
from lib.make import *
|
|
||||||
|
|
||||||
version("0.1.0-alpha.1")
|
|
||||||
description("SemiOS init scripts")
|
|
||||||
maintainer("sisungo <[email protected]>")
|
|
||||||
source_url("https://gitea.semilabs.org/semios/init-scripts/archive/0.1.0-alpha.1.tar.gz")
|
|
||||||
|
|
||||||
|
|
||||||
def build():
|
|
||||||
subprocess.run(["env", f"PREFIX={get_prefix('init-scripts')}", "sh", "install.sh"], check=True)
|
|
||||||
os.chdir("./target")
|
|
||||||
|
|
||||||
on_build(build)
|
|
||||||
|
|
||||||
|
|
||||||
def pack(composer):
|
|
||||||
composer.add("share")
|
|
||||||
composer.add("bin")
|
|
||||||
|
|
||||||
package("init-scripts")
|
|
||||||
arch_any()
|
|
||||||
on_pack(pack)
|
|
||||||
@@ -35,7 +35,6 @@ Libs: -L${libdir} -ludev
|
|||||||
def pack(composer):
|
def pack(composer):
|
||||||
composer.makedirs("share/device")
|
composer.makedirs("share/device")
|
||||||
composer.add_dir("misc/rules", "share/device/rules")
|
composer.add_dir("misc/rules", "share/device/rules")
|
||||||
composer.add_dir("misc/airup", "share/services")
|
|
||||||
oldpwd = os.getcwd()
|
oldpwd = os.getcwd()
|
||||||
os.chdir(rust.artifacts_dir())
|
os.chdir(rust.artifacts_dir())
|
||||||
composer.makedir("bin")
|
composer.makedir("bin")
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
from lib.make import *
|
||||||
|
from lib import cpp
|
||||||
|
|
||||||
|
|
||||||
|
version("2.5.1")
|
||||||
|
description("The FreeDesktop Shared MIMO Info database and utilities")
|
||||||
|
maintainer("sisungo <[email protected]>")
|
||||||
|
source_url("https://gitlab.freedesktop.org/xdg/shared-mime-info/-/archive/2.5.1/shared-mime-info-2.5.1.tar.gz")
|
||||||
|
|
||||||
|
builddep("shortcut/c++")
|
||||||
|
builddep("shortcut/meson")
|
||||||
|
builddep("libintl-dev @target")
|
||||||
|
builddep("gettext")
|
||||||
|
builddep("libxml2-dev @target")
|
||||||
|
builddep("glib-dev @target")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.meson_setup([
|
||||||
|
f"--prefix={get_prefix('shared-mime-info')}",
|
||||||
|
"-Dbuild-tools=true",
|
||||||
|
"-Dbuild-translations=true",
|
||||||
|
"-Dbuild-tests=false",
|
||||||
|
"-Dbuild-spec=false",
|
||||||
|
])
|
||||||
|
cpp.meson_compile()
|
||||||
|
cpp.meson_install()
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
def pack(composer):
|
||||||
|
composer.makedir("lib")
|
||||||
|
composer.makedir("share")
|
||||||
|
composer.add_dir("share/mime")
|
||||||
|
composer.add_dir("share/pkgconfig", "lib/pkgconfig")
|
||||||
|
composer.add_dir("share/locale")
|
||||||
|
composer.add_dir("bin")
|
||||||
|
|
||||||
|
package("shared-mime-info")
|
||||||
|
dep("libxml2 @same-arch")
|
||||||
|
dep("libglib @same-arch")
|
||||||
|
dep("libcxx @same-arch")
|
||||||
|
on_pack(pack)
|
||||||
Reference in New Issue
Block a user