Attachment 'upgrade_BerkeleyDB_Mk_bsd.database.mk.v001.patch'

Download

   1 Index: databases/Makefile
   2 ===================================================================
   3 --- databases/Makefile	(revision 364633)
   4 +++ databases/Makefile	(working copy)
   5 @@ -38,16 +38,6 @@
   6      SUBDIR += cyrus-imspd
   7      SUBDIR += dalmp
   8      SUBDIR += datamodeler
   9 -    SUBDIR += db
  10 -    SUBDIR += db4
  11 -    SUBDIR += db41
  12 -    SUBDIR += db41-nocrypto
  13 -    SUBDIR += db42
  14 -    SUBDIR += db42-nocrypto
  15 -    SUBDIR += db43
  16 -    SUBDIR += db44
  17 -    SUBDIR += db46
  18 -    SUBDIR += db47
  19      SUBDIR += db48
  20      SUBDIR += db4o-mono
  21      SUBDIR += db5
  22 Index: Mk/bsd.database.mk
  23 ===================================================================
  24 --- Mk/bsd.database.mk	(revision 364633)
  25 +++ Mk/bsd.database.mk	(working copy)
  26 @@ -54,7 +54,7 @@
  27  #			  If no version is given (by the maintainer via the port or
  28  #			  by the user via defined variable), try to find the
  29  #			  currently installed version.  Fall back to default if
  30 -#			  necessary (db41+).
  31 +#			  necessary (db5).
  32  # INVALID_BDB_VER
  33  #			- This variable can be defined when the port does not
  34  #			  support one or more versions of Berkeley DB.
  35 @@ -291,39 +291,19 @@
  36  
  37  .if defined(USE_BDB)
  38  
  39 -_DB_PORTS=	40 41 42 43 44 46 47 48 5 6 40+ 41+ 42+ 43+ 44+ 46+ 47+ 48+ 5+ 6+
  40 +_DB_PORTS=	48 5 6 48+ 5+ 6+
  41  # Dependence lines for different db versions
  42 -db40_DEPENDS=	libdb4.so:${PORTSDIR}/databases/db4
  43 -db41_DEPENDS=	libdb41.so:${PORTSDIR}/databases/db41
  44 -db42_DEPENDS=	libdb-4.2.so:${PORTSDIR}/databases/db42
  45 -db43_DEPENDS=	libdb-4.3.so:${PORTSDIR}/databases/db43
  46 -db44_DEPENDS=	libdb-4.4.so:${PORTSDIR}/databases/db44
  47 -db46_DEPENDS=	libdb-4.6.so:${PORTSDIR}/databases/db46
  48 -db47_DEPENDS=	libdb-4.7.so:${PORTSDIR}/databases/db47
  49  db48_DEPENDS=	libdb-4.8.so:${PORTSDIR}/databases/db48
  50  db5_DEPENDS=	libdb-5.3.so:${PORTSDIR}/databases/db5
  51  db6_DEPENDS=	libdb-6.1.so:${PORTSDIR}/databases/db6
  52  # Detect db versions by finding some files
  53 -db40_FIND=	${LOCALBASE}/include/db4/db.h
  54 -db41_FIND=	${LOCALBASE}/include/db41/db.h
  55 -db42_FIND=	${LOCALBASE}/include/db42/db.h
  56 -db43_FIND=	${LOCALBASE}/include/db43/db.h
  57 -db44_FIND=	${LOCALBASE}/include/db44/db.h
  58 -db46_FIND=	${LOCALBASE}/include/db46/db.h
  59 -db47_FIND=	${LOCALBASE}/include/db47/db.h
  60  db48_FIND=	${LOCALBASE}/include/db48/db.h
  61  db5_FIND=	${LOCALBASE}/include/db5/db.h
  62  db6_FIND=	${LOCALBASE}/include/db6/db.h
  63  
  64 -# For specifying [40, 41, ..]+
  65 -_DB_40P=	40 ${_DB_41P}
  66 -_DB_41P=	41 ${_DB_42P}
  67 -_DB_42P=	42 ${_DB_43P}
  68 -_DB_43P=	43 ${_DB_44P}
  69 -_DB_44P=	44 ${_DB_46P}
  70 -_DB_46P=	46 ${_DB_47P}
  71 -_DB_47P=	47 ${_DB_48P}
  72 -_DB_48P=	48 ${_DB_5P}
  73 +# For specifying versions like db48+, db5+
  74 +# prefer db5 over db48
  75 +_DB_48P=	${_DB_5P} db48
  76  _DB_5P=		5 ${_DB_6P}
  77  _DB_6P=		6
  78  
  79 @@ -334,17 +314,23 @@
  80  .endif
  81  
  82  .if defined(WITH_BDB_VER)
  83 -. if ${WITH_BDB_VER} == 4
  84 -USE_BDB=	40
  85 -. elif ${WITH_BDB_VER} != 1
  86 +. if ${WITH_BDB_VER} != 1
  87  USE_BDB=	${WITH_BDB_VER}
  88  . endif
  89  .endif
  90 +
  91 +# Compatiblity hack:
  92 +# upgrade older plussed versions to 48+
  93 +_BDB_OLDPLUSVERS=4+ 40+ 41+ 42+ 43+ 44+ 45+ 46+ 47+
  94 +.if ${_BDB_OLDPLUSVERS:M${{USE_BDB}}
  95 +USE_BDB=48+
  96 +.endif
  97 +
  98  _WANT_BDB_VER=	${USE_BDB}
  99  
 100 -# Assume the default bdb version as 41
 101 +# Assume the default bdb version as 5
 102  .if ${USE_BDB:tl} == "yes"
 103 -_WANT_BDB_VER=	41+
 104 +_WANT_BDB_VER=	5
 105  .endif
 106  
 107  # Detect bdb version
 108 @@ -435,31 +421,7 @@
 109  .else
 110  LIB_DEPENDS+=	${db${_BDB_VER}_DEPENDS}
 111  .endif
 112 -.  if ${_BDB_VER} == 40
 113 -BDB_LIB_NAME=		db4
 114 -BDB_LIB_CXX_NAME=	db4_cxx
 115 -BDB_INCLUDE_DIR=	${LOCALBASE}/include/db4
 116 -.  elif ${_BDB_VER} == 42
 117 -BDB_LIB_NAME=		db-4.2
 118 -BDB_LIB_CXX_NAME=	db_cxx-4.2
 119 -BDB_LIB_DIR=		${LOCALBASE}/lib/db42
 120 -.  elif ${_BDB_VER} == 43
 121 -BDB_LIB_NAME=		db-4.3
 122 -BDB_LIB_CXX_NAME=	db_cxx-4.3
 123 -BDB_LIB_DIR=		${LOCALBASE}/lib/db43
 124 -.  elif ${_BDB_VER} == 44
 125 -BDB_LIB_NAME=		db-4.4
 126 -BDB_LIB_CXX_NAME=	db_cxx-4.4
 127 -BDB_LIB_DIR=		${LOCALBASE}/lib/db44
 128 -.  elif ${_BDB_VER} == 46
 129 -BDB_LIB_NAME=		db-4.6
 130 -BDB_LIB_CXX_NAME=	db_cxx-4.6
 131 -BDB_LIB_DIR=		${LOCALBASE}/lib/db46
 132 -.  elif ${_BDB_VER} == 47
 133 -BDB_LIB_NAME=		db-4.7
 134 -BDB_LIB_CXX_NAME=	db_cxx-4.7
 135 -BDB_LIB_DIR=		${LOCALBASE}/lib/db47
 136 -.  elif ${_BDB_VER} == 48
 137 +.  if ${_BDB_VER} == 48
 138  BDB_LIB_NAME=		db-4.8
 139  BDB_LIB_CXX_NAME=	db_cxx-4.8
 140  BDB_LIB_DIR=		${LOCALBASE}/lib/db48

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2014-08-13T05:58:29+0000, 4.1 KB) [[attachment:upgrade_BerkeleyDB_Mk_bsd.database.mk.v001.patch]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.