Browse Source

update to version 1.4.0

Signed-off-by: Toshaan Bharvani <toshaan@powerel.org>
master
Toshaan Bharvani 1 month ago
parent
commit
cb4e1de753
  1. 12
      SOURCES/libwebp-cmakedir.patch
  2. 25
      SOURCES/libwebp-freeglut.patch
  3. 13
      SOURCES/libwebp-mingw-libsuffix.patch
  4. 20
      SOURCES/libwebp-rpath.patch
  5. 294
      SPECS/libwebp.spec

12
SOURCES/libwebp-cmakedir.patch

@ -0,0 +1,12 @@
diff -rupN --no-dereference libwebp-1.4.0/CMakeLists.txt libwebp-1.4.0-new/CMakeLists.txt
--- libwebp-1.4.0/CMakeLists.txt 2024-04-14 15:30:20.053730120 +0200
+++ libwebp-1.4.0-new/CMakeLists.txt 2024-04-14 15:30:20.056730140 +0200
@@ -784,7 +784,7 @@ install(
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
-set(ConfigPackageLocation ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake/)
+set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/)
install(EXPORT ${PROJECT_NAME}Targets NAMESPACE ${PROJECT_NAME}::
DESTINATION ${ConfigPackageLocation})

25
SOURCES/libwebp-freeglut.patch

@ -1,7 +1,7 @@
diff -rupN --no-dereference libwebp-1.2.0/CMakeLists.txt libwebp-1.2.0-new/CMakeLists.txt diff -rupN --no-dereference libwebp-1.4.0/CMakeLists.txt libwebp-1.4.0-new/CMakeLists.txt
--- libwebp-1.2.0/CMakeLists.txt 2021-01-21 04:43:45.000000000 +0100 --- libwebp-1.4.0/CMakeLists.txt 2024-04-12 22:48:48.000000000 +0200
+++ libwebp-1.2.0-new/CMakeLists.txt 2021-02-01 11:37:20.760764115 +0100 +++ libwebp-1.4.0-new/CMakeLists.txt 2024-04-14 15:30:19.981729641 +0200
@@ -506,8 +506,8 @@ endif() @@ -582,8 +582,8 @@ endif()
if(WEBP_BUILD_VWEBP) if(WEBP_BUILD_VWEBP)
# vwebp # vwebp
@ -12,10 +12,19 @@ diff -rupN --no-dereference libwebp-1.2.0/CMakeLists.txt libwebp-1.2.0-new/CMake
include_directories(${WEBP_DEP_IMG_INCLUDE_DIRS}) include_directories(${WEBP_DEP_IMG_INCLUDE_DIRS})
parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/examples "VWEBP_SRCS" "vwebp") parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/examples "VWEBP_SRCS" "vwebp")
add_executable(vwebp ${VWEBP_SRCS}) add_executable(vwebp ${VWEBP_SRCS})
diff -rupN --no-dereference libwebp-1.2.0/examples/vwebp.c libwebp-1.2.0-new/examples/vwebp.c @@ -591,7 +591,7 @@ if(WEBP_BUILD_VWEBP)
--- libwebp-1.2.0/examples/vwebp.c 2021-01-21 04:43:45.000000000 +0100 vwebp
+++ libwebp-1.2.0-new/examples/vwebp.c 2021-02-01 11:37:20.760764115 +0100 ${OPENGL_LIBRARIES}
@@ -27,7 +27,7 @@ exampleutil
- GLUT::GLUT
+ glut
imageioutil
webp
webpdemux)
diff -rupN --no-dereference libwebp-1.4.0/examples/vwebp.c libwebp-1.4.0-new/examples/vwebp.c
--- libwebp-1.4.0/examples/vwebp.c 2024-04-12 22:48:48.000000000 +0200
+++ libwebp-1.4.0-new/examples/vwebp.c 2024-04-14 15:30:19.981729641 +0200
@@ -28,7 +28,7 @@
#if defined(HAVE_GLUT_GLUT_H) #if defined(HAVE_GLUT_GLUT_H)
#include <GLUT/glut.h> #include <GLUT/glut.h>
#else #else

