pkgsrc/databases/metakit-lib/patches/patch-ab
joerg 844f033253 Update to Metakit 2.4.9.7:
- better UTF8 support in file & property names
- bugfixes
- Python 2.5 support for 64bit platforms
2009-02-11 21:00:13 +00:00

165 lines
6 KiB
Text

$NetBSD: patch-ab,v 1.3 2009/02/11 21:00:13 joerg Exp $
--- unix/Makefile.in.orig 2007-06-16 02:23:25.000000000 +0200
+++ unix/Makefile.in
@@ -36,8 +36,7 @@ tclsh = tclsh
tclincludedir = @TCL_INCLUDE_DIR@
tcllibdir = @TCL_LIB_DIR@
-CXX_FLAGS = @CPPFLAGS@ @CXXFLAGS@ @MK_THREADS@ @SHLIB_CFLAGS@ \
- -I$(srcdir)/../include
+CXX_FLAGS = @CPPFLAGS@ @CXXFLAGS@ @MK_THREADS@ @SHLIB_CFLAGS@
# Compiling without frame pointers can play tricks with exception handling
# (e.g. in Mk4py). This does not affect standard operation, *only* errors.
@@ -47,22 +46,24 @@ CXXFLAGS = $(CXX_FLAGS)
#CXXFLAGS = -Dq4_CHECK $(CXX_FLAGS)
#CXXFLAGS = -Wall -pedantic -Wno-unused $(CXX_FLAGS)
-CXX = @CXX@
+CXX = ${LIBTOOL} --mode=compile @CXX@
+CXXLD= ${LIBTOOL} --mode=link @CXX@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_PROGRAM = ${LIBTOOL} --mode=install @INSTALL_PROGRAM@
LIB_SUFFIX = @LIB_SUFFIX@
-SHLIB_SUFFIX = @SHLIB_SUFFIX@
-SHLIB_LD = @SHLIB_LD@
+SHLIB_SUFFIX = .la
+SHLIB_LD = ${LIBTOOL} --mode=link @CXX@ -rpath ${prefix}/lib
+SHLIB_LDPY = ${LIBTOOL} --mode=link @CXX@ -rpath ${PYSITELIB}
SHLIB_FLAGS = @SHLIB_FLAGS@
STRIP_FLAGS = @STRIP_FLAGS@
-LIBEXT = @LIBEXT@
+LIBEXT = .la
EXEEXT = @EXEEXT@
DESTDIR=
#---------- Do not change, shorthand only
-CXX_SWITCHES = $(CXXFLAGS) -I$(srcdir)/../src -I.
+CXX_SWITCHES = $(CXXFLAGS) -I$(srcdir)/../include -I$(srcdir)/../src -I.
CXX_SWITCHES_TCL = $(CXXFLAGS) -I$(tclincludedir)/generic -I$(tclincludedir)
CXX_SWITCHES_PY = $(CXXFLAGS) -I$(srcdir)/../python/scxx -I$(pyincludedir)
@@ -74,7 +75,7 @@ core: Makefile libmk4$(LIBEXT) $(DEMOS)
tcl: Makefile Mk4tcl$(LIBEXT)
-python: Makefile Mk4py$(LIBEXT)
+python: Makefile Mk4py.so
test: Makefile libmk4$(LIBEXT) regress
test -d tests || mkdir tests
@@ -106,9 +107,9 @@ install-tcl: Mk4tcl$(LIBEXT)
if [ '${LIBEXT}' = '.a' ]; then ranlib $(DESTDIR)$(tcllibdir)/Mk4tcl/Mk4tcl.a; fi
echo 'package ifneeded Mk4tcl 2.4.9.7 [list load [file join $$dir Mk4tcl$(LIBEXT)] Mk4tcl]' >$(DESTDIR)$(tcllibdir)/Mk4tcl/pkgIndex.tcl
-install-python: Mk4py$(LIBEXT)
- $(INSTALL_PROGRAM) Mk4py$(LIBEXT) $(DESTDIR)$(pylibdir)
- $(INSTALL_PROGRAM) $(srcdir)/../python/metakit.py $(DESTDIR)$(pylibdir)
+install-python: Mk4py.so
+ $(INSTALL_PROGRAM) Mk4py.so $(DESTDIR)$(pylibdir)
+ $(INSTALL_DATA) $(srcdir)/../python/metakit.py $(DESTDIR)$(pylibdir)
clean:
rm -f *$(LIBEXT) *.o
@@ -133,8 +134,8 @@ libmk4$(LIB_SUFFIX): $(LOBJS)
ar rcu $@ $(LOBJS)
ranlib $@
-libmk4$(SHLIB_SUFFIX): $(LOBJS) $(LINK_SPECIAL_FILES)
- $(SHLIB_LD) -o $@ $(LOBJS) $(LINK_SPECIAL_FLAGS)
+libmk4$(SHLIB_SUFFIX): $(LOBJS:.o=.lo) $(LINK_SPECIAL_FILES)
+ $(SHLIB_LD) -o $@ $(LOBJS:.o=.lo) $(LINK_SPECIAL_FLAGS)
Mk4tcl$(LIB_SUFFIX): mk4tcl.o mk4too.o $(LOBJS)
ar rcu $@ mk4tcl.o mk4too.o $(LOBJS)
@@ -147,30 +148,34 @@ Mk4py$(LIB_SUFFIX): $(PYOBJS) $(LOBJS)
ar cru $@ $(PYOBJS) $(LOBJS)
ranlib $@
-Mk4py$(SHLIB_SUFFIX): $(PYOBJS) $(LOBJS) $(LINK_SPECIAL_FILES)
- $(SHLIB_LD) -o $@ $(PYOBJS) $(LOBJS) $(LINK_SPECIAL_FLAGS)
+Mk4py.so: $(PYOBJS:.o=.lo) $(LINK_SPECIAL_FILES)
+ $(SHLIB_LDPY) -o libMk4py.la $(PYOBJS:.o=.lo) $(LINK_SPECIAL_FLAGS) -L${prefix}/lib -lmk4
+ cp .libs/libMk4py.so $@
Mk4lua$(SHLIB_SUFFIX): mk4lua.o $(LOBJS) $(LINK_SPECIAL_FILES)
$(SHLIB_LD) -o $@ mk4lua.o $(LOBJS) $(LINK_SPECIAL_FLAGS)
-demo: $(srcdir)/../demos/demo.cpp libmk4$(LIBEXT)
- $(CXX) $(CXX_SWITCHES) -o $@$(EXEEXT) \
- $(srcdir)/../demos/demo.cpp libmk4$(LIBEXT) @LIBS@
+demo.lo dump.lo myio.lo: $(srcdir)/../demos/${@:.lo=.cpp}
+ $(CXX) -c $(CXX_SWITCHES) $?
-dump: $(srcdir)/../demos/dump.cpp libmk4$(LIBEXT)
- $(CXX) $(CXX_SWITCHES) -o $@$(EXEEXT) \
- $(srcdir)/../demos/dump.cpp libmk4$(LIBEXT) @LIBS@
+demo: demo.lo libmk4$(LIBEXT)
+ $(CXXLD) $(CXX_SWITCHES) -o $@$(EXEEXT) \
+ demo.lo libmk4$(LIBEXT) @LIBS@
-myio: $(srcdir)/../demos/myio.cpp libmk4$(LIBEXT)
- $(CXX) $(CXX_SWITCHES) -o $@$(EXEEXT) \
- $(srcdir)/../demos/myio.cpp libmk4$(LIBEXT) @LIBS@
+dump: dump.lo libmk4$(LIBEXT)
+ $(CXXLD) $(CXX_SWITCHES) -o $@$(EXEEXT) \
+ dump.lo libmk4$(LIBEXT) @LIBS@
+
+myio: myio.lo libmk4$(LIBEXT)
+ $(CXXLD) $(CXX_SWITCHES) -o $@$(EXEEXT) \
+ myio.lo libmk4$(LIBEXT) @LIBS@
struct: $(srcdir)/../demos/struct.cpp
$(CXX) $(CXX_SWITCHES) -o $@$(EXEEXT) \
$(srcdir)/../demos/struct.cpp -lmk4 @LIBS@
-regress: $(TSTOBJS) libmk4$(LIBEXT)
- $(CXX) $(CXX_SWITCHES) -o $@$(EXEEXT) $(TSTOBJS) libmk4$(LIBEXT) @LIBS@
+regress: $(TSTOBJS:.o=.lo) libmk4$(LIBEXT)
+ $(CXXLD) $(CXX_SWITCHES) -o $@$(EXEEXT) $(TSTOBJS:.o=.lo) libmk4$(LIBEXT) @LIBS@
#---------- Dependencies
@@ -186,6 +191,9 @@ mk4tcl.o: $(srcdir)/../tcl/mk4tcl.cpp
mk4too.o: $(srcdir)/../tcl/mk4too.cpp
$(CXX) -c $(CXX_SWITCHES_TCL) $?
+PyProperty.lo PyRowRef.lo PyStorage.lo PyView.lo: $(srcdir)/../python/${@:.lo=.cpp}
+ $(CXX) -c $(CXX_SWITCHES_PY) $?
+
PyProperty.o: $(srcdir)/../python/PyProperty.cpp
$(CXX) -c $(CXX_SWITCHES_PY) $?
PyRowRef.o: $(srcdir)/../python/PyRowRef.cpp
@@ -195,7 +203,7 @@ PyStorage.o: $(srcdir)/../python/PyStora
PyView.o: $(srcdir)/../python/PyView.cpp
$(CXX) -c $(CXX_SWITCHES_PY) $?
-PWOImp.o: $(srcdir)/../python/scxx/PWOImp.cpp \
+PWOImp.lo: $(srcdir)/../python/scxx/PWOImp.cpp \
$(srcdir)/../python/scxx/PWOBase.h \
$(srcdir)/../python/scxx/PWOCallable.h \
$(srcdir)/../python/scxx/PWOMSequence.h \
@@ -204,6 +212,9 @@ PWOImp.o: $(srcdir)/../python/scxx/PWOIm
$(srcdir)/../python/scxx/PWOSequence.h
$(CXX) -c $(CXX_SWITCHES_PY) $(srcdir)/../python/scxx/PWOImp.cpp
+$(LOBJS:.o=.lo): $(srcdir)/../src/${@:.lo=.cpp}
+ $(CXX) -c $(CXX_SWITCHES) $?
+
column.o: $(srcdir)/../src/column.cpp
$(CXX) -c $(CXX_SWITCHES) $?
custom.o: $(srcdir)/../src/custom.cpp
@@ -240,6 +251,9 @@ viewx.o: $(srcdir)/../src/viewx.cpp
mk4lua.o: $(srcdir)/../lua/mk4lua.cpp
$(CXX) -c $(CXX_SWITCHES) $?
+$(TSTOBJS:.o=.lo): $(srcdir)/../tests/${@:.lo=.cpp}
+ $(CXX) -c $(CXX_SWITCHES) $?
+
regress.o: $(srcdir)/../tests/regress.cpp
$(CXX) -c $(CXX_SWITCHES) $?
tbasic1.o: $(srcdir)/../tests/tbasic1.cpp