]> git.pld-linux.org Git - packages/simage.git/commitdiff
- new, used by Coin 4.x auto/th/simage-1.8.0-1
authorJakub Bogusz <qboosh@pld-linux.org>
Mon, 30 Nov 2020 20:05:23 +0000 (21:05 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Mon, 30 Nov 2020 20:05:23 +0000 (21:05 +0100)
- added doxygen patch (fixes doxygen configuration)
- added gifutil patch (use gifutil library for GifQuantizeBuffer function)
- added link patch (link with -lm)

simage-doxygen.patch [new file with mode: 0644]
simage-gifutil.patch [new file with mode: 0644]
simage-link.patch [new file with mode: 0644]
simage.spec [new file with mode: 0644]

diff --git a/simage-doxygen.patch b/simage-doxygen.patch
new file mode 100644 (file)
index 0000000..1c404f2
--- /dev/null
@@ -0,0 +1,16 @@
+--- simage/CMakeLists.txt.orig 2020-11-30 19:58:08.803833373 +0100
++++ simage/CMakeLists.txt      2020-11-30 20:04:50.568323495 +0100
+@@ -543,9 +543,12 @@
+   set(DOXYGEN_WARN_IF_UNDOCUMENTED YES)\r
+   set(DOXYGEN_EXCLUDE)\r
\r
++  set(simage_src_dir "${CMAKE_CURRENT_SOURCE_DIR}")\r
++  set(SIMAGE_DOC_HTML YES)\r
++  set(HTML_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/html")\r
+   set(DOXYFILE "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")\r
+   set(DOXYGEN_OUTPUT "${CMAKE_BINARY_DIR}/html/index.html")\r
+-  configure_file("${CMAKE_CURRENT_SOURCE_DIR}/docs/simage.doxygen.cmake.in" ${DOXYFILE} @ONLY)\r
++  configure_file("${CMAKE_CURRENT_SOURCE_DIR}/docs/simage.doxygen.in" ${DOXYFILE} @ONLY)\r
\r
+ # ############################################################################\r
+ # Setup documentation targets\r
diff --git a/simage-gifutil.patch b/simage-gifutil.patch
new file mode 100644 (file)
index 0000000..630a025
--- /dev/null
@@ -0,0 +1,21 @@
+--- simage/CMakeLists.txt.orig 2019-12-24 02:00:09.000000000 +0100
++++ simage/CMakeLists.txt      2020-11-30 19:57:02.597525377 +0100
+@@ -432,7 +432,7 @@
\r
+ if(GIF_FOUND)\r
+   target_include_directories(simage PRIVATE ${GIF_INCLUDE_DIR})\r
+-  target_link_libraries(simage PRIVATE ${GIF_LIBRARIES})\r
++  target_link_libraries(simage PRIVATE ${GIF_LIBRARIES} gifutil)\r
+ endif()\r
\r
+ if(JASPER_FOUND)\r
+--- simage/src/simage_gif.c.orig       2019-12-24 02:00:09.000000000 +0100
++++ simage/src/simage_gif.c    2020-11-30 19:57:31.320703103 +0100
+@@ -30,6 +30,7 @@
+ #include <string.h>
+ #include <stdio.h>
+ #include <gif_lib.h>
++#include <gif_util.h>
+ #if GIFLIB_MAJOR > 5 || GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1
+ #define DGifCloseFile(gif) DGifCloseFile(gif, NULL)
diff --git a/simage-link.patch b/simage-link.patch
new file mode 100644 (file)
index 0000000..2596f2f
--- /dev/null
@@ -0,0 +1,13 @@
+--- simage/CMakeLists.txt.orig 2020-11-30 20:05:24.851471101 +0100
++++ simage/CMakeLists.txt      2020-11-30 20:46:46.764692090 +0100
+@@ -478,6 +478,10 @@
+   target_link_libraries(simage PRIVATE ${VFW_LIBRARIES})\r
+ endif()\r
\r
++if(UNIX)\r
++  target_link_libraries(simage PRIVATE m)\r
++endif()\r
++\r
+ # ############################################################################\r
+ # Build examples\r
+ # ############################################################################\r
diff --git a/simage.spec b/simage.spec
new file mode 100644 (file)
index 0000000..e2ee776
--- /dev/null
@@ -0,0 +1,131 @@
+#
+# Conditional build:
+%bcond_without apidocs         # API documentation
+%bcond_with    qt              # load/save images using Qt
+%bcond_with    qt4             # Qt4 instead of Qt5
+#
+Summary:       Library with image format loaders and front-ends to common import libraries
+Summary(pl.UTF-8):     Biblioteka z wczytywaniem formatów obrazów oraz frontendami do popularnych bibliotek importujących
+Name:          simage
+Version:       1.8.0
+Release:       1
+License:       MIT, MPEG
+Group:         Libraries
+#Source0Download: https://github.com/coin3d/simage/releases
+Source0:       https://github.com/coin3d/simage/releases/download/simage-%{version}/%{name}-%{version}-src.tar.gz
+# Source0-md5: a1810e0c2a1c9c7a6c191198bd8465bc
+Patch0:                %{name}-gifutil.patch
+Patch1:                %{name}-doxygen.patch
+Patch2:                %{name}-link.patch
+URL:           https://github.com/coin3d/simage
+%if %{with qt}
+%if %{with qt4}
+BuildRequires: QtCore-devel >= 4
+BuildRequires: QtGui-devel >= 4
+%else
+BuildRequires: Qt5Core-devel >= 5
+BuildRequires: Qt5Gui-devel >= 5
+%endif
+%endif
+BuildRequires: cmake >= 3.0
+%{?with_apidocs:BuildRequires: doxygen}
+BuildRequires: giflib-devel >= 5.2.1-2
+BuildRequires: jasper-devel
+BuildRequires: libjpeg-devel
+BuildRequires: libogg-devel
+BuildRequires: libpng-devel
+BuildRequires: libsndfile-devel
+BuildRequires: libstdc++-devel
+BuildRequires: libtiff-devel
+BuildRequires: libvorbis-devel
+BuildRequires: rpmbuild(macros) >= 1.752
+BuildRequires: zlib-devel
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+This is simage, a library with image format loaders and front-ends to
+common import libraries. simage is meant for use with applications
+which reads image files as textures.
+
+%description -l pl.UTF-8
+Ten pakiet zawiera bibliotekę simage, obsługującą wczytywanie różnych
+formatów obrazów oraz frontendy do popularnych bibliotek
+importujących. Biblioteka jest przeznaczona do użycia w aplikacjach
+czytających pliki obrazów jako tekstury.
+
+%package devel
+Summary:       Header files for simage library
+Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki simage
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description devel
+Header files for simage library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki simage.
+
+%package apidocs
+Summary:       API documentation for simage library
+Summary(pl.UTF-8):     Dokumentacja API biblioteki simage
+Group:         Documentation
+%{?noarchpackage}
+
+%description apidocs
+API documentation for simage library.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki simage.
+
+%prep
+%setup -q -n %{name}
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+%build
+install -d builddir
+cd builddir
+%cmake .. \
+       %{?with_apidocs:-DSIMAGE_BUILD_DOCUMENTATION=ON} \
+       %{?with_qt:-DSIMAGE_USE_QIMAGE=ON} \
+       %{?with_qt4:-DSIMAGE_USE_QT5=OFF} \
+       -DSIMAGE_XWD_SUPPORT=ON
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C builddir install \
+       DESTDIR=$RPM_BUILD_ROOT
+
+# packaged as %doc
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/html
+# bogus location
+%{__rm} -r $RPM_BUILD_ROOT%{_infodir}/simage1
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post  -p /sbin/ldconfig
+%postun        -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS COPYING ChangeLog LICENSE LICENSE.mpeg2enc NEWS README
+%attr(755,root,root) %{_libdir}/libsimage.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libsimage.so.20
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libsimage.so
+%{_includedir}/simage.h
+%{_pkgconfigdir}/simage.pc
+%{_libdir}/cmake/simage-%{version}
+
+%if %{with apidocs}
+%files apidocs
+%defattr(644,root,root,755)
+%doc builddir/html/*
+%endif
This page took 0.130118 seconds and 4 git commands to generate.