aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Junghans <christoph.junghans@gmail.com>2015-01-13 17:01:34 -0700
committerChristoph Junghans <christoph.junghans@gmail.com>2015-01-13 17:01:34 -0700
commit5a27001c95a180702164a00d1dc80c8164fc7d86 (patch)
tree11ce695cbfbc55addf2a382a49cf575190cb5bfc /sci-misc/kaldi/files
parentMerge pull request #336 from marbre/mendeleydesktop (diff)
parentsci-misc/kaldi: Comment about special case with upstream configure script (diff)
downloadsci-5a27001c95a180702164a00d1dc80c8164fc7d86.tar.gz
sci-5a27001c95a180702164a00d1dc80c8164fc7d86.tar.bz2
sci-5a27001c95a180702164a00d1dc80c8164fc7d86.zip
Merge pull request #332 from akreal/kaldi
sci-misc/kaldi: New package
Diffstat (limited to 'sci-misc/kaldi/files')
-rw-r--r--sci-misc/kaldi/files/Makefile.patch19
-rw-r--r--sci-misc/kaldi/files/configure.patch71
-rw-r--r--sci-misc/kaldi/files/default_rules.mk.patch20
3 files changed, 110 insertions, 0 deletions
diff --git a/sci-misc/kaldi/files/Makefile.patch b/sci-misc/kaldi/files/Makefile.patch
new file mode 100644
index 000000000..07302d6d4
--- /dev/null
+++ b/sci-misc/kaldi/files/Makefile.patch
@@ -0,0 +1,19 @@
+--- Makefile.orig 2015-01-01 21:51:30.999356027 -0400
++++ Makefile 2015-01-04 16:54:02.527824499 -0400
+@@ -131,6 +131,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/configure.patch b/sci-misc/kaldi/files/configure.patch
new file mode 100644
index 000000000..07d663e93
--- /dev/null
+++ b/sci-misc/kaldi/files/configure.patch
@@ -0,0 +1,71 @@
+--- configure.orig 2015-01-01 21:51:05.611960184 -0400
++++ configure 2015-01-01 22:06:11.027064734 -0400
+@@ -45,15 +45,6 @@
+ fi
+ }
+
+-
+-
+-## First do some checks. These verify that all the things are
+-## here that should be here.
+-if [ "`basename $PWD`" != "src" ]; then
+- echo 'You must run "configure" from the src/ directory.'
+- exit 1
+-fi
+-
+ ## Default locations for FST and linear algebra libraries.
+ MATHLIB='ATLAS'
+ ATLASROOT=`rel2abs ../tools/ATLAS/`
+@@ -473,6 +464,23 @@
+ exit_success;
+ }
+
++function linux_configure_gentoo {
++ m=$1 # 64 or empty.
++ 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"
++ for f in $ATLASLIBS; do
++ [ ! -f $f ] && return 1;
++ done
++ libdir=$(dirname $(echo $ATLASLIBS | awk '{print $1}'))
++ [ -z "$libdir" ] && echo "Error getting libdir in linux_configure_gentoo" && exit 1;
++ echo ATLASINC = $ATLASROOT >> kaldi.mk
++ echo ATLASLIBS = $ATLASLIBS -Wl,-rpath=$libdir >> kaldi.mk
++ echo
++ cat makefiles/linux_atlas.mk >> kaldi.mk
++ fix_cxx_flag
++ echo "Successfully configured for gentoo [dynamic libraries] with ATLASLIBS =$ATLASLIBS"
++ $use_cuda && linux_configure_cuda
++ exit_success;
++}
+
+ function linux_configure_static {
+ if $threaded_atlas; then pt=pt; else pt=""; fi
+@@ -716,8 +724,8 @@
+
+ echo "On Linux: Checking for linear algebra header files ..."
+ if [ "$MATHLIB" == "ATLAS" ]; then
+- if [ ! -f $ATLASROOT/include/cblas.h ] || [ ! -f $ATLASROOT/include/clapack.h ] ; then
+- failure "Could not find required header files cblas.h or clapack.h in ATLAS dir '$ATLASROOT/include'"
++ if ( [ ! -f $ATLASROOT/include/cblas.h ] || [ ! -f $ATLASROOT/include/clapack.h ] ) && ( [ ! -f $ATLASROOT/cblas.h ] || [ ! -f $ATLASROOT/clapack.h ] ) ; then
++ failure "Could not find required header files cblas.h or clapack.h in ATLAS dirs '$ATLASROOT/include' or '$ATLASROOT'"
+ fi
+ echo "Using ATLAS as the linear algebra library."
+
+@@ -741,6 +749,8 @@
+ linux_configure_debian7 || \
+ linux_configure_redhat 64 || \
+ linux_configure_redhat || \
++ linux_configure_gentoo 64 || \
++ linux_configure_gentoo || \
+ linux_atlas_failure "Failed to configure ATLAS lbiraries";
+ else
+ # Prefer dynamic to static math.
+@@ -751,6 +761,8 @@
+ linux_configure_debian7 || \
+ linux_configure_redhat 64 || \
+ linux_configure_redhat || \
++ linux_configure_gentoo 64 || \
++ linux_configure_gentoo || \
+ linux_atlas_failure "Failed to configure ATLAS lbiraries";
+ fi
+
diff --git a/sci-misc/kaldi/files/default_rules.mk.patch b/sci-misc/kaldi/files/default_rules.mk.patch
new file mode 100644
index 000000000..26c7f3616
--- /dev/null
+++ b/sci-misc/kaldi/files/default_rules.mk.patch
@@ -0,0 +1,20 @@
+--- makefiles/default_rules.mk.orig 2015-01-10 19:56:03.918751769 -0400
++++ makefiles/default_rules.mk 2015-01-11 13:34:14.596055674 -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
+@@ -84,3 +84,8 @@
+ #.depend.mk: depend
+ -include .depend.mk
+
++print-binfiles:
++ @echo $(addprefix $(shell pwd)/, $(BINFILES))
++
++print-libfiles:
++ @echo $(addsuffix .so, $(addprefix $(shell pwd)/lib, $(LIBNAME)))