summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2024-03-08 10:55:53 +0100
committerSlávek Banko <slavek.banko@axis.cz>2024-03-08 12:53:53 +0100
commit2fa41c1db03b97607378ed8d2eaf0ba315e8569c (patch)
treed1143614ab0411da9799521381285ba6b5b3ddd4
parent7485a4e54aacbb1372c463a905916b3efbe54c65 (diff)
downloadtde-packaging-2fa41c1db03b97607378ed8d2eaf0ba315e8569c.tar.gz
tde-packaging-2fa41c1db03b97607378ed8d2eaf0ba315e8569c.zip
DEB tdelibs: Change the library package name in case of incompatible ABI for 64-bit time_t.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 4da2381632dba8cb1e05d77b2500bd215489e172)
-rw-r--r--debian/_base/core/tdelibs/debian/control2
-rwxr-xr-xdebian/_base/core/tdelibs/debian/rules46
-rw-r--r--dilos/core/tdelibs/debian/control2
-rwxr-xr-xdilos/core/tdelibs/debian/rules46
-rw-r--r--ubuntu/_base/core/tdelibs/debian/control2
-rwxr-xr-xubuntu/_base/core/tdelibs/debian/rules45
6 files changed, 138 insertions, 5 deletions
diff --git a/debian/_base/core/tdelibs/debian/control b/debian/_base/core/tdelibs/debian/control
index 1c52e04d5..fdb2810b6 100644
--- a/debian/_base/core/tdelibs/debian/control
+++ b/debian/_base/core/tdelibs/debian/control
@@ -28,7 +28,7 @@ Architecture: all
Replaces: kdelibs-trinity (<< 4:14.0.0~)
Breaks: kdelibs-trinity (<< 4:14.0.0~)
Provides: tdelibs
-Depends: tdelibs14-trinity (>= ${source:Version}),
+Depends: tdelibs14-trinity (>= ${source:Version}) | tdelibs14t64-trinity (>= ${source:Version}),
tdelibs-data-trinity (>= ${source:Version})
Description: core libraries from the official Trinity release
TDE (the Trinity Desktop Environment) is a powerful Open Source graphical
diff --git a/debian/_base/core/tdelibs/debian/rules b/debian/_base/core/tdelibs/debian/rules
index 8292b5f73..40c8003b2 100755
--- a/debian/_base/core/tdelibs/debian/rules
+++ b/debian/_base/core/tdelibs/debian/rules
@@ -11,9 +11,16 @@ export LD_LIBRARY_PATH
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/cmake.mk
-#include /usr/share/cdbs/1/rules/patchsys-quilt.mk
include debian/cdbs/debian-tde.mk
+DEB_TIME64_API = $(shell echo | cc $(dpkg-buildflags --get CPPFLAGS) -dM -E -x c++ - | grep -q "_TIME_BITS 64" && echo true || false)
+ifeq ($(DEB_TIME64_API),true)
+DEB_TIME64_SUFFIX = t64
+else
+DEB_TIME64_SUFFIX =
+endif
+
+
DEB_KDE_APIDOX := yes
version=Debian Package $(DEB_VERSION)
@@ -106,3 +113,40 @@ binary-install/tdelibs14-trinity::
mv debian/tmp/opt/trinity/bin/tdecmshell debian/tmp/opt/trinity/bin/tdecmshell.real
install -p -D -m755 debian/tmp/opt/trinity/bin/tdecmshell.real debian/tdelibs14-trinity/opt/trinity/bin/tdecmshell.real
install -p -D -m755 debian/tdecmshell debian/tdelibs14-trinity/opt/trinity/bin/tdecmshell
+
+post-patches::
+ dh_testdir
+ifeq ($(DEB_TIME64_API),true)
+ # update library package name for TIME64 ABI
+ ls -d debian/* | \
+ grep -E "/tdelibs14-trinity\." | \
+ grep -v "\.t64$$" | \
+ while read a; do \
+ [ -d $$a ] || [ -f $$a.t64 ] || \
+ (cp -a $$a debian/tdelibs14$(DEB_TIME64_SUFFIX)-trinity.$${a##*.} && mv $$a $$a.t64); \
+ done
+ [ -f debian/control.t64 ] || \
+ sed -i.t64 \
+ -e "s/^\\(Package: tdelibs14\\)-trinity$$/\\1$(DEB_TIME64_SUFFIX)-trinity/" \
+ -e "s/^\\(Replaces\\|Breaks\\):\\(.*\\)\\(tdelibs\\)4c2a-trinity\\( \|$$\)/\\1:\\2\\34c2a-trinity, \\314-trinity\\4/" \
+ -e "s/\\(tdelibs14\\)-trinity (=/\\1$(DEB_TIME64_SUFFIX)-trinity (=/" \
+ debian/control
+endif
+
+clean::
+ dh_testdir
+ dh_clean
+
+ifeq ($(DEB_TIME64_API),true)
+ # revert library package name for TIME64 ABI
+ ls -d debian/* | \
+ grep -E "\.t64$$" | \
+ while read a; do \
+ mv $$a $${a%.t64}; \
+ done
+ ls -d debian/* | \
+ grep -E "/tdelibs14$(DEB_TIME64_SUFFIX)-trinity\." | \
+ xargs -r rm
+ [ ! -f debian/control.t64 ] || \
+ mv debian/control.t64 debian/control
+endif
diff --git a/dilos/core/tdelibs/debian/control b/dilos/core/tdelibs/debian/control
index a4a08a4c5..4fbb784aa 100644
--- a/dilos/core/tdelibs/debian/control
+++ b/dilos/core/tdelibs/debian/control
@@ -29,7 +29,7 @@ Architecture: all
Replaces: kdelibs-trinity (<< 4:14.0.0~)
Breaks: kdelibs-trinity (<< 4:14.0.0~)
Provides: tdelibs
-Depends: tdelibs14-trinity (>= ${source:Version}),
+Depends: tdelibs14-trinity (>= ${source:Version}) | tdelibs14t64-trinity (>= ${source:Version}),
tdelibs-data-trinity (>= ${source:Version})
Description: core libraries from the official Trinity release
TDE (the Trinity Desktop Environment) is a powerful Open Source graphical
diff --git a/dilos/core/tdelibs/debian/rules b/dilos/core/tdelibs/debian/rules
index a463caa48..b693607f1 100755
--- a/dilos/core/tdelibs/debian/rules
+++ b/dilos/core/tdelibs/debian/rules
@@ -11,9 +11,16 @@ export LD_LIBRARY_PATH
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/cmake.mk
-#include /usr/share/cdbs/1/rules/patchsys-quilt.mk
include debian/cdbs/debian-tde.mk
+DEB_TIME64_API = $(shell echo | cc $(dpkg-buildflags --get CPPFLAGS) -dM -E -x c++ - | grep -q "_TIME_BITS 64" && echo true || false)
+ifeq ($(DEB_TIME64_API),true)
+DEB_TIME64_SUFFIX = t64
+else
+DEB_TIME64_SUFFIX =
+endif
+
+
DEB_KDE_APIDOX := yes
version=Debian Package $(DEB_VERSION)
@@ -179,3 +186,40 @@ binary-install/tdelibs14-trinity::
mv debian/tmp/usr/bin/tdecmshell debian/tmp/usr/bin/tdecmshell.real
install -p -D -m755 debian/tmp/usr/bin/tdecmshell.real debian/tdelibs14-trinity/usr/bin/tdecmshell.real
install -p -D -m755 debian/tdecmshell debian/tdelibs14-trinity/usr/bin/tdecmshell
+
+post-patches::
+ dh_testdir
+ifeq ($(DEB_TIME64_API),true)
+ # update library package name for TIME64 ABI
+ ls -d debian/* | \
+ grep -E "/tdelibs14-trinity\." | \
+ grep -v "\.t64$$" | \
+ while read a; do \
+ [ -d $$a ] || [ -f $$a.t64 ] || \
+ (cp -a $$a debian/tdelibs14$(DEB_TIME64_SUFFIX)-trinity.$${a##*.} && mv $$a $$a.t64); \
+ done
+ [ -f debian/control.t64 ] || \
+ sed -i.t64 \
+ -e "s/^\\(Package: tdelibs14\\)-trinity$$/\\1$(DEB_TIME64_SUFFIX)-trinity/" \
+ -e "s/^\\(Replaces\\|Breaks\\):\\(.*\\)\\(tdelibs\\)4c2a-trinity\\( \|$$\)/\\1:\\2\\34c2a-trinity, \\314-trinity\\4/" \
+ -e "s/\\(tdelibs14\\)-trinity (=/\\1$(DEB_TIME64_SUFFIX)-trinity (=/" \
+ debian/control
+endif
+
+clean::
+ dh_testdir
+ dh_clean
+
+ifeq ($(DEB_TIME64_API),true)
+ # revert library package name for TIME64 ABI
+ ls -d debian/* | \
+ grep -E "\.t64$$" | \
+ while read a; do \
+ mv $$a $${a%.t64}; \
+ done
+ ls -d debian/* | \
+ grep -E "/tdelibs14$(DEB_TIME64_SUFFIX)-trinity\." | \
+ xargs -r rm
+ [ ! -f debian/control.t64 ] || \
+ mv debian/control.t64 debian/control
+endif
diff --git a/ubuntu/_base/core/tdelibs/debian/control b/ubuntu/_base/core/tdelibs/debian/control
index 742759d30..2af3ea23e 100644
--- a/ubuntu/_base/core/tdelibs/debian/control
+++ b/ubuntu/_base/core/tdelibs/debian/control
@@ -29,7 +29,7 @@ Replaces: kdelibs-kde3 (<< 4:14.0.0~), kdelibs-trinity (<< 4:14.0.0~)
Breaks: kdelibs-kde3 (<< 4:14.0.0~), kdelibs-trinity (<< 4:14.0.0~)
Provides: tdelibs
Conflicts: tdelibs
-Depends: tdelibs14-trinity (>= ${source:Version}),
+Depends: tdelibs14-trinity (>= ${source:Version}) | tdelibs14t64-trinity (>= ${source:Version}),
tdelibs-data-trinity (>= ${source:Version})
Description: core libraries from the official Trinity release
TDE (the Trinity Desktop Environment) is a powerful Open Source graphical
diff --git a/ubuntu/_base/core/tdelibs/debian/rules b/ubuntu/_base/core/tdelibs/debian/rules
index eafe84957..533c0ed51 100755
--- a/ubuntu/_base/core/tdelibs/debian/rules
+++ b/ubuntu/_base/core/tdelibs/debian/rules
@@ -13,6 +13,14 @@ include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/cmake.mk
include debian/cdbs/debian-tde.mk
+DEB_TIME64_API = $(shell echo | cc $(dpkg-buildflags --get CPPFLAGS) -dM -E -x c++ - | grep -q "_TIME_BITS 64" && echo true || false)
+ifeq ($(DEB_TIME64_API),true)
+DEB_TIME64_SUFFIX = t64
+else
+DEB_TIME64_SUFFIX =
+endif
+
+
DEB_KDE_APIDOX := yes
version=Debian Package $(DEB_VERSION)
@@ -105,3 +113,40 @@ binary-install/tdelibs14-trinity::
mv debian/tmp/opt/trinity/bin/tdecmshell debian/tmp/opt/trinity/bin/tdecmshell.real
install -p -D -m755 debian/tmp/opt/trinity/bin/tdecmshell.real debian/tdelibs14-trinity/opt/trinity/bin/tdecmshell.real
install -p -D -m755 debian/tdecmshell debian/tdelibs14-trinity/opt/trinity/bin/tdecmshell
+
+post-patches::
+ dh_testdir
+ifeq ($(DEB_TIME64_API),true)
+ # update library package name for TIME64 ABI
+ ls -d debian/* | \
+ grep -E "/tdelibs14-trinity\." | \
+ grep -v "\.t64$$" | \
+ while read a; do \
+ [ -d $$a ] || [ -f $$a.t64 ] || \
+ (cp -a $$a debian/tdelibs14$(DEB_TIME64_SUFFIX)-trinity.$${a##*.} && mv $$a $$a.t64); \
+ done
+ [ -f debian/control.t64 ] || \
+ sed -i.t64 \
+ -e "s/^\\(Package: tdelibs14\\)-trinity$$/\\1$(DEB_TIME64_SUFFIX)-trinity/" \
+ -e "s/^\\(Replaces\\|Breaks\\):\\(.*\\)\\(tdelibs\\)4c2a-trinity\\( \|$$\)/\\1:\\2\\34c2a-trinity, \\314-trinity\\4/" \
+ -e "s/\\(tdelibs14\\)-trinity (=/\\1$(DEB_TIME64_SUFFIX)-trinity (=/" \
+ debian/control
+endif
+
+clean::
+ dh_testdir
+ dh_clean
+
+ifeq ($(DEB_TIME64_API),true)
+ # revert library package name for TIME64 ABI
+ ls -d debian/* | \
+ grep -E "\.t64$$" | \
+ while read a; do \
+ mv $$a $${a%.t64}; \
+ done
+ ls -d debian/* | \
+ grep -E "/tdelibs14$(DEB_TIME64_SUFFIX)-trinity\." | \
+ xargs -r rm
+ [ ! -f debian/control.t64 ] || \
+ mv debian/control.t64 debian/control
+endif