git.iko.soy/typeable/nixpkgs
on master help sign in
subtitleeditor: 0.41.0 -> 0.52.1
commit9929ddd1a9b1cdcc1db0be73d0af82f89f08bc9e authorJosé Romildo Malaquias <malaquias@gmail.com> dateFri 18 Mar 2016, 09:14 (11 years ago) parentc023936
2 files changed+97−21
pkgs/applications/video/subtitleeditor/default.nix+42−21 pkgs/applications/video/subtitleeditor/subtitleeditor-0.52.1-build-fix.patch+55
pkgs/applications/video/subtitleeditor/default.nix+42−21
@@ -1,44 +1,65 @@
1−{ stdenv, fetchurl, desktop_file_utils, enchant, gnome, gstreamer, gstreamermm,
2− gst_plugins_base, gst_plugins_good, intltool, hicolor_icon_theme,
3− libsigcxx, libxmlxx, makeWrapper, xdg_utils, pkgconfig } :
1+{ stdenv, fetchurl, pkgconfig, autoconf, automake114x, intltool,
2+ desktop_file_utils, enchant, gnome3, gst_all_1, hicolor_icon_theme,
3+ libsigcxx, libxmlxx, xdg_utils, isocodes, wrapGAppsHook } :
44
55let
6− ver_maj = "0.41";
7− ver_min = "0";
6+ ver_maj = "0.52";
7+ ver_min = "1";
88in
99
1010stdenv.mkDerivation rec {
1111 name = "subtitle-editor-${ver_maj}.${ver_min}";
1212
13− buildInputs = [
14− desktop_file_utils enchant gnome.gtk gnome.gtkmm gstreamer gstreamermm
15− gst_plugins_base gst_plugins_good intltool hicolor_icon_theme libsigcxx libxmlxx
16− makeWrapper xdg_utils pkgconfig
17− ];
18−
1913 src = fetchurl {
2014 url = "http://download.gna.org/subtitleeditor/${ver_maj}/subtitleeditor-${ver_maj}.${ver_min}.tar.gz";
21− md5 = "3c21ccd8296001dcb1a02c62396db1b6";
15+ sha256 = "1m8j2i27kjaycvp09b0knp9in61jd2dj852hrx5hvkrby70mygjv";
2216 };
2317
18+ nativeBuildInputs = [
19+ autoconf automake114x pkgconfig intltool wrapGAppsHook
20+ ];
21+
22+ buildInputs = [
23+ desktop_file_utils
24+ enchant
25+ gnome3.gtk
26+ gnome3.gtkmm
27+ gst_all_1.gstreamer
28+ gst_all_1.gstreamermm
29+ gst_all_1.gst-plugins-base
30+ gst_all_1.gst-plugins-good
31+ hicolor_icon_theme
32+ libsigcxx
33+ libxmlxx
34+ xdg_utils
35+ isocodes
36+ ];
37+
38+ NIX_CFLAGS_COMPILE = "-std=c++11 -DDEBUG";
39+
40+ enableParallelBuilding = true;
41+
2442 doCheck = true;
2543
26− postInstall = ''
27− wrapProgram "$out/bin/subtitleeditor" --prefix \
28− GST_PLUGIN_SYSTEM_PATH ":" "$GST_PLUGIN_SYSTEM_PATH" \
44+ patches = [ ./subtitleeditor-0.52.1-build-fix.patch ];
45+
46+ preConfigure = ''
47+ # ansi overrides -std, see src_configure
48+ sed 's/\(CXXFLAGS\) -ansi/\1/' -i configure.ac configure
2949 '';
3050
51+ configureFlags = [ "--disable-debug" ];
3152
3253 meta = {
33− description = "GTK+2 application to edit video subtitles";
54+ description = "GTK+3 application to edit video subtitles";
3455 longDescription = ''
35− Subtitle Editor is a GTK+2 tool to edit subtitles for GNU/Linux/*BSD. It can be
36− used for new subtitles or as a tool to transform, edit, correct and refine
37− existing subtitle. This program also shows sound waves, which makes it easier
38− to synchronise subtitles to voices.
56+ Subtitle Editor is a GTK+3 tool to edit subtitles for GNU/Linux/*BSD. It
57+ can be used for new subtitles or as a tool to transform, edit, correct
58+ and refine existing subtitle. This program also shows sound waves, which
59+ makes it easier to synchronise subtitles to voices.
3960 '';
4061 homepage = http://home.gna.org/subtitleeditor;
41− license = stdenv.lib.licenses.gpl3;
62+ license = stdenv.lib.licenses.gpl3Plus;
4263 maintainers = [ stdenv.lib.maintainers.plcplc ];
4364 platforms = stdenv.lib.platforms.linux;
4465 };
pkgs/applications/video/subtitleeditor/subtitleeditor-0.52.1-build-fix.patchnew file+55
@@ -0,0 +1,55 @@
1+Fix build errors with gcc-4.9.3 -std=c++11 (after disabling -ansi)
2+
3+https://gna.org/bugs/?23714
4+
5+https://bugs.gentoo.org/show_bug.cgi?id=550764
6+https://bugs.gentoo.org/show_bug.cgi?id=566328
7+
8+--- a/src/subtitleview.cc 2015-12-24 01:52:29.322622155 +0100
9++++ b/src/subtitleview.cc 2015-12-24 01:52:44.210491213 +0100
10+@@ -1363,7 +1363,7 @@
11+ {
12+ int num;
13+ std::istringstream ss(event->string);
14+- bool is_num = ss >> num != 0;
15++ bool is_num = static_cast<bool>(ss >> num) != 0;
16+ // Update only if it's different
17+ if(is_num != get_enable_search())
18+ set_enable_search(is_num);
19+--- a/src/utility.h 2015-12-24 01:49:42.205104858 +0100
20++++ b/src/utility.h 2015-12-24 01:50:23.387737071 +0100
21+@@ -91,7 +91,7 @@
22+ std::istringstream s(src);
23+ // return s >> dest != 0;
24+
25+- bool state = s >> dest != 0;
26++ bool state = static_cast<bool>(s >> dest) != 0;
27+
28+ if(!state)
29+ se_debug_message(SE_DEBUG_UTILITY, "string:'%s'failed.", src.c_str());
30+--- a/plugins/actions/dialoguize/dialoguize.cc 2015-12-24 01:06:24.125428454 +0100
31++++ b/plugins/actions/dialoguize/dialoguize.cc 2015-12-24 01:06:42.630277006 +0100
32+@@ -23,7 +23,7 @@
33+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
34+ */
35+
36+-#include <auto_ptr.h>
37++#include <memory>
38+ #include "extension/action.h"
39+ #include "i18n.h"
40+ #include "debug.h"
41+--- a/plugins/actions/documentmanagement/documentmanagement.old 2015-12-24 01:17:13.914730337 +0100
42++++ b/plugins/actions/documentmanagement/documentmanagement.cc 2015-12-24 01:17:23.339640430 +0100
43+@@ -178,9 +178,9 @@
44+
45+ ui_id = ui->new_merge_id();
46+
47+- #define ADD_UI(name) ui->add_ui(ui_id, "/menubar/menu-file/"name, name, name);
48+- #define ADD_OPEN_UI(name) ui->add_ui(ui_id, "/menubar/menu-file/menu-open/"name, name, name);
49+- #define ADD_SAVE_UI(name) ui->add_ui(ui_id, "/menubar/menu-file/menu-save/"name, name, name);
50++ #define ADD_UI(name) ui->add_ui(ui_id, "/menubar/menu-file/" name, name, name);
51++ #define ADD_OPEN_UI(name) ui->add_ui(ui_id, "/menubar/menu-file/menu-open/" name, name, name);
52++ #define ADD_SAVE_UI(name) ui->add_ui(ui_id, "/menubar/menu-file/menu-save/" name, name, name);
53+
54+ ADD_UI("new-document");
55+ ADD_OPEN_UI("open-document");