13
SOURCES/libwebp-mingw-libsuffix.patch

@ -0,0 +1,13 @@
diff -rupN --no-dereference libwebp-1.4.0/CMakeLists.txt libwebp-1.4.0-new/CMakeLists.txt
--- libwebp-1.4.0/CMakeLists.txt 2024-04-14 15:30:20.015729868 +0200
+++ libwebp-1.4.0-new/CMakeLists.txt 2024-04-14 15:30:20.020729901 +0200
@@ -301,6 +301,9 @@ macro(set_version FILE TARGET_NAME NAME_
MACHO_CURRENT_VERSION
${LIBWEBP_MACHO_COMPATIBILITY_VERSION}.${LT_REVISION})
endif()
+ if(WIN32)
+ set_target_properties(${TARGET_NAME} PROPERTIES SUFFIX "-${LT_CURRENT_MINUS_AGE}${CMAKE_SHARED_LIBRARY_SUFFIX}")
+ endif(WIN32)
endmacro()
# ##############################################################################

20
SOURCES/libwebp-rpath.patch

@ -0,0 +1,20 @@
diff -rupN --no-dereference libwebp-1.4.0/CMakeLists.txt libwebp-1.4.0-new/CMakeLists.txt
--- libwebp-1.4.0/CMakeLists.txt 2024-04-14 15:30:20.089730360 +0200
+++ libwebp-1.4.0-new/CMakeLists.txt 2024-04-14 15:30:20.093730386 +0200
@@ -114,11 +114,11 @@ endif()
include(cmake/deps.cmake)
include(GNUInstallDirs)
-if(BUILD_SHARED_LIBS AND NOT DEFINED CMAKE_INSTALL_RPATH)
- # Set the rpath to match autoconf/libtool behavior. Note this must be set
- # before target creation.
- set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
-endif()
+# if(BUILD_SHARED_LIBS AND NOT DEFINED CMAKE_INSTALL_RPATH)
+# # Set the rpath to match autoconf/libtool behavior. Note this must be set
+# # before target creation.
+# set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
+# endif()
# ##############################################################################
# Options.

294
SPECS/libwebp.spec

@ -1,26 +1,64 @@
%global _hardened_build 1 %global _hardened_build 1


%ifarch %{java_arches}
%bcond_without java
%else
%bcond_with java
%endif

%if 0%{?rhel}
%bcond_with mingw
%else
%bcond_without mingw
%endif

Name: libwebp Name: libwebp
Version: 1.2.0 Version: 1.4.0
Release: 3%{?dist} Release: 1%{?dist}
URL: http://webmproject.org/ URL: http://webmproject.org/
Summary: Library and tools for the WebP graphics format Summary: Library and tools for the WebP graphics format
# Additional IPR is licensed as well. See PATENTS file for details # Additional IPR is licensed as well. See PATENTS file for details
License: BSD License: Apache-2.0 AND LicenseRef-scancode-google-patent-license-webm AND BSD-3-Clause AND FSFULLRWD
Source0: http://downloads.webmproject.org/releases/webp/%{name}-%{version}.tar.gz Source0: http://downloads.webmproject.org/releases/webp/%{name}-%{version}.tar.gz
Source1: libwebp_jni_example.java Source1: libwebp_jni_example.java
# Fix build with freeglut
Patch0: libwebp-freeglut.patch Patch0: libwebp-freeglut.patch

# Add version suffix to mingw libraries
Patch1: libwebp-mingw-libsuffix.patch
# Fix cmake module install location
Patch2: libwebp-cmakedir.patch
# Kill rpath
Patch3: libwebp-rpath.patch

BuildRequires: cmake
BuildRequires: freeglut-devel
BuildRequires: gcc
BuildRequires: giflib-devel
BuildRequires: libjpeg-devel BuildRequires: libjpeg-devel
BuildRequires: libpng-devel BuildRequires: libpng-devel
BuildRequires: giflib-devel
BuildRequires: libtiff-devel BuildRequires: libtiff-devel
%if %{with java}
BuildRequires: java-devel BuildRequires: java-devel
BuildRequires: jpackage-utils BuildRequires: jpackage-utils
BuildRequires: swig BuildRequires: swig
BuildRequires: autoconf automake libtool %endif
BuildRequires: freeglut-devel
BuildRequires: make %if %{with mingw}
BuildRequires: mingw32-filesystem >= 95
BuildRequires: mingw32-gcc
BuildRequires: mingw32-binutils
BuildRequires: mingw32-giflib
BuildRequires: mingw32-libpng
BuildRequires: mingw32-libjpeg

