[packages/gtatool] - up to 2.2.3

baggins baggins at pld-linux.org
Sun Apr 7 10:42:43 CEST 2019


commit b49f8bf21f1c3d7a74ac82ab43dda2e1b66b1d52
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Apr 7 10:42:22 2019 +0200

    - up to 2.2.3

 ffmpeg2.patch   |  12 ------
 ffmpeg3.patch   | 111 --------------------------------------------------------
 ffmpeg4.patch   |  11 ------
 gtatool.spec    |  46 +++++++++++++++--------
 pfstools2.patch |  22 -----------
 5 files changed, 30 insertions(+), 172 deletions(-)
---
diff --git a/gtatool.spec b/gtatool.spec
index e8d4eaa..13d3438 100644
--- a/gtatool.spec
+++ b/gtatool.spec
@@ -9,6 +9,7 @@
 %bcond_without	dcmtk		# DCMTK conv module
 %bcond_without	ffmpeg		# FFmpeg conv module
 %bcond_without	gdal		# GDAL conv module
+%bcond_without	png		# PNG conv module
 %bcond_without	jpeg		# JPEG conv module (based on libjpeg)
 %bcond_without	magick		# Magick conv module (based on ImageMagick's libMagick++)
 %bcond_without	matio		# MAT conv module (MATLAB import/export, based on [lib]matio)
@@ -23,25 +24,22 @@
 Summary:	Tools to manipulate Generic Tagged Array (GTA) files
 Summary(pl.UTF-8):	Narzędzia do obróbki plików GTA (ogólnych tablic etykietowanych)
 Name:		gtatool
-Version:	2.0.1
-Release:	21
+Version:	2.2.3
+Release:	1
 License:	GPL v3+
 Group:		Applications/File
-Source0:	http://download.savannah.gnu.org/releases/gta/%{name}-%{version}.tar.xz
-# Source0-md5:	1133c5687bd14d321eefffab6b495d74
-Patch0:		ffmpeg2.patch
+Source0:	https://marlam.de/gta/releases/%{name}-%{version}.tar.xz
+# Source0-md5:	afa7556b180f69f0b11c08902117e7f5
 Patch1:		%{name}-getopt.patch
 Patch2:		%{name}-bashcomp.patch
-Patch3:		pfstools2.patch
-Patch4:		ffmpeg3.patch
 Patch5:		imagemagick7.patch
-Patch6:		ffmpeg4.patch
 URL:		http://gta.nongnu.org/gtatool.html
 %{?with_magick:BuildRequires:	ImageMagick-c++-devel}
 %{?with_openexr:BuildRequires:	OpenEXR-devel}
 %{?with_qt:BuildRequires:	OpenGL-devel}
-%{?with_qt:BuildRequires:	QtGui-devel >= 4.8}
-%{?with_qt:BuildRequires:	QtOpenGL-devel >= 4.8}
+%{?with_qt:BuildRequires:	Qt5Gui-devel}
+%{?with_qt:BuildRequires:	Qt5OpenGL-devel}
+%{?with_qt:BuildRequires:	Qt5Widgets-devel}
 BuildRequires:	autoconf >= 2.65
 BuildRequires:	automake >= 1:1.11.1
 %{?with_dcmtk:BuildRequires:	dcmtk-devel}
@@ -52,6 +50,7 @@ BuildRequires:	automake >= 1:1.11.1
 %{?with_qt:BuildRequires:	glew-devel >= 1.6.0}
 BuildRequires:	libgta-devel >= 0.9.4
 %{?with_jpeg:BuildRequires:	libjpeg-devel}
+%{?with_png:BuildRequires:	libpng-devel}
 %{?with_sndfile:BuildRequires:	libsndfile-devel}
 BuildRequires:	libstdc++-devel
 BuildRequires:	libtool >= 2:2.2.6
@@ -62,7 +61,7 @@ BuildRequires:	libtool >= 2:2.2.6
 %{?with_pcl:BuildRequires:	pcl-devel >= 1.7}
 %{?with_pfs:BuildRequires:	pfstools-devel >= 2.0}
 BuildRequires:	pkgconfig
-%{?with_qt:BuildRequires:	qt4-build >= 4.8}
+%{?with_qt:BuildRequires:	qt5-build >= 4.8}
 BuildRequires:	rpmbuild(macros) >= 1.673
 BuildRequires:	tar >= 1:1.22
 %{?with_teem:BuildRequires:	teem-devel}
