Add mingw subpackages
This commit is contained in:
parent
4bafe88b4d
commit
82cf2bbdb5
12
libwebp-cmakedir.patch
Normal file
12
libwebp-cmakedir.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -rupN libwebp-1.2.2/CMakeLists.txt libwebp-1.2.2-new/CMakeLists.txt
|
||||||
|
--- libwebp-1.2.2/CMakeLists.txt 2022-02-20 00:15:40.412570626 +0100
|
||||||
|
+++ libwebp-1.2.2-new/CMakeLists.txt 2022-02-20 00:20:58.155228838 +0100
|
||||||
|
@@ -676,7 +679,7 @@ install(TARGETS ${INSTALLED_LIBRARIES}
|
||||||
|
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})
|
@ -1,7 +1,7 @@
|
|||||||
diff -rupN --no-dereference libwebp-1.2.1/CMakeLists.txt libwebp-1.2.1-new/CMakeLists.txt
|
diff -rupN --no-dereference libwebp-1.2.2/CMakeLists.txt libwebp-1.2.2-new/CMakeLists.txt
|
||||||
--- libwebp-1.2.1/CMakeLists.txt 2021-07-30 00:55:37.000000000 +0200
|
--- libwebp-1.2.2/CMakeLists.txt 2022-01-20 00:35:26.000000000 +0100
|
||||||
+++ libwebp-1.2.1-new/CMakeLists.txt 2021-08-15 22:29:28.671542257 +0200
|
+++ libwebp-1.2.2-new/CMakeLists.txt 2022-02-20 00:15:40.382570513 +0100
|
||||||
@@ -521,8 +521,8 @@ endif()
|
@@ -521,15 +521,15 @@ endif()
|
||||||
|
|
||||||
if(WEBP_BUILD_VWEBP)
|
if(WEBP_BUILD_VWEBP)
|
||||||
# vwebp
|
# vwebp
|
||||||
@ -12,9 +12,17 @@ diff -rupN --no-dereference libwebp-1.2.1/CMakeLists.txt libwebp-1.2.1-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.1/examples/vwebp.c libwebp-1.2.1-new/examples/vwebp.c
|
target_link_libraries(vwebp
|
||||||
--- libwebp-1.2.1/examples/vwebp.c 2021-07-30 00:55:37.000000000 +0200
|
${OPENGL_LIBRARIES}
|
||||||
+++ libwebp-1.2.1-new/examples/vwebp.c 2021-08-15 22:29:28.671542257 +0200
|
exampleutil
|
||||||
|
- ${GLUT_glut_LIBRARY}
|
||||||
|
+ glut
|
||||||
|
imageioutil
|
||||||
|
webp
|
||||||
|
webpdemux)
|
||||||
|
diff -rupN --no-dereference libwebp-1.2.2/examples/vwebp.c libwebp-1.2.2-new/examples/vwebp.c
|
||||||
|
--- libwebp-1.2.2/examples/vwebp.c 2022-01-20 00:35:26.000000000 +0100
|
||||||
|
+++ libwebp-1.2.2-new/examples/vwebp.c 2022-02-20 00:15:40.383570517 +0100
|
||||||
@@ -27,7 +27,7 @@
|
@@ -27,7 +27,7 @@
|
||||||
#if defined(HAVE_GLUT_GLUT_H)
|
#if defined(HAVE_GLUT_GLUT_H)
|
||||||
#include <GLUT/glut.h>
|
#include <GLUT/glut.h>
|
||||||
|
13
libwebp-mingw-libsuffix.patch
Normal file
13
libwebp-mingw-libsuffix.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff -rupN libwebp-1.2.2/CMakeLists.txt libwebp-1.2.2-new/CMakeLists.txt
|
||||||
|
--- libwebp-1.2.2/CMakeLists.txt 2022-02-20 00:15:40.412570626 +0100
|
||||||
|
+++ libwebp-1.2.2-new/CMakeLists.txt 2022-02-20 00:17:26.589963934 +0100
|
||||||
|
@@ -360,6 +360,9 @@ macro(set_version FILE TARGET_NAME NAME_
|
||||||
|
${LT_CURRENT_MINUS_AGE}.${LT_AGE}.${LT_REVISION}
|
||||||
|
SOVERSION
|
||||||
|
${LT_CURRENT_MINUS_AGE})
|
||||||
|
+ if(WIN32)
|
||||||
|
+ set_target_properties(${TARGET_NAME} PROPERTIES SUFFIX "-${LT_CURRENT_MINUS_AGE}${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||||
|
+ endif(WIN32)
|
||||||
|
endmacro()
|
||||||
|
set_version(Makefile.am webp webp)
|
||||||
|
set_version(Makefile.am webpdecoder webpdecoder)
|
162
libwebp.spec
162
libwebp.spec
@ -2,25 +2,45 @@
|
|||||||
|
|
||||||
Name: libwebp
|
Name: libwebp
|
||||||
Version: 1.2.2
|
Version: 1.2.2
|
||||||
Release: 2%{?dist}
|
Release: 3%{?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: BSD
|
||||||
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
|
||||||
|
|
||||||
BuildRequires: libjpeg-devel
|
BuildRequires: cmake
|
||||||
BuildRequires: libpng-devel
|
BuildRequires: freeglut-devel
|
||||||
|
BuildRequires: gcc
|
||||||
BuildRequires: giflib-devel
|
BuildRequires: giflib-devel
|
||||||
BuildRequires: libtiff-devel
|
|
||||||
BuildRequires: java-devel
|
BuildRequires: java-devel
|
||||||
BuildRequires: jpackage-utils
|
BuildRequires: jpackage-utils
|
||||||
|
BuildRequires: libjpeg-devel
|
||||||
|
BuildRequires: libpng-devel
|
||||||
|
BuildRequires: libtiff-devel
|
||||||
BuildRequires: swig
|
BuildRequires: swig
|
||||||
BuildRequires: autoconf automake libtool
|
|
||||||
BuildRequires: freeglut-devel
|
BuildRequires: mingw32-filesystem >= 95
|
||||||
BuildRequires: make
|
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
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
WebP is an image format that does lossy compression of digital
|
WebP is an image format that does lossy compression of digital
|
||||||
@ -63,18 +83,37 @@ Requires: jpackage-utils
|
|||||||
Java bindings for libwebp.
|
Java bindings for libwebp.
|
||||||
|
|
||||||
|
|
||||||
|
%package -n mingw32-%{name}
|
||||||
|
Summary: MinGW Windows %{name} library
|
||||||
|
|
||||||
|
%description -n mingw32-%{name}
|
||||||
|
MinGW Windows %{name} library.
|
||||||
|
|
||||||
|
|
||||||
|
%package -n mingw64-%{name}
|
||||||
|
Summary: MinGW Windows %{name} library
|
||||||
|
|
||||||
|
%description -n mingw64-%{name}
|
||||||
|
MinGW Windows %{name} library.
|
||||||
|
|
||||||
|
|
||||||
|
%{?mingw_debug_package}
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1
|
%autosetup -p1
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -vif
|
# Native build
|
||||||
%configure --disable-static --enable-libwebpmux \
|
%cmake
|
||||||
--enable-libwebpdemux --enable-libwebpdecoder
|
%cmake_build
|
||||||
%make_build V=1
|
|
||||||
make -C examples vwebp
|
|
||||||
|
|
||||||
# swig generated Java bindings
|
# MinGW build
|
||||||
|
%mingw_cmake
|
||||||
|
%mingw_make_build
|
||||||
|
|
||||||
|
# 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
|
||||||
@ -88,7 +127,7 @@ 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
|
||||||
@ -97,17 +136,45 @@ jar cvf ../libwebp.jar com/google/webp/*.class
|
|||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install
|
# Native build
|
||||||
|
%cmake_install
|
||||||
|
|
||||||
|
# MinGW build
|
||||||
|
%mingw_make_install
|
||||||
|
rm -rf %{buildroot}%{mingw32_mandir}
|
||||||
|
rm -rf %{buildroot}%{mingw64_mandir}
|
||||||
|
|
||||||
find "%{buildroot}/%{_libdir}" -type f -name "*.la" -delete
|
find "%{buildroot}/%{_libdir}" -type f -name "*.la" -delete
|
||||||
|
|
||||||
# swig generated Java bindings
|
# 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/
|
||||||
|
|
||||||
|
|
||||||
%ldconfig_scriptlets
|
%mingw_debug_install_post
|
||||||
|
|
||||||
|
|
||||||
|
%check
|
||||||
|
%ctest
|
||||||
|
|
||||||
|
|
||||||
|
%files
|
||||||
|
%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}/webp/
|
||||||
|
%{_libdir}/pkgconfig/libwebp.pc
|
||||||
|
%{_libdir}/pkgconfig/libwebpdecoder.pc
|
||||||
|
%{_libdir}/pkgconfig/libwebpdemux.pc
|
||||||
|
%{_libdir}/pkgconfig/libwebpmux.pc
|
||||||
|
%{_libdir}/cmake/WebP/
|
||||||
|
|
||||||
%files tools
|
%files tools
|
||||||
%{_bindir}/cwebp
|
%{_bindir}/cwebp
|
||||||
%{_bindir}/dwebp
|
%{_bindir}/dwebp
|
||||||
@ -118,25 +185,62 @@ cp swig/*.jar swig/*.so %{buildroot}/%{_libdir}/%{name}-java/
|
|||||||
%{_bindir}/vwebp
|
%{_bindir}/vwebp
|
||||||
%{_mandir}/man*/*
|
%{_mandir}/man*/*
|
||||||
|
|
||||||
%files -n %{name}
|
|
||||||
%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/
|
||||||
|
|
||||||
|
%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_includedir}/webp/
|
||||||
|
%{mingw32_libdir}/pkgconfig/libwebp.pc
|
||||||
|
%{mingw32_libdir}/pkgconfig/libwebpdecoder.pc
|
||||||
|
%{mingw32_libdir}/pkgconfig/libwebpdemux.pc
|
||||||
|
%{mingw32_libdir}/pkgconfig/libwebpmux.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
|
||||||
|
|
||||||
|
%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_includedir}/webp/
|
||||||
|
%{mingw64_libdir}/pkgconfig/libwebp.pc
|
||||||
|
%{mingw64_libdir}/pkgconfig/libwebpdecoder.pc
|
||||||
|
%{mingw64_libdir}/pkgconfig/libwebpdemux.pc
|
||||||
|
%{mingw64_libdir}/pkgconfig/libwebpmux.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
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* 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
|
* Sat Feb 05 2022 Jiri Vanek <jvanek@redhat.com> - 1.2.2-2
|
||||||
- Rebuilt for java-17-openjdk as system jdk
|
- Rebuilt for java-17-openjdk as system jdk
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user