commit b861fa3a0ab5178cb5cfcbb2685cc1d16d2033d6
Author: Jakub Bogusz <[email protected]>
Date:   Sun Oct 3 08:38:47 2021 +0200

    - new
    - cmake patch to force static libutils

 sjpeg-cmake.patch |  11 ++++++
 sjpeg.spec        | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 113 insertions(+)
---
diff --git a/sjpeg.spec b/sjpeg.spec
new file mode 100644
index 0000000..8145b32
--- /dev/null
+++ b/sjpeg.spec
@@ -0,0 +1,102 @@
+#
+# Conditional build:
+%bcond_with    simd            # x86 SSE2 / ARM NEON instructions
+#
+%ifarch %{x8664} x32
+%define        with_simd       1
+%endif
+Summary:       Simple JPEG library and utilities
+Summary(pl.UTF-8):     Biblioteka i narzędzia Simple JPEG
+Name:          sjpeg
+Version:       0.1
+%define        gitref  676de227d75877eb5863ec805ba0a4b97fc2fc6c
+%define        snap    20210423
+%define        rel     1
+Release:       0.%{snap}.1
+License:       Apache v2.0
+Group:         Libraries
+#Source0Download: https://github.com/webmproject/sjpeg/releases
+Source0:       
https://github.com/webmproject/sjpeg/archive/%{gitref}/%{name}-%{snap}.tar.gz
+# Source0-md5: e9a5386cca1baccb26d077b338ca3391
+Patch0:                %{name}-cmake.patch
+URL:           https://github.com/webmproject/sjpeg
+BuildRequires: OpenGL-devel
+BuildRequires: OpenGL-glut-devel
+BuildRequires: cmake >= 2.8.7
+BuildRequires: libjpeg-devel
+BuildRequires: libpng-devel
+BuildRequires: libstdc++-devel >= 6:4.7
+Requires:      %{name}-libs = %{version}-%{release}
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Simple JPEG library and utilities.
+
+%description -l pl.UTF-8
+Biblioteka i narzędzia Simple JPEG.
+
+%package libs
+Summary:       Simple encoding library for baseline JPEG files
+Summary(pl.UTF-8):     Prosta biblioteka kodująca do podstawowego formatu JPEG
+Group:         Libraries
+
+%description libs
+Simple encoding library for baseline JPEG files.
+
+%description libs -l pl.UTF-8
+Prosta biblioteka kodująca do podstawowego formatu JPEG.
+
+%package devel
+Summary:       Header files for sjpeg library
+Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki sjpeg
+Group:         Development/Libraries
+Requires:      %{name}-libs = %{version}-%{release}
+
+%description devel
+Header files for sjpeg library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki sjpeg.
+
+%prep
+%setup -q -n %{name}-%{gitref}
+%patch0 -p1
+
+%build
+install -d build
+cd build
+%cmake .. \
+       %{!?with_simd:-DSJPEG_ENABLE_SIMD=OFF}
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build install \
+       DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post  libs -p /sbin/ldconfig
+%postun        libs -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/sjpeg
+%attr(755,root,root) %{_bindir}/vjpeg
+%{_mandir}/man1/sjpeg.1*
+%{_mandir}/man1/vjpeg.1*
+
+%files libs
+%defattr(644,root,root,755)
+%doc AUTHORS NEWS README.md
+%attr(755,root,root) %{_libdir}/libsjpeg.so.0.1
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libsjpeg.so
+%{_includedir}/sjpeg.h
+%dir %{_datadir}/sjpeg
+%{_datadir}/sjpeg/cmake
diff --git a/sjpeg-cmake.patch b/sjpeg-cmake.patch
new file mode 100644
index 0000000..22b7195
--- /dev/null
+++ b/sjpeg-cmake.patch
@@ -0,0 +1,11 @@
+--- sjpeg-676de227d75877eb5863ec805ba0a4b97fc2fc6c/CMakeLists.txt.orig 
2021-04-22 18:39:11.000000000 +0200
++++ sjpeg-676de227d75877eb5863ec805ba0a4b97fc2fc6c/CMakeLists.txt      
2021-10-03 08:34:34.627748773 +0200
+@@ -121,7 +121,7 @@ endif()
+ 
+ # build the utils library
+ include_directories(${SJPEG_DEP_IMG_INCLUDE_DIRS})
+-add_library(utils
++add_library(utils STATIC
+             ${CMAKE_CURRENT_SOURCE_DIR}/examples/utils.cc
+             ${CMAKE_CURRENT_SOURCE_DIR}/examples/utils.h
+ )
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/sjpeg.git/commitdiff/b861fa3a0ab5178cb5cfcbb2685cc1d16d2033d6

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to