fix build fail on i686

This commit is contained in:
wangkerong 2022-02-19 10:20:25 +08:00
parent 16f4613404
commit 2098f8a6fb

View File

@ -1,6 +1,6 @@
Name: glib2
Version: 2.68.1
Release: 6
Release: 7
Summary: The core library that forms the basis for projects such as GTK+ and GNOME
License: LGPLv2+
URL: http://www.gtk.org
@ -9,12 +9,14 @@ Source0: http://download.gnome.org/sources/glib/2.68/glib-%{version}.tar.
Patch6000: backport-correctly-use-3-parameters-for-clise-range.patch
Patch6001: backport-fix-a-memory-leak.patch
BuildRequires: chrpath gcc gcc-c++ gettext gtk-doc perl-interpreter
BuildRequires: chrpath gcc gcc-c++ gettext perl-interpreter
BUildRequires: glibc-devel libattr-devel libselinux-devel meson
BuildRequires: systemtap-sdt-devel pkgconfig(libelf) pkgconfig(libffi)
BuildRequires: pkgconfig(libpcre) pkgconfig(mount) pkgconfig(zlib)
BuildRequires: python3-devel pkgconfig(sysprof-capture-4)
BuildRequires: desktop-file-utils shared-mime-info
BuildRequires: python3-devel
%ifnarch i686
BuildRequires: desktop-file-utils shared-mime-info gtk-doc pkgconfig(sysprof-capture-4)
%endif
Provides: %{name}-fam = %{version}-%{release}
Obsoletes: %{name}-fam < %{version}-%{release}
@ -42,6 +44,7 @@ Obsoletes: %{name}-tests < %{version}-%{release}
%description devel
Development and test files for the GLib library.
%ifnarch i686
%package help
Summary: help document for the glib2 package
Buildarch: noarch
@ -50,14 +53,20 @@ Obsoletes: %{name}-doc < %{version}-%{release}
%description help
help document for the glib2 package.
%endif
%prep
%autosetup -n glib-%{version} -p1
%build
rm glib/pcre/*.[ch]
%meson --default-library=both -Dman=true -Ddtrace=true -Dsysprof=enabled \
-Dsystemtap=true -Dgtk_doc=true -Dinstalled_tests=true
%meson --default-library=both -Ddtrace=true \
%ifnarch i686
-Dsysprof=enabled -Dman=true -Dgtk_doc=true \
%else
-Dsysprof=disabled -Dman=false -Dgtk_doc=false \
%endif
-Dsystemtap=true -Dinstalled_tests=true
%meson_build
@ -148,12 +157,20 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
%{_bindir}/gresource
%attr (0755, root, root) %{_bindir}/gtester-report
%ifnarch i686
%files help
%defattr(-,root,root)
%{_mandir}/man1/*
%doc %{_datadir}/gtk-doc/html/*
%endif
%changelog
* Sat Feb 19 2022 wangkerong<wangkerong@h-partners.com> - 2.68.1-7
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:add i686 optionsfix build failure on i686
* Mon Nov 14 2021 fengtao<fengtao40@huawei.com> - 2.68.1-6
- Type:bugfix
- Id:NA
@ -265,4 +282,4 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
- DESC:fix CVE-2019-12450 CVE-2019-13012
* Thu Sep 19 2019 Lijin Yang <yanglijin@huawei.com> - 2.58.1-2
- Package init
- Package init