@@ -142,6 +141,18 @@ gtatool module to convert from/to GDAL supported formats.
 %description conv-gdal -l pl.UTF-8
 Moduł gtatool do konwersji z/do formatów obsługiwanych przez GDAL.
 
+%package conv-png
+Summary:	gtatool module to convert from/to PNG format
+Summary(pl.UTF-8):	Moduł gtatool do konwersji z/do formatu PNG
+Group:		Applications/File
+Requires:	%{name} = %{version}-%{release}
+
+%description conv-png
+gtatool module to convert from/to PNG format.
+
+%description conv-png -l pl.UTF-8
+Moduł gtatool do konwersji z/do formatu PNG.
+
 %package conv-jpeg
 Summary:	gtatool module to convert from/to JPEG formats
 Summary(pl.UTF-8):	Moduł gtatool do konwersji z/do formatu JPEG
@@ -285,13 +296,9 @@ Bashowe uzupełnianie parametrów programu gtatool.
 
 %prep
 %setup -q
-%patch0 -p1
 %patch1 -p1
 %patch2 -p1
-%patch3 -p1
-%patch4 -p1
 %patch5 -p1
-%patch6 -p1
 
 %build
 %{__libtoolize}
@@ -304,6 +311,7 @@ export CFLAGS="%{rpmcflags} -I/usr/include/netpbm"
 export CXXFLAGS="%{rpmcxxflags} -I/usr/include/netpbm"
 %endif
 %configure \
+	MOC=%{_libdir}/qt5/bin/moc \
 	BASHCOMPLETIONDIR=%{bash_compdir} \
 	--disable-silent-rules \
 	--with-bashcompletion \
@@ -311,6 +319,7 @@ export CXXFLAGS="%{rpmcxxflags} -I/usr/include/netpbm"
 	%{!?with_ffmpeg:--without-ffmpeg} \
 	%{!?with_gdal:--without-gdal} \
 	%{!?with_jpeg:--without-jpeg} \
+	%{!?with_png:--without-png} \
 	%{?with_magick:--with-magick-flavor=ImageMagick} \
 	%{!?with_magick:--without-magick} \
 	%{!?with_matio:--without-matio} \
@@ -384,6 +393,12 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/gtatool/conv-gdal.so
 %endif
 
+%if %{with png}
+%files conv-png
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/gtatool/conv-png.so
+%endif
+
 %if %{with jpeg}
 %files conv-jpeg
 %defattr(644,root,root,755)
