15fe2aa
Name:           glib2
03e2e26
Version:        2.80.0
15fe2aa
Release:        %autorelease
15fe2aa
Summary:        A library of handy utility functions
f19e684
15fe2aa
License:        LGPL-2.1-or-later
15fe2aa
URL:            https://www.gtk.org
03e2e26
Source:         https://download.gnome.org/sources/glib/2.80/glib-%{version}.tar.xz
ec78e22
1f79f05
# Required for RHEL core crypto components policy. Good for Fedora too.
1f79f05
# https://bugzilla.redhat.com/show_bug.cgi?id=1630260
Michael Catanzaro f52f413
# https://gitlab.gnome.org/GNOME/glib/-/merge_requests/903
15fe2aa
Patch:          gnutls-hmac.patch
Michael Catanzaro f52f413
Richard Hughes 744bd63
# recent close_range() changes break CircleCI and GitHub actions -- we can remove this when
Richard Hughes 744bd63
# the baremetal Docker is updated there i.e. lets be a little bit pragmatic...
15fe2aa
Patch:          gspawn-eperm.patch
Richard Hughes 744bd63
15fe2aa
BuildRequires:  gcc
15fe2aa
BuildRequires:  gcc-c++
15fe2aa
BuildRequires:  gettext
15fe2aa
BuildRequires:  perl-interpreter
978e8ff
# for sys/inotify.h
15fe2aa
BuildRequires:  glibc-devel
15fe2aa
BuildRequires:  libattr-devel
15fe2aa
BuildRequires:  libselinux-devel
15fe2aa
BuildRequires:  meson
Mark Wielaard 064a5ee
# for sys/sdt.h
15fe2aa
BuildRequires:  systemtap-sdt-devel
f7008d2
BuildRequires:  pkgconfig(gi-docgen)
15fe2aa
BuildRequires:  pkgconfig(libelf)
15fe2aa
BuildRequires:  pkgconfig(libffi)
15fe2aa
BuildRequires:  pkgconfig(libpcre2-8)
15fe2aa
BuildRequires:  pkgconfig(mount)
15fe2aa
BuildRequires:  pkgconfig(sysprof-capture-4)
15fe2aa
BuildRequires:  pkgconfig(zlib)
15fe2aa
BuildRequires:  python3-devel
f7008d2
BuildRequires:  /usr/bin/g-ir-scanner
15fe2aa
BuildRequires:  /usr/bin/marshalparser
f7008d2
BuildRequires:  /usr/bin/rst2man
31b382d
1f79f05
# For gnutls-hmac.patch. We now dlopen libgnutls.so.30 so that we can build a
1f79f05
# static glib2 without depending on a static build of GnuTLS as well. This will
1f79f05
# ensure we notice if the GnuTLS soname bumps, so that we can update our patch.
cd6f9cf
%if 0%{?__isa_bits} == 64
1f79f05
Requires: libgnutls.so.30()(64bit)
1f79f05
%else
d9cced2
Requires: libgnutls.so.30
1f79f05
%endif
1f79f05
Michael Catanzaro 0291724
Provides: bundled(gvdb)
Michael Catanzaro 0291724
Provides: bundled(libcharset)
Michael Catanzaro 0291724
Provides: bundled(xdgmime)
Michael Catanzaro 0291724
f7008d2
# glib typelib files moved from gobject-introspection to glib2 in F40
f7008d2
Conflicts: gobject-introspection < 1.79.1
f7008d2
e06d22f
%description
b853add
GLib is the low-level core library that forms the basis for projects
b853add
such as GTK+ and GNOME. It provides data structure handling for C,
b853add
portability wrappers, and interfaces for such runtime functionality
b853add
as an event loop, threads, dynamic loading, and an object system.
cvsdist 3be0864
f157144
cvsdist 3be0864
%package devel
e91a444
Summary: A library of handy utility functions
25351c5
Requires: %{name}%{?_isa} = %{version}-%{release}
770dc4f
# Required by gdbus-codegen
770dc4f
Requires: python3-packaging
f7008d2
# glib gir files moved from gobject-introspection-devel to glib2-devel in F40
f7008d2
Conflicts: gobject-introspection-devel < 1.79.1
cvsdist 3be0864
cvsdist 3be0864
%description devel
b853add
The glib2-devel package includes the header files for the GLib library.
cvsdist 3be0864
3d798c3
%package doc
3d798c3
Summary: A library of handy utility functions
cf9e0c3
Requires: %{name}%{?_isa} = %{version}-%{release}
3d798c3
3d798c3
%description doc
3d798c3
The glib2-doc package includes documentation for the GLib library.
3d798c3
8d1f256
%package static
8d1f256
Summary: glib static
8d1f256
Requires: %{name}-devel = %{version}-%{release}
5653dff
Requires: pcre2-static
5653dff
Requires: sysprof-capture-static
8d1f256
8d1f256
%description static
8d1f256
The %{name}-static subpackage contains static libraries for %{name}.
8d1f256
25351c5
%package tests
25351c5
Summary: Tests for the glib2 package
25351c5
Requires: %{name}%{?_isa} = %{version}-%{release}
25351c5
25351c5
%description tests
25351c5
The glib2-tests package contains tests that can be used to verify
25351c5
the functionality of the installed glib2 package.
25351c5
cvsdist fff9915
%prep
78ad5e0
%autosetup -n glib-%{version} -p1
50d046e
dce999b
%build
9f7e13d
%meson \
9f7e13d
    -Dman=true \
