xca: fix project url; rebuild for openssl-3
[oi-userland.git] / components / database / lmdb / patches / 01-Makefile.patch
blobffd002eca6eeb7679306e60823b5ac1a77a37e49
1 --- openldap-LMDB_0.9.32/libraries/liblmdb/Makefile.orig 2024-01-29 19:20:26.000000000 +0100
2 +++ openldap-LMDB_0.9.32/libraries/liblmdb/Makefile 2024-02-01 08:56:41.845326495 +0100
3 @@ -18,7 +18,6 @@
4 # There may be other macros in mdb.c of interest. You should
5 # read mdb.c before changing any of them.
7 -CC = gcc
8 AR = ar
9 W = -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized
10 THREADS = -pthread
11 @@ -27,18 +26,11 @@
12 LDLIBS =
13 SOLIBS =
14 SOEXT = .so
15 -prefix = /usr/local
16 -exec_prefix = $(prefix)
17 -bindir = $(exec_prefix)/bin
18 -libdir = $(exec_prefix)/lib
19 -includedir = $(prefix)/include
20 -datarootdir = $(prefix)/share
21 -mandir = $(datarootdir)/man
23 ########################################################################
25 IHDRS = lmdb.h
26 -ILIBS = liblmdb.a liblmdb$(SOEXT)
27 +ILIBS = liblmdb-$(SOVERSION)$(SOEXT)
28 IPROGS = mdb_stat mdb_copy mdb_dump mdb_load
29 IDOCS = mdb_stat.1 mdb_copy.1 mdb_dump.1 mdb_load.1
30 PROGS = $(IPROGS) mtest mtest2 mtest3 mtest4 mtest5
31 @@ -51,6 +43,7 @@
32 mkdir -p $(DESTDIR)$(mandir)/man1
33 for f in $(IPROGS); do cp $$f $(DESTDIR)$(bindir); done
34 for f in $(ILIBS); do cp $$f $(DESTDIR)$(libdir); done
35 + ln -sf ./liblmdb-$(SOVERSION)$(SOEXT) $(DESTDIR)$(libdir)/liblmdb$(SOEXT)
36 for f in $(IHDRS); do cp $$f $(DESTDIR)$(includedir); done
37 for f in $(IDOCS); do cp $$f $(DESTDIR)$(mandir)/man1; done
39 @@ -59,26 +52,26 @@
41 test: all
42 rm -rf testdb && mkdir testdb
43 - ./mtest && ./mdb_stat testdb
44 + LD_LIBRARY_PATH=. ./mtest && LD_LIBRARY_PATH=. ./mdb_stat testdb
46 liblmdb.a: mdb.o midl.o
47 $(AR) rs $@ mdb.o midl.o
49 -liblmdb$(SOEXT): mdb.lo midl.lo
50 +liblmdb-$(SOVERSION)$(SOEXT): mdb.lo midl.lo
51 # $(CC) $(LDFLAGS) -pthread -shared -Wl,-Bsymbolic -o $@ mdb.o midl.o $(SOLIBS)
52 - $(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.lo midl.lo $(SOLIBS)
53 + $(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.lo midl.lo $(SOLIBS) -Wl,-soname -Wl,liblmdb-$(SOVERSION)$(SOEXT)
55 -mdb_stat: mdb_stat.o liblmdb.a
56 -mdb_copy: mdb_copy.o liblmdb.a
57 -mdb_dump: mdb_dump.o liblmdb.a
58 -mdb_load: mdb_load.o liblmdb.a
59 -mtest: mtest.o liblmdb.a
60 -mtest2: mtest2.o liblmdb.a
61 -mtest3: mtest3.o liblmdb.a
62 -mtest4: mtest4.o liblmdb.a
63 -mtest5: mtest5.o liblmdb.a
64 -mtest6: mtest6.o liblmdb.a
65 -mplay: mplay.o liblmdb.a
66 +mdb_stat: mdb_stat.o
67 +mdb_copy: mdb_copy.o
68 +mdb_dump: mdb_dump.o
69 +mdb_load: mdb_load.o
70 +mtest: mtest.o
71 +mtest2: mtest2.o
72 +mtest3: mtest3.o
73 +mtest4: mtest4.o
74 +mtest5: mtest5.o
75 +mtest6: mtest6.o
76 +mplay: mplay.o
78 mdb.o: mdb.c lmdb.h midl.h
79 $(CC) $(CFLAGS) $(CPPFLAGS) -c mdb.c
80 @@ -92,8 +85,8 @@
81 midl.lo: midl.c midl.h
82 $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) -c midl.c -o $@
84 -%: %.o
85 - $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@
86 +%: %.o | liblmdb-$(SOVERSION)$(SOEXT)
87 + $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -L. -llmdb-$(SOVERSION) -o $@
89 %.o: %.c lmdb.h
90 $(CC) $(CFLAGS) $(CPPFLAGS) -c $<