Switch to meson build system

This commit is contained in:
Kalev Lember 2020-06-02 16:54:52 +02:00
parent 754057ff24
commit ccced52da4

View File

@ -23,6 +23,9 @@ BuildRequires: pkgconfig(adwaita-icon-theme)
BuildRequires: pkgconfig(gio-unix-2.0) >= %{glib2_version}
BuildRequires: pkgconfig(gnome-desktop-3.0)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(gstreamer-1.0)
BuildRequires: pkgconfig(gstreamer-base-1.0)
BuildRequires: pkgconfig(gstreamer-video-1.0)
BuildRequires: pkgconfig(gtk+-x11-3.0) >= %{gtk3_version}
BuildRequires: pkgconfig(libsecret-1)
BuildRequires: pkgconfig(libspectre)
@ -31,12 +34,11 @@ BuildRequires: pkgconfig(poppler-glib) >= %{poppler_version}
BuildRequires: pkgconfig(libarchive)
BuildRequires: pkgconfig(gspell-1)
BuildRequires: libtiff-devel
BuildRequires: libtool
BuildRequires: gtk-doc
BuildRequires: yelp-tools
BuildRequires: /usr/bin/desktop-file-validate
BuildRequires: libappstream-glib-devel
BuildRequires: gnome-common
BuildRequires: meson
%if ! 0%{?flatpak}
BuildRequires: pkgconfig(synctex) >= %{synctex_version}
# for the nautilus properties page
@ -121,44 +123,29 @@ It adds an additional tab called "Document" to the file properties dialog.
%autosetup -p1
%build
autoreconf -f -i
%configure \
--disable-static \
--enable-introspection \
%meson \
%if 0%{?fedora} || 0%{?rhel} > 7
--enable-comics=yes \
-Dcomics=enabled \
%endif
--enable-dvi=yes \
--enable-libgnome-desktop \
-Ddvi=enabled \
%if 0%{?fedora}
--enable-djvu=yes \
-Ddjvu=enabled \
%endif
--enable-xps=yes \
--enable-t1lib=no \
-Dxps=enabled \
-Dt1lib=disabled \
%if 0%{?flatpak}
--without-systemduserunitdir \
--disable-nautilus \
-Dsystemduserunitdir=no \
-Dnautilus=disabled \
%endif
--enable-ps=yes
make %{?_smp_mflags} V=1 LIBTOOL=/usr/bin/libtool
-Dps=enabled
%meson_build
%install
%make_install
%meson_install
%find_lang evince --with-gnome
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
# Get rid of static libs and .la files.
rm -f $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins/*.a
%if ! 0%{?flatpak}
rm -f $RPM_BUILD_ROOT%{_libdir}/nautilus/extensions-3.0/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/nautilus/extensions-3.0/*.a
%endif
rm -f $RPM_BUILD_ROOT%{_libdir}/evince/4/backends/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/evince/4/backends/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
%check
appstream-util validate-relax --nonet $RPM_BUILD_ROOT%{_datadir}/metainfo/org.gnome.Evince.appdata.xml
@ -253,6 +240,7 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.Evince-p
%changelog
* Tue Jun 02 2020 Kalev Lember <klember@redhat.com> - 3.36.3-1
- Update to 3.36.3
- Switch to meson build system
* Tue May 19 2020 Kalev Lember <klember@redhat.com> - 3.36.1-1
- Update to 3.36.1