diff options
-rw-r--r-- | sci-libs/rdkit/rdkit-2015.03.1.ebuild | 2 | ||||
-rw-r--r-- | sci-libs/rdkit/rdkit-9999.ebuild | 2 | ||||
-rw-r--r-- | sci-misc/kaldi/ChangeLog | 8 | ||||
-rw-r--r-- | sci-misc/kaldi/Manifest | 1 | ||||
-rw-r--r-- | sci-misc/kaldi/files/Makefile.patch | 117 | ||||
-rw-r--r-- | sci-misc/kaldi/files/default_rules.mk.a7d9824.patch | 30 | ||||
-rw-r--r-- | sci-misc/kaldi/kaldi-0_p20151106.ebuild | 125 | ||||
-rw-r--r-- | sci-misc/kaldi/metadata.xml | 8 |
8 files changed, 233 insertions, 60 deletions
diff --git a/sci-libs/rdkit/rdkit-2015.03.1.ebuild b/sci-libs/rdkit/rdkit-2015.03.1.ebuild index 68ee45fa0..38e30e975 100644 --- a/sci-libs/rdkit/rdkit-2015.03.1.ebuild +++ b/sci-libs/rdkit/rdkit-2015.03.1.ebuild @@ -20,7 +20,7 @@ REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" RDEPEND="dev-libs/boost python? ( - dev-libs/boost[${PYTHON_USEDEP}] + dev-libs/boost[python,${PYTHON_USEDEP}] dev-python/numpy[${PYTHON_USEDEP}] ) >=dev-db/sqlite-3" diff --git a/sci-libs/rdkit/rdkit-9999.ebuild b/sci-libs/rdkit/rdkit-9999.ebuild index 0b4f40aa9..be37c582c 100644 --- a/sci-libs/rdkit/rdkit-9999.ebuild +++ b/sci-libs/rdkit/rdkit-9999.ebuild @@ -21,7 +21,7 @@ REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" RDEPEND="dev-libs/boost python? ( - dev-libs/boost[${PYTHON_USEDEP}] + dev-libs/boost[python,${PYTHON_USEDEP}] dev-python/numpy[${PYTHON_USEDEP}] ) >=dev-db/sqlite-3" diff --git a/sci-misc/kaldi/ChangeLog b/sci-misc/kaldi/ChangeLog index fe4798129..b40d1713a 100644 --- a/sci-misc/kaldi/ChangeLog +++ b/sci-misc/kaldi/ChangeLog @@ -2,6 +2,14 @@ # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 # $Id$ +*kaldi-0_p20151106 (08 Nov 2015) + + 08 Nov 2015; Pavel Denisov <pavel.a.denisov@gmail.com> + +files/default_rules.mk.a7d9824.patch, +kaldi-0_p20151106.ebuild, + metadata.xml: + sci-misc/kaldi: Version bump, switch to OpenBLAS math library by default, add + CUDA support + *kaldi-0_p20150709 (18 Jul 2015) 18 Jul 2015; Pavel Denisov <pavel.a.denisov@gmail.com> diff --git a/sci-misc/kaldi/Manifest b/sci-misc/kaldi/Manifest index 73235f010..fa70f9d27 100644 --- a/sci-misc/kaldi/Manifest +++ b/sci-misc/kaldi/Manifest @@ -1 +1,2 @@ DIST kaldi-0_p20150709.tar.xz 2322512 SHA256 84f1856315c8a1a3179cd464628bb0efa0423de0d68a529a064ba93c41bd64aa SHA512 cf1f0cb0701d386202a9e406c9a3aa40046058c4ecec8cedb51fc2b3216084eecc8d2a7353d695a21afa668fb88fa5dae29911d35ab5d413f48ccc9025258e90 WHIRLPOOL 144ad5a92fe46146766e9a4f34385b171cf24ce4849456e73783432e8cc74af145f7375e0130dfcbd0eac584d43ed79652f03967a24b532f11b7bf1bf15c2b7b +DIST kaldi-0_p20151106.tar.xz 2533608 SHA256 77726388b33739dcd3840b49bca027c3d97afad02e7b52c931d65ae08d900d40 SHA512 35f41bea999f8fdc5bc8d33753b9630bafddb23975254b12d30287e65cb2bfd48c7d1f126d96fc669cbbd43ad80abf6a5d5ccd6a24d516061454f8f84f560333 WHIRLPOOL 6e6c3ebc2f4701185e5d5c6eae727b5a4c06a764495e5a5172be142724ce89cd7e521b6f9602ae051d44e8766269000cde96ad12e9439cd16890bce6e311eabe diff --git a/sci-misc/kaldi/files/Makefile.patch b/sci-misc/kaldi/files/Makefile.patch index ef1a60640..9fa1841c6 100644 --- a/sci-misc/kaldi/files/Makefile.patch +++ b/sci-misc/kaldi/files/Makefile.patch @@ -1,57 +1,60 @@ -*** Makefile.orig 2015-02-28 16:31:57.377401743 -0400 ---- Makefile 2015-02-28 16:48:58.153175376 -0400 -*************** -*** 30,36 **** - - # Reset the default goal, so that the all target will become default - .DEFAULT_GOAL := -! all: checkversion test_dependencies kaldi.mk mklibdir $(SUBDIRS) - -echo Done - - mklibdir: ---- 30,36 ---- - - # Reset the default goal, so that the all target will become default - .DEFAULT_GOAL := -! all: checkversion kaldi.mk mklibdir $(SUBDIRS) - -echo Done - - mklibdir: -*************** -*** 88,103 **** - ext: test_dependencies ext_depend $(SUBDIRS) $(EXT_SUBDIRS) - -echo Done - -- ifndef OPENFST_VER -- $(error Please rerun configure: OPENFST_VER is not defined, likely kaldi.mk was produced by older configure script.) -- endif -- # Note: OPENFST_VER is determined by configure and added to kaldi.mk -- OPENFST_VER_NUM := $(shell echo $(OPENFST_VER) | sed 's/\./ /g' | xargs printf "%d%02d%02d") -- test_dependencies: -- ifeq ("$(shell expr $(OPENFST_VER_NUM) \< 10302)","1") -- $(error OpenFst $(OPENFST_VER) is not supported. You now need OpenFst >= 1.3.2.) -- endif -- - check_portaudio: - @[ -d ../tools/portaudio ] || ( cd ../tools; ./install_portaudio.sh ) - ---- 88,93 ---- -*************** -*** 131,136 **** ---- 121,136 ---- - ext_depend: check_portaudio - -for x in $(EXT_SUBDIRS); do $(MAKE) -C $$x depend; done - -+ print-binfiles: $(addsuffix /print-binfiles, $(SUBDIRS)) -+ -+ %/print-binfiles: -+ @$(MAKE) --no-print-directory -C $(dir $@) print-binfiles -+ -+ print-libfiles: $(addsuffix /print-libfiles, $(SUBDIRS)) -+ -+ %/print-libfiles: -+ @$(MAKE) --no-print-directory -C $(dir $@) print-libfiles -+ - - .PHONY: $(SUBDIRS) - $(SUBDIRS) : mklibdir +--- Makefile.orig 2015-11-06 18:43:31.000000000 -0400 ++++ Makefile 2015-11-17 20:15:14.452502675 -0400 +@@ -30,7 +30,7 @@ + + # Reset the default goal, so that the all target will become default + .DEFAULT_GOAL := +-all: checkversion test_dependencies kaldi.mk mklibdir $(SUBDIRS) ++all: kaldi.mk mklibdir $(SUBDIRS) + -echo Done + + mklibdir: +@@ -45,14 +45,6 @@ + @true + endif + +-.PHONY: checkversion +-checkversion: +-ifeq ($(shell ./configure --version),$(CONFIGURE_VERSION)) +- @echo "The version of configure script matches kaldi.mk version. Good." +-else +- $(error The kaldi.mk file was generated using a different version of configure script. Run the configure script again.) +-endif +- + biglib: $(SUBDIRS_LIB) + ifeq ($(KALDI_FLAVOR), dynamic) + ifeq ($(shell uname), Darwin) +@@ -88,16 +80,6 @@ + ext: test_dependencies ext_depend $(SUBDIRS) $(EXT_SUBDIRS) + -echo Done + +-ifndef OPENFST_VER +-$(error Please rerun configure: OPENFST_VER is not defined, likely kaldi.mk was produced by older configure script.) +-endif +-# Note: OPENFST_VER is determined by configure and added to kaldi.mk +-OPENFST_VER_NUM := $(shell echo $(OPENFST_VER) | sed 's/\./ /g' | xargs printf "%d%02d%02d") +-test_dependencies: +-ifeq ("$(shell expr $(OPENFST_VER_NUM) \< 10302)","1") +- $(error OpenFst $(OPENFST_VER) is not supported. You now need OpenFst >= 1.3.2.) +-endif +- + check_portaudio: + @[ -d ../tools/portaudio ] || ( cd ../tools; ./install_portaudio.sh ) + +@@ -131,6 +113,16 @@ + ext_depend: check_portaudio + -for x in $(EXT_SUBDIRS); do $(MAKE) -C $$x depend; done + ++print-binfiles: $(addsuffix /print-binfiles, $(SUBDIRS)) ++ ++%/print-binfiles: ++ @$(MAKE) --no-print-directory -C $(dir $@) print-binfiles ++ ++print-libfiles: $(addsuffix /print-libfiles, $(SUBDIRS)) ++ ++%/print-libfiles: ++ @$(MAKE) --no-print-directory -C $(dir $@) print-libfiles ++ + + .PHONY: $(SUBDIRS) + $(SUBDIRS) : mklibdir diff --git a/sci-misc/kaldi/files/default_rules.mk.a7d9824.patch b/sci-misc/kaldi/files/default_rules.mk.a7d9824.patch new file mode 100644 index 000000000..7e60268bc --- /dev/null +++ b/sci-misc/kaldi/files/default_rules.mk.a7d9824.patch @@ -0,0 +1,30 @@ +--- makefiles/default_rules.mk.orig 2015-11-06 18:43:31.000000000 -0400 ++++ makefiles/default_rules.mk 2015-11-09 18:42:33.609774157 -0400 +@@ -14,7 +14,7 @@ + LIBFILE = lib$(LIBNAME).so + #LDLIBS += -l$(LIBNAME) + endif +- LDFLAGS += -Wl,-rpath=$(shell readlink -f $(KALDILIBDIR)) -L. ++ LDFLAGS += -L. + LDFLAGS += $(foreach dep,$(ADDLIBS), -L$(dir $(dep)) ) + XDEPENDS = $(foreach dep,$(ADDLIBS), $(dir $(dep))/lib$(notdir $(basename $(dep))).so ) + else # Platform not supported +@@ -75,7 +75,7 @@ + @{ result=0; \ + for x in $(TESTFILES); do \ + printf "Running $$x ..."; \ +- ./$$x >$$x.testlog 2>&1; \ ++ LD_LIBRARY_PATH=$(KALDILIBDIR):${LD_LIBRARY_PATH} ./$$x >$$x.testlog 2>&1; \ + if [ $$? -ne 0 ]; then \ + echo "... FAIL $$x"; \ + result=1; \ +@@ -99,3 +99,9 @@ + # removing automatic making of "depend" as it's quite slow. + #.depend.mk: depend + -include .depend.mk ++ ++print-binfiles: ++ @echo $(addprefix $(shell pwd)/, $(BINFILES)) ++ ++print-libfiles: ++ @echo $(addsuffix .so, $(addprefix $(shell pwd)/lib, $(LIBNAME))) diff --git a/sci-misc/kaldi/kaldi-0_p20151106.ebuild b/sci-misc/kaldi/kaldi-0_p20151106.ebuild new file mode 100644 index 000000000..9a86cf686 --- /dev/null +++ b/sci-misc/kaldi/kaldi-0_p20151106.ebuild @@ -0,0 +1,125 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils toolchain-funcs cuda flag-o-matic + +DESCRIPTION="A toolkit for speech recognition" +HOMEPAGE="http://kaldi-asr.org/" +SRC_URI="http://gentoo.akreal.net/distfiles/${P}.tar.xz" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="doc test cuda" +KEYWORDS="~amd64" + +RDEPEND=" + media-libs/speex + virtual/cblas + virtual/lapack + virtual/lapacke + >=sci-misc/openfst-1.4.1 + cuda? ( dev-util/nvidia-cuda-toolkit )" +DEPEND="${RDEPEND} + doc? ( app-doc/doxygen )" + +# We need write acccess /dev/nvidiactl, /dev/nvidia0 and /dev/nvidia-uvm and the portage +# user is (usually) not in the video group +RESTRICT="test? ( cuda? ( userpriv ) )" + +pkg_pretend() { + local cblas_provider=$(eselect cblas show) + + if [[ ! ${cblas_provider} =~ (atlas|mkl|openblas) ]]; then + die "Build with '${cblas_provider}' CBLAS is not supported" + fi +} + +src_prepare() { + epatch \ + "${FILESDIR}"/Makefile.patch \ + "${FILESDIR}"/default_rules.mk.a7d9824.patch +} + +src_configure() { + append-cxxflags \ + -DKALDI_DOUBLEPRECISION=0 \ + -DHAVE_POSIX_MEMALIGN \ + -DHAVE_EXECINFO_H=1 \ + -DHAVE_CXXABI_H \ + -DHAVE_SPEEX \ + -DHAVE_OPENFST_GE_10400 \ + -std=c++0x \ + -Wall \ + -I.. \ + -pthread \ + -Wno-sign-compare \ + -Wno-unused-local-typedefs \ + -Winit-self \ + -rdynamic \ + -fPIC \ + $($(tc-getPKG_CONFIG) --cflags cblas) \ + $($(tc-getPKG_CONFIG) --cflags lapack) + + append-libs \ + -lspeex \ + -lfst \ + -lm \ + -lpthread \ + -ldl \ + $($(tc-getPKG_CONFIG) --libs cblas) \ + $($(tc-getPKG_CONFIG) --libs lapack) + + local cblas_provider=$(eselect cblas show) + + if [[ ${cblas_provider} =~ atlas ]]; then + append-cxxflags -DHAVE_ATLAS + elif [[ ${cblas_provider} =~ mkl ]]; then + append-cxxflags -DHAVE_MKL + elif [[ ${cblas_provider} =~ openblas ]]; then + append-cxxflags -DHAVE_OPENBLAS $($(tc-getPKG_CONFIG) --cflags lapacke) + fi + + use test || append-cxxflags -DNDEBUG + + cat <<-EOF > kaldi.mk + KALDI_FLAVOR := dynamic + KALDILIBDIR := "${S}"/lib + CC = $(tc-getCXX) + RANLIB = $(tc-getRANLIB) + LDLIBS = ${LIBS} + EOF + + if use cuda; then + cat <<-EOF >> kaldi.mk + CUDA = true + CUDATKDIR = "${EPREFIX}"/opt/cuda + EOF + cat makefiles/linux_x86_64_cuda.mk >> kaldi.mk + sed -i \ + -e "s:CUDA_FLAGS = -g:CUDA_FLAGS = ${NVCCFLAGS}:" \ + kaldi.mk || die "sed unix/kaldi.mk failed" + fi +} + +src_compile() { + default + use doc && doxygen +} + +src_test() { + if use cuda; then + addwrite /dev/nvidiactl + addwrite /dev/nvidia0 + addwrite /dev/nvidia-uvm + fi + default +} + +src_install() { + dolib.so $(make print-libfiles) + dobin $(make print-binfiles) + use doc && dodoc -r html +} diff --git a/sci-misc/kaldi/metadata.xml b/sci-misc/kaldi/metadata.xml index e961e5163..3aa9b1d14 100644 --- a/sci-misc/kaldi/metadata.xml +++ b/sci-misc/kaldi/metadata.xml @@ -3,6 +3,7 @@ <pkgmetadata> <maintainer> <email>pavel.a.denisov@gmail.com</email> + <name>Pavel Denisov</name> </maintainer> <longdescription lang="en"> Kaldi is a toolkit for speech recognition written @@ -10,6 +11,11 @@ Kaldi is intended for use by speech recognition researchers. </longdescription> <upstream> - <remote-id type="sourceforge">kaldi</remote-id> + <remote-id type="github">kaldi-asr/kaldi</remote-id> </upstream> + <use> + <flag name="cuda"> + Build with CUDA support. + </flag> + </use> </pkgmetadata> |