diff options
author | Ubuntu <ubuntu@ip-172-31-14-192.eu-central-1.compute.internal> | 2018-04-11 12:35:46 +0000 |
---|---|---|
committer | Ubuntu <ubuntu@ip-172-31-14-192.eu-central-1.compute.internal> | 2018-04-11 12:35:46 +0000 |
commit | 5048bf8d2b9ecd070c9ed4e584f274f8ab6cfbfa (patch) | |
tree | d9c4057eefd28db1748a6469d01d1cc78a34cf7a /recipes-support | |
download | meta-updater-5048bf8d2b9ecd070c9ed4e584f274f8ab6cfbfa.tar.gz |
Initial commit of Daisy aktualizr builddaisy
Diffstat (limited to 'recipes-support')
-rw-r--r-- | recipes-support/asn1c/asn1c.bb | 17 | ||||
-rw-r--r-- | recipes-support/asn1c/files/skeletons_dir_fix.patch | 44 | ||||
-rw-r--r-- | recipes-support/boost/bjam-native_1.57.0.bb | 15 | ||||
-rw-r--r-- | recipes-support/boost/boost-1.57.0.inc | 19 | ||||
-rw-r--r-- | recipes-support/boost/boost.inc | 184 | ||||
-rw-r--r-- | recipes-support/boost/boost/arm-intrinsics.patch | 55 | ||||
-rw-r--r-- | recipes-support/boost/boost_1.57.0.bb | 6 | ||||
-rw-r--r-- | recipes-support/libsodium/libsodium_1.0.11.bb | 12 |
8 files changed, 352 insertions, 0 deletions
diff --git a/recipes-support/asn1c/asn1c.bb b/recipes-support/asn1c/asn1c.bb new file mode 100644 index 0000000..9d1517d --- /dev/null +++ b/recipes-support/asn1c/asn1c.bb | |||
@@ -0,0 +1,17 @@ | |||
1 | SUMMARY = "ASN.1 to C compiler" | ||
2 | DESCRIPTION = "Generates serialization routines from ASN.1 schemas" | ||
3 | HOMEPAGE = "http://lionet.info/asn1c" | ||
4 | SECTION = "base" | ||
5 | LICENSE = "BSD" | ||
6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=ee8bfaaa7d71cf3edb079475e6716d4b" | ||
7 | |||
8 | inherit autotools native | ||
9 | |||
10 | PV = "0.9.28" | ||
11 | SRC_URI = "https://github.com/vlm/asn1c/releases/download/v${PV}/asn1c-${PV}.tar.gz \ | ||
12 | file://skeletons_dir_fix.patch" | ||
13 | SRC_URI[sha256sum] = "8007440b647ef2dd9fb73d931c33ac11764e6afb2437dbe638bb4e5fc82386b9" | ||
14 | |||
15 | BBCLASSEXTEND = "native nativesdk" | ||
16 | |||
17 | # vim:set ts=4 sw=4 sts=4 expandtab: | ||
diff --git a/recipes-support/asn1c/files/skeletons_dir_fix.patch b/recipes-support/asn1c/files/skeletons_dir_fix.patch new file mode 100644 index 0000000..f1caa2f --- /dev/null +++ b/recipes-support/asn1c/files/skeletons_dir_fix.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From 1a1c2c94f700cf0f4dc5dba863950b16477fdc6d Mon Sep 17 00:00:00 2001 | ||
2 | From: Laurent Bonnans <laurent.bonnans@here.com> | ||
3 | Date: Thu, 25 Jan 2018 09:49:41 +0100 | ||
4 | Subject: [PATCH] Patch the skeletons directory detection | ||
5 | |||
6 | Detect `share/asn1c` from `bin/` if it exists | ||
7 | --- | ||
8 | asn1c/asn1c.c | 9 ++++----- | ||
9 | 1 file changed, 4 insertions(+), 5 deletions(-) | ||
10 | |||
11 | diff --git a/asn1c/asn1c.c b/asn1c/asn1c.c | ||
12 | index eb1eff7c..dd9fc832 100644 | ||
13 | --- a/asn1c/asn1c.c | ||
14 | +++ b/asn1c/asn1c.c | ||
15 | @@ -226,22 +226,21 @@ main(int ac, char **av) { | ||
16 | if(skeletons_dir == NULL) { | ||
17 | struct stat sb; | ||
18 | skeletons_dir = DATADIR; | ||
19 | - if((av[-optind][0] == '.' || av[-optind][1] == '/') | ||
20 | - && stat(skeletons_dir, &sb)) { | ||
21 | + if(stat(skeletons_dir, &sb)) { | ||
22 | /* | ||
23 | * The default skeletons directory does not exist, | ||
24 | * compute it from my file name: | ||
25 | - * ./asn1c/asn1c -> ./skeletons | ||
26 | + * ./asn1c/asn1c -> ./share/asn1c | ||
27 | */ | ||
28 | char *p; | ||
29 | size_t len; | ||
30 | |||
31 | p = a1c_dirname(av[-optind]); | ||
32 | |||
33 | - len = strlen(p) + sizeof("/../skeletons"); | ||
34 | + len = strlen(p) + sizeof("/../share/asn1c"); | ||
35 | skeletons_dir = malloc(len); | ||
36 | assert(skeletons_dir); | ||
37 | - snprintf(skeletons_dir, len, "%s/../skeletons", p); | ||
38 | + snprintf(skeletons_dir, len, "%s/../share/asn1c", p); | ||
39 | if(stat(skeletons_dir, &sb)) { | ||
40 | fprintf(stderr, | ||
41 | "WARNING: skeletons are neither in " | ||
42 | -- | ||
43 | 2.15.1 | ||
44 | |||
diff --git a/recipes-support/boost/bjam-native_1.57.0.bb b/recipes-support/boost/bjam-native_1.57.0.bb new file mode 100644 index 0000000..d85d1a9 --- /dev/null +++ b/recipes-support/boost/bjam-native_1.57.0.bb | |||
@@ -0,0 +1,15 @@ | |||
1 | include boost-${PV}.inc | ||
2 | |||
3 | SUMMARY = "Portable Boost.Jam build tool for boost" | ||
4 | SECTION = "devel" | ||
5 | |||
6 | inherit native | ||
7 | |||
8 | do_compile() { | ||
9 | ./bootstrap.sh --with-toolset=gcc | ||
10 | } | ||
11 | |||
12 | do_install() { | ||
13 | install -d ${D}${bindir}/ | ||
14 | install -c -m 755 bjam ${D}${bindir}/ | ||
15 | } | ||
diff --git a/recipes-support/boost/boost-1.57.0.inc b/recipes-support/boost/boost-1.57.0.inc new file mode 100644 index 0000000..809419d --- /dev/null +++ b/recipes-support/boost/boost-1.57.0.inc | |||
@@ -0,0 +1,19 @@ | |||
1 | # The Boost web site provides free peer-reviewed portable | ||
2 | # C++ source libraries. The emphasis is on libraries which | ||
3 | # work well with the C++ Standard Library. The libraries are | ||
4 | # intended to be widely useful, and are in regular use by | ||
5 | # thousands of programmers across a broad spectrum of applications. | ||
6 | HOMEPAGE = "http://www.boost.org/" | ||
7 | LICENSE = "BSL-1.0 & MIT & Python-2.0" | ||
8 | LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c" | ||
9 | |||
10 | BOOST_VER = "${@"_".join(d.getVar("PV",1).split("."))}" | ||
11 | BOOST_MAJ = "${@"_".join(d.getVar("PV",1).split(".")[0:2])}" | ||
12 | BOOST_P = "boost_${BOOST_VER}" | ||
13 | |||
14 | SRC_URI = "${SOURCEFORGE_MIRROR}/boost/${BOOST_P}.tar.bz2" | ||
15 | |||
16 | SRC_URI[md5sum] = "1be49befbdd9a5ce9def2983ba3e7b76" | ||
17 | SRC_URI[sha256sum] = "910c8c022a33ccec7f088bd65d4f14b466588dda94ba2124e78b8c57db264967" | ||
18 | |||
19 | S = "${WORKDIR}/${BOOST_P}" | ||
diff --git a/recipes-support/boost/boost.inc b/recipes-support/boost/boost.inc new file mode 100644 index 0000000..bc2dc8c --- /dev/null +++ b/recipes-support/boost/boost.inc | |||
@@ -0,0 +1,184 @@ | |||
1 | SUMMARY = "Free peer-reviewed portable C++ source libraries" | ||
2 | SECTION = "libs" | ||
3 | DEPENDS = "bjam-native zlib bzip2" | ||
4 | |||
5 | ARM_INSTRUCTION_SET = "arm" | ||
6 | |||
7 | BOOST_LIBS = "\ | ||
8 | atomic \ | ||
9 | chrono \ | ||
10 | date_time \ | ||
11 | filesystem \ | ||
12 | graph \ | ||
13 | iostreams \ | ||
14 | log \ | ||
15 | program_options \ | ||
16 | random \ | ||
17 | regex \ | ||
18 | serialization \ | ||
19 | signals \ | ||
20 | system \ | ||
21 | test \ | ||
22 | thread \ | ||
23 | " | ||
24 | |||
25 | # optional boost-python library | ||
26 | PACKAGECONFIG ??= "" | ||
27 | PACKAGECONFIG[python] = ",,python" | ||
28 | BOOST_LIBS += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', '', d)}" | ||
29 | inherit python-dir | ||
30 | PYTHON_ROOT = "${STAGING_DIR_HOST}/${prefix}" | ||
31 | |||
32 | # Make a package for each library, plus -dev | ||
33 | PACKAGES = "${PN}-dbg ${BOOST_PACKAGES}" | ||
34 | python __anonymous () { | ||
35 | packages = [] | ||
36 | extras = [] | ||
37 | for lib in d.getVar('BOOST_LIBS', True).split( ): | ||
38 | pkg = "boost-%s" % lib.replace("_", "-") | ||
39 | extras.append("--with-%s" % lib) | ||
40 | packages.append(pkg) | ||
41 | if not d.getVar("FILES_%s" % pkg, True): | ||
42 | d.setVar("FILES_%s" % pkg, "${libdir}/libboost_%s*.so.*" % lib) | ||
43 | d.setVar("BOOST_PACKAGES", " ".join(packages)) | ||
44 | d.setVar("BJAM_EXTRA", " ".join(extras)) | ||
45 | } | ||
46 | |||
47 | # Override the contents of specific packages | ||
48 | FILES_boost-serialization = "${libdir}/libboost_serialization*.so.* \ | ||
49 | ${libdir}/libboost_wserialization*.so.*" | ||
50 | FILES_boost-test = "${libdir}/libboost_prg_exec_monitor*.so.* \ | ||
51 | ${libdir}/libboost_unit_test_framework*.so.*" | ||
52 | |||
53 | # -dev last to pick up the remaining stuff | ||
54 | PACKAGES += "${PN}-dev ${PN}-staticdev" | ||
55 | FILES_${PN}-dev = "${includedir} ${libdir}/libboost_*.so" | ||
56 | FILES_${PN}-staticdev = "${libdir}/libboost_*.a" | ||
57 | |||
58 | # "boost" is a metapackage which pulls in all boost librabries | ||
59 | PACKAGES += "${PN}" | ||
60 | RRECOMMENDS_${PN} += "${BOOST_PACKAGES}" | ||
61 | RRECOMMENDS_${PN}_class-native = "" | ||
62 | ALLOW_EMPTY_${PN} = "1" | ||
63 | |||
64 | # to avoid GNU_HASH QA errors added LDFLAGS to ARCH; a little bit dirty but at least it works | ||
65 | TARGET_CC_ARCH += "${LDFLAGS}" | ||
66 | |||
67 | # Oh yippee, a new build system, it's sooo cooool I could eat my own | ||
68 | # foot. inlining=on lets the compiler choose, I think. At least this | ||
69 | # stuff is documented... | ||
70 | # NOTE: if you leave <debug-symbols>on then in a debug build the build sys | ||
71 | # objcopy will be invoked, and that won't work. Building debug apparently | ||
72 | # requires hacking gcc-tools.jam | ||
73 | # | ||
74 | # Sometimes I wake up screaming. Famous figures are gathered in the nightmare, | ||
75 | # Steve Bourne, Larry Wall, the whole of the ANSI C committee. They're just | ||
76 | # standing there, waiting, but the truely terrifying thing is what they carry | ||
77 | # in their hands. At first sight each seems to bear the same thing, but it is | ||
78 | # not so for the forms in their grasp are ever so slightly different one from | ||
79 | # the other. Each is twisted in some grotesque way from the other to make each | ||
80 | # an unspeakable perversion impossible to perceive without the onset of madness. | ||
81 | # True insanity awaits anyone who perceives all of these horrors together. | ||
82 | # | ||
83 | # Quotation marks, there might be an easier way to do this, but I can't find | ||
84 | # it. The problem is that the user.hpp configuration file must receive a | ||
85 | # pre-processor macro defined as the appropriate string - complete with "'s | ||
86 | # around it. (<> is a possibility here but the danger to that is that the | ||
87 | # failure case interprets the < and > as shell redirections, creating | ||
88 | # random files in the source tree.) | ||
89 | # | ||
90 | #bjam: '-DBOOST_PLATFORM_CONFIG=\"config\"' | ||
91 | #do_compile: '-sGCC=... '"'-DBOOST_PLATFORM_CONFIG=\"config\"'" | ||
92 | SQD = '"' | ||
93 | EQD = '\"' | ||
94 | #boost.bb: "... '-sGCC=... '${SQD}'-DBOOST_PLATFORM_CONFIG=${EQD}config${EQD}'${SQD} ..." | ||
95 | BJAM_CONF = "${SQD}'-DBOOST_PLATFORM_CONFIG=${EQD}boost/config/platform/${TARGET_OS}.hpp${EQD}'${SQD}" | ||
96 | |||
97 | BJAM_TOOLS = "--ignore-site-config \ | ||
98 | '-sTOOLS=gcc' \ | ||
99 | '-sGCC=${CC} '${BJAM_CONF} \ | ||
100 | '-sGXX=${CXX} '${BJAM_CONF} \ | ||
101 | '-sGCC_INCLUDE_DIRECTORY=${STAGING_INCDIR}' \ | ||
102 | '-sGCC_STDLIB_DIRECTORY=${STAGING_LIBDIR}' \ | ||
103 | '-sBUILD=release <optimization>space <threading>multi <inlining>on <debug-symbols>off' \ | ||
104 | '-sPYTHON_VERSION=${PYTHON_BASEVERSION}' \ | ||
105 | '-sPYTHON_ROOT=${PYTHON_ROOT}' \ | ||
106 | '--layout=system' \ | ||
107 | " | ||
108 | |||
109 | # use PARALLEL_MAKE to speed up the build, but limit it by -j 64, greater paralelism causes bjam to segfault or to ignore -j | ||
110 | # https://svn.boost.org/trac/boost/ticket/7634 | ||
111 | def get_boost_parallel_make(bb, d): | ||
112 | pm = d.getVar('PARALLEL_MAKE', True) | ||
113 | if pm: | ||
114 | # look for '-j' and throw other options (e.g. '-l') away | ||
115 | # because they might have different meaning in bjam | ||
116 | pm = pm.split() | ||
117 | while pm: | ||
118 | v = None | ||
119 | opt = pm.pop(0) | ||
120 | if opt == '-j': | ||
121 | v = pm.pop(0) | ||
122 | elif opt.startswith('-j'): | ||
123 | v = opt[2:].strip() | ||
124 | else: | ||
125 | v = None | ||
126 | |||
127 | if v: | ||
128 | v = min(64, int(v)) | ||
129 | return '-j' + str(v) | ||
130 | |||
131 | return "" | ||
132 | |||
133 | BOOST_PARALLEL_MAKE = "${@get_boost_parallel_make(bb, d)}" | ||
134 | BJAM_OPTS = '${BOOST_PARALLEL_MAKE} \ | ||
135 | ${BJAM_TOOLS} \ | ||
136 | -sBOOST_BUILD_USER_CONFIG=${S}/tools/build/example/user-config.jam \ | ||
137 | --builddir=${S}/${TARGET_SYS} \ | ||
138 | --disable-icu \ | ||
139 | ${BJAM_EXTRA}' | ||
140 | |||
141 | # Native compilation of bzip2 isn't working | ||
142 | BJAM_OPTS_append_class-native = ' -sNO_BZIP2=1' | ||
143 | |||
144 | do_boostconfig() { | ||
145 | cp -f boost/config/platform/linux.hpp boost/config/platform/linux-gnueabi.hpp | ||
146 | |||
147 | # D2194:Fixing the failure of "error: duplicate initialization of gcc with the following parameters" during compilation. | ||
148 | sed -i "/^using gcc : 4.3.1/d" ${S}/tools/build/example/user-config.jam | ||
149 | sed -i "/^using python : ${PYTHON_BASEVERSION}"/d ${S}/tools/build/example/user-config.jam | ||
150 | echo 'using gcc : 4.3.1 : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;' >> ${S}/tools/build/example/user-config.jam | ||
151 | echo "using python : ${PYTHON_BASEVERSION} : : ${STAGING_INCDIR}/python${PYTHON_BASEVERSION} ;" >> ${S}/tools/build/example/user-config.jam | ||
152 | |||
153 | CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" ./bootstrap.sh --with-bjam=bjam --with-toolset=gcc --with-python-root=${PYTHON_ROOT} | ||
154 | sed -i '/^using python/d' project-config.jam | ||
155 | } | ||
156 | |||
157 | addtask do_boostconfig after do_patch before do_configure | ||
158 | |||
159 | do_compile() { | ||
160 | set -ex | ||
161 | bjam ${BJAM_OPTS} --prefix=${prefix} \ | ||
162 | --exec-prefix=${exec_prefix} \ | ||
163 | --libdir=${libdir} \ | ||
164 | --includedir=${includedir} | ||
165 | } | ||
166 | |||
167 | do_install() { | ||
168 | set -ex | ||
169 | bjam ${BJAM_OPTS} \ | ||
170 | --libdir=${D}${libdir} \ | ||
171 | --includedir=${D}${includedir} \ | ||
172 | install | ||
173 | for lib in ${BOOST_LIBS}; do | ||
174 | if [ -e ${D}${libdir}/libboost_${lib}.a ]; then | ||
175 | ln -s libboost_${lib}.a ${D}${libdir}/libboost_${lib}-mt.a | ||
176 | fi | ||
177 | if [ -e ${D}${libdir}/libboost_${lib}.so ]; then | ||
178 | ln -s libboost_${lib}.so ${D}${libdir}/libboost_${lib}-mt.so | ||
179 | fi | ||
180 | done | ||
181 | |||
182 | } | ||
183 | |||
184 | BBCLASSEXTEND = "native" | ||
diff --git a/recipes-support/boost/boost/arm-intrinsics.patch b/recipes-support/boost/boost/arm-intrinsics.patch new file mode 100644 index 0000000..fe85c69 --- /dev/null +++ b/recipes-support/boost/boost/arm-intrinsics.patch | |||
@@ -0,0 +1,55 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | 8/17/2010 - rebased to 1.44 by Qing He <qing.he@intel.com> | ||
4 | |||
5 | diff --git a/boost/smart_ptr/detail/atomic_count_sync.hpp b/boost/smart_ptr/detail/atomic_count_sync.hpp | ||
6 | index b6359b5..78b1cc2 100644 | ||
7 | --- a/boost/smart_ptr/detail/atomic_count_sync.hpp | ||
8 | +++ b/boost/smart_ptr/detail/atomic_count_sync.hpp | ||
9 | @@ -33,17 +33,46 @@ public: | ||
10 | |||
11 | long operator++() | ||
12 | { | ||
13 | +#ifdef __ARM_ARCH_7A__ | ||
14 | + int v1, tmp; | ||
15 | + asm volatile ("1: \n\t" | ||
16 | + "ldrex %0, %1 \n\t" | ||
17 | + "add %0 ,%0, #1 \n\t" | ||
18 | + "strex %2, %0, %1 \n\t" | ||
19 | + "cmp %2, #0 \n\t" | ||
20 | + "bne 1b \n\t" | ||
21 | + : "=&r" (v1), "+Q"(value_), "=&r"(tmp) | ||
22 | + ); | ||
23 | +#else | ||
24 | return __sync_add_and_fetch( &value_, 1 ); | ||
25 | +#endif | ||
26 | } | ||
27 | |||
28 | long operator--() | ||
29 | { | ||
30 | +#ifdef __ARM_ARCH_7A__ | ||
31 | + int v1, tmp; | ||
32 | + asm volatile ("1: \n\t" | ||
33 | + "ldrex %0, %1 \n\t" | ||
34 | + "sub %0 ,%0, #1 \n\t" | ||
35 | + "strex %2, %0, %1 \n\t" | ||
36 | + "cmp %2, #0 \n\t" | ||
37 | + "bne 1b \n\t" | ||
38 | + : "=&r" (v1), "+Q"(value_), "=&r"(tmp) | ||
39 | + ); | ||
40 | + return value_; | ||
41 | +#else | ||
42 | return __sync_add_and_fetch( &value_, -1 ); | ||
43 | +#endif | ||
44 | } | ||
45 | |||
46 | operator long() const | ||
47 | { | ||
48 | +#if __ARM_ARCH_7A__ | ||
49 | + return value_; | ||
50 | +#else | ||
51 | return __sync_fetch_and_add( &value_, 0 ); | ||
52 | +#endif | ||
53 | } | ||
54 | |||
55 | private: | ||
diff --git a/recipes-support/boost/boost_1.57.0.bb b/recipes-support/boost/boost_1.57.0.bb new file mode 100644 index 0000000..c09d5f4 --- /dev/null +++ b/recipes-support/boost/boost_1.57.0.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | include boost-${PV}.inc | ||
2 | include boost.inc | ||
3 | |||
4 | SRC_URI += "\ | ||
5 | file://arm-intrinsics.patch \ | ||
6 | " | ||
diff --git a/recipes-support/libsodium/libsodium_1.0.11.bb b/recipes-support/libsodium/libsodium_1.0.11.bb new file mode 100644 index 0000000..cbcbe96 --- /dev/null +++ b/recipes-support/libsodium/libsodium_1.0.11.bb | |||
@@ -0,0 +1,12 @@ | |||
1 | SUMMARY = "The Sodium crypto library" | ||
2 | HOMEPAGE = "http://libsodium.org/" | ||
3 | LICENSE = "ISC" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=c9f00492f01f5610253fde01c3d2e866" | ||
5 | |||
6 | SRC_URI = "https://download.libsodium.org/libsodium/releases/${BPN}-${PV}.tar.gz" | ||
7 | SRC_URI[md5sum] = "b58928d035064b2a46fb564937b83540" | ||
8 | SRC_URI[sha256sum] = "a14549db3c49f6ae2170cbbf4664bd48ace50681045e8dbea7c8d9fb96f9c765" | ||
9 | |||
10 | inherit autotools | ||
11 | |||
12 | BBCLASSEXTEND = "native nativesdk" | ||