File: gobject-introspection.README.Debian

package info (click to toggle)
gobject-introspection 1.84.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 72,336 kB
  • sloc: ansic: 562,269; python: 23,692; xml: 16,240; yacc: 1,711; perl: 1,624; sh: 1,139; lex: 510; cpp: 487; makefile: 182; javascript: 15; lisp: 1
file content (131 lines) | stat: -rw-r--r-- 4,889 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
GObject-Introspection in Debian
===============================

Enabling cross-compiling for packages that generate introspection data
----------------------------------------------------------------------

Early-adopter example packages include src:graphene (Meson)
and src:ostree (Autotools).

1. Build-dependencies:

    * Build-depend on at least:

          gobject-introspection,
          gobject-introspection (>= 1.78.1-9~) <cross>,

      If the package will not be backported then it is OK to simplify
      this into:

          gobject-introspection (>= 1.78.1-9~),

    * Build-depend on gir1.2-NAMESPACE-VERSION-dev for each
      NAMESPACE-VERSION that is passed to g-ir-scanner --include

    * Build-depend on dh-sequence-gir (optional but recommended)

    * Don't build-depend on libgirepository1.0-dev, which is not
      multiarch-friendly for historical reasons

      - If your build requires vapigen (#1060904), cppgir (#1060906),
        haskell-haskell-gi (#1060907), gir-to-d (1060909) or
        blueprint-compiler (#1060916) then workarounds are likely to
        be needed

    * You might need to build-depend on gir1.2-freedesktop-dev or
      gir1.2-glib-2.0-dev, if they are an indirect dependency via a
      package that has not yet picked them up as a direct dependency

    * Only build-depend on libgirepository-1.0-dev if the package also
      needs to link to libgirepository-1.0.so.1 (usually only language
      bindings will need to do this)

2. Configuration of upstream build system:

    * Meson wants all cross-tools to be specified in a cross-file and
      uses a build-architecture version from pkgconf otherwise (#1060838).
      Until/unless we can solve this more centrally, use the cross-file
      provided by the gobject-introspection package since 1.78.1-6:

      ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
      configure_options += --cross-file=$(DEB_HOST_GNU_TYPE)-gobject-introspection.ini
      endif

      override_dh_auto_configure:
              dh_auto_configure -- $(configure_options)

    * Autotools already discovers g-ir-scanner and g-ir-compiler from the
      host architecture pkgconf, and picks up the
      ${DEB_HOST_GNU_TYPE}-prefixed tools.

    * Commonly-used CMake macros appear to have the same behaviour as
      Autotools, so hopefully they will work as-is.

    * For others, use ${DEB_HOST_GNU_TYPE}-g-ir-scanner instead of
      g-ir-scanner, and ${DEB_HOST_GNU_TYPE}-g-ir-compiler instead of
      g-ir-compiler.

3. Runtime dependencies:

    * Add ${gir:Depends} to all gir1.2-* packages

    * Add ${gir:Depends} to -dev packages if they contain GIR XML

    * Add ${gir:Provides} to all gir1.2-* packages
      (not necessary if the package only contains one typelib and its name
      fits the systematic pattern, e.g. Foo-0.typelib -> gir1.2-foo-0)

    * Add ${gir:Provides} to -dev packages if they contain GIR XML
      (not necessary if the package only contains one GIR XML file and its
      name fits the systematic pattern, e.g. Foo-0.gir -> gir1.2-foo-0-dev)

    * Or if you are not using dh-sequence-gir, add the same Depends
      and Provides manually

Making GObject-Introspection optional, for bootstrapping
--------------------------------------------------------

1. Preparation:

    * Make sure any gir1.2-* package has ${gir:Provides},
      unless the package only contains one typelib and its name
      fits the systematic pattern, e.g. Foo-0.typelib -> gir1.2-foo-0

    * Make sure any -dev package containing GIR XML has ${gir:Provides},
      unless the package only contains one GIR XML file and its name
      fits the systematic pattern, e.g. Foo-0.gir -> gir1.2-foo-0-dev

2. Preparation in reverse dependencies:

    * Identify all reverse dependencies that generate GIR XML/typelibs
      (for example gtk4 -> libadwaita-1)

    * For each reverse dependency, add Build-Depends: gir1.2-foo-0-dev

    * Ideally, upload all reverse dependencies

3. Binary package stanzas:

    * Add Build-Profiles: <!nogir> to each gir1.2-* package

4. -dev packages with GIR XML:

    * If GIR XML is in a separate gir1.2-foo-0-dev package, then it can
      have Build-Profiles: <!nogir>.
      This is recommended in the long term, but for existing packages
      it requires changing all reverse-dependencies to explicitly
      build-depend on gir1.2-*-dev, and then going through the NEW queue;
      see below.

    * If GIR XML is in libfoo-dev, you will have to use dh-exec or similar
      to avoid installing the GIR XML if it was not built

5. Configuration of upstream build system

    * Disable introspection (typically meson setup -Dintrospection=disabled
      or ./configure --disable-introspection) if the nogir profile is active

6. Build-dependencies

    * Annotate libgirepository1.0-dev, gobject-introspection, gir1.2-*, etc.
      with <!nogir>