diff options
Diffstat (limited to 'meta/recipes-support/sass/libsass/0001-Remove-version.h-from-source-directory.patch')
-rw-r--r-- | meta/recipes-support/sass/libsass/0001-Remove-version.h-from-source-directory.patch | 87 |
1 files changed, 87 insertions, 0 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 @@ | |||
1 | From e5af3bbc9ea6e56e3d4e5cabcb5ac57b521fa6c0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
3 | Date: Thu, 24 Apr 2025 22:47:52 +0800 | ||
4 | Subject: [PATCH] Remove version.h from source directory | ||
5 | |||
6 | The version.h should be generated from version.h.in. If the build | ||
7 | directory is out of the source directory, the version.h is generated in | ||
8 | build directory and the original version.h in source directory is not | ||
9 | overwritten. However, the latter is used during the build, resulting in | ||
10 | a missing runtime version: | ||
11 | |||
12 | $ sassc --version | ||
13 | sassc: [NA] | ||
14 | libsass: [NA] | ||
15 | sass2scss: 1.1.1 | ||
16 | sass: 3.5 | ||
17 | |||
18 | Remove version.h from source directory to ensure that the version.h in | ||
19 | build directory is used during the build. | ||
20 | |||
21 | Also remove '--dirty' option from 'git describe' command line in | ||
22 | version.sh to get rid of '-dirty' suffix from version number that | ||
23 | was introduced with this change. | ||
24 | |||
25 | Upstream-Status: Submitted [https://github.com/sass/libsass/pull/3196] | ||
26 | |||
27 | Signed-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 | |||
35 | diff --git a/include/sass/version.h b/include/sass/version.h | ||
36 | deleted file mode 100644 | ||
37 | index 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 | ||
53 | diff --git a/src/GNUmakefile.am b/src/GNUmakefile.am | ||
54 | index 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 | ||
74 | diff --git a/version.sh b/version.sh | ||
75 | index 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 | -- | ||
86 | 2.34.1 | ||
87 | |||