BuildRequires: mingw64-filesystem >= 95
BuildRequires: mingw64-gcc
BuildRequires: mingw64-binutils
BuildRequires: mingw64-giflib
BuildRequires: mingw64-libpng
BuildRequires: mingw64-libjpeg
%endif



%description %description
WebP is an image format that does lossy compression of digital WebP is an image format that does lossy compression of digital
@ -53,6 +91,7 @@ developers can use WebP to compress, archive and distribute digital
images more efficiently. images more efficiently.




%if %{with java}
%package java %package java
Summary: Java bindings for libwebp, a library for the WebP format Summary: Java bindings for libwebp, a library for the WebP format
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
@ -61,6 +100,28 @@ Requires: jpackage-utils


%description java %description java
Java bindings for libwebp. Java bindings for libwebp.
%endif


%if %{with mingw}
%package -n mingw32-%{name}
Summary: MinGW Windows %{name} library
BuildArch: noarch

%description -n mingw32-%{name}
MinGW Windows %{name} library.


%package -n mingw64-%{name}
Summary: MinGW Windows %{name} library
BuildArch: noarch

%description -n mingw64-%{name}
MinGW Windows %{name} library.


%{?mingw_debug_package}
%endif




%prep %prep
@ -68,19 +129,18 @@ Java bindings for libwebp.




%build %build
autoreconf -vif # Native build
%ifarch aarch64 %cmake
export CFLAGS="%{optflags} -frename-registers" %cmake_build

%if %{with mingw}
# MinGW build
%mingw_cmake -DWEBP_BUILD_VWEBP=OFF
%mingw_make_build
%endif %endif
# Neon disabled due to resulting CFLAGS conflict resulting in
# inlining failed in call to always_inline '[...]': target specific option mismatch %if %{with java}
%configure --disable-static --enable-libwebpmux \ # SWIG generated Java bindings
--enable-libwebpdemux --enable-libwebpdecoder \
--disable-neon
%make_build V=1
make -C examples vwebp

# swig generated Java bindings
cp %{SOURCE1} . cp %{SOURCE1} .
cd swig cd swig
rm -rf libwebp.jar libwebp_java_wrap.c rm -rf libwebp.jar libwebp_java_wrap.c
@ -94,25 +154,64 @@ gcc %{__global_ldflags} %{optflags} -shared \
-I/usr/lib/jvm/java/include \ -I/usr/lib/jvm/java/include \
-I/usr/lib/jvm/java/include/linux \ -I/usr/lib/jvm/java/include/linux \
-I../src \ -I../src \
-L../src/.libs -lwebp libwebp_java_wrap.c \ -L../%{_vpath_builddir} -lwebp libwebp_java_wrap.c \
-o libwebp_jni.so -o libwebp_jni.so


