uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
37
pkgs/applications/audio/espeak/default.nix
Normal file
37
pkgs/applications/audio/espeak/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ lib, stdenv, fetchurl, unzip, portaudio }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "espeak";
|
||||
version = "1.48.04";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/espeak/espeak-${version}-source.zip";
|
||||
sha256 = "0n86gwh9pw0jqqpdz7mxggllfr8k0r7pc67ayy7w5z6z79kig6mz";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ unzip ];
|
||||
buildInputs = [ portaudio ];
|
||||
|
||||
patches = [
|
||||
./gcc6.patch
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
sed -e s,/bin/ln,ln,g -i src/Makefile
|
||||
sed -e 's,^CXXFLAGS=-O2,CXXFLAGS=-O2 -D PATH_ESPEAK_DATA=\\\"$(DATADIR)\\\",' -i src/Makefile
|
||||
'' + (if portaudio.api_version == 19 then ''
|
||||
cp src/portaudio19.h src/portaudio.h
|
||||
'' else "");
|
||||
|
||||
configurePhase = ''
|
||||
cd src
|
||||
makeFlags="PREFIX=$out DATADIR=$out/share/espeak-data"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Compact open source software speech synthesizer";
|
||||
homepage = "http://espeak.sourceforge.net/";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
61
pkgs/applications/audio/espeak/edit.nix
Normal file
61
pkgs/applications/audio/espeak/edit.nix
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{ lib, stdenv, fetchurl, pkg-config, unzip, portaudio, wxGTK, sox }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "espeakedit";
|
||||
version = "1.48.03";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/espeak/espeakedit-${version}.zip";
|
||||
sha256 = "0x8s7vpb7rw5x37yjzy1f98m4f2csdg89libb74fm36gn8ly0hli";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config unzip ];
|
||||
buildInputs = [ portaudio wxGTK ];
|
||||
|
||||
# TODO:
|
||||
# Uhm, seems like espeakedit still wants espeak-data/ in $HOME, even thought
|
||||
# it should use $espeak/share/espeak-data. Have to contact upstream to get
|
||||
# this fixed.
|
||||
#
|
||||
# Workaround:
|
||||
# cp -r $(nix-build -A espeak)/share/espeak-data ~
|
||||
# chmod +w ~/espeak-data
|
||||
|
||||
patches = [
|
||||
./gcc6.patch
|
||||
./espeakedit-fix-makefile.patch
|
||||
./espeakedit-configurable-sox-path.patch
|
||||
./espeakedit-configurable-path-espeak-data.patch
|
||||
./espeakedit-gcc6.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# Disable -Wall flag because it's noisy
|
||||
sed -i "s/-Wall//g" src/Makefile
|
||||
|
||||
# Fixup paths (file names from above espeak-configurable* patches)
|
||||
for file in src/compiledata.cpp src/readclause.cpp src/speech.h; do
|
||||
sed -e "s|@sox@|${sox}/bin/sox|" \
|
||||
-e "s|@prefix@|$out|" \
|
||||
-i "$file"
|
||||
done
|
||||
'' + lib.optionalString (portaudio.api_version == 19) ''
|
||||
cp src/portaudio19.h src/portaudio.h
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
make -C src
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/bin"
|
||||
cp src/espeakedit "$out/bin"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Phoneme editor for espeak";
|
||||
homepage = "http://espeak.sourceforge.net/";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
Don't hardcode /usr, use @prefix@.
|
||||
|
||||
Author: Bjørn Forsman
|
||||
diff -uNr espeakedit-1.48.03.orig/src/speech.h espeakedit-1.48.03/src/speech.h
|
||||
--- espeakedit-1.48.03.orig/src/speech.h 2014-03-04 17:48:12.000000000 +0100
|
||||
+++ espeakedit-1.48.03/src/speech.h 2014-07-22 18:21:40.860790719 +0200
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
// will look for espeak_data directory here, and also in user's home directory
|
||||
#ifndef PATH_ESPEAK_DATA
|
||||
- #define PATH_ESPEAK_DATA "/usr/share/espeak-data"
|
||||
+ #define PATH_ESPEAK_DATA "@prefix@/share/espeak-data"
|
||||
#endif
|
||||
|
||||
typedef unsigned short USHORT;
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
Make the path to 'sox' configurable by marking it '@sox@' (easy to match with sed).
|
||||
|
||||
Author: Bjørn Forsman
|
||||
diff -uNr espeakedit-1.48.03.orig/src/compiledata.cpp espeakedit-1.48.03/src/compiledata.cpp
|
||||
--- espeakedit-1.48.03.orig/src/compiledata.cpp 2014-03-04 17:48:11.000000000 +0100
|
||||
+++ espeakedit-1.48.03/src/compiledata.cpp 2014-07-22 16:38:50.261388452 +0200
|
||||
@@ -1884,7 +1884,7 @@
|
||||
fname2 = msg;
|
||||
}
|
||||
|
||||
- sprintf(command,"sox \"%s%s.wav\" -r %d -c1 -t wav %s\n",path_source,fname2,samplerate_native, fname_temp);
|
||||
+ sprintf(command,"@sox@ \"%s%s.wav\" -r %d -c1 -t wav %s\n",path_source,fname2,samplerate_native, fname_temp);
|
||||
if(system(command) != 0)
|
||||
{
|
||||
failed = 1;
|
||||
diff -uNr espeakedit-1.48.03.orig/src/readclause.cpp espeakedit-1.48.03/src/readclause.cpp
|
||||
--- espeakedit-1.48.03.orig/src/readclause.cpp 2014-03-04 17:48:11.000000000 +0100
|
||||
+++ espeakedit-1.48.03/src/readclause.cpp 2014-07-22 16:38:37.190440504 +0200
|
||||
@@ -892,7 +892,7 @@
|
||||
if((fd_temp = mkstemp(fname_temp)) >= 0)
|
||||
{
|
||||
close(fd_temp);
|
||||
- sprintf(command,"sox \"%s\" -r %d -c1 -t wav %s\n", fname, samplerate, fname_temp);
|
||||
+ sprintf(command,"@sox@ \"%s\" -r %d -c1 -t wav %s\n", fname, samplerate, fname_temp);
|
||||
if(system(command) == 0)
|
||||
{
|
||||
fname = fname_temp;
|
||||
26
pkgs/applications/audio/espeak/espeakedit-fix-makefile.patch
Normal file
26
pkgs/applications/audio/espeak/espeakedit-fix-makefile.patch
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
Fix broken Makefile:
|
||||
|
||||
* fix syntax error (missing '\' to continue line):
|
||||
Makefile:19: *** recipe commences before first target. Stop.
|
||||
* Get portaudio library flags from pkg-config (to get -Lpath/to/portaudio/lib etc.)
|
||||
|
||||
Author: Bjørn Forsman
|
||||
diff -uNr espeakedit-1.48.03.orig/src/Makefile espeakedit-1.48.03/src/Makefile
|
||||
--- espeakedit-1.48.03.orig/src/Makefile 2013-03-13 15:52:02.000000000 +0100
|
||||
+++ espeakedit-1.48.03/src/Makefile 2014-07-22 15:34:17.524114822 +0200
|
||||
@@ -12,12 +12,11 @@
|
||||
|
||||
WX_LIBS = -pthread `wx-config --libs`
|
||||
|
||||
-LIBS=-lstdc++ -lportaudio
|
||||
+LIBS=-lstdc++ `pkg-config --libs portaudio-2.0`
|
||||
#LIBS=-lstdc++ /usr/lib/x86_64-linux-gnu/libportaudio.so.2
|
||||
|
||||
-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
|
||||
+CPPFLAGS = -Wall -g -fexceptions `wx-config --cflags` \
|
||||
+ -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` \
|
||||
57
pkgs/applications/audio/espeak/espeakedit-gcc6.patch
Normal file
57
pkgs/applications/audio/espeak/espeakedit-gcc6.patch
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
diff --git i/src/compiledata.cpp w/src/compiledata.cpp
|
||||
index f1bcb30..30e9e2d 100755
|
||||
--- i/src/compiledata.cpp
|
||||
+++ w/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},
|
||||
diff --git i/src/espeakedit.cpp w/src/espeakedit.cpp
|
||||
index bde03ea..071689d 100755
|
||||
--- i/src/espeakedit.cpp
|
||||
+++ w/src/espeakedit.cpp
|
||||
@@ -744,7 +744,7 @@ void MyFrame::OnTools(wxCommandEvent& event)
|
||||
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())
|
||||
{
|
||||
diff --git i/src/extras.cpp w/src/extras.cpp
|
||||
index fa6ac3b..ee68f59 100644
|
||||
--- i/src/extras.cpp
|
||||
+++ w/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[] = {'a',char(0xc3),char(0xac),0}; // aì
|
||||
+ static const char ex2[] = {'e',char(0xc3),char(0xac),0}; // eì
|
||||
+ static const char ex3[] = {char(0xc3),char(0xb9),'a',0}; // ùa
|
||||
+ static const char ex4[] = {char(0xc3),char(0xb9),'e',0}; // ùe
|
||||
+ static const char ex5[] = {char(0xc3),char(0xb9),'i',0}; // ùi
|
||||
+ static const char ex6[] = {char(0xc3),char(0xb9),'o',0}; // ùo
|
||||
+ static const char ex7[] = {'c',char(0xc3),char(0xac),'a',0}; // cìa
|
||||
+ static const char ex8[] = {'c',char(0xc3),char(0xac),'o',0}; // cìo
|
||||
+ static const char ex9[] = {'c',char(0xc3),char(0xac),'u',0}; // cìu
|
||||
+ static const char ex10[] = {'g','l',char(0xc3),char(0xac),0}; // glì
|
||||
|
||||
|
||||
static const char *exceptions[] = {ex1, ex2, ex3, ex4, ex5, ex6, ex7, ex8, ex9, ex10, NULL};
|
||||
13
pkgs/applications/audio/espeak/gcc6.patch
Normal file
13
pkgs/applications/audio/espeak/gcc6.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
diff --git c/src/tr_languages.cpp i/src/tr_languages.cpp
|
||||
index ec210a5..9503f47 100755
|
||||
--- c/src/tr_languages.cpp
|
||||
+++ i/src/tr_languages.cpp
|
||||
@@ -198,7 +198,7 @@ static const unsigned short chars_ignore_zwnj_hyphen[] = {
|
||||
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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue