From a813448594a0d0fe982e7d5a478c1a4a8af9d232 Mon Sep 17 00:00:00 2001
From: newbluemoon <blaumolch@mailbox.org>
Date: Wed, 16 Aug 2017 20:14:55 +0200
Subject: [PATCH 1/2] New package: gstreamermm-1.8.0

---
 common/shlibs                                 |  1 +
 srcpkgs/gstreamermm-devel                     |  1 +
 .../fix-build-with-gstreamer1.12.patch        | 45 +++++++++++++++++++
 srcpkgs/gstreamermm/template                  | 33 ++++++++++++++
 4 files changed, 80 insertions(+)
 create mode 120000 srcpkgs/gstreamermm-devel
 create mode 100644 srcpkgs/gstreamermm/patches/fix-build-with-gstreamer1.12.patch
 create mode 100644 srcpkgs/gstreamermm/template

diff --git a/common/shlibs b/common/shlibs
index 22312429f9c..972e9d64cc9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2822,6 +2822,7 @@ libbrotlidec.so.0.6.0 brotli-0.6.0_1
 libbrotlienc.so.0.6.0 brotli-0.6.0_1
 libfilteraudio.so filter_audio-0.0.1_1
 libarmadillo.so.7 armadillo-7.800.2_1
+libgstreamermm-1.0.so.1 gstreamermm-1.8.0_1
 libduktape.so.201 duktape-2.1.1_1
 libccgnu2-1.8.so.0 commoncpp2-1.8.1_1
 libccext2-1.8.so.0 commoncpp2-1.8.1_1
diff --git a/srcpkgs/gstreamermm-devel b/srcpkgs/gstreamermm-devel
new file mode 120000
index 00000000000..bb721012053
--- /dev/null
+++ b/srcpkgs/gstreamermm-devel
@@ -0,0 +1 @@
+gstreamermm
\ No newline at end of file
diff --git a/srcpkgs/gstreamermm/patches/fix-build-with-gstreamer1.12.patch b/srcpkgs/gstreamermm/patches/fix-build-with-gstreamer1.12.patch
new file mode 100644
index 00000000000..fbfa213a6e6
--- /dev/null
+++ b/srcpkgs/gstreamermm/patches/fix-build-with-gstreamer1.12.patch
@@ -0,0 +1,45 @@
+Author: Marcin Kolny <marcin.kolny@gmail.com>
+Description: Gst::AudioClock: auto generate some audioclock methods
+Origin: https://bugzilla.gnome.org/show_bug.cgi?id=783628
+Last-update: 2017-07-01
+
+--- gstreamer/gstreamermm/audioclock.cc
++++ gstreamer/gstreamermm/audioclock.cc
+@@ -2,6 +2,7 @@
+ 
+ 
+ #include <glibmm.h>
++#include <gst/gstversion.h>
+ 
+ #include <gstreamermm/audioclock.h>
+ #include <gstreamermm/private/audioclock_p.h>
+@@ -76,17 +77,29 @@ AudioClock::AudioClock(const Glib::ustri
+ 
+ Gst::ClockTime AudioClock::adjust(Gst::ClockTime time)
+ {
++#if GST_VERSION_MAJOR == 1 && GST_VERSION_MINOR >= 12
++  return ((Gst::ClockTime)(gst_audio_clock_adjust(gobj(), ((GstClockTime)(time)))));
++#else
+   return static_cast<Gst::ClockTime>(gst_audio_clock_adjust(GST_CLOCK_CAST(gobj()), static_cast<GstClockTime>(time)));
++#endif
+ }
+ 
+ Gst::ClockTime AudioClock::get_time() const
+ {
++#if GST_VERSION_MAJOR == 1 && GST_VERSION_MINOR >= 12
++  return ((Gst::ClockTime)(gst_audio_clock_get_time(const_cast<GstAudioClock*>(gobj()))));
++#else
+   return static_cast<Gst::ClockTime>(gst_audio_clock_get_time(GST_CLOCK_CAST(gobj())));
++#endif
+ }
+ 
+ void AudioClock::invalidate()
+ {
++#if GST_VERSION_MAJOR == 1 && GST_VERSION_MINOR >= 12
++  gst_audio_clock_invalidate(gobj());
++#else
+   gst_audio_clock_invalidate(GST_CLOCK_CAST(gobj()));
++#endif
+ }
+ 
+ } //namespace Gst
diff --git a/srcpkgs/gstreamermm/template b/srcpkgs/gstreamermm/template
new file mode 100644
index 00000000000..a8cdc83eba1
--- /dev/null
+++ b/srcpkgs/gstreamermm/template
@@ -0,0 +1,33 @@
+# Template file for 'gstreamermm'
+pkgname=gstreamermm
+version=1.8.0
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config perl"
+makedepends="gst-plugins-base1-devel pangomm-devel"
+configure_args="--disable-plugins-bad"
+short_desc="GStreamer API C++ bindings"
+maintainer="newbluemoon <blaumolch@mailbox.org>"
+homepage="https://gstreamer.freedesktop.org/bindings/cplusplus.html"
+license="GPL-2, GPL-2.1"
+distfiles="${GNOME_SITE}/${pkgname}/1.8/${pkgname}-${version}.tar.xz"
+checksum=3ee3c1457ea2c32c1e17b784faa828f414ba27a9731532bf26d137a2ad999a44
+
+post_install() {
+	vlicense COPYING
+	vlicense COPYING.examples
+	vlicense COPYING.tools
+}
+
+gstreamermm-devel_package() {
+	depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/gstreamermm-1.0
+		vmove usr/lib/pkgconfig
+		vmove usr/lib/*.so
+		vmove usr/share
+	}
+}
+

From a912cd0acbbdfede50e5b02ed759c9af5dfae0c1 Mon Sep 17 00:00:00 2001
From: newbluemoon <blaumolch@mailbox.org>
Date: Wed, 16 Aug 2017 20:15:21 +0200
Subject: [PATCH 2/2] New package: subtitleeditor-0.54.0

---
 srcpkgs/subtitleeditor/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/subtitleeditor/template

diff --git a/srcpkgs/subtitleeditor/template b/srcpkgs/subtitleeditor/template
new file mode 100644
index 00000000000..e27be408d8c
--- /dev/null
+++ b/srcpkgs/subtitleeditor/template
@@ -0,0 +1,20 @@
+# Template file for 'subtitleeditor'
+pkgname=subtitleeditor
+version=0.54.0
+revision=1
+build_style=gnu-configure
+hostmakedepends="autogen automake intltool libtool pkg-config gettext-devel"
+makedepends="gtk+3-devel gtkmm-devel enchant-devel libxml++-devel
+ gst-plugins-base1-devel gst-plugins-good1 gstreamermm-devel iso-codes"
+depends="iso-codes"
+short_desc="Subtitle Editor is a GTK+3 tool to edit subtitles"
+maintainer="newbluemoon <blaumolch@mailbox.org>"
+homepage="https://kitone.github.io/subtitleeditor/"
+license="GPL-3"
+distfiles="https://github.com/kitone/${pkgname}/archive/${version}.tar.gz"
+checksum=47713c6268b32ed3fe43073e07e14e3075acab7ed305d21d95b224b51ebcba14
+
+
+pre_configure() {
+	NOCONFIGURE=1 ./autogen.sh
+}