summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2025-04-25 15:37:56 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-05-08 10:28:18 +0100
commit5e75b1b4285b796c2a799260cb879cc7e4cde898 (patch)
treebde9f7fc5abc6ce9a977b0b60687fec2d2e9d803 /meta/recipes-support
parentc8e4047fa2c17b746754507d1cfcbaf634f231e8 (diff)
downloadpoky-5e75b1b4285b796c2a799260cb879cc7e4cde898.tar.gz
libsass: fix runtime version
The version.h should be generated from version.h.in. But there is already a version.h file in source directory. When ${S} != ${B}, the version.h is generated in build directory, and the original version.h in source directory is not overwritten. However, the latter is used during the build, resulting in a missing runtime version. Remove version.h from source directory to ensure that the one in build directory is used during the build. Before the fix: $ sassc --version sassc: [NA] libsass: [NA] sass2scss: 1.1.1 sass: 3.5 After the fix: $ sassc --version sassc: 3.6.2 libsass: 3.6.6 sass2scss: 1.1.1 sass: 3.5 (From OE-Core rev: 88fc48d65dfc61b6a89018c3348b369aa450a8c0) Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support')
-rw-r--r--meta/recipes-support/sass/libsass/0001-Remove-version.h-from-source-directory.patch87
-rw-r--r--meta/recipes-support/sass/libsass_git.bb4
2 files changed, 90 insertions, 1 deletions
diff --git a/meta/recipes-support/sass/libsass/0001-Remove-version.h-from-source-directory.patch b/meta/recipes-support/sass/libsass/0001-Remove-version.h-from-source-directory.patch
new file mode 100644
index 0000000000..d1356dc83a
--- /dev/null
+++ b/meta/recipes-support/sass/libsass/0001-Remove-version.h-from-source-directory.patch
@@ -0,0 +1,87 @@
1From e5af3bbc9ea6e56e3d4e5cabcb5ac57b521fa6c0 Mon Sep 17 00:00:00 2001
2From: Yi Zhao <yi.zhao@windriver.com>
3Date: Thu, 24 Apr 2025 22:47:52 +0800
4Subject: [PATCH] Remove version.h from source directory
5
6The version.h should be generated from version.h.in. If the build
7directory is out of the source directory, the version.h is generated in
8build directory and the original version.h in source directory is not
9overwritten. However, the latter is used during the build, resulting in
10a missing runtime version:
11
12$ sassc --version
13sassc: [NA]
14libsass: [NA]
15sass2scss: 1.1.1
16sass: 3.5
17
18Remove version.h from source directory to ensure that the version.h in
19build directory is used during the build.
20
21Also remove '--dirty' option from 'git describe' command line in
22version.sh to get rid of '-dirty' suffix from version number that
23was introduced with this change.
24
25Upstream-Status: Submitted [https://github.com/sass/libsass/pull/3196]
26
27Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
28---
29 include/sass/version.h | 12 ------------
30 src/GNUmakefile.am | 4 ++--
31 version.sh | 2 +-
32 3 files changed, 3 insertions(+), 15 deletions(-)
33 delete mode 100644 include/sass/version.h
34
35diff --git a/include/sass/version.h b/include/sass/version.h
36deleted file mode 100644
37index 56ea016a..00000000
38--- a/include/sass/version.h
39+++ /dev/null
40@@ -1,12 +0,0 @@
41-#ifndef SASS_VERSION_H
42-#define SASS_VERSION_H
43-
44-#ifndef LIBSASS_VERSION
45-#define LIBSASS_VERSION "[NA]"
46-#endif
47-
48-#ifndef LIBSASS_LANGUAGE_VERSION
49-#define LIBSASS_LANGUAGE_VERSION "3.5"
50-#endif
51-
52-#endif
53diff --git a/src/GNUmakefile.am b/src/GNUmakefile.am
54index 9b0e6a99..e955f0b4 100644
55--- a/src/GNUmakefile.am
56+++ b/src/GNUmakefile.am
57@@ -8,7 +8,7 @@ if ENABLE_COVERAGE
58 AM_COVLDFLAGS += -lgcov
59 endif
60
61-AM_CPPFLAGS = -I$(top_srcdir)/include
62+AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
63 AM_CFLAGS = $(AM_COPT)
64 AM_CXXFLAGS = $(AM_COPT)
65 AM_LDFLAGS = $(AM_COPT) $(AM_COVLDFLAGS)
66@@ -45,6 +45,6 @@ sass_includedir = $(includedir)/sass
67
68 sass_include_HEADERS = $(top_srcdir)/include/sass/base.h \
69 $(top_srcdir)/include/sass/values.h \
70- $(top_srcdir)/include/sass/version.h \
71+ $(top_builddir)/include/sass/version.h \
72 $(top_srcdir)/include/sass/context.h \
73 $(top_srcdir)/include/sass/functions.h
74diff --git a/version.sh b/version.sh
75index 281de74d..7bc57230 100755
76--- a/version.sh
77+++ b/version.sh
78@@ -1,5 +1,5 @@
79 if test "x$LIBSASS_VERSION" = "x"; then
80- LIBSASS_VERSION=`git describe --abbrev=4 --dirty --always --tags 2>/dev/null`
81+ LIBSASS_VERSION=`git describe --abbrev=4 --always --tags 2>/dev/null`
82 fi
83 if test "x$LIBSASS_VERSION" = "x"; then
84 LIBSASS_VERSION=`cat VERSION 2>/dev/null`
85--
862.34.1
87
diff --git a/meta/recipes-support/sass/libsass_git.bb b/meta/recipes-support/sass/libsass_git.bb
index f0824944b9..890cbf8e63 100644
--- a/meta/recipes-support/sass/libsass_git.bb
+++ b/meta/recipes-support/sass/libsass_git.bb
@@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=8f34396ca205f5e119ee77aae91fa27d"
5 5
6inherit autotools 6inherit autotools
7 7
8SRC_URI = "git://github.com/sass/libsass.git;branch=master;protocol=https" 8SRC_URI = "git://github.com/sass/libsass.git;branch=master;protocol=https \
9 file://0001-Remove-version.h-from-source-directory.patch"
10
9SRCREV = "7037f03fabeb2b18b5efa84403f5a6d7a990f460" 11SRCREV = "7037f03fabeb2b18b5efa84403f5a6d7a990f460"
10PV = "3.6.6" 12PV = "3.6.6"
11 13