diff options
Diffstat (limited to 'recipes-sota/asn1c')
-rw-r--r-- | recipes-sota/asn1c/asn1c.bb | 3 | ||||
-rw-r--r-- | recipes-sota/asn1c/files/skeletons_dir_fix.patch | 44 |
2 files changed, 46 insertions, 1 deletions
diff --git a/recipes-sota/asn1c/asn1c.bb b/recipes-sota/asn1c/asn1c.bb index 7539825..9d1517d 100644 --- a/recipes-sota/asn1c/asn1c.bb +++ b/recipes-sota/asn1c/asn1c.bb | |||
@@ -8,7 +8,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=ee8bfaaa7d71cf3edb079475e6716d4b" | |||
8 | inherit autotools native | 8 | inherit autotools native |
9 | 9 | ||
10 | PV = "0.9.28" | 10 | PV = "0.9.28" |
11 | SRC_URI = "https://github.com/vlm/asn1c/releases/download/v${PV}/asn1c-${PV}.tar.gz" | 11 | SRC_URI = "https://github.com/vlm/asn1c/releases/download/v${PV}/asn1c-${PV}.tar.gz \ |
12 | file://skeletons_dir_fix.patch" | ||
12 | SRC_URI[sha256sum] = "8007440b647ef2dd9fb73d931c33ac11764e6afb2437dbe638bb4e5fc82386b9" | 13 | SRC_URI[sha256sum] = "8007440b647ef2dd9fb73d931c33ac11764e6afb2437dbe638bb4e5fc82386b9" |
13 | 14 | ||
14 | BBCLASSEXTEND = "native nativesdk" | 15 | BBCLASSEXTEND = "native nativesdk" |
diff --git a/recipes-sota/asn1c/files/skeletons_dir_fix.patch b/recipes-sota/asn1c/files/skeletons_dir_fix.patch new file mode 100644 index 0000000..f1caa2f --- /dev/null +++ b/recipes-sota/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 | |||