aboutsummaryrefslogtreecommitdiffstats
path: root/databases/db48/Makefile
blob: ab275876386e83f6bc1c28444cdaeb995f523fa9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Created by: Gea-Suan Lin <gslin@gslin.org>
# $FreeBSD$

PORTNAME=   db48
PORTVERSION=    4.8.30.0
PORTREVISION=   2
CATEGORIES= databases
MASTER_SITES=   http://download.oracle.com/berkeley-db/
PKGNAMEPREFIX?=
DISTNAME=   db-${PORTVERSION:R}
DIST_SUBDIR=    bdb

MAINTAINER= mandree@FreeBSD.org
COMMENT=    Berkeley DB package, revision 4.8

LICENSE=    BSD3CLAUSE
LICENSE_FILE=   ${WRKDIR}/${DISTNAME}/LICENSE

DEPRECATED=     Please migrate to db5 or db6
# The port is not to be removed unless the bitcoin-related ports can
# go without this.
EXPIRATION_DATE=    2016-07-31

BDBVER=     ${PORTVERSION:R:R}
CONFIGURE_ARGS= --enable-compat185 --enable-dump185 --enable-cxx \
        --includedir=${PREFIX}/include/${PORTNAME} \
        --libdir=${PREFIX}/lib/${PORTNAME} \
        --bindir=${PREFIX}/bin/${PORTNAME}
CONFIGURE_SCRIPT=   ../dist/configure
USES=       libtool:keepla
GNU_CONFIGURE=  yes
INSTALL_TARGET= install_include install_lib install_utilities
WRKSRC=     ${WRKDIR}/${DISTNAME}/build_unix
USE_LDCONFIG=   yes

.include <bsd.port.options.mk>

.if ${OSVERSION} >= 1100101
IGNORE=     db48 is not supported on FreeBSD 11+ with clang 3.8 - upgrade to db5
.endif

.if ${ARCH} == "aarch64" || ${ARCH} == "armv6"
# db48 uses a deprecated instruction for mutexes on ARM, fbsd bug#197227
CONFIGURE_ARGS+=    --enable-posixmutexes
.endif

post-patch:
    ${REINPLACE_CMD} -Ee 's|--mode=install cp -p|--mode=install ${INSTALL} -s|;' ${WRKSRC}/${CONFIGURE_SCRIPT}

post-install:
.for i in libdb libdb_cxx
    ${LN} -s -f ${PORTNAME}/${i}-${BDBVER}.so.0 ${STAGEDIR}${PREFIX}/lib
    ${LN} -s -f ${i}-${BDBVER}.so.0 ${STAGEDIR}${PREFIX}/lib/${i}-${BDBVER}.so
.endfor
    cd ${STAGEDIR}${PREFIX}/bin/${PORTNAME}; \
    for i in *; do ${LN} -s -f ${PORTNAME}/$$i ../$$i-${BDBVER}; done

.include <bsd.port.mk>