Blame SOURCES/flite-1.3-sharedlibs.patch

6d2634
diff -uNr flite-1.3-release/config/common_make_rules flite-1.3-release-mod/config/common_make_rules
6d2634
--- flite-1.3-release/config/common_make_rules	2004-12-20 00:20:43.000000000 +0200
6d2634
+++ flite-1.3-release-mod/config/common_make_rules	2006-11-12 12:17:25.000000000 +0200
6d2634
@@ -59,27 +59,35 @@
6d2634
 endif
6d2634
 OBJDIR=$(BUILDDIR)/obj/$(DIRNAME)
6d2634
 BINDIR=$(BUILDDIR)/bin
6d2634
+LIBDIR=$(BUILDDIR)/lib
6d2634
 ifeq ($(HOST_PLATFORM),$(TARGET_PLATFORM))
6d2634
 BINDIR=$(TOP)/bin
6d2634
+LIBDIR=$(TOP)/lib
6d2634
 endif
6d2634
 
6d2634
-LIBDIR=$(BUILDDIR)/lib
6d2634
 BUILDDIRS=$(OBJDIR) $(BINDIR) $(LIBDIR)
6d2634
 
6d2634
-FLITELIBS = $(BUILDDIR)/lib/libflite.a
6d2634
-LDFLAGS += -L$(BUILDDIR)/lib -lflite -lm $(AUDIOLIBS) $(OTHERLIBS)
6d2634
+ifdef SHFLAGS
6d2634
+FLITELIBS = $(LIBDIR)/libflite.so
6d2634
+LDFLAGS += -L$(LIBDIR) -lflite $(OTHERLIBS)
6d2634
+else
6d2634
+FLITELIBS = $(LIBDIR)/libflite.a
6d2634
+LDFLAGS += -L$(LIBDIR) -lflite -lm $(AUDIOLIBS) $(OTHERLIBS)
6d2634
+endif
6d2634
 
6d2634
 FULLOBJS = $(OBJS:%=$(OBJDIR)/%)
6d2634
 ifdef SHFLAGS
6d2634
 SOOBJS = $(OBJS:.o=.os)
6d2634
-FULLSHOBJS = $(SOOBJS:%=$(OBJDIR)/%)
6d2634
+FULLSOOBJS = $(SOOBJS:%=$(OBJDIR)/%)
6d2634
 ifdef LIBNAME
6d2634
 ALL += $(OBJDIR)/.build_so
6d2634
 endif
6d2634
-endif
6d2634
+else
6d2634
 ifdef LIBNAME
6d2634
 ALL += $(OBJDIR)/.build_lib
6d2634
 endif
6d2634
+endif
6d2634
+
6d2634
 # Only do some directories when you are not cross compiling
6d2634
 ifeq ($(HOST_PLATFORM),$(TARGET_PLATFORM))
6d2634
 OTHER_BUILD_DIRS = $(HOST_ONLY_DIRS)
6d2634
@@ -117,14 +125,14 @@
6d2634
 	@ touch $(OBJDIR)/.build_so
6d2634
 
6d2634
 # Used in the lib/ directory and in building new voices
6d2634
-$(OBJDIR)/%.so: %.shared.a
6d2634
+%.so: %.shared.a
6d2634
 	@ echo making $@
6d2634
 	@ rm -rf shared_os && mkdir shared_os
6d2634
-	@ rm -f $@ $(LIBDIR)/$@.${PROJECT_VERSION} $(LIBDIR)/$@.${PROJECT_SHLIB_VERSION} 
6d2634
+	@ rm -f $@ $@.${PROJECT_VERSION} $@.${PROJECT_SHLIB_VERSION} 
6d2634
 	@ (cd shared_os && ar x ../$<)
6d2634
-	@ (cd shared_os && $(CC) -shared -Wl,-soname,$@.${PROJECT_SHLIB_VERSION} -o ../$@.${PROJECT_VERSION} *.os)
6d2634
-	@ ln -s $(LIBDIR)/$@.${PROJECT_VERSION} $(LIBDIR)/$@.${PROJECT_SHLIB_VERSION}
6d2634
-	@ ln -s $(LIBDIR)/$@.${PROJECT_SHLIB_VERSION} $(LIBDIR)/$@
6d2634
+	@ (cd shared_os && $(CC) -shared -Wl,-soname,$@.${PROJECT_SHLIB_VERSION} -o ../$@.${PROJECT_VERSION} *.os -L../ $($(@:%.so=%_LDLIBS)))
6d2634
+	@ ln -s $@.${PROJECT_VERSION} $@.${PROJECT_SHLIB_VERSION}
6d2634
+	@ ln -s $@.${PROJECT_SHLIB_VERSION} $@
6d2634
 	@ rm -rf shared_os
6d2634
 
6d2634
 $(OBJDIR)/.make_build_dirs:
6d2634
diff -uNr flite-1.3-release/lib/Makefile flite-1.3-release-mod/lib/Makefile
6d2634
--- flite-1.3-release/lib/Makefile	1970-01-01 02:00:00.000000000 +0200
6d2634
+++ flite-1.3-release-mod/lib/Makefile	2006-11-12 12:17:40.000000000 +0200
6d2634
@@ -0,0 +1,73 @@
6d2634
+###########################################################################
6d2634
+##                                                                       ##
6d2634
+##                  Language Technologies Institute                      ##
6d2634
+##                     Carnegie Mellon University                        ##
6d2634
+##                        Copyright (c) 1999                             ##
6d2634
+##                        All Rights Reserved.                           ##
6d2634
+##                                                                       ##
6d2634
+##  Permission is hereby granted, free of charge, to use and distribute  ##
6d2634
+##  this software and its documentation without restriction, including   ##
6d2634
+##  without limitation the rights to use, copy, modify, merge, publish,  ##
6d2634
+##  distribute, sublicense, and/or sell copies of this work, and to      ##
6d2634
+##  permit persons to whom this work is furnished to do so, subject to   ##
6d2634
+##  the following conditions:                                            ##
6d2634
+##   1. The code must retain the above copyright notice, this list of    ##
6d2634
+##      conditions and the following disclaimer.                         ##
6d2634
+##   2. Any modifications must be clearly marked as such.                ##
6d2634
+##   3. Original authors' names are not deleted.                         ##
6d2634
+##   4. The authors' names are not used to endorse or promote products   ##
6d2634
+##      derived from this software without specific prior written        ##
6d2634
+##      permission.                                                      ##
6d2634
+##                                                                       ##
6d2634
+##  CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK         ##
6d2634
+##  DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING      ##
6d2634
+##  ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT   ##
6d2634
+##  SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE      ##
6d2634
+##  FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES    ##
6d2634
+##  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN   ##
6d2634
+##  AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,          ##
6d2634
+##  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF       ##
6d2634
+##  THIS SOFTWARE.                                                       ##
6d2634
+##                                                                       ##
6d2634
+###########################################################################
6d2634
+##                                                                       ##
6d2634
+##    FLITE libraries                                                    ##
6d2634
+##                                                                       ##
6d2634
+###########################################################################
6d2634
+TOP=..
6d2634
+DIRNAME=lib
6d2634
+BUILD_DIRS = 
6d2634
+ALL_DIRS=
6d2634
+FILES = Makefile
6d2634
+LIBNAMES = flite flite_cmulex flite_usenglish \
6d2634
+           flite_cmu_us_kal flite_cmu_us_kal16 flite_cmu_time_awb
6d2634
+
6d2634
+STATICLIBS= $(LIBNAMES:%=lib%.a)
6d2634
+SHAREDARLIBS= $(LIBNAMES:%=lib%.shared.a)
6d2634
+#SHAREDLIBS = $(LIBNAMES:%=lib%.so)
6d2634
+SHAREDLIBS = $(SHAREDARLIBS:%.shared.a=%.so)
6d2634
+VERSIONSHAREDLIBS = $(SHAREDLIBS:%=%.${PROJECT_VERSION}) \
6d2634
+                    $(SHAREDLIBS:%=%.${PROJECT_SHLIB_VERSION})
6d2634
+ALL_LIBS = $(SHAREDLIBS) $(VERSIONSHAREDLIBS)
6d2634
+
6d2634
+ALL = shared_libs
6d2634
+
6d2634
+LOCAL_CLEAN=*.a *.so *.so.${PROJECT_VERSION} *.so.${PROJECT_SHLIB_VERSION}
6d2634
+
6d2634
+include $(TOP)/config/common_make_rules
6d2634
+
6d2634
+ifdef SHFLAGS
6d2634
+shared_libs: $(SHAREDLIBS)
6d2634
+libflite_LDLIBS = -lm $(AUDIOLIBS)
6d2634
+libflite_cmulex_LDLIBS = -lflite
6d2634
+libflite_usenglish_LDLIBS = -lflite
6d2634
+libflite_cmu_us_kal_LDLIBS = -lflite_cmulex -lflite_usenglish
6d2634
+libflite_cmu_us_kal16_LDLIBS = -lflite_cmulex -lflite_usenglish
6d2634
+libflite_cmu_time_awb_LDLIBS = -lflite -lflite_cmulex -lflite_usenglish
6d2634
+else
6d2634
+shared_libs: nothing
6d2634
+endif
6d2634
+
6d2634
+install:
6d2634
+	@ tar cvf - $(ALL_LIBS) | ( cd $(INSTALLLIBDIR) && tar xf -)
6d2634
+
6d2634
diff -uNr flite-1.3-release/main/Makefile flite-1.3-release-mod/main/Makefile
6d2634
--- flite-1.3-release/main/Makefile	2005-08-08 00:38:42.000000000 +0200
6d2634
+++ flite-1.3-release-mod/main/Makefile	2006-11-12 11:44:46.000000000 +0200
6d2634
@@ -50,11 +50,11 @@
6d2634
 
6d2634
 flite_LIBS = flite_$(FL_VOX) flite_$(FL_LANG) flite_$(FL_LEX) 
6d2634
 flite_LIBS_flags = -L$(LIBDIR) $(flite_LIBS:%=-l%)
6d2634
-flite_LIBS_deps = $(flite_LIBS:%=$(LIBDIR)/lib%.a)
6d2634
+flite_LIBS_deps = $(flite_LIBS:%=$(LIBDIR)/lib%.so)
6d2634
 
6d2634
 flite_time_LIBS = flite_cmu_time_awb flite_$(FL_LANG) flite_$(FL_LEX)
6d2634
 flite_time_LIBS_flags = -L$(LIBDIR) $(flite_time_LIBS:%=-l%)
6d2634
-flite_time_LIBS_deps = $(flite_time_LIBS:%=$(LIBDIR)/lib%.a)
6d2634
+flite_time_LIBS_deps = $(flite_time_LIBS:%=$(LIBDIR)/lib%.so)
6d2634
 
6d2634
 include $(TOP)/config/common_make_rules
6d2634
 
6d2634
diff -uNr flite-1.3-release/Makefile flite-1.3-release-mod/Makefile
6d2634
--- flite-1.3-release/Makefile	2005-11-01 15:40:45.000000000 +0200
6d2634
+++ flite-1.3-release-mod/Makefile	2006-11-12 11:44:46.000000000 +0200
6d2634
@@ -41,7 +41,7 @@
6d2634
 ###########################################################################
6d2634
 TOP=.
6d2634
 DIRNAME=
6d2634
-BUILD_DIRS = include src lang doc
6d2634
+BUILD_DIRS = include src lang lib doc
6d2634
 ALL_DIRS=config $(BUILD_DIRS) testsuite sapi palm tools main
6d2634
 CONFIG=configure configure.in config.sub config.guess \
6d2634
        missing install-sh mkinstalldirs