Makefile.inc 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # $OpenBSD: Makefile.inc,v 1.37 2016/03/12 16:45:57 naddy Exp $
  2. COMMENT-main= Berkeley DB package, revision ${REV}
  3. COMMENT-tcl= TCL bindings for Berkeley DB, revision ${REV}
  4. DISTNAME= db-${VERSION}
  5. CATEGORIES= databases
  6. HOMEPAGE= http://www.oracle.com/technology/products/berkeley-db/
  7. MASTER_SITES= http://download.oracle.com/berkeley-db/
  8. # License: BSD + SleepyCat's additions.
  9. # Must purchase license to redistribute if not distributing the source.
  10. PERMIT_PACKAGE_CDROM= Yes
  11. CONFIGURE_SCRIPT= ../dist/configure
  12. CONFIGURE_ARGS+= --enable-shared \
  13. --enable-compat185 \
  14. --enable-dump185 \
  15. --enable-cxx \
  16. --includedir=$$\{prefix}/include/db${DEST_SUBDIR} \
  17. --libdir=$$\{prefix}/lib/db${DEST_SUBDIR}
  18. MODGNU_CONFIG_GUESS_DIRS= ${WRKSRC}/dist
  19. MAKE_FLAGS+= DBVERSION=${LIBdb_VERSION} \
  20. DBCXXVERSION=${LIBdb_cxx_VERSION} \
  21. DBTCLVERSION=${LIBdb_tcl_VERSION}
  22. WRKBUILD= ${WRKDIST}/build_unix
  23. PSEUDO_FLAVORS+= no_tcl
  24. FLAVOR?=
  25. MULTI_PACKAGES += -main -tcl
  26. LIB_DEPENDS-main?=
  27. RUN_DEPENDS-main?=
  28. #ONLY_FOR_ARCHS = ${ALL_ARCHS}
  29. ONLY_FOR_ARCHS-java = amd64 i386
  30. .include <bsd.port.arch.mk>
  31. .if ${BUILD_PACKAGES:M-tcl}
  32. MODULES+= lang/tcl
  33. WANTLIB-tcl?=
  34. RUN_DEPENDS-tcl+= ${MODTCL_RUN_DEPENDS}
  35. BUILD_DEPENDS+= ${MODTCL_BUILD_DEPENDS}
  36. CFLAGS+= -I${MODTCL_INCDIR}
  37. CONFIGURE_ARGS+=--enable-tcl \
  38. --with-tcl=${MODTCL_LIBDIR}
  39. # this compiles slightly different code, some tests fail nevertheless
  40. #CONFIGURE_ARGS+=--enable-test
  41. do-test:
  42. @cd ${WRKBUILD}; env PATH=${PORTPATH} ${MODTCL_BIN} ${FILESDIR}/regress.tcl
  43. .else
  44. CONFIGURE_ARGS+=--disable-tcl
  45. # regression tests need tcl
  46. NO_TEST= Yes
  47. .endif
  48. .if ${BUILD_PACKAGES:M-java}
  49. CONFIGURE_ARGS+=--enable-java
  50. MODULES+= java
  51. MODJAVA_VER= 1.4+
  52. MODJAVA_JRERUN= Yes
  53. CONFIGURE_ENV+= JAVAC=${JAVA_HOME}/bin/javac \
  54. JAR=${JAVA_HOME}/bin/jar \
  55. JAVA=${JAVA_HOME}/bin/java
  56. MAKE_FLAGS+= DBJVERSION=${LIBdb_java_VERSION}
  57. .endif
  58. post-install:
  59. ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/db${DEST_SUBDIR}
  60. cd ${WRKSRC}/examples_c; ${INSTALL_DATA} *.c \
  61. ${PREFIX}/share/examples/db${DEST_SUBDIR}
  62. cd ${WRKSRC}/examples_cxx; ${INSTALL_DATA} *.cpp \
  63. ${PREFIX}/share/examples/db${DEST_SUBDIR}