openbsd-ports/databases/sqlite3/patches/patch-Makefile_in
espie 5c927d5626 zap sqlite3 build, proper, keep the lemon and tcl-sqlite3 stuff going.
(and don't forget about LIB_DEPENDS-tcl, thx sthen@)
2012-05-01 14:29:56 +00:00

108 lines
3.8 KiB
Plaintext

$OpenBSD: patch-Makefile_in,v 1.20 2012/05/01 14:29:56 espie Exp $
--- Makefile.in.orig Tue Mar 20 15:20:13 2012
+++ Makefile.in Sat Apr 28 15:40:57 2012
@@ -186,7 +186,7 @@ LIBOBJS1 = sqlite3.lo
# Determine the real value of LIBOBJ based on the 'configure' script
#
-LIBOBJ = $(LIBOBJS$(USE_AMALGAMATION))
+LIBOBJ = $(LIBOBJS$(USE_AMALGAMATION)) pthread_stub.lo
# All of the source code files.
@@ -283,6 +283,8 @@ SRC = \
$(TOP)/src/walker.c \
$(TOP)/src/where.c
+SRC += $(TOP)/src/pthread_stub.c
+
# Source code for extensions
#
SRC += \
@@ -476,7 +478,7 @@ EXTHDR += \
# This is the default Makefile target. The objects listed here
# are what get build when you type just "make" with no arguments.
#
-all: sqlite3.h libsqlite3.la sqlite3$(TEXE) $(HAVE_TCL:1=libtclsqlite3.la)
+all: $(HAVE_TCL:1=libtclsqlite3.la) lemon$(BEXE)
Makefile: $(TOP)/Makefile.in
./config.status
@@ -488,9 +490,9 @@ libsqlite3.la: $(LIBOBJ)
$(LTLINK) -o $@ $(LIBOBJ) $(TLIBS) \
${ALLOWRELEASE} -rpath "$(libdir)" -version-info "8:6:8"
-libtclsqlite3.la: tclsqlite.lo libsqlite3.la
+libtclsqlite3.la: tclsqlite.lo
$(LTLINK) -o $@ tclsqlite.lo \
- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
+ -lsqlite3 @TCL_STUB_LIB_SPEC@ $(TLIBS) \
-rpath "$(TCLLIBDIR)" \
-version-info "8:6:8" \
-avoid-version
@@ -778,6 +780,9 @@ tclsqlite3$(TEXE): tclsqlite-shell.lo libsqlite3.la
$(LTLINK) -o $@ tclsqlite-shell.lo \
libsqlite3.la $(LIBTCL)
+pthread_stub.lo: $(TOP)/src/pthread_stub.c
+ $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/pthread_stub.c
+
# Rules to build opcodes.c and opcodes.h
#
opcodes.c: opcodes.h $(TOP)/mkopcodec.awk
@@ -798,8 +803,12 @@ parse.c: $(TOP)/src/parse.y lemon$(BEXE) $(TOP)/addopc
$(NAWK) -f $(TOP)/addopcodes.awk parse.h.temp >parse.h
sqlite3.h: $(TOP)/src/sqlite.h.in $(TOP)/manifest.uuid $(TOP)/VERSION
- $(TCLSH_CMD) $(TOP)/tool/mksqlite3h.tcl $(TOP) >sqlite3.h
-
+ sed -e '/^#include <sqlite3\.h>$$/d' \
+ -e 's/--VERS--/$(RELEASE)/' \
+ -e 's/--VERSION-NUMBER--/$(VERSION_NUMBER)/' \
+ $(TOP)/src/sqlite.h.in $(TOP)/ext/rtree/sqlite3rtree.h \
+ > sqlite3.h
+
keywordhash.h: $(TOP)/tool/mkkeywordhash.c
$(BCC) -o mkkeywordhash$(BEXE) $(OPT_FEATURE_FLAGS) $(OPTS) $(TOP)/tool/mkkeywordhash.c
./mkkeywordhash$(BEXE) >keywordhash.h
@@ -875,7 +884,7 @@ TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVAT
TESTFIXTURE_FLAGS += -DBUILD_sqlite
TESTFIXTURE_SRC0 = $(TESTSRC2) libsqlite3.la
-TESTFIXTURE_SRC1 = sqlite3.c
+TESTFIXTURE_SRC1 = sqlite3.c $(TOP)/src/pthread_stub.c
TESTFIXTURE_SRC = $(TESTSRC) $(TOP)/src/tclsqlite.c $(TESTFIXTURE_SRC$(USE_AMALGAMATION))
testfixture$(TEXE): $(TESTFIXTURE_SRC)
@@ -909,18 +918,12 @@ lib_install: libsqlite3.la
$(INSTALL) -d $(DESTDIR)$(libdir)
$(LTINSTALL) libsqlite3.la $(DESTDIR)$(libdir)
-install: sqlite3$(BEXE) lib_install sqlite3.h sqlite3.pc ${HAVE_TCL:1=tcl_install}
- $(INSTALL) -d $(DESTDIR)$(bindir)
- $(LTINSTALL) sqlite3$(BEXE) $(DESTDIR)$(bindir)
- $(INSTALL) -d $(DESTDIR)$(includedir)
- $(INSTALL) -m 0644 sqlite3.h $(DESTDIR)$(includedir)
- $(INSTALL) -m 0644 $(TOP)/src/sqlite3ext.h $(DESTDIR)$(includedir)
- $(INSTALL) -d $(DESTDIR)$(pkgconfigdir)
- $(INSTALL) -m 0644 sqlite3.pc $(DESTDIR)$(pkgconfigdir)
+install: ${HAVE_TCL:1=tcl_install}
+ #
pkgIndex.tcl:
echo 'package ifneeded sqlite3 $(RELEASE) [list load $(TCLLIBDIR)/libtclsqlite3.so sqlite3]' > $@
-tcl_install: lib_install libtclsqlite3.la pkgIndex.tcl
+tcl_install: libtclsqlite3.la pkgIndex.tcl
$(INSTALL) -d $(DESTDIR)$(TCLLIBDIR)
$(LTINSTALL) libtclsqlite3.la $(DESTDIR)$(TCLLIBDIR)
rm -f $(DESTDIR)$(TCLLIBDIR)/libtclsqlite3.la $(DESTDIR)$(TCLLIBDIR)/libtclsqlite3.a
@@ -944,6 +947,8 @@ clean:
distclean: clean
rm -f config.log config.status libtool Makefile sqlite3.pc
+
+.PHONY: test
#
# Windows section