Gentoo Archives: gentoo-commits

From: Andrew Savchenko <bircoph@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-misc/kaldi/files/, sci-misc/kaldi/
Date: Mon, 02 Mar 2015 07:15:19
Message-Id: 1425177647.0063c7b7e3dfa20520464d865025a83531eb6b1d.bircoph@gentoo
1 commit: 0063c7b7e3dfa20520464d865025a83531eb6b1d
2 Author: Pavel Denisov <pavel.a.denisov <AT> gmail <DOT> com>
3 AuthorDate: Sun Mar 1 02:40:03 2015 +0000
4 Commit: Andrew Savchenko <bircoph <AT> gmail <DOT> com>
5 CommitDate: Sun Mar 1 02:40:47 2015 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=0063c7b7
7
8 sci-misc/kaldi: version bump
9
10 Package-Manager: portage-2.2.17
11
12 ---
13 sci-misc/kaldi/ChangeLog | 7 +
14 sci-misc/kaldi/files/Makefile.patch | 76 +++++++---
15 sci-misc/kaldi/files/configure.patch | 164 ++++++++++++---------
16 sci-misc/kaldi/files/default_rules.mk.patch | 67 ++++++---
17 ...0_p20150101.ebuild => kaldi-0_p20150301.ebuild} | 5 +-
18 5 files changed, 206 insertions(+), 113 deletions(-)
19
20 diff --git a/sci-misc/kaldi/ChangeLog b/sci-misc/kaldi/ChangeLog
21 index f7406fa..6639e7e 100644
22 --- a/sci-misc/kaldi/ChangeLog
23 +++ b/sci-misc/kaldi/ChangeLog
24 @@ -2,6 +2,13 @@
25 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
26 # $Header: $
27
28 +*kaldi-0_p20150301 (01 Mar 2015)
29 +
30 + 01 Mar 2015; Pavel Denisov <pavel.a.denisov@×××××.com>
31 + -kaldi-0_p20150101.ebuild, +kaldi-0_p20150301.ebuild, files/Makefile.patch,
32 + files/configure.patch, files/default_rules.mk.patch:
33 + Version bump.
34 +
35 *kaldi-0_p20150101 (11 Jan 2015)
36
37 11 Jan 2015; Pavel Denisov <pavel.a.denisov@×××××.com> +files/Makefile.patch,
38
39 diff --git a/sci-misc/kaldi/files/Makefile.patch b/sci-misc/kaldi/files/Makefile.patch
40 index 07302d6..ef1a606 100644
41 --- a/sci-misc/kaldi/files/Makefile.patch
42 +++ b/sci-misc/kaldi/files/Makefile.patch
43 @@ -1,19 +1,57 @@
44 ---- Makefile.orig 2015-01-01 21:51:30.999356027 -0400
45 -+++ Makefile 2015-01-04 16:54:02.527824499 -0400
46 -@@ -131,6 +131,16 @@
47 - ext_depend: check_portaudio
48 - -for x in $(EXT_SUBDIRS); do $(MAKE) -C $$x depend; done
49 -
50 -+print-binfiles: $(addsuffix /print-binfiles, $(SUBDIRS))
51 -+
52 -+%/print-binfiles:
53 -+ @$(MAKE) --no-print-directory -C $(dir $@) print-binfiles
54 -+
55 -+print-libfiles: $(addsuffix /print-libfiles, $(SUBDIRS))
56 -+
57 -+%/print-libfiles:
58 -+ @$(MAKE) --no-print-directory -C $(dir $@) print-libfiles
59 -+
60 -
61 - .PHONY: $(SUBDIRS)
62 - $(SUBDIRS) : mklibdir
63 +*** Makefile.orig 2015-02-28 16:31:57.377401743 -0400
64 +--- Makefile 2015-02-28 16:48:58.153175376 -0400
65 +***************
66 +*** 30,36 ****
67 +
68 + # Reset the default goal, so that the all target will become default
69 + .DEFAULT_GOAL :=
70 +! all: checkversion test_dependencies kaldi.mk mklibdir $(SUBDIRS)
71 + -echo Done
72 +
73 + mklibdir:
74 +--- 30,36 ----
75 +
76 + # Reset the default goal, so that the all target will become default
77 + .DEFAULT_GOAL :=
78 +! all: checkversion kaldi.mk mklibdir $(SUBDIRS)
79 + -echo Done
80 +
81 + mklibdir:
82 +***************
83 +*** 88,103 ****
84 + ext: test_dependencies ext_depend $(SUBDIRS) $(EXT_SUBDIRS)
85 + -echo Done
86 +
87 +- ifndef OPENFST_VER
88 +- $(error Please rerun configure: OPENFST_VER is not defined, likely kaldi.mk was produced by older configure script.)
89 +- endif
90 +- # Note: OPENFST_VER is determined by configure and added to kaldi.mk
91 +- OPENFST_VER_NUM := $(shell echo $(OPENFST_VER) | sed 's/\./ /g' | xargs printf "%d%02d%02d")
92 +- test_dependencies:
93 +- ifeq ("$(shell expr $(OPENFST_VER_NUM) \< 10302)","1")
94 +- $(error OpenFst $(OPENFST_VER) is not supported. You now need OpenFst >= 1.3.2.)
95 +- endif
96 +-
97 + check_portaudio:
98 + @[ -d ../tools/portaudio ] || ( cd ../tools; ./install_portaudio.sh )
99 +
100 +--- 88,93 ----
101 +***************
102 +*** 131,136 ****
103 +--- 121,136 ----
104 + ext_depend: check_portaudio
105 + -for x in $(EXT_SUBDIRS); do $(MAKE) -C $$x depend; done
106 +
107 ++ print-binfiles: $(addsuffix /print-binfiles, $(SUBDIRS))
108 ++
109 ++ %/print-binfiles:
110 ++ @$(MAKE) --no-print-directory -C $(dir $@) print-binfiles
111 ++
112 ++ print-libfiles: $(addsuffix /print-libfiles, $(SUBDIRS))
113 ++
114 ++ %/print-libfiles:
115 ++ @$(MAKE) --no-print-directory -C $(dir $@) print-libfiles
116 ++
117 +
118 + .PHONY: $(SUBDIRS)
119 + $(SUBDIRS) : mklibdir
120
121 diff --git a/sci-misc/kaldi/files/configure.patch b/sci-misc/kaldi/files/configure.patch
122 index 07d663e..f6086fc 100644
123 --- a/sci-misc/kaldi/files/configure.patch
124 +++ b/sci-misc/kaldi/files/configure.patch
125 @@ -1,71 +1,93 @@
126 ---- configure.orig 2015-01-01 21:51:05.611960184 -0400
127 -+++ configure 2015-01-01 22:06:11.027064734 -0400
128 -@@ -45,15 +45,6 @@
129 - fi
130 - }
131 -
132 --
133 --
134 --## First do some checks. These verify that all the things are
135 --## here that should be here.
136 --if [ "`basename $PWD`" != "src" ]; then
137 -- echo 'You must run "configure" from the src/ directory.'
138 -- exit 1
139 --fi
140 --
141 - ## Default locations for FST and linear algebra libraries.
142 - MATHLIB='ATLAS'
143 - ATLASROOT=`rel2abs ../tools/ATLAS/`
144 -@@ -473,6 +464,23 @@
145 - exit_success;
146 - }
147 -
148 -+function linux_configure_gentoo {
149 -+ m=$1 # 64 or empty.
150 -+ ATLASLIBS="/usr/lib$m/libatlas.so.3 /usr/lib$m/libf77blas.so.3 /usr/lib$m/libatlcblas.so.3 /usr/lib$m/libatlclapack.so.3"
151 -+ for f in $ATLASLIBS; do
152 -+ [ ! -f $f ] && return 1;
153 -+ done
154 -+ libdir=$(dirname $(echo $ATLASLIBS | awk '{print $1}'))
155 -+ [ -z "$libdir" ] && echo "Error getting libdir in linux_configure_gentoo" && exit 1;
156 -+ echo ATLASINC = $ATLASROOT >> kaldi.mk
157 -+ echo ATLASLIBS = $ATLASLIBS -Wl,-rpath=$libdir >> kaldi.mk
158 -+ echo
159 -+ cat makefiles/linux_atlas.mk >> kaldi.mk
160 -+ fix_cxx_flag
161 -+ echo "Successfully configured for gentoo [dynamic libraries] with ATLASLIBS =$ATLASLIBS"
162 -+ $use_cuda && linux_configure_cuda
163 -+ exit_success;
164 -+}
165 -
166 - function linux_configure_static {
167 - if $threaded_atlas; then pt=pt; else pt=""; fi
168 -@@ -716,8 +724,8 @@
169 -
170 - echo "On Linux: Checking for linear algebra header files ..."
171 - if [ "$MATHLIB" == "ATLAS" ]; then
172 -- if [ ! -f $ATLASROOT/include/cblas.h ] || [ ! -f $ATLASROOT/include/clapack.h ] ; then
173 -- failure "Could not find required header files cblas.h or clapack.h in ATLAS dir '$ATLASROOT/include'"
174 -+ if ( [ ! -f $ATLASROOT/include/cblas.h ] || [ ! -f $ATLASROOT/include/clapack.h ] ) && ( [ ! -f $ATLASROOT/cblas.h ] || [ ! -f $ATLASROOT/clapack.h ] ) ; then
175 -+ failure "Could not find required header files cblas.h or clapack.h in ATLAS dirs '$ATLASROOT/include' or '$ATLASROOT'"
176 - fi
177 - echo "Using ATLAS as the linear algebra library."
178 -
179 -@@ -741,6 +749,8 @@
180 - linux_configure_debian7 || \
181 - linux_configure_redhat 64 || \
182 - linux_configure_redhat || \
183 -+ linux_configure_gentoo 64 || \
184 -+ linux_configure_gentoo || \
185 - linux_atlas_failure "Failed to configure ATLAS lbiraries";
186 - else
187 - # Prefer dynamic to static math.
188 -@@ -751,6 +761,8 @@
189 - linux_configure_debian7 || \
190 - linux_configure_redhat 64 || \
191 - linux_configure_redhat || \
192 -+ linux_configure_gentoo 64 || \
193 -+ linux_configure_gentoo || \
194 - linux_atlas_failure "Failed to configure ATLAS lbiraries";
195 - fi
196 -
197 +*** configure.orig 2015-02-28 16:31:35.568045409 -0400
198 +--- configure 2015-02-28 17:21:58.477634475 -0400
199 +***************
200 +*** 46,60 ****
201 + fi
202 + }
203 +
204 +-
205 +-
206 +- ## First do some checks. These verify that all the things are
207 +- ## here that should be here.
208 +- if [ "`basename $PWD`" != "src" ]; then
209 +- echo 'You must run "configure" from the src/ directory.'
210 +- exit 1
211 +- fi
212 +-
213 + ## Default locations for FST and linear algebra libraries.
214 + MATHLIB='ATLAS'
215 + ATLASROOT=`rel2abs ../tools/ATLAS/`
216 +--- 46,51 ----
217 +***************
218 +*** 522,527 ****
219 +--- 513,535 ----
220 + exit_success;
221 + }
222 +
223 ++ function linux_configure_gentoo {
224 ++ m=$1 # 64 or empty.
225 ++ ATLASLIBS="/usr/lib$m/libatlas.so.3 /usr/lib$m/libf77blas.so.3 /usr/lib$m/libatlcblas.so.3 /usr/lib$m/libatlclapack.so.3"
226 ++ for f in $ATLASLIBS; do
227 ++ [ ! -f $f ] && return 1;
228 ++ done
229 ++ libdir=$(dirname $(echo $ATLASLIBS | awk '{print $1}'))
230 ++ [ -z "$libdir" ] && echo "Error getting libdir in linux_configure_gentoo" && exit 1;
231 ++ echo ATLASINC = $ATLASROOT >> kaldi.mk
232 ++ echo ATLASLIBS = $ATLASLIBS -Wl,-rpath=$libdir >> kaldi.mk
233 ++ echo
234 ++ cat makefiles/linux_atlas.mk >> kaldi.mk
235 ++ fix_cxx_flag
236 ++ echo "Successfully configured for gentoo [dynamic libraries] with ATLASLIBS =$ATLASLIBS"
237 ++ $use_cuda && linux_configure_cuda
238 ++ exit_success;
239 ++ }
240 +
241 + function linux_configure_static {
242 + if $threaded_atlas; then pt=pt; else pt=""; fi
243 +***************
244 +*** 682,688 ****
245 + echo "FSTROOT = $FSTROOT" >> kaldi.mk
246 +
247 + # Check installed OpenFst version and add C++11 flags if OpenFst >= 1.4
248 +! OPENFST_VER=`grep 'PACKAGE_VERSION' $FSTROOT/Makefile | sed -e 's:.*= ::'`
249 + echo "OPENFST_VER = $OPENFST_VER" >> kaldi.mk
250 + OPENFST_VER_NUM=`echo $OPENFST_VER | sed 's/\./ /g' | xargs printf "%d%02d%02d"`
251 + if [ $OPENFST_VER_NUM -ge 10400 ]; then
252 +--- 690,696 ----
253 + echo "FSTROOT = $FSTROOT" >> kaldi.mk
254 +
255 + # Check installed OpenFst version and add C++11 flags if OpenFst >= 1.4
256 +! OPENFST_VER="1.4.1"
257 + echo "OPENFST_VER = $OPENFST_VER" >> kaldi.mk
258 + OPENFST_VER_NUM=`echo $OPENFST_VER | sed 's/\./ /g' | xargs printf "%d%02d%02d"`
259 + if [ $OPENFST_VER_NUM -ge 10400 ]; then
260 +***************
261 +*** 765,772 ****
262 +
263 + echo "On Linux: Checking for linear algebra header files ..."
264 + if [ "$MATHLIB" == "ATLAS" ]; then
265 +! if [ ! -f $ATLASROOT/include/cblas.h ] || [ ! -f $ATLASROOT/include/clapack.h ] ; then
266 +! failure "Could not find required header files cblas.h or clapack.h in ATLAS dir '$ATLASROOT/include'"
267 + fi
268 + echo "Using ATLAS as the linear algebra library."
269 +
270 +--- 773,780 ----
271 +
272 + echo "On Linux: Checking for linear algebra header files ..."
273 + if [ "$MATHLIB" == "ATLAS" ]; then
274 +! if ( [ ! -f $ATLASROOT/include/cblas.h ] || [ ! -f $ATLASROOT/include/clapack.h ] ) && ( [ ! -f $ATLASROOT/cblas.h ] || [ ! -f $ATLASROOT/clapack.h ] ) ; then
275 +! failure "Could not find required header files cblas.h or clapack.h in ATLAS dirs '$ATLASROOT/include' or '$ATLASROOT'"
276 + fi
277 + echo "Using ATLAS as the linear algebra library."
278 +
279 +***************
280 +*** 797,802 ****
281 +--- 805,812 ----
282 + else
283 + # Prefer dynamic to static math.
284 + linux_configure_debian_ubuntu3 || \
285 ++ linux_configure_gentoo 64 || \
286 ++ linux_configure_gentoo || \
287 + linux_configure_dynamic || \
288 + linux_configure_static || \
289 + linux_configure_debian_ubuntu 64 || \
290
291 diff --git a/sci-misc/kaldi/files/default_rules.mk.patch b/sci-misc/kaldi/files/default_rules.mk.patch
292 index 26c7f36..60e3430 100644
293 --- a/sci-misc/kaldi/files/default_rules.mk.patch
294 +++ b/sci-misc/kaldi/files/default_rules.mk.patch
295 @@ -1,20 +1,47 @@
296 ---- makefiles/default_rules.mk.orig 2015-01-10 19:56:03.918751769 -0400
297 -+++ makefiles/default_rules.mk 2015-01-11 13:34:14.596055674 -0400
298 -@@ -14,7 +14,7 @@
299 - LIBFILE = lib$(LIBNAME).so
300 - #LDLIBS += -l$(LIBNAME)
301 - endif
302 -- LDFLAGS += -Wl,-rpath=$(shell readlink -f $(KALDILIBDIR)) -L.
303 -+ LDFLAGS += -L.
304 - LDFLAGS += $(foreach dep,$(ADDLIBS), -L$(dir $(dep)) )
305 - XDEPENDS = $(foreach dep,$(ADDLIBS), $(dir $(dep))/lib$(notdir $(basename $(dep))).so )
306 - else # Platform not supported
307 -@@ -84,3 +84,8 @@
308 - #.depend.mk: depend
309 - -include .depend.mk
310 -
311 -+print-binfiles:
312 -+ @echo $(addprefix $(shell pwd)/, $(BINFILES))
313 -+
314 -+print-libfiles:
315 -+ @echo $(addsuffix .so, $(addprefix $(shell pwd)/lib, $(LIBNAME)))
316 +*** makefiles/default_rules.mk.orig 2015-02-28 16:32:00.830458169 -0400
317 +--- makefiles/default_rules.mk 2015-02-28 19:10:50.692172138 -0400
318 +***************
319 +*** 14,20 ****
320 + LIBFILE = lib$(LIBNAME).so
321 + #LDLIBS += -l$(LIBNAME)
322 + endif
323 +! LDFLAGS += -Wl,-rpath=$(shell readlink -f $(KALDILIBDIR)) -L.
324 + LDFLAGS += $(foreach dep,$(ADDLIBS), -L$(dir $(dep)) )
325 + XDEPENDS = $(foreach dep,$(ADDLIBS), $(dir $(dep))/lib$(notdir $(basename $(dep))).so )
326 + else # Platform not supported
327 +--- 14,20 ----
328 + LIBFILE = lib$(LIBNAME).so
329 + #LDLIBS += -l$(LIBNAME)
330 + endif
331 +! LDFLAGS += -L.
332 + LDFLAGS += $(foreach dep,$(ADDLIBS), -L$(dir $(dep)) )
333 + XDEPENDS = $(foreach dep,$(ADDLIBS), $(dir $(dep))/lib$(notdir $(basename $(dep))).so )
334 + else # Platform not supported
335 +***************
336 +*** 72,78 ****
337 + test_compile: $(TESTFILES)
338 +
339 + test: test_compile
340 +! @result=0; for x in $(TESTFILES); do printf "Running $$x ..."; ./$$x >/dev/null 2>&1; if [ $$? -ne 0 ]; then echo "... FAIL $$x"; result=1; else echo "... SUCCESS"; fi; done; exit $$result
341 +
342 + .valgrind: $(BINFILES) $(TESTFILES)
343 +
344 +--- 72,78 ----
345 + test_compile: $(TESTFILES)
346 +
347 + test: test_compile
348 +! @result=0; for x in $(TESTFILES); do printf "Running $$x ..."; LD_LIBRARY_PATH=$(KALDILIBDIR):${LD_LIBRARY_PATH} ./$$x >/dev/null 2>&1; if [ $$? -ne 0 ]; then echo "... FAIL $$x"; result=1; else echo "... SUCCESS"; fi; done; exit $$result
349 +
350 + .valgrind: $(BINFILES) $(TESTFILES)
351 +
352 +***************
353 +*** 84,86 ****
354 +--- 84,91 ----
355 + #.depend.mk: depend
356 + -include .depend.mk
357 +
358 ++ print-binfiles:
359 ++ @echo $(addprefix $(shell pwd)/, $(BINFILES))
360 ++
361 ++ print-libfiles:
362 ++ @echo $(addsuffix .so, $(addprefix $(shell pwd)/lib, $(LIBNAME)))
363
364 diff --git a/sci-misc/kaldi/kaldi-0_p20150101.ebuild b/sci-misc/kaldi/kaldi-0_p20150301.ebuild
365 similarity index 89%
366 rename from sci-misc/kaldi/kaldi-0_p20150101.ebuild
367 rename to sci-misc/kaldi/kaldi-0_p20150301.ebuild
368 index 9ef5703..8ba100d 100644
369 --- a/sci-misc/kaldi/kaldi-0_p20150101.ebuild
370 +++ b/sci-misc/kaldi/kaldi-0_p20150301.ebuild
371 @@ -8,7 +8,7 @@ inherit eutils flag-o-matic subversion
372
373 DESCRIPTION="A toolkit for speech recognition"
374 HOMEPAGE="http://kaldi.sourceforge.net/"
375 -ESVN_REPO_URI="https://svn.code.sf.net/p/kaldi/code/trunk/src@4735"
376 +ESVN_REPO_URI="https://svn.code.sf.net/p/kaldi/code/trunk/src@4927"
377
378 LICENSE="Apache-2.0"
379 SLOT="0"
380 @@ -18,7 +18,7 @@ KEYWORDS=""
381 RDEPEND="
382 media-libs/speex
383 sci-libs/atlas[lapack,threads=]
384 - ~sci-misc/openfst-1.3.4"
385 + >=sci-misc/openfst-1.4.1"
386 DEPEND="${RDEPEND}
387 doc? ( app-doc/doxygen )"
388
389 @@ -41,7 +41,6 @@ src_configure() {
390 use test || append-cxxflags -DNDEBUG
391
392 sed -i \
393 - -e 's/OPENFST_VER =/OPENFST_VER = 1.3.4#/' \
394 -e "s:-g :-DHAVE_SPEEX ${CXXFLAGS} :" \
395 -e "s:-lm -lpthread -ldl:-lm -lpthread -ldl -lspeex ${LDFLAGS}:" \
396 kaldi.mk || die "sed unix/kaldi.mk failed"