9f7e13d
    -Ddtrace=true \
9f7e13d
    -Dsystemtap=true \
6f01bd7
    -Dsysprof=enabled \
dfa01c8
    -Dglib_debug=disabled \
9f7e13d
    -Dgtk_doc=true \
Michael Catanzaro a6c3663
    -Dinstalled_tests=true \
Michael Catanzaro a6c3663
    -Dgnutls=true \
Michael Catanzaro a6c3663
    --default-library=both \
Michael Catanzaro a6c3663
    %{nil}
9f7e13d
9f7e13d
%meson_build
d2ad172
cvsdist fff9915
%install
9f7e13d
%meson_install
947d874
947d874
# We need reproducible .pyc files across architectures to support multilib installations
947d874
# https://bugzilla.redhat.com/show_bug.cgi?id=2008912
947d874
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_Appendix/#_byte_compilation_reproducibility
947d874
%global py_reproducible_pyc_path %{buildroot}%{_datadir}
947d874
947d874
# Since this is a generated .py file, set it to a known timestamp
947d874
# because the source timestamp is baked into the .pyc file
de2e4aa
# Also copy the timestamp for other .py files, because meson doesn't
de2e4aa
# do this, see https://github.com/mesonbuild/meson/issues/5027.
f45e5da
touch -r gio/gdbus-2.0/codegen/config.py.in %{buildroot}%{_datadir}/glib-2.0/codegen/*.py
947d874
de2e4aa
# Perform byte compilation manually to avoid issues with
de2e4aa
# irreproducibility of the default invalidation mode, see
12007a2
# https://www.python.org/dev/peps/pep-0552/ and
12007a2
# https://bugzilla.redhat.com/show_bug.cgi?id=1686078
947d874
%py_byte_compile %{python3} %{buildroot}%{_datadir}
de2e4aa
ee2a246
mv %{buildroot}%{_bindir}/gio-querymodules %{buildroot}%{_bindir}/gio-querymodules-%{__isa_bits}
ee2a246
sed -i -e "/^gio_querymodules=/s/gio-querymodules/gio-querymodules-%{__isa_bits}/" %{buildroot}%{_libdir}/pkgconfig/gio-2.0.pc
05ecd7b
341fea0
mkdir -p %{buildroot}%{_libdir}/gio/modules
f45e5da
touch %{buildroot}%{_libdir}/gio/modules/giomodule.cache
92eb058
cvsdist fff9915
%find_lang glib20
cvsdist fff9915
6755798
%transfiletriggerin -- %{_libdir}/gio/modules
801e4a1
gio-querymodules-%{__isa_bits} %{_libdir}/gio/modules &> /dev/null || :
c13999f
6755798
%transfiletriggerpostun -- %{_libdir}/gio/modules
801e4a1
gio-querymodules-%{__isa_bits} %{_libdir}/gio/modules &> /dev/null || :
cvsdist fff9915
6755798
%transfiletriggerin -- %{_datadir}/glib-2.0/schemas
801e4a1
glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
6755798
6755798
%transfiletriggerpostun -- %{_datadir}/glib-2.0/schemas
801e4a1
glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
cvsdist fff9915
cvsdist fff9915
%files -f glib20.lang
d160263
%license LICENSES/LGPL-2.1-or-later.txt
d160263
%doc NEWS README.md
1379742
%{_libdir}/libglib-2.0.so.0*
1379742
%{_libdir}/libgthread-2.0.so.0*
1379742
%{_libdir}/libgmodule-2.0.so.0*
1379742
%{_libdir}/libgobject-2.0.so.0*
1379742
%{_libdir}/libgio-2.0.so.0*
f7008d2
%{_libdir}/libgirepository-2.0.so.0*
f7008d2
%dir %{_libdir}/girepository-1.0
f7008d2
%{_libdir}/girepository-1.0/GIRepository-3.0.typelib
f7008d2
%{_libdir}/girepository-1.0/GLib-2.0.typelib
03e2e26
%{_libdir}/girepository-1.0/GLibUnix-2.0.typelib
f7008d2
%{_libdir}/girepository-1.0/GModule-2.0.typelib
f7008d2
%{_libdir}/girepository-1.0/GObject-2.0.typelib
f7008d2
%{_libdir}/girepository-1.0/Gio-2.0.typelib
03e2e26
%{_libdir}/girepository-1.0/GioUnix-2.0.typelib
e33b45d
%dir %{_datadir}/bash-completion
e33b45d
%dir %{_datadir}/bash-completion/completions
Richard Hughes 3be72f9
%{_datadir}/bash-completion/completions/gapplication
e17445b
%{_datadir}/bash-completion/completions/gdbus
9617870
%{_datadir}/bash-completion/completions/gio
e17445b
%{_datadir}/bash-completion/completions/gsettings
5cb4d6c
%dir %{_datadir}/glib-2.0
5cb4d6c
%dir %{_datadir}/glib-2.0/schemas
849d436
%dir %{_libdir}/gio
849d436
%dir %{_libdir}/gio/modules
92eb058
%ghost %{_libdir}/gio/modules/giomodule.cache
e80d992
%{_bindir}/gio
c13999f
%{_bindir}/gio-querymodules*
04a7a35
%{_bindir}/glib-compile-schemas
bc373de
%{_bindir}/gsettings
6a9cab0
%{_bindir}/gdbus
Richard Hughes 3be72f9
%{_bindir}/gapplication
aa10a29
%{_libexecdir}/gio-launch-desktop
e80d992
%{_mandir}/man1/gio.1*
cc555d1
%{_mandir}/man1/gio-querymodules.1*
cc555d1
%{_mandir}/man1/glib-compile-schemas.1*
cc555d1
%{_mandir}/man1/gsettings.1*
cc555d1
%{_mandir}/man1/gdbus.1*
cc555d1
%{_mandir}/man1/gapplication.1*
cvsdist fff9915
cvsdist fff9915
%files devel
fe30d5e
%{_libdir}/lib*.so
758bebd
%{_libdir}/glib-2.0
cvsdist fff9915
%{_includedir}/*
cvsdist fff9915
%{_datadir}/aclocal/*
cvsdist fff9915
%{_libdir}/pkgconfig/*
16e7fdb
%{_datadir}/glib-2.0/dtds
e53437d
%{_datadir}/glib-2.0/gdb
eb0dd09
%{_datadir}/glib-2.0/gettext
df81c20
%{_datadir}/glib-2.0/schemas/gschema.dtd
Richard Hughes 6eddb09
%{_datadir}/glib-2.0/valgrind/glib.supp
1dfb213
%{_datadir}/bash-completion/completions/gresource
ed966ca
%{_bindir}/glib-genmarshal
ed966ca
%{_bindir}/glib-gettextize
ed966ca
%{_bindir}/glib-mkenums
03e2e26
%{_bindir}/gi-compile-repository
03e2e26
%{_bindir}/gi-decompile-typelib
03e2e26
%{_bindir}/gi-inspect-typelib
ed966ca
%{_bindir}/gobject-query
ed966ca
%{_bindir}/gtester
390e20c
%{_bindir}/gdbus-codegen
1a5af75
%{_bindir}/glib-compile-resources
45490ab
%{_bindir}/gresource
3d798c3
%{_datadir}/glib-2.0/codegen
ed966ca
%attr (0755, root, root) %{_bindir}/gtester-report
cc555d1
%{_mandir}/man1/glib-genmarshal.1*
cc555d1
%{_mandir}/man1/glib-gettextize.1*
cc555d1
%{_mandir}/man1/glib-mkenums.1*
03e2e26
%{_mandir}/man1/gi-compile-repository.1*
03e2e26
%{_mandir}/man1/gi-decompile-typelib.1*
03e2e26
%{_mandir}/man1/gi-inspect-typelib.1*
cc555d1
%{_mandir}/man1/gobject-query.1*
cc555d1
%{_mandir}/man1/gtester-report.1*
cc555d1
%{_mandir}/man1/gtester.1*
cc555d1
%{_mandir}/man1/gdbus-codegen.1*
cc555d1
%{_mandir}/man1/glib-compile-resources.1*
cc555d1
%{_mandir}/man1/gresource.1*
720a3c0
%{_datadir}/gdb/
f7008d2
%dir %{_datadir}/gir-1.0
f7008d2
%{_datadir}/gir-1.0/GIRepository-3.0.gir
f7008d2
%{_datadir}/gir-1.0/GLib-2.0.gir
03e2e26
%{_datadir}/gir-1.0/GLibUnix-2.0.gir
f7008d2
%{_datadir}/gir-1.0/GModule-2.0.gir
f7008d2
%{_datadir}/gir-1.0/GObject-2.0.gir
f7008d2
%{_datadir}/gir-1.0/Gio-2.0.gir
03e2e26
%{_datadir}/gir-1.0/GioUnix-2.0.gir
78b0c0f
%{_datadir}/gettext/
720a3c0
%{_datadir}/systemtap/
837c11b
3d798c3
%files doc
f7008d2
%{_datadir}/doc/glib-2.0/
3d798c3
8d1f256
%files static
8d1f256
%{_libdir}/libgio-2.0.a
03e2e26
%{_libdir}/libgirepository-2.0.a
8d1f256
%{_libdir}/libglib-2.0.a
8d1f256
%{_libdir}/libgmodule-2.0.a
8d1f256
%{_libdir}/libgobject-2.0.a
8d1f256
%{_libdir}/libgthread-2.0.a
8d1f256
25351c5
%files tests
Debarshi Ray b947f05
%{_libexecdir}/installed-tests
25351c5
%{_datadir}/installed-tests
25351c5
cvsdist 3be0864
%changelog
9c6c2dc
%autochangelog