diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
commit | 972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch) | |
tree | 97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-support/db | |
download | poky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz |
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-support/db')
-rw-r--r-- | meta/recipes-support/db/db/arm-thumb-mutex_db5.patch | 48 | ||||
-rw-r--r-- | meta/recipes-support/db/db/fix-parallel-build.patch | 19 | ||||
-rw-r--r-- | meta/recipes-support/db/db_5.3.28.bb | 116 | ||||
-rw-r--r-- | meta/recipes-support/db/db_6.0.30.bb | 115 |
4 files changed, 298 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..34e8db84df --- /dev/null +++ b/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | Original patch submitted by jbowler@nslu2-linux.org on 2005-11-17: | ||
2 | |||
3 | db: fix thumb uclibc operation in 4.3.29 | ||
4 | - uclibc thumb builds were using libpthread to implement mutexes, the | ||
5 | - uclibc version seems to be a stub (at least on thumb). This commit | ||
6 | - fixes the ARM/gcc-assembly mutex implementation so that it has thumb | ||
7 | - support and the resultant db4 works (tested on LE Thumb uclibc) | ||
8 | |||
9 | Upstream-Status: Inappropriate [embedded specific] | ||
10 | |||
11 | Author: jbowler@nslu2-linux.org | ||
12 | |||
13 | --- db-5.1.19/src/dbinc/mutex_int.h.orig 2011-01-05 19:21:42.181805366 -0600 | ||
14 | +++ db-5.1.19/src/dbinc/mutex_int.h 2011-01-05 19:24:53.141853117 -0600 | ||
15 | @@ -474,6 +474,25 @@ | ||
16 | |||
17 | #ifdef LOAD_ACTUAL_MUTEX_CODE | ||
18 | /* gcc/arm: 0 is clear, 1 is set. */ | ||
19 | +#if defined __thumb__ | ||
20 | +#define MUTEX_SET(tsl) ({ \ | ||
21 | + int __r, __p; \ | ||
22 | + __asm__ volatile( \ | ||
23 | + ".align 2\n\t" \ | ||
24 | + "bx pc\n\t" \ | ||
25 | + "nop\n\t" \ | ||
26 | + ".arm\n\t" \ | ||
27 | + "swpb %0, %2, [%3]\n\t" \ | ||
28 | + "eor %0, %0, #1\n\t" \ | ||
29 | + "orr %1, pc, #1\n\t" \ | ||
30 | + "bx %1\n\t" \ | ||
31 | + ".force_thumb" \ | ||
32 | + : "=&r" (__r), "=r" (__p) \ | ||
33 | + : "r" (1), "r" (tsl) \ | ||
34 | + ); \ | ||
35 | + __r & 1; \ | ||
36 | +}) | ||
37 | +#else | ||
38 | #define MUTEX_SET(tsl) ({ \ | ||
39 | int __r; \ | ||
40 | __asm__ volatile( \ | ||
41 | @@ -484,6 +503,7 @@ | ||
42 | ); \ | ||
43 | __r & 1; \ | ||
44 | }) | ||
45 | +#endif | ||
46 | |||
47 | #define MUTEX_UNSET(tsl) (*(volatile tsl_t *)(tsl) = 0) | ||
48 | #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 @@ | |||
1 | With higher paralelism it sometimes fails with: | ||
2 | libtool: link: `util_log.lo' is not a valid libtool object | ||
3 | make: *** [db_replicate] Error 1 | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | |||
7 | Signed-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.28.bb b/meta/recipes-support/db/db_5.3.28.bb new file mode 100644 index 0000000000..e8b814e06b --- /dev/null +++ b/meta/recipes-support/db/db_5.3.28.bb | |||
@@ -0,0 +1,116 @@ | |||
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. | ||
11 | SECTION = "libs" | ||
12 | SUMMARY = "Berkeley Database v5" | ||
13 | HOMEPAGE = "http://www.oracle.com/technology/products/berkeley-db/db/index.html" | ||
14 | LICENSE = "Sleepycat" | ||
15 | VIRTUAL_NAME ?= "virtual/db" | ||
16 | RCONFLICTS_${PN} = "db3" | ||
17 | |||
18 | SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz" | ||
19 | SRC_URI += "file://arm-thumb-mutex_db5.patch;patchdir=.. \ | ||
20 | file://fix-parallel-build.patch \ | ||
21 | " | ||
22 | |||
23 | SRC_URI[md5sum] = "b99454564d5b4479750567031d66fe24" | ||
24 | SRC_URI[sha256sum] = "e0a992d740709892e81f9d93f06daf305cf73fb81b545afe72478043172c3628" | ||
25 | |||
26 | LIC_FILES_CHKSUM = "file://../LICENSE;md5=ed1158e31437f4f87cdd4ab2b8613955" | ||
27 | |||
28 | inherit 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 | ||
37 | PROVIDES += "${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 | ||
43 | S = "${WORKDIR}/db-${PV}/dist" | ||
44 | B = "${WORKDIR}/db-${PV}/build_unix" | ||
45 | SPDX_S = "${WORKDIR}/db-${PV}" | ||
46 | |||
47 | # The executables go in a separate package - typically there | ||
48 | # is no need to install these unless doing real database | ||
49 | # management on the system. | ||
50 | inherit lib_package | ||
51 | |||
52 | PACKAGES =+ "${PN}-cxx" | ||
53 | FILES_${PN}-cxx = "${libdir}/*cxx*so" | ||
54 | |||
55 | |||
56 | # The dev package has the .so link (as in db3) and the .a's - | ||
57 | # it is therefore incompatible (cannot be installed at the | ||
58 | # same time) as the db3 package | ||
59 | # sort out the .so since they do version prior to the .so | ||
60 | SOLIBS = "-5*.so" | ||
61 | FILES_SOLIBSDEV = "${libdir}/libdb.so ${libdir}/libdb_cxx.so" | ||
62 | |||
63 | #configuration - set in local.conf to override | ||
64 | # All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix) | ||
65 | DB5_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-verify --disable-compat185 --disable-sql" | ||
66 | |||
67 | EXTRA_OECONF = "${DB5_CONFIG} --enable-shared --enable-cxx --with-sysroot" | ||
68 | |||
69 | # Override the MUTEX setting here, the POSIX library is | ||
70 | # the default - "POSIX/pthreads/library". | ||
71 | # Don't ignore the nice SWP instruction on the ARM: | ||
72 | # These enable the ARM assembler mutex code, this won't | ||
73 | # work with thumb compilation... | ||
74 | ARM_MUTEX = "--with-mutex=ARM/gcc-assembly" | ||
75 | MUTEX = "" | ||
76 | MUTEX_arm = "${ARM_MUTEX}" | ||
77 | MUTEX_armeb = "${ARM_MUTEX}" | ||
78 | EXTRA_OECONF += "${MUTEX}" | ||
79 | |||
80 | # Cancel the site stuff - it's set for db3 and destroys the | ||
81 | # configure. | ||
82 | CONFIG_SITE = "" | ||
83 | do_configure() { | ||
84 | gnu-configize --force ${S} | ||
85 | export STRIP="true" | ||
86 | oe_runconf | ||
87 | } | ||
88 | |||
89 | do_compile_prepend() { | ||
90 | sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' \ | ||
91 | ${B}/libtool | ||
92 | } | ||
93 | |||
94 | do_install_append() { | ||
95 | mkdir -p ${D}/${includedir}/db51 | ||
96 | mv ${D}/${includedir}/db.h ${D}/${includedir}/db51/. | ||
97 | mv ${D}/${includedir}/db_cxx.h ${D}/${includedir}/db51/. | ||
98 | ln -s db51/db.h ${D}/${includedir}/db.h | ||
99 | ln -s db51/db_cxx.h ${D}/${includedir}/db_cxx.h | ||
100 | |||
101 | # The docs end up in /usr/docs - not right. | ||
102 | if test -d "${D}/${prefix}/docs" | ||
103 | then | ||
104 | mkdir -p "${D}/${datadir}" | ||
105 | test ! -d "${D}/${docdir}" || rm -rf "${D}/${docdir}" | ||
106 | mv "${D}/${prefix}/docs" "${D}/${docdir}" | ||
107 | fi | ||
108 | |||
109 | chown -R root:root ${D} | ||
110 | } | ||
111 | |||
112 | INSANE_SKIP_${PN} = "dev-so" | ||
113 | INSANE_SKIP_${PN}-cxx = "dev-so" | ||
114 | |||
115 | BBCLASSEXTEND = "native nativesdk" | ||
116 | |||
diff --git a/meta/recipes-support/db/db_6.0.30.bb b/meta/recipes-support/db/db_6.0.30.bb new file mode 100644 index 0000000000..47fb296daa --- /dev/null +++ b/meta/recipes-support/db/db_6.0.30.bb | |||
@@ -0,0 +1,115 @@ | |||
1 | # Version 6 of the Berkeley DB from Oracle (formerly 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 DB6 can both be installed on the | ||
10 | # same system at the same time if really necessary. | ||
11 | SECTION = "libs" | ||
12 | SUMMARY = "Berkeley Database v6" | ||
13 | HOMEPAGE = "http://www.oracle.com/technology/products/berkeley-db/db/index.html" | ||
14 | LICENSE = "AGPL-3.0" | ||
15 | VIRTUAL_NAME ?= "virtual/db" | ||
16 | RCONFLICTS_${PN} = "db3" | ||
17 | |||
18 | SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz" | ||
19 | SRC_URI += "file://arm-thumb-mutex_db5.patch;patchdir=.. \ | ||
20 | file://fix-parallel-build.patch \ | ||
21 | " | ||
22 | |||
23 | SRC_URI[md5sum] = "ad28eb86ad3203b5422844db179c585b" | ||
24 | SRC_URI[sha256sum] = "608e4b1cf390e9bf54c0ef00c5bd9ca76d36e2261b9f4d33d54516f3f6a20fd2" | ||
25 | |||
26 | LIC_FILES_CHKSUM = "file://../LICENSE;md5=1ec8b0b17cc31513fe35ab10716f8490" | ||
27 | |||
28 | inherit 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 | ||
37 | PROVIDES += "${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 | ||
43 | S = "${WORKDIR}/db-${PV}/dist" | ||
44 | B = "${WORKDIR}/db-${PV}/build_unix" | ||
45 | SPDX_S = "${WORKDIR}/db-${PV}" | ||
46 | |||
47 | # The executables go in a separate package - typically there | ||
48 | # is no need to install these unless doing real database | ||
49 | # management on the system. | ||
50 | inherit lib_package | ||
51 | |||
52 | PACKAGES =+ "${PN}-cxx" | ||
53 | FILES_${PN}-cxx = "${libdir}/*cxx*so" | ||
54 | |||
55 | |||
56 | # The dev package has the .so link (as in db3) and the .a's - | ||
57 | # it is therefore incompatible (cannot be installed at the | ||
58 | # same time) as the db3 package | ||
59 | # sort out the .so since they do version prior to the .so | ||
60 | SOLIBS = "-6*.so" | ||
61 | FILES_SOLIBSDEV = "${libdir}/libdb.so ${libdir}/libdb_cxx.so" | ||
62 | |||
63 | #configuration - set in local.conf to override | ||
64 | # All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix) | ||
65 | DB6_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-verify --disable-compat185 --disable-sql" | ||
66 | |||
67 | EXTRA_OECONF = "${DB6_CONFIG} --enable-shared --enable-cxx --with-sysroot" | ||
68 | |||
69 | # Override the MUTEX setting here, the POSIX library is | ||
70 | # the default - "POSIX/pthreads/library". | ||
71 | # Don't ignore the nice SWP instruction on the ARM: | ||
72 | # These enable the ARM assembler mutex code | ||
73 | ARM_MUTEX = "--with-mutex=ARM/gcc-assembly" | ||
74 | MUTEX = "" | ||
75 | MUTEX_arm = "${ARM_MUTEX}" | ||
76 | MUTEX_armeb = "${ARM_MUTEX}" | ||
77 | EXTRA_OECONF += "${MUTEX}" | ||
78 | |||
79 | # Cancel the site stuff - it's set for db3 and destroys the | ||
80 | # configure. | ||
81 | CONFIG_SITE = "" | ||
82 | do_configure() { | ||
83 | gnu-configize --force ${S} | ||
84 | export STRIP="true" | ||
85 | oe_runconf | ||
86 | } | ||
87 | |||
88 | do_compile_prepend() { | ||
89 | sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' \ | ||
90 | ${B}/libtool | ||
91 | } | ||
92 | |||
93 | do_install_append() { | ||
94 | mkdir -p ${D}/${includedir}/db60 | ||
95 | mv ${D}/${includedir}/db.h ${D}/${includedir}/db60/. | ||
96 | mv ${D}/${includedir}/db_cxx.h ${D}/${includedir}/db60/. | ||
97 | ln -s db60/db.h ${D}/${includedir}/db.h | ||
98 | ln -s db60/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 | |||
111 | INSANE_SKIP_${PN} = "dev-so" | ||
112 | INSANE_SKIP_${PN}-cxx = "dev-so" | ||
113 | |||
114 | BBCLASSEXTEND = "native nativesdk" | ||
115 | |||