From d0679f8ab9d31dcfbef3493e2a646c084c17f229 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 15 Jun 2021 15:56:16 +0200 Subject: test build for fix for bad prefix guess from https://github.com/libvips/libvips/pull/2308 only use openjpeg2 >= 2.4 (Fedora >= 34) --- vips-lib64.patch | 22 ++++++++++++++++++++++ vips.spec | 31 ++++++++++++++++++------------- 2 files changed, 40 insertions(+), 13 deletions(-) create mode 100644 vips-lib64.patch diff --git a/vips-lib64.patch b/vips-lib64.patch new file mode 100644 index 0000000..edcc88b --- /dev/null +++ b/vips-lib64.patch @@ -0,0 +1,22 @@ +From ea48b6a482f4e85c967593fc8dc523e3d10a7067 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Tue, 15 Jun 2021 15:17:35 +0200 +Subject: [PATCH] use /lib64 instead of /lib when needed + +--- + libvips/iofuncs/init.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libvips/iofuncs/init.c b/libvips/iofuncs/init.c +index 74f9cdd93..b7b9e8e0b 100644 +--- a/libvips/iofuncs/init.c ++++ b/libvips/iofuncs/init.c +@@ -1226,6 +1226,8 @@ vips_guess_libdir( const char *argv0, const char *env_name ) + */ + if( strcmp( prefix, VIPS_PREFIX ) == 0 ) + libdir = VIPS_LIBDIR; ++ else if ( strstr(VIPS_LIBDIR, "/lib64") ) ++ libdir = g_strdup_printf( "%s/lib64", prefix ); + else + libdir = g_strdup_printf( "%s/lib", prefix ); + diff --git a/vips.spec b/vips.spec index 0baa953..e57da12 100644 --- a/vips.spec +++ b/vips.spec @@ -25,13 +25,14 @@ %bcond_with libimagequant %endif -%if 0%{?rhel} == 7 +%if 0%{?fedora} >= 34 +%bcond_without openjpeg2 +%else # disabled by default # as vips pulls poppler (libopenjpeg) and IM (libopenjp2) # so vips segfaults in various place +# also see https://github.com/libvips/libvips/pull/2305 %bcond_with openjpeg2 -%else -%bcond_without openjpeg2 %endif %if 0%{?fedora} @@ -43,9 +44,9 @@ %endif # 3 builds needed to get the full stack -# --without im6 --with im7 -# --without im6 --with gm -# --with heif +# --without heif --without im6 --with im7 +# --without heif --without im6 --with gm +# --with heif --with im6 %bcond_without im6 %bcond_with im7 @@ -59,7 +60,7 @@ %endif Name: vips -Release: 1%{?dist}.1 +Release: 1%{?dist}.2 Version: %{vips_version}%{?vips_prever:~%{vips_prever}} Summary: C/C++ library for processing large images @@ -67,6 +68,9 @@ License: LGPLv2+ URL: https://libvips.github.io/libvips/ Source0: https://github.com/libvips/libvips/releases/download/v%{vips_version}%{?vips_prever:-%{vips_prever}}/vips-%{vips_tarver}.tar.gz +# https://github.com/libvips/libvips/pull/2308 +Patch0: vips-lib64.patch + BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(expat) BuildRequires: pkgconfig(fftw3) @@ -94,7 +98,7 @@ BuildRequires: pkgconfig(spng) >= 0.6 BuildRequires: nifticlib-devel %endif %if %{with openjpeg2} -BuildRequires: pkgconfig(libopenjp2) >= 2.3 +BuildRequires: pkgconfig(libopenjp2) >= 2.4 %endif %if %{with libimagequant} #BuildRequires: pkgconfig(imagequant) TODO only in 2.12+ @@ -243,6 +247,7 @@ The %{name}-magick-gm contains the magick module using GraphicsMagick. %prep %setup -q -n vips-%{vips_version} +%patch0 -p1 # make the version string consistent for multiarch export FAKE_BUILD_DATE=$(date -r %{SOURCE0}) @@ -250,11 +255,6 @@ sed -i "s/\\(VIPS_VERSION_STRING=\\)\$VIPS_VERSION-\`date\`/\\1\"\$VIPS_VERSION- configure unset FAKE_BUILD_DATE -%if %{with openjpeg2} -# allow openjpeg2 version 2.3 -sed -i '/libopenjp2/s/2.4/2.3/' -i configure -%endif - # 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 @@ -373,6 +373,11 @@ sed -e 's:/usr/bin/python:%{_bindir}/python3:' -i %{buildroot}/%{_bindir}/vipspr %changelog +* Tue Jun 15 2021 Remi Collet - 8.11.0-1.2 +- test build for fix for bad prefix guess from + https://github.com/libvips/libvips/pull/2308 +- only use openjpeg2 >= 2.4 (Fedora >= 34) + * Tue Jun 15 2021 Remi Collet - 8.11.0-1.1 - test build using openjpeg2 2.3 - open https://github.com/libvips/libvips/pull/2305 allow libopenjp2 2.3 -- cgit