Skip to content
Snippets Groups Projects
Commit 745e691c authored by Natanael Copa's avatar Natanael Copa
Browse files

main/flite: fix underlinking

backport fix(es) for the underlinking issues in the internal libraries.
parent ad186eaa
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=flite
pkgver=2.1
pkgrel=0
pkgrel=1
pkgdesc="Small, fast speech synthesis engine (text-to-speech)"
url="http://www.speech.cs.cmu.edu/flite"
arch="all"
......@@ -12,7 +12,8 @@ depends_dev=
makedepends="$depends_dev"
install=""
subpackages="$pkgname-dev"
source="http://www.festvox.org/$pkgname/packed/$pkgname-$pkgver/$pkgname-$pkgver-release.tar.bz2"
source="http://www.festvox.org/$pkgname/packed/$pkgname-$pkgver/$pkgname-$pkgver-release.tar.bz2
fix-internal-linking.patch"
builddir="$srcdir/$pkgname-$pkgver-release"
build() {
......@@ -55,4 +56,5 @@ Cflags: -I\${includedir}/flite/
EOF
}
sha512sums="e9ef9ca4b6920178634d94bbe6e21a8b0ec471b010b07e6cc961ed2d120acb944c8e1d268fe26188f7dfe43fb7bd4bdff7fa53b2d2f12029d37e08d0316620d2 flite-2.1-release.tar.bz2"
sha512sums="e9ef9ca4b6920178634d94bbe6e21a8b0ec471b010b07e6cc961ed2d120acb944c8e1d268fe26188f7dfe43fb7bd4bdff7fa53b2d2f12029d37e08d0316620d2 flite-2.1-release.tar.bz2
3794f7b6520ab11e5fd2e6e8dc2ce630f0bcb26ea42f94778e410c08f50e3b4c9c6388e60c15deb545df0d8a83f0299fc75766a606f040c13f68ae2f38b6a5df fix-internal-linking.patch"
From 6e3c1a2fa29c066f7d1a25037a1f61cd295ac3af Mon Sep 17 00:00:00 2001
From: Paul Gevers <elbrus@debian.org>
Date: Tue, 2 Jan 2018 19:58:18 +0100
Subject: [PATCH] Improve internal linking
Building packages in Debian uses a tool to link libraries together at the
package level. It emits warnings when unknonw symbols are found. E.g:
dpkg-shlibdeps: warning: symbol us_tokentowords used by debian/libflite1/usr/lib/x86_64-linux-gnu/libflite_cmu_indic_lang.so.2.0.0 found in none of the libraries
---
config/common_make_rules | 2 +-
main/Makefile | 16 ++++++++++++++--
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/config/common_make_rules b/config/common_make_rules
index 7a03785..34434fd 100644
--- a/config/common_make_rules
+++ b/config/common_make_rules
@@ -123,7 +123,7 @@ $(LIBDIR)/%.so: $(LIBDIR)/%.shared.a
@ 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) -shared -Wl,-soname,`basename $@`.${PROJECT_SHLIB_VERSION} -o ../$@.${PROJECT_VERSION} *.os $(LDFLAGS))
@ (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 --git a/main/Makefile b/main/Makefile
index ff422e0..47b6344 100644
--- a/main/Makefile
+++ b/main/Makefile
@@ -54,7 +54,8 @@ ALL = shared_libs \
VOICES=$(VOXES)
VOICELIBS=$(VOICES:%=flite_%)
-flite_LIBS = $(VOICELIBS) $(LANGS:%=flite_%) $(LEXES:%=flite_%) flite
+flite_MODS = $(VOICELIBS) $(LANGS:%=flite_%) $(LEXES:%=flite_%)
+flite_LIBS = flite $(flite_MODS)
flite_LIBS_flags = -L$(LIBDIR) $(flite_LIBS:%=-l%)
flite_LIBS_deps = $(flite_LIBS:%=$(LIBDIR)/lib%.a)
@@ -65,6 +66,10 @@ include $(TOP)/config/common_make_rules
# so make clean can remove them
SHAREDARLIBS= $(flite_LIBS:%=$(LIBDIR)/lib%.shared.a)
SHAREDLIBS = $(SHAREDARLIBS:%.shared.a=%.so)
+SHAREDMODS = $(flite_MODS:%=$(LIBDIR)/lib%.so)
+SHAREDusenMODS = $(LIBDIR)/libflite_cmu_time_awb.so $(LIBDIR)/libflite_cmu_us_awb.so $(LIBDIR)/libflite_cmu_us_kal16.so $(LIBDIR)/libflite_cmu_us_kal.so $(LIBDIR)/libflite_cmu_us_rms.so $(LIBDIR)/libflite_cmu_us_slt.so $(LIBDIR)/libflite_cmu_indic_lang.so
+SHAREDcmulexMODS = $(LIBDIR)/libflite_cmu_time_awb.so $(LIBDIR)/libflite_cmu_us_awb.so $(LIBDIR)/libflite_cmu_us_kal16.so $(LIBDIR)/libflite_cmu_us_kal.so $(LIBDIR)/libflite_cmu_us_rms.so $(LIBDIR)/libflite_cmu_us_slt.so $(LIBDIR)/libflite_cmu_indic_lex.so
+SHAREDindicMODS = $(LIBDIR)/libflite_cmu_indic_lex.so
VERSIONSHAREDLIBS = $(SHAREDLIBS:%=%.${PROJECT_VERSION}) \
$(SHAREDLIBS:%=%.${PROJECT_SHLIB_VERSION})
@@ -79,7 +84,14 @@ LOCAL_CLEAN = $(BINDIR)/flite$(EXEEXT) $(BINDIR)/flite_time$(EXEEXT) \
flite_voice_list.c
ifdef SHFLAGS
-flite_LIBS_flags += -Wl,-rpath $(LIBDIR)
+$(SHAREDMODS): $(LIBDIR)/libflite.so
+$(SHAREDMODS): LDFLAGS+=-L../$(LIBDIR) -lflite
+$(SHAREDusenMODS): $(LIBDIR)/libflite_usenglish.so
+$(SHAREDusenMODS): LDFLAGS+=-L../$(LIBDIR) -lflite_usenglish
+$(SHAREDcmulexMODS): $(LIBDIR)/libflite_cmulex.so
+$(SHAREDcmulexMODS): LDFLAGS+=-L../$(LIBDIR) -lflite_cmulex
+$(SHAREDindicMODS): $(LIBDIR)/libflite_cmu_indic_lang.so
+$(SHAREDindicMODS): LDFLAGS+=-L../$(LIBDIR) -lflite_cmu_indic_lang
shared_libs: $(SHAREDLIBS)
else
shared_libs: nothing
From d673f65b2c4a8cd3da7447079309a6dc4bcf1a5e Mon Sep 17 00:00:00 2001
From: Alan W Black <awb@cs.cmu.edu>
Date: Sun, 4 Mar 2018 08:55:40 -0500
Subject: [PATCH] get libs in the right order
---
main/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/main/Makefile b/main/Makefile
index 47b6344..1da18a8 100644
--- a/main/Makefile
+++ b/main/Makefile
@@ -55,7 +55,7 @@ VOICES=$(VOXES)
VOICELIBS=$(VOICES:%=flite_%)
flite_MODS = $(VOICELIBS) $(LANGS:%=flite_%) $(LEXES:%=flite_%)
-flite_LIBS = flite $(flite_MODS)
+flite_LIBS = $(flite_MODS) flite
flite_LIBS_flags = -L$(LIBDIR) $(flite_LIBS:%=-l%)
flite_LIBS_deps = $(flite_LIBS:%=$(LIBDIR)/lib%.a)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment