- fix build on amd64
- honor CXX and CXXFLAGS
This commit is contained in:
parent
3a7aab977c
commit
a369c27d08
@ -1,9 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2008/10/26 19:42:11 jasper Exp $
|
||||
# $OpenBSD: Makefile,v 1.2 2008/11/03 20:23:18 jasper Exp $
|
||||
|
||||
COMMENT= compact speech synthesizer
|
||||
|
||||
DISTNAME= espeak-1.37-source
|
||||
PKGNAME= ${DISTNAME:S/-source//}
|
||||
PKGNAME= ${DISTNAME:S/-source//}p0
|
||||
SHARED_LIBS= espeak 0.0
|
||||
CATEGORIES= audio devel
|
||||
|
||||
@ -29,6 +29,12 @@ NO_REGRESS= Yes
|
||||
|
||||
WRKSRC= ${WRKDIST}/src
|
||||
|
||||
MAKE_FLAGS+= CXX="${CXX}" CXXFLAGS="${CXXFLAGS}"
|
||||
|
||||
.if ${MACHINE_ARCH} == "amd64"
|
||||
MAKE_FLAGS += EXTRA_FLAGS="-fPIC"
|
||||
.endif
|
||||
|
||||
SUBST_VARS= PREFIX LIBespeak_VERSION
|
||||
|
||||
post-extract:
|
||||
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-src_Makefile,v 1.1.1.1 2008/10/26 19:42:11 jasper Exp $
|
||||
$OpenBSD: patch-src_Makefile,v 1.2 2008/11/03 20:23:18 jasper Exp $
|
||||
--- src/Makefile.orig Wed Apr 16 14:06:34 2008
|
||||
+++ src/Makefile Tue Aug 12 16:14:52 2008
|
||||
+++ src/Makefile Mon Nov 3 21:19:49 2008
|
||||
@@ -1,19 +1,20 @@
|
||||
# remove -fno-exceptions if it causes problems with stdio library on some platforms (ARM)
|
||||
|
||||
@ -18,7 +18,7 @@ $OpenBSD: patch-src_Makefile,v 1.1.1.1 2008/10/26 19:42:11 jasper Exp $
|
||||
STATIC_LIB_NAME = libespeak.a
|
||||
-LIB_VERSION = 1
|
||||
-LIBTAG = $(LIB_VERSION).$(RELEASE)
|
||||
+LIB_VERSION = ${LIBespeak_VERSION}
|
||||
+LIB_VERSION = 0.0
|
||||
+LIBTAG = $(LIB_VERSION)
|
||||
|
||||
+LPATH= -L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib
|
||||
@ -26,7 +26,7 @@ $OpenBSD: patch-src_Makefile,v 1.1.1.1 2008/10/26 19:42:11 jasper Exp $
|
||||
# Use SONAME_OPT=-Wl,h, on Solaris
|
||||
SONAME_OPT=-Wl,-soname,
|
||||
|
||||
@@ -60,15 +61,15 @@ libespeak_SOURCES = speak_lib.cpp compiledict.cpp dict
|
||||
@@ -60,39 +61,37 @@ libespeak_SOURCES = speak_lib.cpp compiledict.cpp dict
|
||||
|
||||
SRCS1=$(speak_SOURCES)
|
||||
OBJS1=$(patsubst %.cpp,%.o,$(SRCS1))
|
||||
@ -43,9 +43,25 @@ $OpenBSD: patch-src_Makefile,v 1.1.1.1 2008/10/26 19:42:11 jasper Exp $
|
||||
-LIBS3=-lstdc++ -L . -lespeak
|
||||
+LIBS3=-lstdc++ -L . -lespeak $(LPATH) -lportaudio -pthread
|
||||
|
||||
CXXFLAGS=-O2
|
||||
-CXXFLAGS=-O2
|
||||
|
||||
-
|
||||
all: $(BIN_NAME) $(LIB_NAME) $(STATIC_LIB_NAME) $(BIN2_NAME)
|
||||
mv $(LIB_NAME) $(LIB_NAME).$(LIBTAG)
|
||||
|
||||
.cpp.o:
|
||||
- $(CXX) $(CXXFLAGS) $(USE_AUDIO) -D PATH_ESPEAK_DATA=\"$(DATADIR)\" -Wall -pedantic -I. -c -fno-exceptions $<
|
||||
+ $(CXX) $(CXXFLAGS) $(EXTRA_FLAGS) $(USE_AUDIO) -D PATH_ESPEAK_DATA=\"$(DATADIR)\" -Wall -pedantic -I. -c -fno-exceptions $<
|
||||
|
||||
$(BIN_NAME): $(OBJS1)
|
||||
- $(CXX) -o $@ $(OBJS1) $(LIBS1)
|
||||
+ $(CXX) -o $@ $(EXTRA_FLAGS) $(OBJS1) $(LIBS1)
|
||||
|
||||
$(BIN2_NAME): $(OBJS3) $(LIB_NAME)
|
||||
- $(CXX) -o $@ $(OBJS3) $(LIBS3)
|
||||
+ $(CXX) -o $@ $(EXTRA_FLAGS) $(OBJS3) $(LIBS3)
|
||||
|
||||
|
||||
@@ -89,7 +90,7 @@ $(BIN2_NAME): $(OBJS3) $(LIB_NAME)
|
||||
|
||||
x_%.o: %.cpp
|
||||
$(CXX) $(CXXFLAGS) $(USE_AUDIO) -Wall -fpic -pedantic \
|
||||
@ -53,4 +69,8 @@ $OpenBSD: patch-src_Makefile,v 1.1.1.1 2008/10/26 19:42:11 jasper Exp $
|
||||
+ -I. -DLIBRARY -DPATH_ESPEAK_DATA=\"$(DATADIR)\" -c -fno-exceptions $< -o x_$*.o
|
||||
|
||||
$(LIB_NAME): $(OBJS2)
|
||||
$(CXX) -shared $(SONAME_OPT)$(LIB_NAME).$(LIB_VERSION) -o $@ $(OBJS2) $(LIBS2)
|
||||
- $(CXX) -shared $(SONAME_OPT)$(LIB_NAME).$(LIB_VERSION) -o $@ $(OBJS2) $(LIBS2)
|
||||
+ $(CXX) -shared $(SONAME_OPT)$(LIB_NAME).$(LIB_VERSION) -o $@ $(OBJS2) $(LIBS2) $(EXTRA_FLAGS)
|
||||
|
||||
$(STATIC_LIB_NAME): $(OBJS2)
|
||||
$(AR) cqs $(STATIC_LIB_NAME) $(OBJS2)
|
||||
|
Loading…
Reference in New Issue
Block a user