openbsd-ports/databases/db/v4/Makefile
2010-11-26 14:44:27 +00:00

63 lines
1.6 KiB
Makefile

# $OpenBSD: Makefile,v 1.47 2010/11/26 14:44:27 espie Exp $
COMMENT-java= Java bindings for Berkeley DB, revision ${REV}
REV= 4
VERSION= ${REV}.6.21
PKGNAME-main= ${DISTNAME}
PKGSPEC-main = db->=4,<5
# XXX specs for java,tcl ?
PKGNAME-java= db-java-${VERSION}
PKGNAME-tcl= db-tcl-${VERSION}
REVISION-main= 4
REVISION-java= 8
REVISION-tcl= 9
DBLIBDIR= lib/db4
SHARED_LIBS += db 5.0 # .0.0
SHARED_LIBS += db_cxx 6.0 # .0.0
SHARED_LIBS += db_java 5.0 # .0.0
SHARED_LIBS += db_tcl 6.0 # .0.0
MASTER_SITES0= ${HOMEPAGE}db/update/${VERSION}/
# patch 2 has converted DOS line-endings; no other change
# patches 1,3,4 are just mirrored
MASTER_SITES2= http://spacehopper.org/mirrors/
PATCHFILES= patch.${VERSION}.1:2 \
patch.${VERSION}.2.fixed:2 \
patch.${VERSION}.3:2 \
patch.${VERSION}.4:2
CONFIGURE_STYLE=gnu
DEST_SUBDIR= ${REV}
WANTLIB= c m stdc++
PSEUDO_FLAVORS= java
FLAVOR?=
RUN_DEPENDS-java= databases/db/v${REV} \
${MODJAVA_RUN_DEPENDS}
RUN_DEPENDS-tcl= databases/db/v${REV}
WANTLIB-java=
.if ${FLAVOR:L:Mjava}
MULTI_PACKAGES+=-java
CONFIGURE_ARGS+=--enable-java
MODULES+= java
MODJAVA_VER= 1.4+
MODJAVA_JRERUN= Yes
CONFIGURE_ENV+= JAVAC=${JAVA_HOME}/bin/javac \
JAR=${JAVA_HOME}/bin/jar \
JAVA=${JAVA_HOME}/bin/java
MAKE_FLAGS+= DBJVERSION=${LIBdb_java_VERSION}
.endif
SUBST_VARS= LIBdb_tcl_VERSION
pre-configure:
@perl -pi -e "s,db_(archive|checkpoint|deadlock|dump|hotbackup),db5_\0,g" ${WRKSRC}/test/*tcl
@perl -pi -e "s,db_(load|printlog|recover|stat|upgrade|verify),db5_\0,g" ${WRKSRC}/test/*tcl
@${SUBST_CMD} ${WRKSRC}/test/include.tcl
.include <bsd.port.mk>