summaryrefslogtreecommitdiffstats
path: root/debian/patches/tilde-in-version.diff
blob: 8182935042d8f427bfcdb59e612389316f00b156 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From: Michael Tokarev <mjt@tls.msk.ru>
Subject: handle tilde in version string
Date: Thu, 20 Jun 2024 09:47:47 +0300
Forwarded: yes

wafsamba dislikes when version string contains "special" chars.
For some of them, upstream already has code to deal with.
Add handling of tilde (~) to the same places too.

diff --git a/buildtools/wafsamba/samba_abi.py b/buildtools/wafsamba/samba_abi.py
index 2d9505d255c..cf7153f25f0 100644
--- a/buildtools/wafsamba/samba_abi.py
+++ b/buildtools/wafsamba/samba_abi.py
@@ -288,3 +288,3 @@ def abi_build_vscript(task):
 def VSCRIPT_MAP_PRIVATE(bld, libname, orig_vscript, version, private_vscript):
-    version = version.replace("-", "_").replace("+","_").upper()
+    version = version.replace("-", "_").replace("+","_").replace("~","_").upper()
     t = bld.SAMBA_GENERATOR(private_vscript,
@@ -317,3 +317,3 @@ def ABI_VSCRIPT(bld, libname, abi_directory, version, vscript, abi_match=None, p
     libname = libname.replace("-", "_").replace("+","_").upper()
-    version = version.replace("-", "_").replace("+","_").upper()
+    version = version.replace("-", "_").replace("+","_").replace("~","_").upper()