cd java cd java
javac com/google/webp/libwebp.java javac com/google/webp/libwebp.java
jar cvf ../libwebp.jar com/google/webp/*.class jar cvf ../libwebp.jar com/google/webp/*.class
%endif




%install %install
%make_install # Native build
%cmake_install

%if %{with mingw}
# MinGW build
%mingw_make_install
rm -rf %{buildroot}%{mingw32_mandir}
rm -rf %{buildroot}%{mingw64_mandir}
%endif

find "%{buildroot}/%{_libdir}" -type f -name "*.la" -delete find "%{buildroot}/%{_libdir}" -type f -name "*.la" -delete


# swig generated Java bindings %if %{with java}
# SWIG generated Java bindings
mkdir -p %{buildroot}/%{_libdir}/%{name}-java mkdir -p %{buildroot}/%{_libdir}/%{name}-java
cp swig/*.jar swig/*.so %{buildroot}/%{_libdir}/%{name}-java/ cp swig/*.jar swig/*.so %{buildroot}/%{_libdir}/%{name}-java/
%endif


%{?mingw_debug_install_post}


%check
%ctest




%ldconfig_scriptlets %files
%doc README.md PATENTS NEWS AUTHORS
%license COPYING
%{_libdir}/%{name}.so.7*
%{_libdir}/%{name}decoder.so.3*
%{_libdir}/%{name}demux.so.2*
%{_libdir}/%{name}mux.so.3*
%{_libdir}/libsharpyuv.so.0*


%files devel
%{_libdir}/%{name}.so
%{_libdir}/%{name}decoder.so
%{_libdir}/%{name}demux.so
%{_libdir}/%{name}mux.so
%{_libdir}/libsharpyuv.so
%{_includedir}/webp/
%{_libdir}/pkgconfig/libwebp.pc
%{_libdir}/pkgconfig/libwebpdecoder.pc
%{_libdir}/pkgconfig/libwebpdemux.pc
%{_libdir}/pkgconfig/libwebpmux.pc
%{_libdir}/pkgconfig/libsharpyuv.pc
%{_libdir}/cmake/WebP/


%files tools %files tools
%{_bindir}/cwebp %{_bindir}/cwebp
@ -124,31 +223,142 @@ cp swig/*.jar swig/*.so %{buildroot}/%{_libdir}/%{name}-java/
%{_bindir}/vwebp %{_bindir}/vwebp
%{_mandir}/man*/* %{_mandir}/man*/*


%files -n %{name} %if %{with java}
%doc README PATENTS NEWS AUTHORS
%license COPYING
%{_libdir}/%{name}.so.7*
%{_libdir}/%{name}decoder.so.3*
%{_libdir}/%{name}demux.so.2*
%{_libdir}/%{name}mux.so.3*

%files devel
%{_libdir}/%{name}*.so
%{_includedir}/*
%{_libdir}/pkgconfig/*

%files java %files java
%doc libwebp_jni_example.java %doc libwebp_jni_example.java
%{_libdir}/%{name}-java/ %{_libdir}/%{name}-java/
%endif

%if %{with mingw}
%files -n mingw32-libwebp
%license PATENTS COPYING
%{mingw32_bindir}/cwebp.exe
%{mingw32_bindir}/dwebp.exe
%{mingw32_bindir}/gif2webp.exe
%{mingw32_bindir}/img2webp.exe
%{mingw32_bindir}/webpinfo.exe
%{mingw32_bindir}/webpmux.exe
%{mingw32_bindir}/libwebp-7.dll
%{mingw32_bindir}/libwebpdecoder-3.dll
%{mingw32_bindir}/libwebpdemux-2.dll
%{mingw32_bindir}/libwebpmux-3.dll
%{mingw32_bindir}/libsharpyuv-0.dll
%{mingw32_includedir}/webp/
%{mingw32_libdir}/pkgconfig/libwebp.pc
%{mingw32_libdir}/pkgconfig/libwebpdecoder.pc
%{mingw32_libdir}/pkgconfig/libwebpdemux.pc
%{mingw32_libdir}/pkgconfig/libwebpmux.pc
%{mingw32_libdir}/pkgconfig/libsharpyuv.pc
%{mingw32_libdir}/cmake/WebP/
%{mingw32_libdir}/libwebp.dll.a
%{mingw32_libdir}/libwebpdecoder.dll.a
%{mingw32_libdir}/libwebpdemux.dll.a
%{mingw32_libdir}/libwebpmux.dll.a
%{mingw32_libdir}/libsharpyuv.dll.a

%files -n mingw64-libwebp
%license PATENTS COPYING
%{mingw64_bindir}/cwebp.exe
%{mingw64_bindir}/dwebp.exe
%{mingw64_bindir}/gif2webp.exe
%{mingw64_bindir}/img2webp.exe
%{mingw64_bindir}/webpinfo.exe
%{mingw64_bindir}/webpmux.exe
%{mingw64_bindir}/libwebp-7.dll
%{mingw64_bindir}/libwebpdecoder-3.dll
%{mingw64_bindir}/libwebpdemux-2.dll
%{mingw64_bindir}/libwebpmux-3.dll
%{mingw64_bindir}/libsharpyuv-0.dll
%{mingw64_includedir}/webp/
%{mingw64_libdir}/pkgconfig/libwebp.pc
%{mingw64_libdir}/pkgconfig/libwebpdecoder.pc
%{mingw64_libdir}/pkgconfig/libwebpdemux.pc
%{mingw64_libdir}/pkgconfig/libwebpmux.pc
%{mingw64_libdir}/pkgconfig/libsharpyuv.pc
%{mingw64_libdir}/cmake/WebP/
%{mingw64_libdir}/libwebp.dll.a
%{mingw64_libdir}/libwebpdecoder.dll.a
%{mingw64_libdir}/libwebpdemux.dll.a
%{mingw64_libdir}/libwebpmux.dll.a
%{mingw64_libdir}/libsharpyuv.dll.a
%endif




%changelog %changelog
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.2.0-3 * Sun Apr 14 2024 Sandro Mani <manisandro@gmail.com> - 1.4.0-1
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags - Update to 1.4.0
Related: rhbz#1991688
* Wed Feb 14 2024 Martin Stransky <stransky@redhat.com> - 1.3.2-5
- Migrated to SPDX license

* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Thu Sep 28 2023 Sandro Mani <manisandro@gmail.com> - 1.3.2-2
- Backport upstream fix for CVE-2023-5129

* Mon Sep 18 2023 Sandro Mani <manisandro@gmail.com> - 1.3.2-1
- Update to 1.3.2

* Wed Sep 13 2023 Boudhayan Bhattacharya <bbhtt.zn0i8@slmail.me> - 1.3.1-3
- Add patch for CVE-2023-4863 ref rhbz#2238543

* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Fri Jun 30 2023 Sandro Mani <manisandro@gmail.com> - 1.3.1-1
- Update to 1.3.1

* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Fri Jan 13 2023 Sandro Mani <manisandro@gmail.com> - 1.3.0-1
- Update to 1.3.0

* Thu Sep 22 2022 Sandro Mani <manisandro@gmail.com> - 1.2.4-2
- Add libwebp_libsuffix.patch

* Sun Aug 07 2022 Sandro Mani <manisandro@gmail.com> - 1.2.4-1
- Update to 1.2.4

* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Wed Jul 20 2022 Sandro Mani <manisandro@gmail.com> - 1.2.3-1
- Update to 1.2.3

* Tue Jul 05 2022 Sandro Mani <manisandro@gmail.com> - 1.2.2-6
- Limit -java subpackage to %%java_arches

* Fri Mar 25 2022 Sandro Mani <manisandro@gmail.com> - 1.2.2-5
- Rebuild with mingw-gcc-12

* Thu Feb 24 2022 Sandro Mani <manisandro@gmail.com> - 1.2.2-4
- Make mingw subpackages noarch

* Sat Feb 19 2022 Sandro Mani <manisandro@gmail.com> - 1.2.2-3
- Add mingw subpackage

* Sat Feb 05 2022 Jiri Vanek <jvanek@redhat.com> - 1.2.2-2
- Rebuilt for java-17-openjdk as system jdk

* Thu Jan 20 2022 Sandro Mani <manisandro@gmail.com> - 1.2.2-1
- Update to 1.2.2

* Thu Jan 06 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 1.2.1-3
- Drop aarch64 CFLAGS FTB workaround

* Sun Jan 02 2022 Dennis Gilmore <dennis@ausil.us> - 1.2.2-2
- do not disable neon support

* Sun Aug 15 2021 Sandro Mani <manisandro@gmail.com> - 1.2.1-1
- Update to 1.2.1


* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.2.0-2 * Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild


* Mon Feb 01 2021 Sandro Mani <manisandro@gmail.com> - 1.2.0-1 * Mon Feb 01 2021 Sandro Mani <manisandro@gmail.com> - 1.2.0-1
- Update to 1.2.0 - Update to 1.2.0

Loading…
Cancel
Save