From 04cb451cbd80b4684f2c364748472097beef19fa65ace60c774cabba3d7dd9ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 5 Jun 2017 08:22:09 +0000 Subject: [PATCH] - Add constraints file to allow paralel build - Add changelog to files list to ensure plain rpmbuild to work - Do not bundle luajit remove-vendor-luajit-dependency.patch - Disable the version checking, calling home in desktop apps is really bad idea, esp since upstream is semi-dead - Add patch to fix build with icu59 icu59.patch - Add patch to not put O3 to the cflags aegisub-no-optimize.patch OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/aegisub?expand=0&rev=39 --- _constraints | 7 +++ aegisub-no-optimize.patch | 30 ++++++++++ aegisub.changes | 11 ++++ aegisub.spec | 43 ++++++++------ icu59.patch | 11 ++++ remove-vendor-luajit-dependency.patch | 80 +++++++++++++++++++++++++++ 6 files changed, 164 insertions(+), 18 deletions(-) create mode 100644 _constraints create mode 100644 aegisub-no-optimize.patch create mode 100644 icu59.patch create mode 100644 remove-vendor-luajit-dependency.patch diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..99390ab --- /dev/null +++ b/_constraints @@ -0,0 +1,7 @@ + + + + 4000 + + + diff --git a/aegisub-no-optimize.patch b/aegisub-no-optimize.patch new file mode 100644 index 0000000..532d0c8 --- /dev/null +++ b/aegisub-no-optimize.patch @@ -0,0 +1,30 @@ +Index: aegisub-3.2.2/configure +=================================================================== +--- aegisub-3.2.2.orig/configure ++++ aegisub-3.2.2/configure +@@ -5949,8 +5949,8 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + else + +- CFLAGS="$CFLAGS -O3" +- CXXFLAGS="$CXXFLAGS -O3" ++ CFLAGS="$CFLAGS" ++ CXXFLAGS="$CXXFLAGS" + + fi + +Index: aegisub-3.2.2/configure.ac +=================================================================== +--- aegisub-3.2.2.orig/configure.ac ++++ aegisub-3.2.2/configure.ac +@@ -151,8 +151,8 @@ AS_IF([test x$enable_compiler_flags != x + CFLAGS="$CFLAGS -O0" + CXXFLAGS="$CXXFLAGS -O0" + ], [ +- CFLAGS="$CFLAGS -O3" +- CXXFLAGS="$CXXFLAGS -O3" ++ CFLAGS="$CFLAGS" ++ CXXFLAGS="$CXXFLAGS" + ]) + ]) + diff --git a/aegisub.changes b/aegisub.changes index cf7a912..6337323 100644 --- a/aegisub.changes +++ b/aegisub.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Mon Jun 5 07:47:20 UTC 2017 - tchvatal@suse.com + +- Add constraints file to allow paralel build +- Add changelog to files list to ensure plain rpmbuild to work +- Do not bundle luajit remove-vendor-luajit-dependency.patch +- Disable the version checking, calling home in desktop apps is + really bad idea, esp since upstream is semi-dead +- Add patch to fix build with icu59 icu59.patch +- Add patch to not put O3 to the cflags aegisub-no-optimize.patch + ------------------------------------------------------------------- Tue Mar 21 07:10:37 UTC 2017 - olaf@aepfle.de diff --git a/aegisub.spec b/aegisub.spec index 3f5118a..a408173 100644 --- a/aegisub.spec +++ b/aegisub.spec @@ -17,7 +17,6 @@ %bcond_with ffms2 - Name: aegisub Version: 3.2.2 Release: 0 @@ -26,21 +25,18 @@ License: BSD-3-Clause Group: Productivity/Multimedia/Video/Editors and Convertors Url: http://www.aegisub.net/ Source0: http://ftp.aegisub.org/pub/releases/aegisub-%{version}.tar.xz +Source99: aegisub.changes Patch0: aegisub.build-compare.patch Patch1: Makefile.inc.in.patch +Patch2: remove-vendor-luajit-dependency.patch +Patch3: icu59.patch +Patch4: aegisub-no-optimize.patch BuildRequires: autoconf BuildRequires: automake -%if 0%{?suse_version} > 1325 -BuildRequires: libboost_filesystem-devel -BuildRequires: libboost_locale-devel -BuildRequires: libboost_regex-devel -BuildRequires: libboost_thread-devel -%else -BuildRequires: boost-devel >= 1.50.0 -%endif BuildRequires: gcc-c++ BuildRequires: intltool -BuildRequires: pkg-config >= 0.20 +BuildRequires: lua51 +BuildRequires: pkgconfig >= 0.20 BuildRequires: wxWidgets-devel >= 3 BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(fftw3) >= 3.3 @@ -49,12 +45,20 @@ BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(hunspell) >= 1.2.0 BuildRequires: pkgconfig(libass) BuildRequires: pkgconfig(libpulse) >= 0.5 -BuildRequires: pkgconfig(lua) >= 5.1 +BuildRequires: pkgconfig(luajit) BuildRequires: pkgconfig(zlib) +ExcludeArch: ppc ppc64 ppc64le +%if 0%{?suse_version} > 1325 +BuildRequires: libboost_filesystem-devel +BuildRequires: libboost_locale-devel +BuildRequires: libboost_regex-devel +BuildRequires: libboost_thread-devel +%else +BuildRequires: boost-devel >= 1.50.0 +%endif %if %{with ffms2} BuildRequires: pkgconfig(ffms2) %endif -ExcludeArch: ppc ppc64 ppc64le %description Aegisub is an advanced subtitle editor for Windows, and UNIX-like systems, such @@ -69,18 +73,21 @@ functions with ease. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y') sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/" src/version.cpp FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M:%%S') sed -i "s/__TIME__/\"$FAKE_BUILDTIME\"/" src/version.cpp %build -autoreconf -fi -# Don't use --disable-update-checker because of http://blog.aegisub.org/2012/02/bit-of-statistics.html -%configure --with-player-audio=PulseAudio \ - --without-oss -# parallel make takes too much memory -make -j1 +autoreconf -fvi +%configure \ + --disable-update-checker \ + --with-player-audio=PulseAudio \ + --without-oss +make %{?_smp_mflags} %install %make_install diff --git a/icu59.patch b/icu59.patch new file mode 100644 index 0000000..f0c2542 --- /dev/null +++ b/icu59.patch @@ -0,0 +1,11 @@ +diff -upr aegisub-3.2.2.orig/src/utils.cpp aegisub-3.2.2/src/utils.cpp +--- aegisub-3.2.2.orig/src/utils.cpp 2014-12-08 02:07:09.000000000 +0200 ++++ aegisub-3.2.2/src/utils.cpp 2017-04-26 11:11:15.438239182 +0300 +@@ -44,6 +44,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/remove-vendor-luajit-dependency.patch b/remove-vendor-luajit-dependency.patch new file mode 100644 index 0000000..9685f97 --- /dev/null +++ b/remove-vendor-luajit-dependency.patch @@ -0,0 +1,80 @@ +Subject: vendor/luajit is removed in the Debian package +Author: Sebastian Reichel +Forwarded: not-needed +Last-Update: 2014-08-06 + +--- a/header.mk ++++ b/header.mk +@@ -13,7 +13,6 @@ + tests \ + tools \ + vendor/luabins \ +- vendor/luajit \ + vendor/universalchardet + + subdirs := $(addprefix $(TOP),$(addsuffix /Makefile,$(subdirs))) +--- a/Makefile.inc.in ++++ b/Makefile.inc.in +@@ -78,7 +78,7 @@ + CFLAGS_ICU = @ICU_I18N_CFLAGS@ + CFLAGS_LIBASS = @LIBASS_CFLAGS@ + CFLAGS_LIBPULSE = @LIBPULSE_CFLAGS@ +-CFLAGS_LUA = -I$(TOP)vendor/luajit/include ++CFLAGS_LUA = `pkg-config --cflags luajit` + CFLAGS_OPENAL = @OPENAL_CFLAGS@ + CFLAGS_OSS = @OSS_CFLAGS@ + CFLAGS_PORTAUDIO = @PORTAUDIO_CFLAGS@ +@@ -96,7 +96,7 @@ + LIBS_ICU = @ICU_UC_LIBS@ @ICU_I18N_LIBS@ + LIBS_LIBASS = @LIBASS_LIBS@ + LIBS_LIBPULSE = @LIBPULSE_LIBS@ +-LIBS_LUA = $(TOP)vendor/luajit/src/libluajit.a ++LIBS_LUA = `pkg-config --libs luajit` + LIBS_OPENAL = @OPENAL_LIBS@ + LIBS_PORTAUDIO = @PORTAUDIO_LIBS@ + LIBS_PTHREAD = @PTHREAD_LIBS@ +--- a/src/Makefile ++++ b/src/Makefile +@@ -192,10 +192,10 @@ + $(d)subtitles_provider_libass.o_FLAGS := $(CFLAGS_LIBASS) -Wno-c++11-narrowing + $(d)text_file_reader.o_FLAGS := -D_X86_ + $(d)video_provider_manager.o_FLAGS := $(CFLAGS_FFMS2) +-$(d)auto4_lua.o_FLAGS := -I$(TOP)vendor/luajit/include +-$(d)auto4_lua_assfile.o_FLAGS := -I$(TOP)vendor/luajit/include +-$(d)auto4_lua_dialog.o_FLAGS := -I$(TOP)vendor/luajit/include +-$(d)auto4_lua_progresssink.o_FLAGS := -I$(TOP)vendor/luajit/include ++$(d)auto4_lua.o_FLAGS := `pkg-config --cflags luajit` ++$(d)auto4_lua_assfile.o_FLAGS := `pkg-config --cflags luajit` ++$(d)auto4_lua_dialog.o_FLAGS := `pkg-config --cflags luajit` ++$(d)auto4_lua_progresssink.o_FLAGS := `pkg-config --cflags luajit` + + $(src_OBJ): $(d)libresrc/bitmap.h $(d)libresrc/default_config.h + +--- a/tools/Makefile ++++ b/tools/Makefile +@@ -12,6 +12,4 @@ + + PROGRAM += $(d)repack-thes-dict + +-$(TOP)tools/respack.lua: $(TOP)vendor/luajit/src/host/minilua +- + include $(TOP)Makefile.target +--- a/tools/respack.lua ++++ b/tools/respack.lua +@@ -1,4 +1,4 @@ +-#!../vendor/luajit/src/host/minilua ++#!/usr/bin/lua + -- Copyright (c) 2014, Thomas Goyne + -- + -- Permission to use, copy, modify, and distribute this software for any +--- a/src/libresrc/Makefile ++++ b/src/libresrc/Makefile +@@ -10,7 +10,7 @@ + + $(resrc_OBJ): $(d)default_config.h $(d)bitmap.h $(d)default_config.cpp $(d)bitmap.cpp + +-RESPACK := cd $(TOP)src/libresrc; $(TOP)vendor/luajit/src/host/minilua $(TOP)tools/respack.lua ++RESPACK := cd $(TOP)src/libresrc; $(TOP)tools/respack.lua + + $(d)bitmap.cpp: $(d)bitmap.h + $(d)default_config.cpp: $(d)default_config.h