ITADN

KDL recipe format proposal

#790Openermo 创建于 2026-05-21
E
ermocommented
Based on conversion proposals by @jplatte and @zkat in AerynOS/recipes#1186 **Status:** *draft* **Revision:** 3 ```KDL // SPDX-FileCopyrightText: © 2026 AerynOS Developers // SPDX-License-Identifier: MPL-2.0 VERSION 0 // we version the recipe format so we can validate it via a schema meta { // a subset of these keys can be used directly via %(definition) macros instead of the more clunky %(meta.definition) format name glib2 version "2.84.0" release 24 homepage "https://gitlab.gnome.org/GNOME/glib" description """ Low-level core library that forms the basis for projects such as GTK+ and GNOME // first line is the summary GLib is the low-level core library that forms the basis for projects such // the rest is description (like in git) as GTK and GNOME. It provides data structure handling for C, portability wrappers, and interfaces for such runtime functionality as an event loop, threads, dynamic loading, and an object system. """ licenses { - Apache-2.0 - CC0-1.0 - GPL-2.0-or-later - LGPL-2.1-or-later - LLVM-exception - MIT } } // the idea is to have a kind and an url, which then have associated valid properties and helper dependencies per the schema // Each upstream can also have other properties, hence the bracketed block for each upstreams { - tar "https://download.gnome.org/sources/glib/2.84/glib-2.84.0.tar.xz" { hash=f8823600cb85425e2815cfad82ea20fdaa538482ab74e7293d58b3f64a5aff6a unpackdir=somedir } - git "https://github.com/foo/bar.git" { ref=v1.0.2 // will get converted and rewritten to a stable commit hash by boulder } - svn "https://some.svn/repository" { rev=r19710975 } } builddeps { binary xgettext pkgconfig bash-completion pkgconfig gobject-introspection-1.0 python-packaging } rundeps { binary python3 elfutils-libs python-packaging } flags { // 'no-' prefix looks nicer than foo #false devel no-autodep no-libsplit } tuning { lto full } environment """ export CFLAGS="${CFLAGS} -Wno-error=missing-include-dirs" """ // The top level setup/build/install/check blocks are referenced via "default" setup """ %patch %(pkgdir)/0001-glib-gutils-Support-stateless-fallback-XDG_CONFIG_DI.patch %patch %(pkgdir)/0001-gdesktopappinfo-Support-ptyxis-for-executing-.deskto.patch %meson -Dtests=false -Dinstalled_tests=false """ build """ %meson_build """ install """ %meson_install %python_compile %install_file %(pkgdir)/trigger.yaml %(installroot)/usr/share/moss/triggers/tx.d/glib2.yaml %install_file %(pkgdir)/glibconfig.h %(installroot)%(includedir)/glib-2.0/glibconfig.h """ // These are manually specified patterns that belong to the named (sub)-packages packages { "%(name)-i686-devel" { paths { "/usr/share/gdb/auto-load/usr/aerynos-i686-linux" "/usr/aerynos-i686-linux/glib-2.0/include" } } "%(name)-devel" { paths { "/usr/share/gdb/auto-load/usr/lib" "/usr/lib/glib-2.0/include" } } } // All profiles to be built must be listed here. Profiles are valid chost strings. // In the future, specific chost binaries and libraries will be saved in native cross-compile paths // in the form /usr/%(chost)/{bin,lib,libexec,(...)/ profiles { aerynos-i686-linux { builddeps { append { // appends to the default build dependencies above pkgconfig32 libelf pkgconfig32 libffi pkgconfig32 libpcre2-8 pkgconfig32 mount pkgconfig32 zlib } } setup { // actions are append, prepend, override (of the default sections above) override """ %patch %(pkgdir)/0001-glib-gutils-Support-stateless-fallback-XDG_CONFIG_DI.patch %patch %(pkgdir)/0001-gdesktopappinfo-Support-ptyxis-for-executing-.deskto.patch %meson -Dtests=false -Dinstalled_tests=false -Dintrospection=disabled """ } build default install default } aerynos-x86_64-v2-linux default aerynos-x86_64-v3x-linux default aerynos-x86_64-v4-linux default } ```
3 条评论