commit:     b61461426061051c12558ac0b7ddf0e95094cc4c
Author:     Denis Pronin <dannftk <AT> yandex <DOT> ru>
AuthorDate: Mon Mar 25 11:15:30 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue May 28 01:57:50 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6146142

dev-db/sqlitebrowser: add patch to fix conflict that str macro brings in

sometimes expanding str() gives an error because it conflicts with str()
 method of, for example, std::ostringstream::str()

This patch is dedicated to fixing this circumstance

Closes https://bugs.gentoo.org/932577

Signed-off-by: Denis Pronin <dannftk <AT> yandex.ru>
Closes: https://github.com/gentoo/gentoo/pull/35909
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/sqlitebrowser-3.12.2-str-conflict-fix.patch       | 13 +++++++++++++
 dev-db/sqlitebrowser/sqlitebrowser-3.12.2-r2.ebuild         |  4 ++++
 2 files changed, 17 insertions(+)

diff --git 
a/dev-db/sqlitebrowser/files/sqlitebrowser-3.12.2-str-conflict-fix.patch 
b/dev-db/sqlitebrowser/files/sqlitebrowser-3.12.2-str-conflict-fix.patch
new file mode 100644
index 000000000000..07284ca8ba0c
--- /dev/null
+++ b/dev-db/sqlitebrowser/files/sqlitebrowser-3.12.2-str-conflict-fix.patch
@@ -0,0 +1,13 @@
+--- a/src/version.h
++++ b/src/version.h
+@@ -4,8 +4,8 @@
+ #define MINOR_VERSION 12
+ #define PATCH_VERSION 2
+ 
+-#define str(s) #s
+-#define xstr(s) str(s)
++#define stringize(s) #s
++#define xstr(s) stringize(s)
+ #define APP_VERSION xstr(MAJOR_VERSION) "." xstr(MINOR_VERSION) "." 
xstr(PATCH_VERSION)
+ 
+ // If it is defined by the compiler, then it is a nightly build, and in the 
YYYYMMDD format.

diff --git a/dev-db/sqlitebrowser/sqlitebrowser-3.12.2-r2.ebuild 
b/dev-db/sqlitebrowser/sqlitebrowser-3.12.2-r2.ebuild
index 47ce7cb6cacc..0b6665b1dd80 100644
--- a/dev-db/sqlitebrowser/sqlitebrowser-3.12.2-r2.ebuild
+++ b/dev-db/sqlitebrowser/sqlitebrowser-3.12.2-r2.ebuild
@@ -46,6 +46,10 @@ RDEPEND="
        >=dev-qt/qtsvg-5.5:5
 "
 
+PATCHES=(
+       "${FILESDIR}/${P}-str-conflict-fix.patch"
+)
+
 src_prepare() {
        cmake_src_prepare
 

Reply via email to