@@ -442,7 +457,6 @@ rm -rf $RPM_BUILD_ROOT
 %files gui
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/gtatool/gui.so
-%attr(755,root,root) %{_libdir}/gtatool/view.so
 %{_desktopdir}/gta_gui.desktop
 %{_iconsdir}/hicolor/*/apps/gta.png
 %{_iconsdir}/hicolor/scalable/apps/gta.svg
diff --git a/ffmpeg2.patch b/ffmpeg2.patch
deleted file mode 100644
index db3a3b8..0000000
--- a/ffmpeg2.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- gtatool-1.5.2/src/conv-ffmpeg/media_object.cpp~	2013-04-28 20:24:13.884124701 +0200
-+++ gtatool-1.5.2/src/conv-ffmpeg/media_object.cpp	2013-08-29 17:43:44.081721565 +0200
-@@ -149,6 +149,9 @@
- 
- // Hide the FFmpeg stuff so that their messy header files cannot cause problems
- // in other source files.
-+#ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE
-+#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000
-+#endif
- 
- static const size_t audio_tmpbuf_size = (AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2;
- 
diff --git a/ffmpeg3.patch b/ffmpeg3.patch
deleted file mode 100644
index 262871b..0000000
--- a/ffmpeg3.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-diff -ur gtatool-2.0.1.orig/src/conv-ffmpeg/media_object.cpp gtatool-2.0.1/src/conv-ffmpeg/media_object.cpp
---- gtatool-2.0.1.orig/src/conv-ffmpeg/media_object.cpp	2016-03-29 15:47:09.906503157 +0200
-+++ gtatool-2.0.1/src/conv-ffmpeg/media_object.cpp	2016-03-29 15:54:14.410037508 +0200
-@@ -430,20 +430,20 @@
-     video_frame_template.value_range = video_frame::u8_full;
-     video_frame_template.chroma_location = video_frame::center;
-     if (!_always_convert_to_bgra32
--            && (video_codec_ctx->pix_fmt == PIX_FMT_YUV444P
--                || video_codec_ctx->pix_fmt == PIX_FMT_YUV444P10
--                || video_codec_ctx->pix_fmt == PIX_FMT_YUV422P
--                || video_codec_ctx->pix_fmt == PIX_FMT_YUV422P10
--                || video_codec_ctx->pix_fmt == PIX_FMT_YUV420P
--                || video_codec_ctx->pix_fmt == PIX_FMT_YUV420P10))
-+            && (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV444P
-+                || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV444P10
-+                || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV422P
-+                || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV422P10
-+                || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV420P
-+                || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV420P10))
-     {
--        if (video_codec_ctx->pix_fmt == PIX_FMT_YUV444P
--                || video_codec_ctx->pix_fmt == PIX_FMT_YUV444P10)
-+        if (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV444P
-+                || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV444P10)
-         {
-             video_frame_template.layout = video_frame::yuv444p;
-         }
--        else if (video_codec_ctx->pix_fmt == PIX_FMT_YUV422P
--                || video_codec_ctx->pix_fmt == PIX_FMT_YUV422P10)
-+        else if (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV422P
-+                || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV422P10)
-         {
-             video_frame_template.layout = video_frame::yuv422p;
-         }
-@@ -456,9 +456,9 @@
-         {
-             video_frame_template.color_space = video_frame::yuv709;
-         }
--        if (video_codec_ctx->pix_fmt == PIX_FMT_YUV444P10
--                || video_codec_ctx->pix_fmt == PIX_FMT_YUV422P10
--                || video_codec_ctx->pix_fmt == PIX_FMT_YUV420P10)
-+        if (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV444P10
-+                || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV422P10
-+                || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV420P10)
-         {
-             video_frame_template.value_range = video_frame::u10_mpeg;
-             if (video_codec_ctx->color_range == AVCOL_RANGE_JPEG)
-@@ -485,15 +485,15 @@
-         }
-     }
-     else if (!_always_convert_to_bgra32
--            && (video_codec_ctx->pix_fmt == PIX_FMT_YUVJ444P
--                || video_codec_ctx->pix_fmt == PIX_FMT_YUVJ422P
--                || video_codec_ctx->pix_fmt == PIX_FMT_YUVJ420P))
-+            && (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUVJ444P
-+                || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUVJ422P
-+                || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUVJ420P))
-     {
--        if (video_codec_ctx->pix_fmt == PIX_FMT_YUVJ444P)
-+        if (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUVJ444P)
-         {
-             video_frame_template.layout = video_frame::yuv444p;
-         }
--        else if (video_codec_ctx->pix_fmt == PIX_FMT_YUVJ422P)
-+        else if (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUVJ422P)
-         {
-             video_frame_template.layout = video_frame::yuv422p;
-         }
-@@ -947,8 +947,8 @@
-             _ffmpeg->video_frames.push_back(av_frame_alloc());
-             _ffmpeg->video_buffered_frames.push_back(av_frame_alloc());
- #endif
--            enum PixelFormat frame_fmt = (_ffmpeg->video_frame_templates[j].layout == video_frame::bgra32
--                    ? PIX_FMT_BGRA : _ffmpeg->video_codec_ctxs[j]->pix_fmt);
-+            enum AVPixelFormat frame_fmt = (_ffmpeg->video_frame_templates[j].layout == video_frame::bgra32
-+                    ? AV_PIX_FMT_BGRA : _ffmpeg->video_codec_ctxs[j]->pix_fmt);
-             int frame_bufsize = (avpicture_get_size(frame_fmt,
-                         _ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height));
-             _ffmpeg->video_buffers.push_back(static_cast<uint8_t *>(av_malloc(frame_bufsize)));
-@@ -961,7 +961,7 @@
-             if (_ffmpeg->video_frame_templates[j].layout == video_frame::bgra32)
-             {
-                 // Initialize things needed for software pixel format conversion
--                int sws_bufsize = avpicture_get_size(PIX_FMT_BGRA,
-+                int sws_bufsize = avpicture_get_size(AV_PIX_FMT_BGRA,
-                         _ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height);
- #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55, 28, 1)
-                 _ffmpeg->video_sws_frames.push_back(avcodec_alloc_frame());
-@@ -974,11 +974,11 @@
-                     throw exc(HERE + ": " + strerror(ENOMEM));
-                 }
-                 avpicture_fill(reinterpret_cast<AVPicture *>(_ffmpeg->video_sws_frames[j]), _ffmpeg->video_sws_buffers[j],
--                        PIX_FMT_BGRA, _ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height);
-+                        AV_PIX_FMT_BGRA, _ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height);
-                 // Call sws_getCachedContext(NULL, ...) instead of sws_getContext(...) just to avoid a deprecation warning.
-                 _ffmpeg->video_sws_ctxs.push_back(sws_getCachedContext(NULL,
-                             _ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height, _ffmpeg->video_codec_ctxs[j]->pix_fmt,
--                            _ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height, PIX_FMT_BGRA,
-+                            _ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height, AV_PIX_FMT_BGRA,
-                             SWS_POINT, NULL, NULL, NULL));
-                 if (!_ffmpeg->video_sws_ctxs[j])
-                 {
-@@ -1532,7 +1532,7 @@
-                 // We need to buffer the data because FFmpeg will clubber it when decoding the next frame.
-                 av_picture_copy(reinterpret_cast<AVPicture *>(_ffmpeg->video_buffered_frames[_video_stream]),
-                         reinterpret_cast<AVPicture *>(_ffmpeg->video_frames[_video_stream]),
--                        static_cast<enum PixelFormat>(_ffmpeg->video_codec_ctxs[_video_stream]->pix_fmt),
-+                        static_cast<enum AVPixelFormat>(_ffmpeg->video_codec_ctxs[_video_stream]->pix_fmt),
-                         _ffmpeg->video_codec_ctxs[_video_stream]->width,
-                         _ffmpeg->video_codec_ctxs[_video_stream]->height);
-                 src_frame = _ffmpeg->video_buffered_frames[_video_stream];
diff --git a/ffmpeg4.patch b/ffmpeg4.patch
deleted file mode 100644
index d60f54e..0000000
--- a/ffmpeg4.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- gtatool-2.0.1/src/conv-ffmpeg/media_object.cpp~	2018-04-29 18:57:24.000000000 +0200
-+++ gtatool-2.0.1/src/conv-ffmpeg/media_object.cpp	2018-04-29 18:59:29.051110754 +0200
-@@ -908,8 +908,6 @@
- #ifdef FF_API_LOWRES
-             lowres = codec_ctx->lowres;
- #endif
--            if (lowres || (codec && (codec->capabilities & CODEC_CAP_DR1)))
--                codec_ctx->flags |= CODEC_FLAG_EMU_EDGE;
-         }
-         // Find and open the codec. AV_CODEC_ID_TEXT is a special case: it has no decoder since it is unencoded raw data.
-         if (codec_ctx->codec_id != AV_CODEC_ID_TEXT && (!codec || (e = avcodec_open2(codec_ctx, codec, NULL)) < 0))
diff --git a/pfstools2.patch b/pfstools2.patch
deleted file mode 100644
index c8c2815..0000000
--- a/pfstools2.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- gtatool-2.0.1/src/conv-pfs/from-pfs.cpp~	2013-04-28 20:24:13.000000000 +0200
-+++ gtatool-2.0.1/src/conv-pfs/from-pfs.cpp	2015-11-24 00:35:33.834608471 +0100
-@@ -23,7 +23,7 @@
- 
- #include <string>
- 
--#include <pfs-1.2/pfs.h>
-+#include <pfs/pfs.h>
- 
- #include <gta/gta.hpp>
- 
---- gtatool-2.0.1/src/conv-pfs/to-pfs.cpp~	2013-04-28 20:24:13.000000000 +0200
-+++ gtatool-2.0.1/src/conv-pfs/to-pfs.cpp	2015-11-24 00:35:49.311263517 +0100
-@@ -24,7 +24,7 @@
- #include <string>
- #include <limits>
- 
--#include <pfs-1.2/pfs.h>
-+#include <pfs/pfs.h>
- 
- #include <gta/gta.hpp>
- 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gtatool.git/commitdiff/b49f8bf21f1c3d7a74ac82ab43dda2e1b66b1d52



More information about the pld-cvs-commit mailing list