update Fri Jan 22 12:37:00 PST 2010
[pkgsrc.git] / databases / db4 / Makefile
1 # $NetBSD: Makefile,v 1.58 2010/01/16 17:57:37 wiz Exp $
2 #
3 # NOTE:
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.
8
9 DISTNAME=       db-4.7.25
10 PKGNAME=        ${DISTNAME:S/db/db4/}.3
11 CATEGORIES=     databases
12 MASTER_SITES=   http://download.oracle.com/berkeley-db/ \
13                 http://download-uk.oracle.com/berkeley-db/
14
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/
18
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
22
23 PKG_INSTALLATION_TYPES= overwrite pkgviews
24 PKG_DESTDIR_SUPPORT=    user-destdir
25
26 USE_LANGUAGES=          c c++
27 USE_LIBTOOL=            yes
28 USE_TOOLS+=             pax
29 GNU_CONFIGURE=          yes
30 CONFIGURE_DIRS=         build_unix
31 CONFIGURE_SCRIPT=       ../dist/configure
32
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_,
38
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}
42
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}
48
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
53 # mutexes.
54 #
55 .include "../../mk/compiler.mk"
56 .if !empty(PKGSRC_COMPILER:Mgcc)
57 CONFIGURE_ENV+=         ac_cv_lib_pthread_main=no
58 .else
59 PTHREAD_OPTS+=          native
60 .  include "../../mk/pthread.buildlink3.mk"
61 .endif
62
63 INSTALLATION_DIRS=      include/db4 lib share/doc/db4
64
65 post-install:
66         chown -R ${DOCOWN}:${DOCGRP} ${DESTDIR}${PREFIX}/share/doc/db4
67
68 .include "../../mk/bsd.pkg.mk"