1 # $NetBSD: Makefile,v 1.58 2010/01/16 17:57:37 wiz Exp $
4 # When updating this package, a change in the minor (4.n -> 4.(n+1))
5 # usually incurs a shlib name change. Please make sure to update the
6 # ABI depends in buildlink3.mk and bump PKGREVISIONs for all dependencies.
7 # In particular, take care to include BDB_ACCEPTED=db4 packages.
10 PKGNAME= ${DISTNAME:S/db/db4/}.3
12 MASTER_SITES= http://download.oracle.com/berkeley-db/ \
13 http://download-uk.oracle.com/berkeley-db/
15 # doesn't apply due to line endings, included as patch-ba
16 #PATCHFILES= patch.4.7.25.1
17 #PATCH_SITES= http://www.oracle.com/technology/products/berkeley-db/db/update/4.7.25/
19 MAINTAINER= pkgsrc-users@NetBSD.org
20 HOMEPAGE= http://www.oracle.com/database/berkeley-db/db/index.html
21 COMMENT= Berkeley DB version 4 from Oracle
23 PKG_INSTALLATION_TYPES= overwrite pkgviews
24 PKG_DESTDIR_SUPPORT= user-destdir
30 CONFIGURE_DIRS= build_unix
31 CONFIGURE_SCRIPT= ../dist/configure
33 CONFIGURE_ARGS+= --enable-cxx
34 CONFIGURE_ARGS+= --enable-rpc
35 CONFIGURE_ARGS+= --enable-compat185
36 CONFIGURE_ARGS+= --includedir=${PREFIX}/include/db4
37 CONFIGURE_ARGS+= --program-transform-name=s,db_,db4_,
39 # Along with a hack in patch-ab, this forces shlib detection via
40 # the pkgsrc-supplied libtool only.
41 CONFIGURE_ENV+= LIBTOOL_PROG=${LIBTOOL:Q}\ ${LIBTOOL_FLAGS:Q}
43 OPSYSVARS+= LIBSO_LIBS
44 LIBSO_LIBS.Interix+= -lrpclib
45 LIBS.Interix+= -lrpclib # needed for in-tree programs, too
46 LIBSO_LIBS.SunOS+= -lnsl -lrt
47 CONFIGURE_ENV+= LIBSO_LIBS=${LIBSO_LIBS:Q}
49 # DB4 only want pthreads because it's really after POSIX 1003.1
50 # inter-process mutexes. In this case, we only care to use the native
51 # threads. We also only care if we're using a non-GCC compiler since
52 # we have code to use GCC assembly for mutexes instead of 1003.1
55 .include "../../mk/compiler.mk"
56 .if !empty(PKGSRC_COMPILER:Mgcc)
57 CONFIGURE_ENV+= ac_cv_lib_pthread_main=no
60 . include "../../mk/pthread.buildlink3.mk"
63 INSTALLATION_DIRS= include/db4 lib share/doc/db4
66 chown -R ${DOCOWN}:${DOCGRP} ${DESTDIR}${PREFIX}/share/doc/db4
68 .include "../../mk/bsd.pkg.mk"