forked from semios/ports
Compare commits
10
Commits
linux-kernel
...
fonts
| Author | SHA256 | Date | |
|---|---|---|---|
|
|
6bae1e1788 | ||
|
|
c62b2fc8f6 | ||
|
|
e7eaa7273c | ||
|
|
f7adbdebd8 | ||
|
|
8c4b7a429c | ||
|
|
7e4e1ece86 | ||
|
|
8a82bcf29e | ||
|
|
e61e796eda | ||
|
|
6645a7f537 | ||
|
|
6837ddb31a |
+29
-19
@@ -3,6 +3,13 @@ import os
|
||||
from lib import arch, common, make, pkgcomposer
|
||||
|
||||
|
||||
def do(f):
|
||||
try:
|
||||
f()
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
def is_abslink(path):
|
||||
try:
|
||||
return os.readlink(path).startswith("/")
|
||||
@@ -41,26 +48,29 @@ def autolink_share_pkgconfig():
|
||||
if i.is_file():
|
||||
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_fonts():
|
||||
for i in common.treedir("share/fonts"):
|
||||
if i.is_file() and os.access(i.path, os.F_OK):
|
||||
make.link(f"share/fonts/{i.name}", "/share/fonts/" + i.name)
|
||||
|
||||
|
||||
def autolink(composer: pkgcomposer.PkgComposer):
|
||||
os.chdir(composer.workdir + "/bundle/")
|
||||
|
||||
try:
|
||||
autolink_bin()
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
autolink_lib()
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
autolink_include()
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
autolink_share_pkgconfig()
|
||||
except:
|
||||
pass
|
||||
do(autolink_bin)
|
||||
do(autolink_lib)
|
||||
do(autolink_include)
|
||||
do(autolink_share_pkgconfig)
|
||||
do(autolink_services)
|
||||
do(autolink_milestones)
|
||||
do(autolink_fonts)
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
import os
|
||||
|
||||
from lib.make import *
|
||||
|
||||
upstream_version = "3.206"
|
||||
|
||||
version(upstream_version)
|
||||
description("Monospaced variant of the Fira Sans font series")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://carrois.com/downloads/Fira/Fira_Mono_3_2.zip")
|
||||
|
||||
|
||||
def build():
|
||||
os.chdir("Fonts/FiraMono_OTF_32")
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def declare_seperate(name):
|
||||
def pack(composer):
|
||||
composer.makedirs("share/fonts/FiraMono")
|
||||
composer.add(f"{name}.otf", f"share/fonts/FiraMono/{name}.otf")
|
||||
|
||||
package(name)
|
||||
on_pack(pack)
|
||||
|
||||
declare_seperate("FiraMono-Bold")
|
||||
declare_seperate("FiraMono-Medium")
|
||||
declare_seperate("FiraMono-Regular")
|
||||
|
||||
package("FiraMono-Fonts")
|
||||
dep("FiraMono-Bold")
|
||||
dep("FiraMono-Medium")
|
||||
dep("FiraMono-Regular")
|
||||
on_pack(lambda x: print("Packing FiraMono-Fonts."))
|
||||
@@ -0,0 +1,60 @@
|
||||
import os
|
||||
|
||||
from lib.make import *
|
||||
|
||||
upstream_version = "4.301"
|
||||
|
||||
version(upstream_version)
|
||||
description("a humanist sans-serif typeface designed by Carrois Type Design and Mozilla")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://carrois.com/downloads/Fira/Download_Folder_FiraSans_4301.zip")
|
||||
|
||||
|
||||
widths = ["Compressed", "Condensed", "Normal"]
|
||||
styles = ["Italic", "Roman"]
|
||||
weights = ["Bold", "Book", "Eight", "ExtraBold", "ExtraLight", "Four", "Hair", "Heavy", "", "Light", "Medium", "SemiBold", "Thin", "Two", "Ultra", "UltraLight"]
|
||||
|
||||
|
||||
def find_file(width, style, weight):
|
||||
modify = width
|
||||
if width == "Normal":
|
||||
modify = ""
|
||||
filename = f"FiraSans{modify}-{weight}{style}.otf"
|
||||
if os.path.exists(f"{width}/{style}/{filename}"):
|
||||
return filename
|
||||
return None
|
||||
|
||||
def on_pack_by(width, style, weight):
|
||||
def pack(composer):
|
||||
composer.makedirs("share/fonts/FiraSans")
|
||||
filename = find_file(width, style, weight)
|
||||
composer.add(
|
||||
f"{width}/{style}/{filename}",
|
||||
f"share/fonts/FiraSans/{filename}",
|
||||
)
|
||||
on_pack(pack)
|
||||
|
||||
|
||||
def build():
|
||||
filename_version = upstream_version.replace('.', '')
|
||||
os.chdir(f"Download_Folder_FiraSans_{filename_version}/Fonts/Fira_Sans_OTF_{filename_version}")
|
||||
|
||||
packages = []
|
||||
for width in widths:
|
||||
for style in styles:
|
||||
for weight in weights:
|
||||
filename = find_file(width, style, weight)
|
||||
if filename:
|
||||
pkgname = filename.replace(".otf", "")
|
||||
package(pkgname)
|
||||
arch_any()
|
||||
on_pack_by(width, style, weight)
|
||||
packages += [pkgname]
|
||||
|
||||
package("FiraSans-Fonts")
|
||||
arch_any()
|
||||
for pkgname in packages:
|
||||
dep(f"{pkgname} (same-version) @any")
|
||||
on_pack(lambda x: print("Packing FiraSans-Fonts."))
|
||||
|
||||
on_build(build)
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"os_name": "\u001b[36;4mSemiOS\u001b[0m",
|
||||
"config_dir": "/var/config/airup",
|
||||
"service_dir": "/share/airup/services",
|
||||
"milestone_dir": "/share/airup/milestones",
|
||||
"service_dir": "/share/services",
|
||||
"milestone_dir": "/share/milestones",
|
||||
"runtime_dir": "/run/airup",
|
||||
"env_vars": {},
|
||||
"early_cmds": []
|
||||
|
||||
@@ -16,14 +16,30 @@ def build():
|
||||
shutil.copy2("../../build_manifest.json", "build_manifest.json")
|
||||
rust.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):
|
||||
os.chdir(rust.artifacts_dir())
|
||||
composer.makedir("bin")
|
||||
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("airupd", "bin/airupd")
|
||||
composer.addfile("airup-fallback-logger", "libexec/airup-fallback-logger")
|
||||
@@ -32,3 +48,4 @@ def pack_airup(composer):
|
||||
package("airup")
|
||||
on_pack(pack_airup)
|
||||
dep("semi-libc @same-arch")
|
||||
link("bin/airupd", "/bin/init")
|
||||
|
||||
@@ -14,13 +14,14 @@ source_url("https://download.gnome.org/sources/glib/2.89/glib-2.89.2.tar.xz")
|
||||
builddep("shortcut/c++")
|
||||
builddep("shortcut/meson")
|
||||
builddep("gettext")
|
||||
builddep(f"libintl-dev @{arch.get_target()}")
|
||||
builddep("libintl-dev @target")
|
||||
builddep("pcre2-tools")
|
||||
builddep(f"libpcre2-dev @{arch.get_target()}")
|
||||
builddep(f"libffi-dev @{arch.get_target()}")
|
||||
builddep("libpcre2-dev @target")
|
||||
builddep("libffi-dev @target")
|
||||
builddep("pkgconf")
|
||||
builddep(f"libz-ng-dev @{arch.get_target()}")
|
||||
builddep("libz-ng-dev @target")
|
||||
builddep("libexpat")
|
||||
builddep("gobject-introspection @target")
|
||||
|
||||
|
||||
def build():
|
||||
@@ -29,6 +30,7 @@ def build():
|
||||
cpp.meson_setup([
|
||||
"-Druntime_dir=/run",
|
||||
f"-Dgio_module_dir=/lib/{arch.get_target()}/gio/modules",
|
||||
"-Dintrospection=enabled",
|
||||
"--prefix=/",
|
||||
f"--bindir={get_prefix('glib-tools')}/bin",
|
||||
f"--libdir={get_prefix('glib-dev')}/lib",
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
import shutil
|
||||
|
||||
from lib.make import *
|
||||
from lib import cpp, arch
|
||||
|
||||
|
||||
version("1.86.0")
|
||||
description("to describe the APIs and collect them in a uniform, machine readable format")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://gitlab.gnome.org/GNOME/gobject-introspection/-/archive/1.86.0/gobject-introspection-1.86.0.tar.gz")
|
||||
|
||||
builddep("shortcut/meson")
|
||||
builddep("shortcut/c")
|
||||
builddep("glib-dev @target")
|
||||
builddep("setuptools.py @target")
|
||||
builddep("libpython-dev @target")
|
||||
builddep("flex")
|
||||
builddep("bison")
|
||||
builddep("libexpat @target")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.meson_setup([
|
||||
f"--prefix={get_prefix('gobject-introspection')}",
|
||||
f"-Dgir_dir_prefix=/lib/{arch.get_target()}/include/gir",
|
||||
"-Dcairo=disabled",
|
||||
"-Dpython=/bin/python3",
|
||||
"-Dtests=false",
|
||||
])
|
||||
cpp.meson_compile()
|
||||
cpp.meson_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack(composer):
|
||||
composer.add_dir("include")
|
||||
composer.add_dir("share")
|
||||
composer.add_dir("bin")
|
||||
composer.add_dir("lib")
|
||||
shutil.rmtree(f"{composer.workdir}/bundle/lib/{arch.get_target()}")
|
||||
composer.add_dir(f"lib/{arch.get_target()}/include/gir", "include/gir")
|
||||
|
||||
package("gobject-introspection")
|
||||
dep("python @same-arch")
|
||||
dep("setuptools.py @same-arch")
|
||||
dep("glib-dev @same-arch")
|
||||
on_pack(pack)
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
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)
|
||||
@@ -0,0 +1,38 @@
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("1.13.7")
|
||||
description("Wrapper library for evdev devices")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://gitlab.freedesktop.org/libevdev/libevdev/-/archive/libevdev-1.13.7/libevdev-libevdev-1.13.7.tar.gz?ref_type=tags")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/meson")
|
||||
builddep("linux-dev @target")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.meson_setup([
|
||||
"--prefix=/",
|
||||
f"--libdir={get_prefix('libevdev')}/lib",
|
||||
f"--includedir={get_prefix('libevdev-dev')}/include",
|
||||
"-Dtests=disabled",
|
||||
"-Ddocumentation=disabled",
|
||||
])
|
||||
cpp.meson_compile()
|
||||
cpp.meson_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("libevdev")
|
||||
dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("libevdev-tools")
|
||||
dep("libevdev (same)")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
|
||||
package("libevdev-dev")
|
||||
dep("libevdev (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,6 @@
|
||||
--- a/gudev/meson.build
|
||||
+++ b/gudev/meson.build
|
||||
36c36
|
||||
< '-export-dynamic',
|
||||
---
|
||||
> '-Wl,-export-dynamic',
|
||||
@@ -0,0 +1,42 @@
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("238")
|
||||
description("Input device management and event handling library")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://gitlab.gnome.org/GNOME/libgudev/-/archive/238/libgudev-238.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/meson")
|
||||
builddep("gobject-introspection @target")
|
||||
builddep("glib-dev @target")
|
||||
builddep("lxdeviced-libudev-dev @target")
|
||||
builddep("glib-tools")
|
||||
builddep("libexpat")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.meson_setup([
|
||||
"--prefix=/",
|
||||
f"--libdir={get_prefix('libgudev')}/lib",
|
||||
f"--includedir={get_prefix('libgudev-dev')}/include",
|
||||
"-Dintrospection=enabled",
|
||||
])
|
||||
cpp.meson_compile()
|
||||
cpp.meson_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("libgudev")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("lxdeviced-libudev @same-arch")
|
||||
dep("libglib @same-arch")
|
||||
dep("libgobject @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("libgudev-dev")
|
||||
dep("libgudev (same)")
|
||||
dep("lxdeviced-libudev-dev @same-arch")
|
||||
dep("glib-dev @same-arch")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,58 @@
|
||||
import glob
|
||||
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("1.30.4")
|
||||
description("Input device management and event handling library")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://gitlab.freedesktop.org/libinput/libinput/-/archive/1.30.4/libinput-1.30.4.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/meson")
|
||||
builddep("lxdeviced-libudev-dev @target")
|
||||
builddep("libevdev-dev @target")
|
||||
builddep("libmtdev-dev @target")
|
||||
builddep("libwacom-dev @target")
|
||||
builddep("linux-dev @target")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.meson_setup([
|
||||
"--prefix=/",
|
||||
f"--libdir={get_prefix('libinput')}/lib",
|
||||
f"--libexecdir={get_prefix('libinput-tools')}/libexec",
|
||||
f"--includedir={get_prefix('libinput-dev')}/include",
|
||||
"--sysconfdir=/var/config",
|
||||
f"--datadir={get_prefix('libinput')}/share",
|
||||
"-Ddebug-gui=false",
|
||||
"-Dtests=false",
|
||||
])
|
||||
cpp.meson_compile()
|
||||
cpp.meson_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack(composer):
|
||||
composer.makedir("lib")
|
||||
for i in glob.glob("lib/*so*"):
|
||||
composer.add(i)
|
||||
composer.makedir("share")
|
||||
composer.add("share/libinput")
|
||||
|
||||
def pack_tools(composer):
|
||||
composer.add("bin")
|
||||
composer.add("libexec")
|
||||
|
||||
package("libinput")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(pack)
|
||||
|
||||
package("libinput-tools")
|
||||
dep("libinput (same)")
|
||||
on_pack(pack_tools)
|
||||
|
||||
package("libinput-dev")
|
||||
dep("libinput (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,32 @@
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("1.1.7")
|
||||
description("a stand-alone library which transforms all variants of kernel MT events to the slotted type B protocol")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://bitmath.se/org/code/mtdev/mtdev-1.1.7.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep("linux-dev @target")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure([
|
||||
"--prefix=/",
|
||||
f"--libdir={get_prefix('libmtdev')}/lib",
|
||||
f"--includedir={get_prefix('libmtdev-dev')}/include",
|
||||
])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("libmtdev")
|
||||
dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("libmtdev-dev")
|
||||
dep("libmtdev (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,33 @@
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("1.3.6")
|
||||
description("Ogg container format libraries")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://downloads.xiph.org/releases/ogg/libogg-1.3.6.tar.xz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure(
|
||||
[
|
||||
"--prefix=/",
|
||||
f"--libdir={get_prefix('libogg')}/lib",
|
||||
f"--includedir={get_prefix('libogg-dev')}/include",
|
||||
]
|
||||
)
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("libogg")
|
||||
dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("libogg-dev")
|
||||
dep("libogg (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,35 @@
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("1.3.7")
|
||||
description("Reference implementation of the Ogg Vorbis audio format.")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://downloads.xiph.org/releases/vorbis/libvorbis-1.3.7.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep("libogg-dev @target")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure(
|
||||
[
|
||||
"--prefix=/",
|
||||
f"--libdir={get_prefix('libvorbis')}/lib",
|
||||
f"--includedir={get_prefix('libvorbis-dev')}/include",
|
||||
"--disable-oggtest",
|
||||
]
|
||||
)
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("libvorbis")
|
||||
dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("libvorbis-dev")
|
||||
dep("libvorbis (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,48 @@
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("2.19.1")
|
||||
description("libwacom is a tablet description library")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/linuxwacom/libwacom/releases/download/libwacom-2.19.1/libwacom-2.19.1.tar.xz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/meson")
|
||||
builddep("linux-dev @target")
|
||||
builddep("libgudev-dev @target")
|
||||
builddep("libevdev-dev @target")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.meson_setup([
|
||||
"--prefix=/",
|
||||
f"--libdir={get_prefix('libwacom')}/lib",
|
||||
f"--bindir={get_prefix('libwacom-tools')}/bin",
|
||||
f"--includedir={get_prefix('libwacom-dev')}/include",
|
||||
f"--datadir={get_prefix('libwacom')}/share",
|
||||
"-Dtests=disabled",
|
||||
])
|
||||
cpp.meson_compile()
|
||||
cpp.meson_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("libwacom")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libgudev @same-arch")
|
||||
dep("libgobject @same-arch")
|
||||
dep("libglib @same-arch")
|
||||
dep("libevdev @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("libwacom-tools")
|
||||
dep("libwacom (same)")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
|
||||
package("libwacom-dev")
|
||||
dep("libwacom (same)")
|
||||
dep("libgudev-dev @same-arch")
|
||||
dep("glib-dev @same-arch")
|
||||
dep("libevdev-dev @same-arch")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -0,0 +1,79 @@
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from lib.make import *
|
||||
from lib import cpp
|
||||
|
||||
|
||||
version("1.6.0")
|
||||
description("a library to encode and decode images in WebP format")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/webmproject/libwebp/archive/refs/tags/v1.6.0.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/cmake")
|
||||
|
||||
|
||||
def split_libsharpyuv():
|
||||
os.makedirs("sharpyuv/libdev/pkgconfig")
|
||||
os.makedirs("sharpyuv/lib")
|
||||
os.makedirs("sharpyuv/include")
|
||||
os.rename("lib/pkgconfig/libsharpyuv.pc", "sharpyuv/libdev/pkgconfig/libsharpyuv.pc")
|
||||
os.system("mv lib/libsharpyuv* sharpyuv/lib/")
|
||||
os.rename("include/webp/sharpyuv", "sharpyuv/include/sharpyuv")
|
||||
with open("sharpyuv/libdev/pkgconfig/libsharpyuv.pc", "r") as pcf:
|
||||
pc = pcf.read()
|
||||
pc = pc.replace(get_prefix("libwebp"), get_prefix("libsharpyuv"))
|
||||
pc = pc.replace(f"{get_prefix('libwebp-dev')}/include/webp", f"{get_prefix('libsharpyuv-dev')}/include")
|
||||
with open("sharpyuv/libdev/pkgconfig/libsharpyuv.pc", "wt+") as pcf:
|
||||
pcf.write(pc)
|
||||
|
||||
|
||||
def build():
|
||||
cpp.cmake([
|
||||
"-DBUILD_SHARED_LIBS=1",
|
||||
f"-DCMAKE_INSTALL_LIBDIR={get_prefix('libwebp')}/lib",
|
||||
f"-DCMAKE_INSTALL_BINDIR={get_prefix('libwebp-tools')}/bin",
|
||||
f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('libwebp-dev')}/include",
|
||||
])
|
||||
cpp.ninja()
|
||||
if os.path.exists("../cpp_install"):
|
||||
shutil.rmtree("../cpp_install")
|
||||
cpp.ninja_install()
|
||||
split_libsharpyuv()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_libsharpyuv(composer):
|
||||
composer.add_dir("sharpyuv/lib", "lib")
|
||||
|
||||
def pack_libsharpyuv_dev(composer):
|
||||
composer.add_dir("sharpyuv/libdev", "lib")
|
||||
composer.add_dir("sharpyuv/include", "include")
|
||||
|
||||
package("libsharpyuv")
|
||||
description("Library for sharp RGB to YUV conversion")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(pack_libsharpyuv)
|
||||
|
||||
package("libsharpyuv-dev")
|
||||
description("Library for sharp RGB to YUV conversion")
|
||||
dep("libsharpyuv (same)")
|
||||
dep("semi-libc-dev @same-arch")
|
||||
on_pack(pack_libsharpyuv_dev)
|
||||
|
||||
package("libwebp")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libsharpyuv (same)")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("libwebp-tools")
|
||||
dep("libwebp (same)")
|
||||
cpp.use_auto_pack(["bin"])
|
||||
|
||||
package("libwebp-dev")
|
||||
dep("libwebp (same)")
|
||||
dep("libsharpyuv-dev (same)")
|
||||
dep("semi-libc-dev @same-arch")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -4,7 +4,7 @@ from lib.make import *
|
||||
|
||||
version("2.15.3")
|
||||
description("an XML toolkit implemented in C, originally developed for the GNOME Project")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://download.gnome.org/sources/libxml2/2.15/libxml2-2.15.3.tar.xz")
|
||||
|
||||
builddep("shortcut/autotools")
|
||||
@@ -27,5 +27,6 @@ dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("libxml2-dev")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libxml2 (same)")
|
||||
dep("semi-libc-dev @same-arch")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
|
||||
@@ -35,6 +35,7 @@ Libs: -L${libdir} -ludev
|
||||
def pack(composer):
|
||||
composer.makedirs("share/device")
|
||||
composer.add_dir("misc/rules", "share/device/rules")
|
||||
composer.add_dir("misc/airup", "share/services")
|
||||
oldpwd = os.getcwd()
|
||||
os.chdir(rust.artifacts_dir())
|
||||
composer.makedir("bin")
|
||||
|
||||
Reference in New Issue
Block a user