summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/xxhash
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2021-05-24 12:35:19 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-05-25 22:36:08 +0100
commitf003e6015f613b5786ab374853562282cbcd7958 (patch)
treebee809cb270c221130f199385891ebee1b1cd7e4 /meta/recipes-support/xxhash
parentf3ea5898cb915eaea7d8a32e30eb504820c71917 (diff)
downloadpoky-f003e6015f613b5786ab374853562282cbcd7958.tar.gz
xxhash: backport patch to fix special char problem
When building nativesdk-xxhash, we get error like below. Makefile:422: *** configured libdir (/opt/poky/3.3+snapshot/sysroots/x86_64-pokysdk-linux/usr/lib) is outside of exec_prefix (/opt/poky/3.3+snapshot/sysroots/x86_64-pokysdk-linux/usr), can't generate pkg-config file. Stop. This is because we have '+' in the path. Backport a patch to fix this problem. (From OE-Core rev: 0f328cd36fe10e0d1d865ada45ca4f118007956c) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/xxhash')
-rw-r--r--meta/recipes-support/xxhash/files/0001-Makefile-escape-special-regex-characters-in-paths.patch55
-rw-r--r--meta/recipes-support/xxhash/xxhash_0.8.0.bb4
2 files changed, 58 insertions, 1 deletions
diff --git a/meta/recipes-support/xxhash/files/0001-Makefile-escape-special-regex-characters-in-paths.patch b/meta/recipes-support/xxhash/files/0001-Makefile-escape-special-regex-characters-in-paths.patch
new file mode 100644
index 0000000000..6d3da147f2
--- /dev/null
+++ b/meta/recipes-support/xxhash/files/0001-Makefile-escape-special-regex-characters-in-paths.patch
@@ -0,0 +1,55 @@
1From 9ab56f841b1986cd5cdff66cb5ef222794b9ed39 Mon Sep 17 00:00:00 2001
2From: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
3Date: Mon, 22 Feb 2021 14:07:58 -0500
4Subject: [PATCH] Makefile: escape special regex characters in paths
5
6Fixes a problem with certain valid install paths:
7
8make prefix=/tmp/a+b/
9Makefile:434: *** configured libdir (/tmp/a+b//lib) is outside of exec_prefix (/tmp/a+b/), can't generate pkg-config file. Stop.
10
11Upstream-Status: Backport [f79cd22a806993b4a62d8a4f1ba529a29a9d9ff5]
12
13Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
14---
15 Makefile | 12 ++++++++----
16 1 file changed, 8 insertions(+), 4 deletions(-)
17
18diff --git a/Makefile b/Makefile
19index ef24e94..baa1533 100644
20--- a/Makefile
21+++ b/Makefile
22@@ -411,14 +411,18 @@ INSTALL_PROGRAM ?= $(INSTALL)
23 INSTALL_DATA ?= $(INSTALL) -m 644
24
25
26-PCLIBDIR ?= $(shell echo "$(LIBDIR)" | $(SED) -n $(SED_ERE_OPT) -e "s@^$(EXEC_PREFIX)(/|$$)@@p")
27-PCINCDIR ?= $(shell echo "$(INCLUDEDIR)" | $(SED) -n $(SED_ERE_OPT) -e "s@^$(PREFIX)(/|$$)@@p")
28+# Escape special symbols by putting each character into its separate class
29+EXEC_PREFIX_REGEX ?= $(shell echo "$(EXEC_PREFIX)" | $(SED) $(SED_ERE_OPT) -e "s/([^^])/[\1]/g" -e "s/\\^/\\\\^/g")
30+PREFIX_REGEX ?= $(shell echo "$(PREFIX)" | $(SED) $(SED_ERE_OPT) -e "s/([^^])/[\1]/g" -e "s/\\^/\\\\^/g")
31+
32+PCLIBDIR ?= $(shell echo "$(LIBDIR)" | $(SED) -n $(SED_ERE_OPT) -e "s@^$(EXEC_PREFIX_REGEX)(/|$$)@@p")
33+PCINCDIR ?= $(shell echo "$(INCLUDEDIR)" | $(SED) -n $(SED_ERE_OPT) -e "s@^$(PREFIX_REGEX)(/|$$)@@p")
34 PCEXECDIR?= $(if $(filter $(PREFIX),$(EXEC_PREFIX)),$$\{prefix\},$(EXEC_PREFIX))
35
36 ifeq (,$(PCLIBDIR))
37 # Additional prefix check is required, since the empty string is technically a
38 # valid PCLIBDIR
39-ifeq (,$(shell echo "$(LIBDIR)" | $(SED) -n $(SED_ERE_OPT) -e "\\@^$(EXEC_PREFIX)(/|$$)@ p"))
40+ifeq (,$(shell echo "$(LIBDIR)" | $(SED) -n $(SED_ERE_OPT) -e "\\@^$(EXEC_PREFIX_REGEX)(/|$$)@ p"))
41 $(error configured libdir ($(LIBDIR)) is outside of exec_prefix ($(EXEC_PREFIX)), can't generate pkg-config file)
42 endif
43 endif
44@@ -426,7 +430,7 @@ endif
45 ifeq (,$(PCINCDIR))
46 # Additional prefix check is required, since the empty string is technically a
47 # valid PCINCDIR
48-ifeq (,$(shell echo "$(INCLUDEDIR)" | $(SED) -n $(SED_ERE_OPT) -e "\\@^$(PREFIX)(/|$$)@ p"))
49+ifeq (,$(shell echo "$(INCLUDEDIR)" | $(SED) -n $(SED_ERE_OPT) -e "\\@^$(PREFIX_REGEX)(/|$$)@ p"))
50 $(error configured includedir ($(INCLUDEDIR)) is outside of prefix ($(PREFIX)), can't generate pkg-config file)
51 endif
52 endif
53--
542.17.1
55
diff --git a/meta/recipes-support/xxhash/xxhash_0.8.0.bb b/meta/recipes-support/xxhash/xxhash_0.8.0.bb
index 9e38872361..4e48365a71 100644
--- a/meta/recipes-support/xxhash/xxhash_0.8.0.bb
+++ b/meta/recipes-support/xxhash/xxhash_0.8.0.bb
@@ -5,7 +5,9 @@ HOMEPAGE = "http://www.xxhash.com/"
5LICENSE = "BSD-2-Clause & GPL-2.0" 5LICENSE = "BSD-2-Clause & GPL-2.0"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=b335320506abb0505437e39295e799cb" 6LIC_FILES_CHKSUM = "file://LICENSE;md5=b335320506abb0505437e39295e799cb"
7 7
8SRC_URI = "git://github.com/Cyan4973/xxHash.git;branch=release;protocol=git" 8SRC_URI = "git://github.com/Cyan4973/xxHash.git;branch=release;protocol=git \
9 file://0001-Makefile-escape-special-regex-characters-in-paths.patch \
10 "
9UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" 11UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
10 12
11SRCREV = "94e5f23e736f2bb67ebdf90727353e65344f9fc0" 13SRCREV = "94e5f23e736f2bb67ebdf90727353e65344f9fc0"