diff --git a/espeakedit-1.46.02.zip b/espeakedit-1.46.02.zip deleted file mode 100644 index 0c3b67c..0000000 --- a/espeakedit-1.46.02.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:74e2694a3ea6c1e32f4c9102b93c881eabb37aeaf911c9d13aff23ab13ca85b1 -size 7306662 diff --git a/espeakedit-1.48.03-gcc6.patch b/espeakedit-1.48.03-gcc6.patch new file mode 100644 index 0000000..b3fee08 --- /dev/null +++ b/espeakedit-1.48.03-gcc6.patch @@ -0,0 +1,128 @@ +Index: b/src/compiledata.cpp +=================================================================== +--- a/src/compiledata.cpp ++++ b/src/compiledata.cpp +@@ -212,7 +212,7 @@ enum { + kTUNE_SPLIT, + }; + +-static const char utf8_bom[] = {0xef,0xbb,0xbf,0}; ++static const char utf8_bom[] = {(char)0xef,(char)0xbb,(char)0xbf,0}; + + static keywtab_t k_intonation[] = { + {"tune", 0, kTUNE}, +@@ -748,8 +748,9 @@ static void CompileReport(void) + int procedure_num; + int prev_mnemonic; + +- if(f_report == NULL) ++ if(f_report == NULL) { + return; ++ } + + // make a list of all the references and sort it + list = (REF_HASH_TAB **)malloc((count_references)* sizeof(REF_HASH_TAB *)); +@@ -3682,8 +3683,9 @@ make_envs(); + fprintf(f_errors,"\nRefs %d, Reused %d\n",count_references,duplicate_references); + fclose(f_in); + fclose(f_phdata); +- if(f_prog_log != NULL) ++ if(f_prog_log != NULL) { + fclose(f_prog_log); ++ } + fclose(f_phindex); + fclose(f_phtab); + fclose(f_phcontents); +Index: b/src/espeakedit.cpp +=================================================================== +--- a/src/espeakedit.cpp ++++ b/src/espeakedit.cpp +@@ -359,10 +359,11 @@ void MyFrame::SetVoiceTitle(char *voice_ + {//========================================== + char buf[100]; + +- if(samplerate_native == 22050) ++ if(samplerate_native == 22050) { + sprintf(buf, " - %s voice", voice_name); +- else ++ } else { + sprintf(buf, " - %s voice %dHz", voice_name, samplerate_native); ++ } + SetTitle(AppName + wxString(buf,wxConvLocal)); + + if((data_menu != NULL) && (translator != NULL)) +@@ -538,8 +539,9 @@ HtmlWindow::HtmlWindow(wxWindow *parent, + + void HtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) + { +- if(wxLaunchDefaultBrowser(link.GetHref()) == FALSE) ++ if(wxLaunchDefaultBrowser(link.GetHref()) == FALSE) { + wxLogStatus(_T("Failed to launch default browser: "+link.GetHref())); ++ } + } + + +@@ -598,8 +600,9 @@ void MyFrame::OnAbout(wxCommandEvent& ev + } + + result = wxLaunchDefaultBrowser(url_docs); +- if(result == 0) ++ if(result == 0) { + wxLogStatus(_T("Failed to launch default browser: "+url_docs)); ++ } + break; + } + } +@@ -744,7 +747,7 @@ void MyFrame::OnTools(wxCommandEvent& ev + int debug_flag=0; + char fname_log[sizeof(path_dsource)+12]; + char err_fname[sizeof(path_home)+15]; +- static const char utf8_bom[] = {0xef,0xbb,0xbf,0}; ++ static const char utf8_bom[] = {(char)0xef,(char)0xbb,(char)0xbf,0}; + + switch(event.GetId()) + { +Index: b/src/extras.cpp +=================================================================== +--- a/src/extras.cpp ++++ b/src/extras.cpp +@@ -335,16 +335,16 @@ void Lexicon_It(int pass) + static const char *vowels1 = "aeiou"; + static const char *vowels2 = "aeou"; + +- static const char ex1[] = {'a',0xc3,0xac,0}; // aì +- static const char ex2[] = {'e',0xc3,0xac,0}; // eì +- static const char ex3[] = {0xc3,0xb9,'a',0}; // ùa +- static const char ex4[] = {0xc3,0xb9,'e',0}; // ùe +- static const char ex5[] = {0xc3,0xb9,'i',0}; // ùi +- static const char ex6[] = {0xc3,0xb9,'o',0}; // ùo +- static const char ex7[] = {'c',0xc3,0xac,'a',0}; // cìa +- static const char ex8[] = {'c',0xc3,0xac,'o',0}; // cìo +- static const char ex9[] = {'c',0xc3,0xac,'u',0}; // cìu +- static const char ex10[] = {'g','l',0xc3,0xac,0}; // glì ++ static const char ex1[] = {(char)'a',(char)0xc3,(char)0xac,0}; // aì ++ static const char ex2[] = {(char)'e',(char)0xc3,(char)0xac,0}; // eì ++ static const char ex3[] = {(char)0xc3,(char)0xb9,(char)'a',0}; // ùa ++ static const char ex4[] = {(char)0xc3,(char)0xb9,(char)'e',0}; // ùe ++ static const char ex5[] = {(char)0xc3,(char)0xb9,(char)'i',0}; // ùi ++ static const char ex6[] = {(char)0xc3,(char)0xb9,(char)'o',0}; // ùo ++ static const char ex7[] = {(char)'c',(char)0xc3,(char)0xac,(char)'a',0}; // cìa ++ static const char ex8[] = {(char)'c',(char)0xc3,(char)0xac,(char)'o',0}; // cìo ++ static const char ex9[] = {(char)'c',(char)0xc3,(char)0xac,(char)'u',0}; // cìu ++ static const char ex10[] = {(char)'g',(char)'l',(char)0xc3,(char)0xac,0}; // glì + + + static const char *exceptions[] = {ex1, ex2, ex3, ex4, ex5, ex6, ex7, ex8, ex9, ex10, NULL}; +Index: b/src/tr_languages.cpp +=================================================================== +--- a/src/tr_languages.cpp ++++ b/src/tr_languages.cpp +@@ -198,7 +198,7 @@ static const unsigned short chars_ignore + 0x200d, 1, // zero width joiner + 0, 0 }; + +-const char string_ordinal[] = {0xc2,0xba,0}; // masculine ordinal character, UTF-8 ++const char string_ordinal[] = {(char)0xc2,(char)0xba,0}; // masculine ordinal character, UTF-8 + + + static Translator* NewTranslator(void) diff --git a/espeakedit-1.48.03-next-line.patch b/espeakedit-1.48.03-next-line.patch new file mode 100644 index 0000000..93808c8 --- /dev/null +++ b/espeakedit-1.48.03-next-line.patch @@ -0,0 +1,16 @@ +Index: b/src/Makefile +=================================================================== +--- a/src/Makefile ++++ b/src/Makefile +@@ -15,9 +15,9 @@ WX_LIBS = -pthread `wx-config --libs` + LIBS=-lstdc++ -lportaudio + #LIBS=-lstdc++ /usr/lib/x86_64-linux-gnu/libportaudio.so.2 + +-CPPFLAGS = -Wall -g -fexceptions `wx-config --cflags` ++CPPFLAGS = -Wall -g -fexceptions `wx-config --cflags` \ + -I/usr/include/wx-2.8 \ +- -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES ++ -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES \ + -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -D_ESPEAKEDIT + + CXXFLAGS = -O2 -Wall -fexceptions `wx-config --cflags` \ diff --git a/espeakedit-1.48.03.zip b/espeakedit-1.48.03.zip new file mode 100644 index 0000000..ef450ca --- /dev/null +++ b/espeakedit-1.48.03.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9142e029b2cf8ceac8592bd2845ed34c38525172c17fe9cfe885e7b3ee3e1a75 +size 7557985 diff --git a/espeakedit-wx3.diff b/espeakedit-wx3.diff new file mode 100644 index 0000000..8d214ff --- /dev/null +++ b/espeakedit-wx3.diff @@ -0,0 +1,45 @@ +From: Jan Engelhardt +Date: 2016-06-29 16:03:01.838755093 +0200 + +Make espeakedit build with wxWidgets 3. +--- + src/espeakedit.cpp | 17 +++-------------- + 1 file changed, 3 insertions(+), 14 deletions(-) + +Index: espeakedit-1.48.03/src/espeakedit.cpp +=================================================================== +--- espeakedit-1.48.03.orig/src/espeakedit.cpp ++++ espeakedit-1.48.03/src/espeakedit.cpp +@@ -116,20 +116,10 @@ static const char *help_text = + // Initialise this in OnInit, not statically + bool MyApp::OnInit(void) + {//===================== +- +-int j; +-wxChar *p; +-char param[120]; +- +- + if(argc > 1) + { +- p = argv[1]; +- j = 0; +- while((param[j] = p[j]) != 0) j++; +- +- if((strcmp(param,"--help")==0) || (strcmp(param,"-h")==0)) +- { ++ wxString param = argv[1]; ++ if (param == "--help" || param == "-h") { + printf(about_string2,espeak_Info(NULL)); + printf("%s", help_text); + exit(0); +@@ -137,8 +127,7 @@ if(argc > 1) + + ConfigInit(); + +- if(strcmp(param,"--compile")==0) +- { ++ if (param == "--compile") { + samplerate_native = samplerate = 22050; + LoadPhData(NULL); + if(LoadVoice("", 0) == NULL) diff --git a/espeakedit.changes b/espeakedit.changes index b1a6003..1f6a40e 100644 --- a/espeakedit.changes +++ b/espeakedit.changes @@ -1,8 +1,27 @@ +------------------------------------------------------------------- +Thu Jun 30 11:12:38 UTC 2016 - jengelh@inai.de + +- Use wxWidgets 3. +- add patch: espeakedit-wx3.diff + +------------------------------------------------------------------- +Fri Jun 24 18:52:01 UTC 2016 - i@marguerite.su + +- update version 1.48.03 +- add patch: espeakedit-1.48.03-next-line.patch + * lack of next line mark in Makefile +- add patch: espeakedit-1.48.03-gcc6.patch + * fix boo#985354 + * fix narrowing conversion from int to char inside {} +- drop patch: makefile_rpmoptflags_wxversion.patch, upstreamed + ------------------------------------------------------------------- Wed Jul 11 09:10:07 EEST 2012 - embar@super.lt + - Fix ability to use wxcontainer instead of stl variant for WxWidgets ------------------------------------------------------------------- Sat Jul 07 19:40:40 UTC 2012 - embar@super.lt + - Version 1.46.02 diff --git a/espeakedit.spec b/espeakedit.spec index 19c7944..8581ee7 100644 --- a/espeakedit.spec +++ b/espeakedit.spec @@ -1,7 +1,7 @@ # # spec file for package espeakedit # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,51 +16,40 @@ # - -Name: espeakedit -Version: 1.46.02 -Release: 0 %define _version %{version}-source -License: GPL-3.0+ +#Fix ability to use wxcontainer instead of stl variant for WxWidgets +Name: espeakedit +Version: 1.48.03 +Release: 0 Summary: Software speech synthesizer (text-to-speech) -Url: http://espeak.sourceforge.net +License: GPL-3.0+ Group: Productivity/Other +Url: http://espeak.sourceforge.net Source: %{name}-%{version}.zip Source1: espeakedit.1 -Patch0: makefile_rpmoptflags_wxversion.patch -#To avoid library choise conflict: recomend to use -stl versions instead of -wxcontainer -Requires: libwx_baseu-2_8-0-stl -Requires: libwx_baseu-2_8-0-compat-lib-stl -Requires: libwx_gtk2u_adv-2_8-0-compat-lib-stl -Requires: libwx_gtk2u_core-2_8-0-compat-lib-stl -Requires: libwx_gtk2u_html-2_8-0-compat-lib-stl -Requires: wxWidgets-compat-lib-config -Conflicts: wxWidgets-ansi-compat-lib-config -Conflicts: wxWidgets-wxcontainer-compat-lib-config +#PATCH-FIX-UPSTREAM marguerite@opensuse.org - lack of next line mark in Makefile +Patch1: espeakedit-1.48.03-next-line.patch +#PATCH-FIX-UPSTREAM marguerite@opensuse.org - fix narrowing conversion from int to char inside {} +Patch2: espeakedit-1.48.03-gcc6.patch +Patch3: espeakedit-wx3.diff BuildRequires: gcc-c++ BuildRequires: portaudio-devel BuildRequires: pulseaudio-devel BuildRequires: unzip -BuildRequires: wxWidgets-devel +BuildRequires: wxWidgets-devel >= 3 BuildRoot: %{_tmppath}/%{name}-%{version}-build -#Fix ability to use wxcontainer instead of stl variant for WxWidgets -%define _use_internal_dependency_generator 0 -%define __find_requires %wx_requires - %description eSpeak is a software speech synthesizer for English, and some other languages. eSpeakEdit provides a User Interface to edit the eSpeak voices. - %prep -%setup -q -n %{name}-%{version} -%patch0 -p1 +%setup -q +%patch1 -p1 +%patch2 -p1 +%patch -P 3 -p1 # Build against portaudio v19 (see ReadMe) -%{__cp} -f src/portaudio19.h src/portaudio.h -%ifarch i386 i486 i586 i686 -sed "s/lib64/lib/g" -i src/Makefile -%endif +cp -f src/portaudio19.h src/portaudio.h %build cd src @@ -73,15 +62,11 @@ mkdir -p %{buildroot}/%{_bindir}/ cp espeakedit %{buildroot}/%{_bindir}/ cd .. # Install manpage -%{__install} -D -m 0644 %{SOURCE1} %{buildroot}%{_mandir}/man1/espeakedit.1 - -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig +install -D -m 0644 %{SOURCE1} %{buildroot}%{_mandir}/man1/espeakedit.1 %files %defattr (-,root,root,755) %{_bindir}/espeakedit -%doc %{_mandir}/man1/espeakedit.1.* +%{_mandir}/man1/espeakedit.1%{ext_man} %changelog diff --git a/makefile_rpmoptflags_wxversion.patch b/makefile_rpmoptflags_wxversion.patch deleted file mode 100644 index 67521da..0000000 --- a/makefile_rpmoptflags_wxversion.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- ./src/Makefile.orig 2011-09-14 14:59:35.000000000 +0300 -+++ ./src/Makefile 2012-05-24 08:57:37.070235001 +0300 -@@ -10,23 +10,21 @@ - - OBJS=$(patsubst %.cpp,%.o,$(SRCS)) - --WX_LIBS = -pthread -lwx_gtk2u_xrc-2.6 -lwx_gtk2u_qa-2.6 -lwx_gtk2u_html-2.6 \ -- -lwx_gtk2u_adv-2.6 -lwx_gtk2u_core-2.6 -lwx_baseu_xml-2.6 -lwx_baseu_net-2.6 -lwx_baseu-2.6 -- -+WX_VERSION = 2.8 -+WX_LIBS = -pthread -L /usr/lib64/wx-$(WX_VERSION)-stl/ -lwx_gtk2u_xrc-$(WX_VERSION) -lwx_gtk2u_qa-$(WX_VERSION) -lwx_gtk2u_html-$(WX_VERSION) -lwx_gtk2u_adv-$(WX_VERSION) -lwx_gtk2u_core-$(WX_VERSION) -lwx_baseu_xml-$(WX_VERSION) -lwx_baseu_net-$(WX_VERSION) -lwx_baseu-$(WX_VERSION) -+WX_INCLUDES = -I/usr/lib64/wx-$(WX_VERSION)-stl/wx/include/gtk2-unicode-release-$(WX_VERSION) -I/usr/include/wx-$(WX_VERSION) -+ - LIBS=-lstdc++ -lportaudio - --CPPFLAGS = -Wall -g -fexceptions -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -- -I/usr/include/wx-2.6 \ -- -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -- -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -D_ESPEAKEDIT -+DEFS = -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -D_ESPEAKEDIT - --CXXFLAGS = -O2 -Wall -fexceptions -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 \ -- -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -D_ESPEAKEDIT -+CXXFLAGS = -O2 -Wall -fexceptions -I/usr/lib64/wx-$(WX_VERSION)-stl/wx/include/gtk2-unicode-release-$(WX_VERSION) -I/usr/include/wx-$(WX_VERSION) \ -+ -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DLD_DYNAMIC_WEAK=0 -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -D_ESPEAKEDIT - - all: espeakedit - - .cpp.o: -- $(CXX) $(CXXFLAGS) -I. -c -fno-exceptions $< -+ $(CXX) $(CXXFLAGS) $(WX_INCLUDES) $(DEFS) -I. -c -fno-exceptions $< - - espeakedit: $(OBJS) - $(CXX) -o $@ $(OBJS) $(LIBS) $(WX_LIBS)