freebsd-ports/databases/db42/Makefile.db
2014-02-02 11:17:47 +00:00

44 lines
1.4 KiB
Text

# $FreeBSD$
MASTER_SITES= http://download.oracle.com/berkeley-db/
DISTNAME?= db-${PORTVERSION}
DIST_SUBDIR= bdb
PATCH_SITES= http://download.oracle.com/berkeley-db/patches/db/${PORTVERSION}/
PATCH_DIST_STRIP= -d ${WRKDIR}/${DISTNAME}
WRKSRC= ${WRKDIR}/${DISTNAME}/build_unix
USE_LDCONFIG= yes
USE_AUTOTOOLS= libtool
CONFIGURE_SCRIPT= ../dist/configure
LIBTOOLFILES= ${CONFIGURE_SCRIPT}
BDBVER= ${PORTVERSION:R}
BDBMINOR= ${BDBVER:E:S/^\.//}
BDBDIR= BerkeleyDB.${BDBVER}
CONFIGURE_ARGS= --enable-compat185 --enable-dump185 \
--enable-cxx --enable-dynamic \
--enable-rpc \
--with-uniquename \
--includedir=${PREFIX}/include/${PORTNAME} \
--libdir=${PREFIX}/lib/${PORTNAME} \
--bindir=${PREFIX}/bin/${PORTNAME}
INSTALL_TARGET= install_include install_lib install_utilities
INSTALL_TARGET+= install_docs docdir=${DOCSDIR}
PORTDOCS= *
pre-patch:
${REINPLACE_CMD} -Ee 's|-l?pthread|${PTHREAD_LIBS}|g; s,/usr/bin/objformat \|\| echo aout,/usr/bin/objformat || echo elf,' ${WRKSRC}/${CONFIGURE_SCRIPT}
pre-configure:
${CHMOD} u+w ${WRKSRC}/../dist/configure
post-install:
.for i in libdb libdb_cxx
${LN} -s -f ${PORTNAME}/${i}-${BDBVER}.so.${BDBMINOR} ${STAGEDIR}${PREFIX}/lib
${LN} -s -f ${i}-${BDBVER}.so.${BDBMINOR} ${STAGEDIR}${PREFIX}/lib/${i}-${BDBVER}.so
.endfor
@${RMDIR} ${STAGEDIR}${DOCSDIR}/ref/splash 2>/dev/null || :
cd ${STAGEDIR}${PREFIX}/bin/${PORTNAME} ; \
for i in * ; do ${LN} -s -f ${PORTNAME}/$$i ../$$i-${BDBVER} ; done