summaryrefslogtreecommitdiffstats
path: root/vips.spec
diff options
context:
space:
mode:
authorKleis Auke Wolthuizen <github@kleisauke.nl>2022-11-27 19:54:12 +0100
committerRemi Collet <remi@php.net>2023-01-02 09:08:26 +0100
commit6086834a4f1d480b029e106e5e0709ed16bb81bc (patch)
treec43c93e81e47cc272eff6c6238a877cd1526907d /vips.spec
parent8bf54fc39e69087a989caa2b43b5659ba213787e (diff)
Adjustments for upcoming libvips 8.14
- Migrate build to Meson - Remove gtk-doc docs from vips-devel
Diffstat (limited to 'vips.spec')
-rw-r--r--vips.spec123
1 files changed, 57 insertions, 66 deletions
diff --git a/vips.spec b/vips.spec
index 7be6105..f568701 100644
--- a/vips.spec
+++ b/vips.spec
@@ -7,11 +7,16 @@
#
# Please preserve changelog entries
#
-%global vips_version_base 8.13
-%global vips_version %{vips_version_base}.3
+%global vips_version_base 8.14
+%global vips_version %{vips_version_base}.0
%global vips_soname_major 42
-#global vips_prever rc2
-%global vips_tarver %{vips_version}%{?vips_prever:-%{vips_prever}}
+%global vips_prever alpha1
+%global vips_tagver %{vips_version}%{?vips_prever:-%{vips_prever}}
+
+# TODO remove when libvips 8.14 alpha1 is released
+%global commit 4611651d90d5afe3f8628be2735a1d35be32f3b2
+%global commitdate 20221127
+%global shortcommit %(c=%{commit}; echo ${c:0:7})
%if 0%{?fedora} || 0%{?rhel} >= 8
%bcond_without doc
@@ -69,17 +74,17 @@
%endif
Name: vips
-Release: 2%{?dist}
Version: %{vips_version}%{?vips_prever:~%{vips_prever}}
+Release: 1%{?commitdate:.%{commitdate}git%{shortcommit}}%{?dist}
Summary: C/C++ library for processing large images
License: LGPLv2+
URL: https://libvips.github.io/libvips/
-Source0: https://github.com/libvips/libvips/releases/download/v%{vips_tarver}/vips-%{vips_tarver}.tar.gz
+Source0: https://github.com/libvips/libvips/archive/%{commit}/libvips-%{shortcommit}.tar.gz
-BuildRequires: make
BuildRequires: gcc
BuildRequires: gcc-c++
+BuildRequires: meson
BuildRequires: pkgconfig
BuildRequires: gettext
BuildRequires: pkgconfig(glib-2.0)
@@ -131,7 +136,6 @@ BuildRequires: bc
%endif
# Not available as system library
-# and altered by vips upstream
Provides: bundled(libnsgif)
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
@@ -307,88 +311,71 @@ exit 1
%endif
%endif
-%setup -q -n vips-%{vips_version}
-
-# make the version string consistent for multiarch
-export FAKE_BUILD_DATE=$(date -r %{SOURCE0})
-sed -i "s/\\(VIPS_VERSION_STRING=\\)\$VIPS_VERSION-\`date\`/\\1\"\$VIPS_VERSION-$FAKE_BUILD_DATE\"/g" \
- configure
-unset FAKE_BUILD_DATE
-
-# Avoid setting RPATH to /usr/lib64 on 64-bit builds
-# The DIE_RPATH_DIE trick breaks the build wrt gobject-introspection
-sed -i 's|sys_lib_dlsearch_path_spec="|sys_lib_dlsearch_path_spec="/%{_lib} %{_libdir} |' configure
-
+%setup -q -n libvips-%{commit}
%build
# Upstream recommends enabling auto-vectorization of inner loops:
-# https://github.com/jcupitt/libvips/pull/212#issuecomment-68177930
+# https://github.com/libvips/libvips/pull/212#issuecomment-68177930
export CFLAGS="%{optflags} -ftree-vectorize"
export CXXFLAGS="%{optflags} -ftree-vectorize"
-%configure \
-%if %{with heif}
- --with-heif=module \
-%else
- --without-heif \
+# TODO remove `-Dnifti-prefix-dir=/usr`:
+# https://github.com/libvips/libvips/pull/2882#issuecomment-1165686117
+# https://bugzilla.redhat.com/2099283
+# TODO remove `-Dmatio=disabled`:
+# https://bugzilla.redhat.com/2034536
+%meson \
+%if 0%{?rhel} >= 9
+ -Dmatio=disabled \
%endif
-%if %{with libimagequant}
- --with-imagequant \
-%else
- --without-imagequant \
+%if %{without heif}
+ -Dheif=disabled \
%endif
-%if %{with libcgif}
- --with-cgif \
-%else
- --without-cgif \
+%if %{without libimagequant}
+ -Dimagequant=disabled \
%endif
-%if %{with openjpeg2}
- --with-libopenjp2 \
-%else
- --without-libopenjp2 \
+%if %{without libcgif}
+ -Dcgif=disabled \
%endif
-%if %{with libspng}
- --with-libspng \
-%else
- --without-libspng \
+%if %{without openjpeg2}
+ -Dopenjpeg=disabled \
%endif
-%if %{with jxl}
- --with-libjxl=module \
+%if %{without libspng}
+ -Dspng=disabled \
+%endif
+%if %{without jxl}
+ -Djpeg-xl=disabled \
+%endif
+%if %{without niftic}
+ -Dnifti=disabled \
%else
- --without-libjxl \
+ -Dnifti-prefix-dir=/usr \
%endif
%if %{with doc}
- --enable-doxygen \
- --enable-gtk-doc \
+ -Ddoxygen=true \
+ -Dgtk_doc=true \
%endif
%if %{with gm}
- --with-magickpackage=GraphicsMagick \
+ -Dmagick-package=GraphicsMagick \
%endif
- --disable-static
-make %{?_smp_mflags}
+ -Dpdfium=disabled \
+ %{nil}
+%meson_build
%install
-make install DESTDIR=%{buildroot}
-find %{buildroot} \( -name '*.la' -o -name '*.a' \) -exec rm -f {} ';'
-
-# delete doc (we will get it later with %%doc)
-rm -rf %{buildroot}%{_datadir}/doc/vips
+%meson_install
%if 0%{?fedora} >= 29 || 0%{?rhel} >= 8
sed -e 's:/usr/bin/python:%{_bindir}/python3:' -i %{buildroot}/%{_bindir}/vipsprofile
%endif
-%if %{with doc}
-mv cplusplus/html cplusplus_html
-%endif
-
# locale stuff
%find_lang vips%{vips_version_base}
%if %{with tests}
%check
-make check
+%meson_test
%endif
@@ -399,8 +386,8 @@ make check
%files -f vips%{vips_version_base}.lang
-%doc AUTHORS NEWS THANKS README.md ChangeLog
-%license COPYING
+%doc ChangeLog README.md
+%license LICENSE
%{_libdir}/*.so.%{vips_soname_major}*
%{_libdir}/girepository-1.0
%dir %{_libdir}/vips-modules-%{vips_version_base}
@@ -411,7 +398,6 @@ make check
%{_libdir}/*.so
%{_libdir}/pkgconfig/*
%{_datadir}/gir-1.0
-%{_datadir}/gtk-doc
%files tools
@@ -421,9 +407,9 @@ make check
%if %{with doc}
%files doc
-%doc doc/html
-%doc cplusplus_html
-%license COPYING
+%{_datadir}/gtk-doc
+%{_docdir}/vips-doc/html
+%license LICENSE
%endif
@@ -460,6 +446,11 @@ make check
%changelog
+* Sun Nov 27 2022 Kleis Auke Wolthuizen <info@kleisauke.nl> - 8.14.0~alpha1-1.20221127git4611651
+- Update to libvips/libvips@4611651
+- Migrate build to Meson
+- Remove gtk-doc docs from vips-devel
+
* Mon Nov 21 2022 Remi Collet <remi@remirepo.net> - 8.13.3-2
- EL-9 rebuild for new libjxl