From b60faa8c2136670468233d0193ced9c51d32d5b9 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 14 Jun 2017 17:24:17 -0400 Subject: accessibility/flite: Fix linking with libflite.so. Signed-off-by: B. Watson --- accessibility/flite/flite-ldflags-fix.patch | 36 +++++++++++++++++++++++++++++ accessibility/flite/flite.SlackBuild | 9 +++++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 accessibility/flite/flite-ldflags-fix.patch (limited to 'accessibility') diff --git a/accessibility/flite/flite-ldflags-fix.patch b/accessibility/flite/flite-ldflags-fix.patch new file mode 100644 index 0000000000..d42dfd5d50 --- /dev/null +++ b/accessibility/flite/flite-ldflags-fix.patch @@ -0,0 +1,36 @@ +diff -Naur flite-2.0.0-release/config/common_make_rules flite-2.0.0-release.new/config/common_make_rules +--- flite-2.0.0-release/config/common_make_rules 2012-01-15 07:06:52.000000000 -0800 ++++ flite-2.0.0-release.new/config/common_make_rules 2017-06-14 00:41:06.080962503 -0700 +@@ -68,7 +68,7 @@ + + FLITELIBS = $(BUILDDIR)/lib/libflite.a + FLITELIBFLAGS = -L$(BUILDDIR)/lib -lflite +-LDFLAGS += -lm $(AUDIOLIBS) $(OTHERLIBS) ++LDLIBS += -lm $(AUDIOLIBS) $(OTHERLIBS) + + FULLOBJS = $(OBJS:%=$(OBJDIR)/%) + ifdef SHFLAGS +@@ -123,7 +123,7 @@ + @ rm -rf shared_os && mkdir shared_os + @ rm -f $@ $@.${PROJECT_VERSION} $@.${PROJECT_SHLIB_VERSION} + @ (cd shared_os && ar x ../$<) +- @ (cd shared_os && $(CC) -shared -Wl,-soname,`basename $@`.${PROJECT_SHLIB_VERSION} -o ../$@.${PROJECT_VERSION} *.os) ++ @ (cd shared_os && $(CC) ${LDFLAGS} -shared -Wl,-soname,`basename $@`.${PROJECT_SHLIB_VERSION} -o ../$@.${PROJECT_VERSION} *.os $(LDLIBS)) + @ (cd $(LIBDIR) && ln -s `basename $@.${PROJECT_VERSION}` `basename $@.${PROJECT_SHLIB_VERSION}` ) + @ (cd $(LIBDIR) && ln -s `basename $@.${PROJECT_SHLIB_VERSION}` `basename $@` ) + @ rm -rf shared_os +diff -Naur flite-2.0.0-release/tools/Makefile flite-2.0.0-release.new/tools/Makefile +--- flite-2.0.0-release/tools/Makefile 2014-08-22 06:06:18.000000000 -0700 ++++ flite-2.0.0-release.new/tools/Makefile 2017-06-14 00:23:10.081062041 -0700 +@@ -67,9 +67,9 @@ + LOCAL_CLEAN = $(BINDIR)/find_sts $(BINDIR)/flite_sort $(TOP)/bin + + $(BINDIR)/find_sts: find_sts_main.o $(FLITELIBS) +- $(CC) $(CFLAGS) -o $@ find_sts_main.o $(FLITELIBFLAGS) $(LDFLAGS) ++ $(CC) $(CFLAGS) ${LDFLAGS} -o $@ find_sts_main.o $(FLITELIBFLAGS) $(LDLIBS) + $(BINDIR)/flite_sort: flite_sort_main.o $(FLITELIBS) +- $(CC) $(CFLAGS) -o $@ flite_sort_main.o $(FLITELIBFLAGS) $(LDFLAGS) ++ $(CC) $(CFLAGS) ${LDFLAGS} -o $@ flite_sort_main.o $(FLITELIBFLAGS) $(LDLIBS) + makescripts: + @ cp -p $(SCRIPTS) $(TOP)/bin + diff --git a/accessibility/flite/flite.SlackBuild b/accessibility/flite/flite.SlackBuild index 4e0248f374..e6a22aea6d 100644 --- a/accessibility/flite/flite.SlackBuild +++ b/accessibility/flite/flite.SlackBuild @@ -4,6 +4,10 @@ # Originally written by Martin Lefebvre (dadexter@sekurity.com) # Now maintained by B. Watson (yalhcru@gmail.com), original author is MIA. +# 20170614 bkw: +# - add ldflags patch from King Beowulf, to allow external programs +# to link correctly with libflite.so. BUILD=2. + # 20150623 bkw: # - fix doc build failure with standalone SBo texi2html, thanks # to John Vogel for investigating this @@ -27,7 +31,7 @@ PRGNAM=flite VERSION=${VERSION:-2.0.0} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -72,6 +76,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# fix LDLAGS to allow external programs to find libflite.so +patch -p1 < $CWD/flite-ldflags-fix.patch + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ -- cgit v1.2.3