openbsd-ports/databases/tinycdb/patches/patch-Makefile
sthen 112b700301 import ports/databases/tinycdb, from maintainer Christian Rueger, ok okan@
tinycdb is a small, fast and reliable utility and subroutine library for
creating and reading constant databases. The database structure is tuned
for fast reading.
2012-05-18 20:59:13 +00:00

65 lines
1.5 KiB
Plaintext

$OpenBSD: patch-Makefile,v 1.1.1.1 2012/05/18 20:59:13 sthen Exp $
--- Makefile.orig Sat Jan 31 18:12:21 2009
+++ Makefile Sun Apr 19 15:49:39 2009
@@ -7,19 +7,19 @@
VERSION = 0.77
-prefix=/usr/local
+prefix?=/usr/local
exec_prefix=$(prefix)
bindir=$(exec_prefix)/bin
libdir=$(exec_prefix)/lib
syslibdir=$(libdir)
-sysconfdir=/etc
+sysconfdir?=/etc
includedir=$(prefix)/include
mandir=$(prefix)/man
NSSCDB_DIR = $(sysconfdir)
DESTDIR=
-CC = cc
-CFLAGS = -O
+CC?= cc
+CFLAGS?= -O
AR = ar
ARFLAGS = rv
@@ -29,7 +29,7 @@ NSS_CDB = libnss_cdb.so.2
LIBBASE = libcdb
LIB = $(LIBBASE).a
PICLIB = $(LIBBASE)_pic.a
-SHAREDLIB = $(LIBBASE).so.1
+SHAREDLIB = $(LIBBASE).so.${LIBcdb_VERSION}
SOLIB = $(LIBBASE).so
CDB_USELIB = $(LIB)
NSS_USELIB = $(PICLIB)
@@ -85,7 +85,7 @@ $(SHAREDLIB): $(LIB_OBJS_PIC) $(LIBMAP)
-rm -f $(SOLIB)
ln -s $@ $(SOLIB)
$(CC) $(CFLAGS) $(CFLAGS_SHARED) -o $@ \
- $(CFLAGS_SONAME)$(SHAREDLIB) $(CFLAGS_VSCRIPT)$(LIBMAP) \
+ $(CFLAGS_VSCRIPT)$(LIBMAP) \
$(LIB_OBJS_PIC)
cdb: cdb.o $(CDB_USELIB)
@@ -137,7 +137,7 @@ do_install = \
done
install-all: all $(INSTALLPROG)
- set -- \
+ @set -- \
cdb.h 644 $(includedir) - \
cdb.3 644 $(mandir)/man3 - \
cdb.1 644 $(mandir)/man1 - \
@@ -152,8 +152,7 @@ install-nss: nss
$(do_install)
install-sharedlib: sharedlib
@set -- $(SHAREDLIB) 644 $(libdir) - ; \
- $(do_install) ; \
- ln -sf $(SHAREDLIB) $(DESTDIR)$(libdir)/$(LIBBASE).so
+ $(do_install)
install-piclib: piclib
@set -- $(PICLIB) 644 $(libdir) - ; \
$(do_install)