From 9f7e13d0dba89cc8ae7fd67a34622ad2e0718fd9 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Thu, 3 Jan 2019 13:57:37 +0100 Subject: [PATCH] Switch to the meson build system --- glib2.spec | 37 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/glib2.spec b/glib2.spec index 6e25548..35f5707 100644 --- a/glib2.spec +++ b/glib2.spec @@ -20,11 +20,13 @@ BuildRequires: chrpath BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: gettext +BuildRequires: gtk-doc BuildRequires: perl-interpreter # for sys/inotify.h BuildRequires: glibc-devel BuildRequires: libattr-devel BuildRequires: libselinux-devel +BuildRequires: meson # for sys/sdt.h BuildRequires: systemtap-sdt-devel BuildRequires: pkgconfig(libelf) @@ -32,9 +34,6 @@ BuildRequires: pkgconfig(libffi) BuildRequires: pkgconfig(libpcre) BuildRequires: pkgconfig(mount) BuildRequires: pkgconfig(zlib) -# Bootstrap build requirements -BuildRequires: automake autoconf libtool -BuildRequires: gtk-doc BuildRequires: python3-devel # for GIO content-type support @@ -91,36 +90,25 @@ the functionality of the installed glib2 package. %build # Bug 1324770: Also explicitly remove PCRE sources since we use --with-pcre=system rm glib/pcre/*.[ch] -# Support builds of both git snapshots and tarballs packed with autogoo -(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; CONFIGFLAGS=--enable-gtk-doc; fi; - %configure $CONFIGFLAGS \ - --disable-silent-rules \ - --with-python=%{__python3} \ - --with-pcre=system \ - --enable-systemtap \ - --enable-static \ - --enable-installed-tests -) +%meson \ + --default-library=both \ + -Dman=true \ + -Ddtrace=true \ + -Dsystemtap=true \ + -Dgtk_doc=true \ + -Dfam=true \ + -Dinstalled_tests=true -%make_build +%meson_build %install -%make_install +%meson_install # Since this is a generated .py file, set it to a known timestamp, # otherwise it will vary by build time, and thus break multilib -devel # installs. touch -r gio/gdbus-2.0/codegen/config.py.in $RPM_BUILD_ROOT/%{_datadir}/glib-2.0/codegen/config.py chrpath --delete $RPM_BUILD_ROOT%{_libdir}/*.so -rm -f $RPM_BUILD_ROOT%{_libdir}/*.la -rm -f $RPM_BUILD_ROOT%{_libdir}/gio/modules/*.{a,la} -# Remove python files bytecompiled by the build system. rpmbuild regenerates -# them again later in a brp script using the timestamps set above. -rm -f $RPM_BUILD_ROOT%{_datadir}/glib-2.0/gdb/*.{pyc,pyo} -rm -f $RPM_BUILD_ROOT%{_datadir}/glib-2.0/gdb/__pycache__/ -rm -f $RPM_BUILD_ROOT%{_datadir}/glib-2.0/codegen/*.{pyc,pyo} -rm -rf $RPM_BUILD_ROOT%{_datadir}/glib-2.0/codegen/__pycache__/ - mv $RPM_BUILD_ROOT%{_bindir}/gio-querymodules $RPM_BUILD_ROOT%{_bindir}/gio-querymodules-%{__isa_bits} touch $RPM_BUILD_ROOT%{_libdir}/gio/modules/giomodule.cache @@ -229,6 +217,7 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : %changelog * Thu Jan 03 2019 Kalev Lember - 2.59.0-1 - Update to 2.59.0 +- Switch to the meson build system * Tue Dec 18 2018 Kalev Lember - 2.58.2-1 - Update to 2.58.2