summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/db
diff options
context:
space:
mode:
authorAdrian Dudau <adrian.dudau@enea.com>2014-06-26 14:36:22 +0200
committerAdrian Dudau <adrian.dudau@enea.com>2014-06-26 15:32:53 +0200
commitf4cf9fe05bb3f32fabea4e54dd92d368967a80da (patch)
tree487180fa9866985ea7b28e625651765d86f515c3 /meta/recipes-support/db
downloadpoky-f4cf9fe05bb3f32fabea4e54dd92d368967a80da.tar.gz
initial commit for Enea Linux 4.0
Migrated from the internal git server on the daisy-enea branch Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-support/db')
-rw-r--r--meta/recipes-support/db/db/arm-thumb-mutex_db5.patch38
-rw-r--r--meta/recipes-support/db/db/fix-parallel-build.patch19
-rw-r--r--meta/recipes-support/db/db_5.3.21.bb115
3 files changed, 172 insertions, 0 deletions
diff --git a/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch b/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch
new file mode 100644
index 0000000000..40b13dee79
--- /dev/null
+++ b/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch
@@ -0,0 +1,38 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3--- db-5.1.19/src/dbinc/mutex_int.h.orig 2011-01-05 19:21:42.181805366 -0600
4+++ db-5.1.19/src/dbinc/mutex_int.h 2011-01-05 19:24:53.141853117 -0600
5@@ -474,6 +474,25 @@
6
7 #ifdef LOAD_ACTUAL_MUTEX_CODE
8 /* gcc/arm: 0 is clear, 1 is set. */
9+#if defined __thumb__
10+#define MUTEX_SET(tsl) ({ \
11+ int __r, __p; \
12+ __asm__ volatile( \
13+ ".align 2\n\t" \
14+ "bx pc\n\t" \
15+ "nop\n\t" \
16+ ".arm\n\t" \
17+ "swpb %0, %2, [%3]\n\t" \
18+ "eor %0, %0, #1\n\t" \
19+ "orr %1, pc, #1\n\t" \
20+ "bx %1\n\t" \
21+ ".force_thumb" \
22+ : "=&r" (__r), "=r" (__p) \
23+ : "r" (1), "r" (tsl) \
24+ ); \
25+ __r & 1; \
26+})
27+#else
28 #define MUTEX_SET(tsl) ({ \
29 int __r; \
30 __asm__ volatile( \
31@@ -484,6 +503,7 @@
32 ); \
33 __r & 1; \
34 })
35+#endif
36
37 #define MUTEX_UNSET(tsl) (*(volatile tsl_t *)(tsl) = 0)
38 #define MUTEX_INIT(tsl) (MUTEX_UNSET(tsl), 0)
diff --git a/meta/recipes-support/db/db/fix-parallel-build.patch b/meta/recipes-support/db/db/fix-parallel-build.patch
new file mode 100644
index 0000000000..2c7f1e186b
--- /dev/null
+++ b/meta/recipes-support/db/db/fix-parallel-build.patch
@@ -0,0 +1,19 @@
1With higher paralelism it sometimes fails with:
2libtool: link: `util_log.lo' is not a valid libtool object
3make: *** [db_replicate] Error 1
4
5Upstream-Status: Pending
6
7Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
8
9--- dist.orig/Makefile.in 2012-05-11 19:57:48.000000000 +0200
10+++ dist/Makefile.in 2013-10-31 18:17:11.875532522 +0100
11@@ -1034,7 +1034,7 @@
12 db_recover@o@ util_sig@o@ $(DEF_LIB) $(LIBS)
13 $(POSTLINK) $@
14
15-db_replicate: db_replicate@o@ util_sig@o@ $(DEF_LIB)
16+db_replicate: db_replicate@o@ util_log@o@ util_sig@o@ $(DEF_LIB)
17 $(CCLINK) -o $@ $(LDFLAGS) \
18 db_replicate@o@ util_log@o@ util_sig@o@ $(DEF_LIB) $(LIBS)
19 $(POSTLINK) $@
diff --git a/meta/recipes-support/db/db_5.3.21.bb b/meta/recipes-support/db/db_5.3.21.bb
new file mode 100644
index 0000000000..caf6890261
--- /dev/null
+++ b/meta/recipes-support/db/db_5.3.21.bb
@@ -0,0 +1,115 @@
1# Version 5 of the Berkeley DB from Sleepycat
2#
3# At present this package only installs the DB code
4# itself (shared libraries, .a in the dev package),
5# documentation and headers.
6#
7# The headers have the same names as those as v3
8# of the DB, only one version can be used *for dev*
9# at once - DB3 and DB5 can both be installed on the
10# same system at the same time if really necessary.
11SECTION = "libs"
12SUMMARY = "Berkeley Database v5"
13HOMEPAGE = "http://www.oracle.com/technology/products/berkeley-db/db/index.html"
14LICENSE = "Sleepycat"
15VIRTUAL_NAME ?= "virtual/db"
16RCONFLICTS_${PN} = "db3"
17
18SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz"
19SRC_URI += "file://arm-thumb-mutex_db5.patch;patchdir=.. \
20 file://fix-parallel-build.patch \
21 "
22
23SRC_URI[md5sum] = "3fda0b004acdaa6fa350bfc41a3b95ca"
24SRC_URI[sha256sum] = "ddd92a930317df92021054c03992392db9ea5cddba43bef8920d392a82114fb8"
25
26LIC_FILES_CHKSUM = "file://../LICENSE;md5=32aefa5a8e7318be1f657432cbe2e768"
27
28inherit autotools
29
30# Put virtual/db in any appropriate provider of a
31# relational database, use it as a dependency in
32# place of a specific db and use:
33#
34# PREFERRED_PROVIDER_virtual/db
35#
36# to select the correct db in the build (distro) .conf
37PROVIDES += "${VIRTUAL_NAME}"
38
39# bitbake isn't quite clever enough to deal with sleepycat,
40# the distribution sits in the expected directory, but all
41# the builds must occur from a sub-directory. The following
42# persuades bitbake to go to the right place
43S = "${WORKDIR}/db-${PV}/dist"
44B = "${WORKDIR}/db-${PV}/build_unix"
45
46# The executables go in a separate package - typically there
47# is no need to install these unless doing real database
48# management on the system.
49inherit lib_package
50
51PACKAGES =+ "${PN}-cxx"
52FILES_${PN}-cxx = "${libdir}/*cxx*so"
53
54
55# The dev package has the .so link (as in db3) and the .a's -
56# it is therefore incompatible (cannot be installed at the
57# same time) as the db3 package
58# sort out the .so since they do version prior to the .so
59SOLIBS = "-5*.so"
60FILES_SOLIBSDEV = "${libdir}/libdb.so ${libdir}/libdb_cxx.so"
61
62#configuration - set in local.conf to override
63# All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix)
64DB5_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-verify --disable-compat185 --disable-sql"
65
66EXTRA_OECONF = "${DB5_CONFIG} --enable-shared --enable-cxx --with-sysroot"
67
68# Override the MUTEX setting here, the POSIX library is
69# the default - "POSIX/pthreads/library".
70# Don't ignore the nice SWP instruction on the ARM:
71# These enable the ARM assembler mutex code, this won't
72# work with thumb compilation...
73ARM_MUTEX = "--with-mutex=ARM/gcc-assembly"
74MUTEX = ""
75MUTEX_arm = "${ARM_MUTEX}"
76MUTEX_armeb = "${ARM_MUTEX}"
77EXTRA_OECONF += "${MUTEX}"
78
79# Cancel the site stuff - it's set for db3 and destroys the
80# configure.
81CONFIG_SITE = ""
82do_configure() {
83 gnu-configize --force ${S}
84 export STRIP="true"
85 oe_runconf
86}
87
88do_compile_prepend() {
89 sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' \
90 ${B}/libtool
91}
92
93do_install_append() {
94 mkdir -p ${D}/${includedir}/db51
95 mv ${D}/${includedir}/db.h ${D}/${includedir}/db51/.
96 mv ${D}/${includedir}/db_cxx.h ${D}/${includedir}/db51/.
97 ln -s db51/db.h ${D}/${includedir}/db.h
98 ln -s db51/db_cxx.h ${D}/${includedir}/db_cxx.h
99
100 # The docs end up in /usr/docs - not right.
101 if test -d "${D}/${prefix}/docs"
102 then
103 mkdir -p "${D}/${datadir}"
104 test ! -d "${D}/${docdir}" || rm -rf "${D}/${docdir}"
105 mv "${D}/${prefix}/docs" "${D}/${docdir}"
106 fi
107
108 chown -R root:root ${D}
109}
110
111INSANE_SKIP_${PN} = "dev-so"
112INSANE_SKIP_${PN}-cxx = "dev-so"
113
114BBCLASSEXTEND = "native nativesdk"
115