forked from semios/ports
Compare commits
| Author | SHA256 | Date | |
|---|---|---|---|
|
|
d6ebf1bd9b |
@@ -0,0 +1,35 @@
|
||||
from lib.make import *
|
||||
from lib import cpp, arch
|
||||
|
||||
|
||||
version("1.0.30")
|
||||
description("A cross-platform library to access USB devices.")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/libusb/libusb/releases/download/v1.0.30/libusb-1.0.30.tar.bz2")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
builddep("linux-dev @target")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.configure([
|
||||
"--prefix=/",
|
||||
f"--libdir={get_prefix('libusb')}/lib",
|
||||
f"--includedir={get_prefix('libusb-dev')}/include",
|
||||
"--disable-udev",
|
||||
])
|
||||
cpp.make()
|
||||
cpp.make_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
package("libusb")
|
||||
dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("libusb-dev")
|
||||
dep("libusb (same)")
|
||||
dep("semi-libc-dev @same-arch")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -1,103 +0,0 @@
|
||||
import os
|
||||
|
||||
from lib.make import *
|
||||
from lib import cpp, arch
|
||||
|
||||
|
||||
version("1.14.0-beta.1")
|
||||
description("keymap handling library for toolkits and window systems")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://github.com/xkbcommon/libxkbcommon/archive/refs/tags/xkbcommon-1.14.0-beta1.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/meson")
|
||||
builddep("flex")
|
||||
builddep("bison")
|
||||
builddep("libxml2-dev @target")
|
||||
builddep("libwayland-dev @target")
|
||||
builddep("wayland-protocols @target")
|
||||
builddep("awk")
|
||||
builddep("bash")
|
||||
builddep("xkeyboard-config-dev (=2.48) @any")
|
||||
|
||||
|
||||
def build():
|
||||
os.environ["PKG_CONFIG_PATH"] = "/share/pkgconfig"
|
||||
|
||||
# FIXME: Building the package requires `/bin/sh` to be bash.
|
||||
if in_atomic():
|
||||
os.system("ln -sf /bin/bash /bin/sh")
|
||||
|
||||
cpp.meson_setup([
|
||||
f"--libdir={get_prefix('libxkbcommon')}/lib",
|
||||
f"--includedir={get_prefix('libxkbcommon-dev')}/include",
|
||||
f"--bindir={get_prefix('xkbcli')}/bin",
|
||||
f"--libexecdir={get_prefix('xkbcli')}/libexec",
|
||||
"-Denable-x11=false",
|
||||
])
|
||||
cpp.meson_compile()
|
||||
cpp.meson_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack_libxkbcommon(composer):
|
||||
composer.makedir("lib")
|
||||
for i in glob.glob("lib/*common*so*"):
|
||||
composer.add(i)
|
||||
|
||||
package("libxkbcommon")
|
||||
dep("semi-libc @same-arch")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
def pack_libxkbregistry(composer):
|
||||
composer.makedir("lib")
|
||||
for i in glob.glob("lib/*registry*so*"):
|
||||
composer.add(i)
|
||||
|
||||
package("libxkbregistry")
|
||||
dep("semi-libc @same-arch")
|
||||
dep("libxml2 @same-arch")
|
||||
dep("xkeyboard-config (=2.48) @any")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
def pack_libxkbcommon_dev(composer):
|
||||
composer.makedirs("lib/pkgconfig")
|
||||
composer.add("lib/pkgconfig/xkbcommon.pc")
|
||||
composer.makedirs("include/xkbcommon")
|
||||
for i in glob.glob("include/xkbcommon/*"):
|
||||
if "registry" in i:
|
||||
continue
|
||||
composer.add(i)
|
||||
|
||||
package("libxkbcommon-dev")
|
||||
dep("libxkbcommon (same)")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
|
||||
def pack_libxkbregistry_dev(composer):
|
||||
composer.makedirs("lib/pkgconfig")
|
||||
with open("lib/pkgconfig/xkbregistry.pc", "r") as pcf:
|
||||
pc = pcf.read()
|
||||
pc = pc.replace(get_prefix("libxkbcommon"), get_prefix("libxkbregistry"))
|
||||
pc = pc.replace(get_prefix("libxkbcommon-dev"), get_prefix("libxkbregistry-dev"))
|
||||
with open("lib/pkgconfig/xkbregistry.pc", "wt+") as pcf:
|
||||
pcf.write(pc)
|
||||
composer.add("lib/pkgconfig/xkbregistry.pc")
|
||||
composer.makedirs("include/xkbcommon")
|
||||
for i in glob.glob("include/xkbcommon/*"):
|
||||
if "registry" in i:
|
||||
composer.add(i)
|
||||
|
||||
package("libxkbregistry-dev")
|
||||
dep("libxkbregistry (same)")
|
||||
dep("libxml2-dev @same-arch")
|
||||
dep("xkeyboard-config-dev (=2.48) @any")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
|
||||
def pack_bin(composer):
|
||||
composer.add("bin")
|
||||
composer.add("libexec")
|
||||
|
||||
package("xkbcli")
|
||||
dep("libxkbcommon (same)")
|
||||
on_pack(pack_bin)
|
||||
@@ -1,51 +0,0 @@
|
||||
import glob
|
||||
|
||||
from lib.make import *
|
||||
from lib import cpp, arch
|
||||
|
||||
|
||||
version("2.48")
|
||||
description("a consistent, well-structured, frequently released, open source database of keyboard configuration data")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_url("https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/archive/xkeyboard-config-2.48/xkeyboard-config-xkeyboard-config-2.48.tar.gz")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/meson")
|
||||
builddep("libintl-dev @target")
|
||||
builddep("gettext")
|
||||
builddep("libexpat")
|
||||
builddep("perl")
|
||||
|
||||
|
||||
def build():
|
||||
cpp.meson_setup([
|
||||
f"--prefix={get_prefix('xkeyboard-config')}",
|
||||
])
|
||||
cpp.meson_compile()
|
||||
cpp.meson_install()
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack(composer):
|
||||
composer.makedir("share")
|
||||
composer.add("share/xkeyboard-config-2")
|
||||
|
||||
package("xkeyboard-config")
|
||||
arch_any()
|
||||
on_pack(pack)
|
||||
|
||||
def pack_dev(composer):
|
||||
for i in glob.glob("share/pkgconfig/*"):
|
||||
with open(i, "r") as file:
|
||||
content = file.read()
|
||||
content = content.replace(get_prefix("xkeyboard-config-dev"), get_prefix("xkeyboard-config"))
|
||||
with open(i, "wt+") as file:
|
||||
file.write(content)
|
||||
composer.makedir("share")
|
||||
composer.add("share/pkgconfig")
|
||||
|
||||
package("xkeyboard-config-dev")
|
||||
arch_any()
|
||||
dep("xkeyboard-config (same-version) @any")
|
||||
on_pack(pack_dev)
|
||||
Reference in New Issue
Block a user