|
| 1 | +-- gnome.gobject — part of GLib 2.82.5. |
| 2 | +-- |
| 3 | +-- Upstream ships glib as one source tree producing FOUR separate shared |
| 4 | +-- libraries, and this index follows that split: `gnome.glib`, |
| 5 | +-- `gnome.gobject` and `gnome.gmodule` are three packages from one fork, |
| 6 | +-- because that is what a consumer links. (The fourth, gio, is absent — see |
| 7 | +-- below.) |
| 8 | +-- |
| 9 | +-- ───────────────────────────────────────────────────────────────────────── |
| 10 | +-- WHY A FORK |
| 11 | +-- |
| 12 | +-- Generators, not line count. GLib has six, and `build.mcpp` reimplements all |
| 13 | +-- of them, so the tree carries no `sh` and no `python`: |
| 14 | +-- |
| 15 | +-- gen-visibility-macros.py versions-macros glib/gversionmacros.h |
| 16 | +-- gen-visibility-macros.py visibility-macros three *-visibility.h |
| 17 | +-- configure_file glibconfig.h |
| 18 | +-- configure_file gmodule/gmoduleconf.h |
| 19 | +-- gobject/glib-mkenums (816 lines of Python) glib-enumtypes.{h,c} |
| 20 | +-- configure_file config.h |
| 21 | +-- |
| 22 | +-- glib-mkenums is reproduced FOR THE ONE INPUT this build points it at — |
| 23 | +-- `glib/gunicode.h`, four enums — rather than wholesale. It reads upstream's |
| 24 | +-- `.template` files from the tree so a template change is picked up, and |
| 25 | +-- exits non-zero if that header stops yielding four enums: a silent drop |
| 26 | +-- would produce a library missing `g_unicode_script_get_type` and the failure |
| 27 | +-- would land in a consumer. |
| 28 | +-- |
| 29 | +-- https://github.com/mcpplibs/glib |
| 30 | +-- |
| 31 | +-- ───────────────────────────────────────────────────────────────────────── |
| 32 | +-- ⚠️ C++ CONSUMERS MUST WRAP THE INCLUDES |
| 33 | +-- |
| 34 | +-- glib's headers carry their own `G_BEGIN_DECLS`, so this is usually fine — |
| 35 | +-- but the generated `glib-enumtypes.h` comes from a template, and wrapping |
| 36 | +-- costs nothing: |
| 37 | +-- |
| 38 | +-- extern "C" { |
| 39 | +-- #include <glib-object.h> |
| 40 | +-- } |
| 41 | +-- |
| 42 | +-- There is no module. glib's API is macro-heavy — `G_DEFINE_TYPE`, |
| 43 | +-- `G_OBJECT`, `g_signal_connect` are all macros — and macros do not cross a |
| 44 | +-- module boundary, so an `import` would hand a consumer the declarations and |
| 45 | +-- withhold the half of the API that makes them usable. Compare |
| 46 | +-- `wlroots.wlroots`, where the module is the ONLY way in because the headers |
| 47 | +-- are not valid C++ at all: the shape follows what upstream's headers are, |
| 48 | +-- not a house style. |
| 49 | +-- |
| 50 | +-- ───────────────────────────────────────────────────────────────────────── |
| 51 | +-- ⚠️ gio IS NOT IN THIS INDEX, AND THAT BLOCKS pango |
| 52 | +-- |
| 53 | +-- Two of gio's six generators are `gdbus-codegen`, an 8,351-line Python |
| 54 | +-- program that turns D-Bus interface XML into GObject skeletons. Seven gio |
| 55 | +-- sources include its output and two more reference those, so it cannot be |
| 56 | +-- dropped without changing what gio is, and reimplementing it in |
| 57 | +-- `build.mcpp` is not proportionate. |
| 58 | +-- |
| 59 | +-- pango uses `GListModel`, which lives in gio, so the text-layout line stops |
| 60 | +-- here. Measured and recorded rather than left as an unexplained gap. |
| 61 | +-- |
| 62 | +-- ───────────────────────────────────────────────────────────────────────── |
| 63 | +-- LINUX ONLY |
| 64 | +-- |
| 65 | +-- The generated `glibconfig.h` fixes `G_OS_UNIX`, the POSIX thread |
| 66 | +-- implementation and the poll constants, and `build.mcpp` refuses to run |
| 67 | +-- anywhere else rather than emitting a header that is quietly wrong. The |
| 68 | +-- upstream tree also contains two `COPYING` symlinks, which a Windows |
| 69 | +-- extraction would not survive — one more reason the descriptor offers |
| 70 | +-- `linux` alone. |
| 71 | +package = { |
| 72 | + spec = "1", |
| 73 | + namespace = "gnome", |
| 74 | + name = "gobject", |
| 75 | + description = "GObject 2.82.5 — the GLib type system: GType, signals, properties, closures and GValue", |
| 76 | + licenses = {"LGPL-2.1-or-later"}, |
| 77 | + repo = "https://github.com/mcpplibs/glib", |
| 78 | + type = "package", |
| 79 | + |
| 80 | + xpm = { |
| 81 | + linux = { |
| 82 | + ["2.82.5"] = { |
| 83 | + url = { |
| 84 | + GLOBAL = "https://github.com/mcpplibs/glib/archive/refs/tags/2.82.5.tar.gz", |
| 85 | + -- ⚠️ The container tag is `2.82.5-1`, not `2.82.5`. The fork's |
| 86 | + -- tag was re-cut once while this descriptor was still |
| 87 | + -- unpublished — safe only because nothing had extracted it |
| 88 | + -- yet — and gitcode refuses to REPLACE an asset of the same |
| 89 | + -- name in an existing release. Verified: this URL's sha256 |
| 90 | + -- equals the GLOBAL tarball's. |
| 91 | + CN = "https://gitcode.com/mcpp-res/glib/releases/download/2.82.5-1/glib-2.82.5.tar.gz", |
| 92 | + }, |
| 93 | + sha256 = "98118dacf3ebc9d5aefba340e9248385f1643b76ca672b864c37a3e4fb71caf6", |
| 94 | + }, |
| 95 | + }, |
| 96 | + }, |
| 97 | + |
| 98 | + mcpp = "*/mcpp/gobject/mcpp.toml", |
| 99 | +} |
0 commit comments