From 90b5b6d2f1d23a0b641170250261e7d7077d92fc Mon Sep 17 00:00:00 2001 From: guibuilder_pel7x64builder0 Date: Thu, 18 Jul 2019 18:17:19 +0200 Subject: [PATCH] gimp-gap pcakage creation Signed-off-by: guibuilder_pel7x64builder0 --- .../gimp-gap-2.7-fix-format-security.patch | 12 ++ SOURCES/gimp-gap-2.7-unbandle.patch | 99 +++++++++++ SOURCES/gimp-gap.get.tarball | 12 ++ SOURCES/gimp-gap.metainfo.xml | 13 ++ SPECS/gimp-gap.spec | 162 ++++++++++++++++++ 5 files changed, 298 insertions(+) create mode 100644 SOURCES/gimp-gap-2.7-fix-format-security.patch create mode 100644 SOURCES/gimp-gap-2.7-unbandle.patch create mode 100644 SOURCES/gimp-gap.get.tarball create mode 100644 SOURCES/gimp-gap.metainfo.xml create mode 100644 SPECS/gimp-gap.spec diff --git a/SOURCES/gimp-gap-2.7-fix-format-security.patch b/SOURCES/gimp-gap-2.7-fix-format-security.patch new file mode 100644 index 0000000..efb07f0 --- /dev/null +++ b/SOURCES/gimp-gap-2.7-fix-format-security.patch @@ -0,0 +1,12 @@ +diff -up gimp-gap/gap/gap_sdl_audioplayer.c.format-security gimp-gap/gap/gap_sdl_audioplayer.c +--- gimp-gap/gap/gap_sdl_audioplayer.c.format-security 2018-06-04 17:32:31.167211811 -0400 ++++ gimp-gap/gap/gap_sdl_audioplayer.c 2018-06-04 17:32:58.901508843 -0400 +@@ -600,7 +600,7 @@ gap_sdl_path(const char *pathname,int fl + + if (usrPtr->sounds[ii].fpWav == NULL) + { +- g_snprintf(usrPtr->sounds[ii].wav_filename, MAX_WAV_FILENAME_LENGTH -1, pathname); ++ g_snprintf(usrPtr->sounds[ii].wav_filename, MAX_WAV_FILENAME_LENGTH -1, "%s", pathname); + usrPtr->sounds[ii].wav_filename[MAX_WAV_FILENAME_LENGTH -1] = '\0'; + usrPtr->sounds[ii].offset_to_first_sample = 0; + usrPtr->sounds[ii].fpWav = gap_audio_wav_open_seek_data(usrPtr->sounds[ii].wav_filename); diff --git a/SOURCES/gimp-gap-2.7-unbandle.patch b/SOURCES/gimp-gap-2.7-unbandle.patch new file mode 100644 index 0000000..88c06f6 --- /dev/null +++ b/SOURCES/gimp-gap-2.7-unbandle.patch @@ -0,0 +1,99 @@ +diff -NaurEbBH gimp-gap.orig/configure.in gimp-gap/configure.in +--- gimp-gap.orig/configure.in 2013-04-16 13:30:03.000000000 +0400 ++++ gimp-gap/configure.in 2013-04-20 21:04:24.215486712 +0400 +@@ -1202,15 +1202,12 @@ + AC_OUTPUT([ + Makefile + libgapbase/Makefile +-extern_libs/Makefile + images/Makefile + gap/Makefile + libwavplayclient/Makefile + libgapvidapi/Makefile + libgapvidutil/Makefile + vid_common/Makefile +-vid_enc_avi/Makefile +-vid_enc_ffmpeg/Makefile + vid_enc_rawframes/Makefile + vid_enc_single/Makefile + po/Makefile.in +diff -NaurEbBH gimp-gap.orig/gap/Makefile.am gimp-gap/gap/Makefile.am +--- gimp-gap.orig/gap/Makefile.am 2013-04-16 13:30:03.000000000 +0400 ++++ gimp-gap/gap/Makefile.am 2013-04-20 21:04:24.215486712 +0400 +@@ -294,8 +294,6 @@ + gap_decode_xanim.c \ + gap_decode_xanim.h \ + gap_frontends_main.c \ +- gap_mpege.c \ +- gap_mpege.h \ + gap_libgimpgap.h + + gap_decode_mplayer_SOURCES = \ +diff -NaurEbBH gimp-gap.orig/libgapvidapi/Makefile.am gimp-gap/libgapvidapi/Makefile.am +--- gimp-gap.orig/libgapvidapi/Makefile.am 2013-04-16 13:30:03.000000000 +0400 ++++ gimp-gap/libgapvidapi/Makefile.am 2013-04-20 21:04:24.216486729 +0400 +@@ -27,9 +27,6 @@ + # .c sourcefiles in gap_vid_api.c (except example.c) + EXTRA_DIST = \ + gap_vid_api_gimp.c \ +- gap_vid_api_ffmpeg.c \ +- gap_vid_api_mpeg3.c \ +- gap_vid_api_mpeg3toc.c \ + gap_vid_api_quicktime.c \ + gap_vid_api_util.c \ + gap_vid_api_mp_util.c \ +diff -NaurEbBH gimp-gap.orig/Makefile.am gimp-gap/Makefile.am +--- gimp-gap.orig/Makefile.am 2013-04-16 13:30:03.000000000 +0400 ++++ gimp-gap/Makefile.am 2013-04-20 21:04:24.214486696 +0400 +@@ -18,21 +18,12 @@ + VID_COMMON=vid_common + VID_ENC_RAWFRAMES=vid_enc_rawframes + VID_ENC_SINGLE=vid_enc_single +-VID_ENC_AVI=vid_enc_avi + ## endif + +-# the ffmpeg based video encoder depends on ENABLE_GVA_LIBAVFORMAT_SUPPORT +-# and is not bulit when disabled. +-if ENABLE_GVA_LIBAVFORMAT_SUPPORT +-VID_ENC_FFMPEG=vid_enc_ffmpeg +-endif + +- +-SUBDIRS = libgapbase extern_libs images $(LIBWAVCLIENT) $(LIBGAPVIDAPI) gap po docs \ ++SUBDIRS = libgapbase images $(LIBWAVCLIENT) $(LIBGAPVIDAPI) gap po docs \ + $(LIBGAPVIDUTIL) \ + $(VID_COMMON) \ +- $(VID_ENC_AVI) \ +- $(VID_ENC_FFMPEG) \ + $(VID_ENC_RAWFRAMES) \ + $(VID_ENC_SINGLE) + +diff -NaurEbBH gimp-gap.orig/po/POTFILES.in gimp-gap/po/POTFILES.in +--- gimp-gap.orig/po/POTFILES.in 2013-04-16 13:30:03.000000000 +0400 ++++ gimp-gap/po/POTFILES.in 2013-04-20 21:07:07.901273795 +0400 +@@ -43,7 +43,6 @@ + gap/gap_mov_dialog.c + gap/gap_mov_exec.c + gap/gap_mov_main.c +-gap/gap_mpege.c + gap/gap_name2layer_main.c + gap/gap_navigator_dialog.c + gap/gap_onion_base.c +@@ -79,17 +78,10 @@ + gap/gap_wr_resynth.c + gap/gap_wr_trans.c + gap/sel-to-anim-img.scm +-libgapvidapi/gap_vid_api_mpeg3.c + libgapvidapi/gap_vid_api_vidindex.c + libgapvidutil/gap_gve_sox.c + libgapvidutil/gap_gve_story.c + vid_common/gap_cme_gui.c + vid_common/gap_cme_main.c +-vid_enc_avi/gap_enc_avi_gui.c +-vid_enc_avi/gap_enc_avi_main.c +-vid_enc_ffmpeg/gap_enc_ffmpeg_callbacks.c +-vid_enc_ffmpeg/gap_enc_ffmpeg_gui.c +-vid_enc_ffmpeg/gap_enc_ffmpeg_main.c +-vid_enc_ffmpeg/gap_enc_ffmpeg_par.c + vid_enc_rawframes/gap_enc_rawframes_main.c + vid_enc_single/gap_enc_singleframes_main.c diff --git a/SOURCES/gimp-gap.get.tarball b/SOURCES/gimp-gap.get.tarball new file mode 100644 index 0000000..7e4e42d --- /dev/null +++ b/SOURCES/gimp-gap.get.tarball @@ -0,0 +1,12 @@ +#!/bin/bash + +rm -rf gimp-gap +git clone --depth 1 https://github.com/GNOME/gimp-gap.git gimp-gap +GHASH=$( git --git-dir ./gimp-gap/.git reflog | cut -d' ' -f1 ) +rm -rf gimp-gap/.git +# Remove legally problematic files +rm -rf gimp-gap/extern_libs gimp-gap/vid_enc_avi gimp-gap/vid_enc_ffmpeg gimp-gap/gap/gap_mpege.c gimp-gap/gap/gap_mpege.h \ + gimp-gap/libgapvidapi/gap_vid_api_ffmpeg.c gimp-gap/libgapvidapi/gap_vid_api_mpeg3.c gimp-gap/libgapvidapi/gap_vid_api_mpeg3toc.c +TARF=gimp-gap-$GHASH-clean.tar.xz +tar -cJf $TARF gimp-gap +echo "[$TARF] created" diff --git a/SOURCES/gimp-gap.metainfo.xml b/SOURCES/gimp-gap.metainfo.xml new file mode 100644 index 0000000..1a35737 --- /dev/null +++ b/SOURCES/gimp-gap.metainfo.xml @@ -0,0 +1,13 @@ + + + + gimp-gap + gimp.desktop + GIMP Animation Package + A collection of plugins to extend GIMP with capabilities to edit and create animations as sequences of single frames. + https://github.com/GNOME/gimp-gap + http://bugzilla.gnome.org/enter_bug.cgi?product=gimp-gap + CC0-1.0 + GPL-2.0+ + diff --git a/SPECS/gimp-gap.spec b/SPECS/gimp-gap.spec new file mode 100644 index 0000000..bbe4dc3 --- /dev/null +++ b/SPECS/gimp-gap.spec @@ -0,0 +1,162 @@ +Version: 2.7.0 + +%global GITrev b17f908 + +%global gapmajorver %(echo %version | sed 's|\\..*||g') +%global gapminorver %(echo %version | sed 's|^%{gapmajorver}\\.||g;s|\\..*||g') +%global gapmicrover %(echo %version | sed 's|^%{gapmajorver}\\.%{gapminorver}\\.||g;s|\\..*||g') +%global gimplibdir %(pkg-config gimp-2.0 --variable=gimplibdir) +%global gimpdatadir %(pkg-config gimp-2.0 --variable=gimpdatadir) + +Summary: The GIMP Animation Package +Name: gimp-gap +Release: 20%{?GITrev:.GIT%{GITrev}}%{?dist} +Group: Applications/Multimedia +License: GPLv2+ +URL: https://github.com/GNOME/gimp-gap +#Source: ftp://ftp.gimp.org/pub/gimp/plug-ins/v2.6/gap/gimp-gap-%%{version}.tar.bz2 +# See script in Source1 to reproduce tarball +Source0: %{name}-%{GITrev}-clean.tar.xz +Source1: %{name}.get.tarball +# https://bugzilla.redhat.com/show_bug.cgi?id=1299256 -> https://bugzilla.gnome.org/show_bug.cgi?id=760758 +Source2: %{name}.metainfo.xml + +BuildRequires: gcc +BuildRequires: autoconf >= 2.54, automake >= 1.7, intltool >= 0.17 +# glib-gettextize >= 2.2.0 +BuildRequires: pkgconfig(gimp-2.0), gimp-devel-tools >= 2.6.0 +BuildRequires: bzip2-devel, glib2-devel >= 2.2.0, libjpeg-turbo-devel + +Requires: gimp >= 2.6.0 + +# Unbundle libs. Fedora-specific patch, borrowed from SUSE. +Patch1: gimp-gap-2.7-unbandle.patch +# Fix format security issues +Patch2: gimp-gap-2.7-fix-format-security.patch + +%description +The GIMP-GAP (GIMP Animation Package) is a collection of Plug-Ins to +extend GIMP with capabilities to edit and create animations as +sequences of single frames. + +%prep +%setup -q -n %{name} + +%patch1 -p1 -b .unbundle +%patch2 -p1 -b .format-security + +# 1 symbol only not in UTF-8. iso8859-1 encoding my guess +iconv -f iso8859-1 -t utf8 ChangeLog > ChangeLog.tmp +touch -r ChangeLog ChangeLog.tmp +mv -f ChangeLog.tmp ChangeLog + +# Try make rpmlint happy +find \( -iname '*.c' -or -iname '*.h' \) -exec chmod -x {} \; +find -type d -exec chmod 0755 {} \; + +%build +# Disable call ./configure from autogen.sh because we want it with default configured parameters +sed -i 's@$srcdir/configure@#$srcdir/configure@' autogen.sh +./autogen.sh +%configure --disable-libavformat + +# Parralel build terminated with error +make LIBS="$LIBS -lm" + +%install +%make_install + +mkdir -p %{buildroot}/%{_datadir}/appdata/ +install -m 644 -D %{SOURCE2} %{buildroot}/%{_datadir}/appdata/ + +%find_lang gimp20-gap + +%files -f gimp20-gap.lang +%doc AUTHORS ChangeLog MAINTAINERS NEWS README +%{_libdir}/%{name}-2.7/ +%{gimplibdir}/plug-ins/* +%{gimpdatadir}/scripts/* +%{_datadir}/appdata/%{name}.metainfo.xml + +%changelog +* Fri Jul 13 2018 Fedora Release Engineering - 2.7.0-20.GITb17f908 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Mon Jun 4 2018 Tom Callaway - 2.7.0-19.GITb17f908 +- update to git b17f908 +- adjust "get" script to remove legally problematic items and make clean tarball +- use clean tarball + +* Wed Feb 07 2018 Fedora Release Engineering - 2.7.0-18.GITe75bd46 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Aug 02 2017 Fedora Release Engineering - 2.7.0-17.GITe75bd46 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 2.7.0-16.GITe75bd46 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 2.7.0-15.GITe75bd46 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Feb 03 2016 Fedora Release Engineering - 2.7.0-14.GITe75bd46 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Sat Jan 23 2016 Pavel Alexeev - 2.7.0-13.GITe75bd46 +- Add appdata metainfo file. Thanks to Jiri Eischmann. bz#1299256 + +* Mon Dec 07 2015 Pavel Alexeev - 2.7.0-12.GITe75bd46 +- Replace patch gimp-gap-2.7-autogen.sh-automake-1.12.patch by universal gimp-gap-automake-auto-version.patch - fix FBFS bz#1239530 + +* Wed Jun 17 2015 Fedora Release Engineering - 2.7.0-11.GITe75bd46 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat Aug 16 2014 Fedora Release Engineering - 2.7.0-10.GITe75bd46 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 2.7.0-9.GITe75bd46 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Mon Nov 4 2013 Pavel Alexeev - 2.7.0-8.GITe75bd46 +- Review in progress (bz#954108), for comments thanks to Mario Blättermann. +- Filled bug about incorrect FSF address - https://bugzilla.gnome.org/show_bug.cgi?id=711402 +- Encode Changelog into UTF-8. +- Make rpmlint for debuginfo happy by drop executable permissions from source files and chmod directories to 0755. + +* Sun Nov 3 2013 Pavel Alexeev - 2.7.0-7.GITe75bd46 +- Change BR "gimp-devel >= 2.6.0" on "pkgconfig(gimp-2.0)", remove sed. Thanks to Mario Blättermann (review bz#954108). + +* Thu May 2 2013 Pavel Alexeev - 2.7.0-6.GITe75bd46 +- Disable call of ./configure script from autogen.sh as excessive and run it manually via macros (Michael Schwendt insist). + +* Tue Apr 30 2013 Pavel Alexeev - 2.7.0-5.GITe75bd46 +- Remove xvidcore from requires. Thanks to Vasiliy Glazov. + +* Mon Apr 29 2013 Pavel Alexeev - 2.7.0-4.GITe75bd46 +- Add %%{?dist} tag. Thanks to Vasiliy Glazov. +- Try avoid second reconfigure by passing argument in autoden.sh. Thanks to Antonio Trande. + +* Mon Apr 29 2013 Pavel Alexeev - 2.7.0-3.GITe75bd46 +- For changes thanks to Antonio Trande and their comments in Fedora review (bz#954108). +- Remove BR xvidcore-devel xvidcore (its is not required and does not present in Fedora). +- Remove %%{_datadir}/locale/*/*/* +- Remade gimp-gap-2.7-autogen.sh-automake-1.12.patch to account automake-1.13 also. +- Add BR libjpeg-turbo-devel + +* Sat Apr 20 2013 Pavel Alexeev - 2.7.0-2.GITe75bd46 +- Remove BuildRequires: ffmpeg-libs ffmpeg-devel +- Borrow from SUSE Patch1: gimp-gap-2.7-unbandle.patch (rebased) +- Remove bundled libs in prep. +- Add --disable-libavformat configure option. +- As ffmpeg not required anymore and there no legal issues it ready for Fedora now. + +* Tue Apr 9 2013 Pavel Alexeev - 2.7.0-1.GITe75bd46 +- Import http://forums.fedoraforum.org/attachment.php?attachmentid=20693&d=12975115122C ( http://forums.fedoraforum.org/showthread.php?t=182414 ) + +* Thu Feb 10 2011 Oliver Mangold +- updated to version 2.6.0 + +* Wed Apr 14 2004 Nils Philippsen +- version 2.0.0 +- initial build +