From ad04947f7b784f20dfbd8b187630fef48ca41f7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Tue, 12 Mar 2024 04:01:46 +0100 Subject: [PATCH] DEB tdepim: Change the library package name in case of incompatible ABI for 64-bit time_t. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko (cherry picked from commit f32d6abff0a755187b97e0e26662b1c50e547c53) --- debian/_base/core/tdepim/debian/control | 2 +- debian/_base/core/tdepim/debian/rules | 58 +++++++++++++++++++++++++ dilos/core/tdepim/debian/control | 2 +- dilos/core/tdepim/debian/rules | 58 +++++++++++++++++++++++++ ubuntu/_base/core/tdepim/debian/control | 2 +- ubuntu/_base/core/tdepim/debian/rules | 58 +++++++++++++++++++++++++ 6 files changed, 177 insertions(+), 3 deletions(-) diff --git a/debian/_base/core/tdepim/debian/control b/debian/_base/core/tdepim/debian/control index 5ae303a22..aa5705508 100644 --- a/debian/_base/core/tdepim/debian/control +++ b/debian/_base/core/tdepim/debian/control @@ -21,7 +21,7 @@ Section: tde Architecture: all Replaces: kdepim-trinity (<< 4:14.0.0~) Breaks: kdepim-trinity (<< 4:14.0.0~) -Depends: akregator-trinity (>= ${source:Version}), kaddressbook-trinity (>= ${source:Version}), kalarm-trinity (>= ${source:Version}), kandy-trinity (>= ${source:Version}), karm-trinity (>= ${source:Version}), tdepim-tdefile-plugins-trinity (>= ${source:Version}), tdepim-tdeio-plugins-trinity (>= ${source:Version}), tdepim-tderesources-trinity (>= ${source:Version}), tdepim-wizards-trinity (>= ${source:Version}), kleopatra-trinity (>= ${source:Version}), kmail-trinity (>= ${source:Version}), kmailcvt-trinity (>= ${source:Version}), knode-trinity (>= ${source:Version}), knotes-trinity (>= ${source:Version}), konsolekalendar-trinity (>= ${source:Version}), kontact-trinity (>= ${source:Version}), korganizer-trinity (>= ${source:Version}), korn-trinity (>= ${source:Version}), ktnef-trinity (>= ${source:Version}), libindex0-trinity (>= ${source:Version}), libtdepim1a-trinity (>= ${source:Version}), libkgantt0-trinity (>= ${source:Version}), libkleopatra1-trinity (>= ${source:Version}), libkpimexchange1-trinity (>= ${source:Version}), libkpimidentities1-trinity (>= ${source:Version}), libksieve0-trinity (>= ${source:Version}), libktnef1-trinity (>= ${source:Version}), libmimelib1c2a-trinity (>= ${source:Version}) +Depends: akregator-trinity (>= ${source:Version}), kaddressbook-trinity (>= ${source:Version}), kalarm-trinity (>= ${source:Version}), kandy-trinity (>= ${source:Version}), karm-trinity (>= ${source:Version}), tdepim-tdefile-plugins-trinity (>= ${source:Version}), tdepim-tdeio-plugins-trinity (>= ${source:Version}), tdepim-tderesources-trinity (>= ${source:Version}), tdepim-wizards-trinity (>= ${source:Version}), kleopatra-trinity (>= ${source:Version}), kmail-trinity (>= ${source:Version}), kmailcvt-trinity (>= ${source:Version}), knode-trinity (>= ${source:Version}), knotes-trinity (>= ${source:Version}), konsolekalendar-trinity (>= ${source:Version}), kontact-trinity (>= ${source:Version}), korganizer-trinity (>= ${source:Version}), korn-trinity (>= ${source:Version}), ktnef-trinity (>= ${source:Version}), libindex0-trinity (>= ${source:Version}), libtdepim1a-trinity (>= ${source:Version}), libkgantt0-trinity (>= ${source:Version}), libkleopatra1-trinity (>= ${source:Version}) | libkleopatra1t64-trinity (>= ${source:Version}), libkpimexchange1-trinity (>= ${source:Version}), libkpimidentities1-trinity (>= ${source:Version}), libksieve0-trinity (>= ${source:Version}), libktnef1-trinity (>= ${source:Version}), libmimelib1c2a-trinity (>= ${source:Version}) | libmimelib1t64-trinity (>= ${source:Version}) Suggests: tdepim-trinity-doc-html Description: Personal Information Management apps from the official Trinity release TDE (the Trinity Desktop Environment) is a powerful Open Source graphical diff --git a/debian/_base/core/tdepim/debian/rules b/debian/_base/core/tdepim/debian/rules index f2de846ca..874cc57ac 100755 --- a/debian/_base/core/tdepim/debian/rules +++ b/debian/_base/core/tdepim/debian/rules @@ -13,6 +13,13 @@ 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 DEB_CMAKE_EXTRA_FLAGS := \ @@ -86,3 +93,54 @@ KDE_UPSTREAM_VERSION := $(shell echo $(DEB_UPSTREAM_VERSION) | sed -e 's/\.dfsg. KDE_TARBALL := ../$(DEB_SOURCE_PACKAGE)-$(KDE_UPSTREAM_VERSION).tar.bz2 KDE_SOURCEDIR := dfsg-tmp/$(DEB_SOURCE_PACKAGE)-$(KDE_UPSTREAM_VERSION) NEWDEB_SOURCEDIR := $(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION) + +post-patches:: + dh_testdir +ifeq ($(DEB_TIME64_API),true) + # update library package name for TIME64 ABI + ls -d debian/* | \ + grep -E "/libmimelib1c2a" | \ + grep -v "\.t64$$" | \ + while read a; do \ + [ -d $$a ] || [ -f $$a.t64 ] || \ + (cp -a $$a debian/libmimelib1$(DEB_TIME64_SUFFIX)$${a##*c2a} && mv $$a $$a.t64); \ + done + ls -d debian/* | \ + grep -E "/libkleopatra1-" | \ + grep -v "\.t64$$" | \ + while read a; do \ + [ -d $$a ] || [ -f $$a.t64 ] || \ + (cp -a $$a debian/libkleopatra1$(DEB_TIME64_SUFFIX)-$${a##*-} && mv $$a $$a.t64); \ + done + [ -f debian/control.t64 ] || \ + sed -i.t64 \ + -e "s/^\\(Package: libmimelib1\\)c2a-trinity$$/\\1$(DEB_TIME64_SUFFIX)-trinity/" \ + -e "s/^\\(Replaces\\|Breaks\\):\\(.*\\)\\(libmimelib1\\)c2a-trinity\\( \|$$\)/\\1:\\2\\3c2a-trinity, \\3$(DEB_TIME64_SUFFIX)-trinity\\4/" \ + -e "s/\\(libmimelib1\\)c2a-trinity (=/\\1$(DEB_TIME64_SUFFIX)-trinity (=/" \ + \ + -e "s/^\\(Package: libkleopatra1\\)-trinity$$/\\1$(DEB_TIME64_SUFFIX)-trinity/" \ + -e "s/^\\(Replaces\\|Breaks\\):\\(.*\\)\\(libkleopatra1\\)-trinity\\( \|$$\)/\\1:\\2\\3-trinity, \\3$(DEB_TIME64_SUFFIX)-trinity\\4/" \ + -e "s/\\(libkleopatra1\\)-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 "/libmimelib1$(DEB_TIME64_SUFFIX)-" | \ + xargs -r rm + ls -d debian/* | \ + grep -E "/libkleopatra1$(DEB_TIME64_SUFFIX)-" | \ + xargs -r rm + [ ! -f debian/control.t64 ] || \ + mv debian/control.t64 debian/control +endif diff --git a/dilos/core/tdepim/debian/control b/dilos/core/tdepim/debian/control index 6e411e711..1e08619f1 100644 --- a/dilos/core/tdepim/debian/control +++ b/dilos/core/tdepim/debian/control @@ -21,7 +21,7 @@ Section: tde Architecture: all Replaces: kdepim-trinity (<< 4:14.0.0~) Breaks: kdepim-trinity (<< 4:14.0.0~) -Depends: akregator-trinity (>= ${source:Version}), kaddressbook-trinity (>= ${source:Version}), kalarm-trinity (>= ${source:Version}), kandy-trinity (>= ${source:Version}), karm-trinity (>= ${source:Version}), tdepim-tdefile-plugins-trinity (>= ${source:Version}), tdepim-tdeio-plugins-trinity (>= ${source:Version}), tdepim-tderesources-trinity (>= ${source:Version}), tdepim-wizards-trinity (>= ${source:Version}), kleopatra-trinity (>= ${source:Version}), kmail-trinity (>= ${source:Version}), kmailcvt-trinity (>= ${source:Version}), knode-trinity (>= ${source:Version}), knotes-trinity (>= ${source:Version}), konsolekalendar-trinity (>= ${source:Version}), kontact-trinity (>= ${source:Version}), korganizer-trinity (>= ${source:Version}), korn-trinity (>= ${source:Version}), ktnef-trinity (>= ${source:Version}), libindex0-trinity (>= ${source:Version}), libtdepim1a-trinity (>= ${source:Version}), libkgantt0-trinity (>= ${source:Version}), libkleopatra1-trinity (>= ${source:Version}), libkpimexchange1-trinity (>= ${source:Version}), libkpimidentities1-trinity (>= ${source:Version}), libksieve0-trinity (>= ${source:Version}), libktnef1-trinity (>= ${source:Version}), libmimelib1c2a-trinity (>= ${source:Version}) +Depends: akregator-trinity (>= ${source:Version}), kaddressbook-trinity (>= ${source:Version}), kalarm-trinity (>= ${source:Version}), kandy-trinity (>= ${source:Version}), karm-trinity (>= ${source:Version}), tdepim-tdefile-plugins-trinity (>= ${source:Version}), tdepim-tdeio-plugins-trinity (>= ${source:Version}), tdepim-tderesources-trinity (>= ${source:Version}), tdepim-wizards-trinity (>= ${source:Version}), kleopatra-trinity (>= ${source:Version}), kmail-trinity (>= ${source:Version}), kmailcvt-trinity (>= ${source:Version}), knode-trinity (>= ${source:Version}), knotes-trinity (>= ${source:Version}), konsolekalendar-trinity (>= ${source:Version}), kontact-trinity (>= ${source:Version}), korganizer-trinity (>= ${source:Version}), korn-trinity (>= ${source:Version}), ktnef-trinity (>= ${source:Version}), libindex0-trinity (>= ${source:Version}), libtdepim1a-trinity (>= ${source:Version}), libkgantt0-trinity (>= ${source:Version}), libkleopatra1-trinity (>= ${source:Version}) | libkleopatra1t64-trinity (>= ${source:Version}), libkpimexchange1-trinity (>= ${source:Version}), libkpimidentities1-trinity (>= ${source:Version}), libksieve0-trinity (>= ${source:Version}), libktnef1-trinity (>= ${source:Version}), libmimelib1c2a-trinity (>= ${source:Version}) | libmimelib1t64-trinity (>= ${source:Version}) Suggests: tdepim-trinity-doc-html Description: Personal Information Management apps from the official Trinity release TDE (the Trinity Desktop Environment) is a powerful Open Source graphical diff --git a/dilos/core/tdepim/debian/rules b/dilos/core/tdepim/debian/rules index 06c6e701d..afc29ebff 100755 --- a/dilos/core/tdepim/debian/rules +++ b/dilos/core/tdepim/debian/rules @@ -13,6 +13,13 @@ 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 CPPFLAGS+= -D__dilos__ @@ -92,3 +99,54 @@ NEWDEB_SOURCEDIR := $(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION) DEB_DH_STRIP_ARGS := -Xlibindex.so.0.0.0 -Xlibgpgme++.so.0.4.0 \ -Xlibmimelib.so.1.0.1 + +post-patches:: + dh_testdir +ifeq ($(DEB_TIME64_API),true) + # update library package name for TIME64 ABI + ls -d debian/* | \ + grep -E "/libmimelib1c2a" | \ + grep -v "\.t64$$" | \ + while read a; do \ + [ -d $$a ] || [ -f $$a.t64 ] || \ + (cp -a $$a debian/libmimelib1$(DEB_TIME64_SUFFIX)$${a##*c2a} && mv $$a $$a.t64); \ + done + ls -d debian/* | \ + grep -E "/libkleopatra1-" | \ + grep -v "\.t64$$" | \ + while read a; do \ + [ -d $$a ] || [ -f $$a.t64 ] || \ + (cp -a $$a debian/libkleopatra1$(DEB_TIME64_SUFFIX)-$${a##*-} && mv $$a $$a.t64); \ + done + [ -f debian/control.t64 ] || \ + sed -i.t64 \ + -e "s/^\\(Package: libmimelib1\\)c2a-trinity$$/\\1$(DEB_TIME64_SUFFIX)-trinity/" \ + -e "s/^\\(Replaces\\|Breaks\\):\\(.*\\)\\(libmimelib1\\)c2a-trinity\\( \|$$\)/\\1:\\2\\3c2a-trinity, \\3$(DEB_TIME64_SUFFIX)-trinity\\4/" \ + -e "s/\\(libmimelib1\\)c2a-trinity (=/\\1$(DEB_TIME64_SUFFIX)-trinity (=/" \ + \ + -e "s/^\\(Package: libkleopatra1\\)-trinity$$/\\1$(DEB_TIME64_SUFFIX)-trinity/" \ + -e "s/^\\(Replaces\\|Breaks\\):\\(.*\\)\\(libkleopatra1\\)-trinity\\( \|$$\)/\\1:\\2\\3-trinity, \\3$(DEB_TIME64_SUFFIX)-trinity\\4/" \ + -e "s/\\(libkleopatra1\\)-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 "/libmimelib1$(DEB_TIME64_SUFFIX)-" | \ + xargs -r rm + ls -d debian/* | \ + grep -E "/libkleopatra1$(DEB_TIME64_SUFFIX)-" | \ + xargs -r rm + [ ! -f debian/control.t64 ] || \ + mv debian/control.t64 debian/control +endif diff --git a/ubuntu/_base/core/tdepim/debian/control b/ubuntu/_base/core/tdepim/debian/control index 6474679ec..756e22d00 100644 --- a/ubuntu/_base/core/tdepim/debian/control +++ b/ubuntu/_base/core/tdepim/debian/control @@ -21,7 +21,7 @@ Section: tde Architecture: all Replaces: kdepim-kde3 (<< 4:14.0.0~), kdepim-trinity (<< 4:14.0.0~) Breaks: kdepim-kde3 (<< 4:14.0.0~), kdepim-trinity (<< 4:14.0.0~) -Depends: akregator-trinity (>= ${source:Version}), kaddressbook-trinity (>= ${source:Version}), kalarm-trinity (>= ${source:Version}), kandy-trinity (>= ${source:Version}), karm-trinity (>= ${source:Version}), tdepim-tdefile-plugins-trinity (>= ${source:Version}), tdepim-tdeio-plugins-trinity (>= ${source:Version}), tdepim-tderesources-trinity (>= ${source:Version}), tdepim-wizards-trinity (>= ${source:Version}), kleopatra-trinity (>= ${source:Version}), kmail-trinity (>= ${source:Version}), kmailcvt-trinity (>= ${source:Version}), knode-trinity (>= ${source:Version}), knotes-trinity (>= ${source:Version}), konsolekalendar-trinity (>= ${source:Version}), kontact-trinity (>= ${source:Version}), korganizer-trinity (>= ${source:Version}), korn-trinity (>= ${source:Version}), ktnef-trinity (>= ${source:Version}), libindex0-trinity (>= ${source:Version}), libtdepim1a-trinity (>= ${source:Version}), libkgantt0-trinity (>= ${source:Version}), libkleopatra1-trinity (>= ${source:Version}), libkpimexchange1-trinity (>= ${source:Version}), libkpimidentities1-trinity (>= ${source:Version}), libksieve0-trinity (>= ${source:Version}), libktnef1-trinity (>= ${source:Version}), libmimelib1c2a-trinity (>= ${source:Version}) +Depends: akregator-trinity (>= ${source:Version}), kaddressbook-trinity (>= ${source:Version}), kalarm-trinity (>= ${source:Version}), kandy-trinity (>= ${source:Version}), karm-trinity (>= ${source:Version}), tdepim-tdefile-plugins-trinity (>= ${source:Version}), tdepim-tdeio-plugins-trinity (>= ${source:Version}), tdepim-tderesources-trinity (>= ${source:Version}), tdepim-wizards-trinity (>= ${source:Version}), kleopatra-trinity (>= ${source:Version}), kmail-trinity (>= ${source:Version}), kmailcvt-trinity (>= ${source:Version}), knode-trinity (>= ${source:Version}), knotes-trinity (>= ${source:Version}), konsolekalendar-trinity (>= ${source:Version}), kontact-trinity (>= ${source:Version}), korganizer-trinity (>= ${source:Version}), korn-trinity (>= ${source:Version}), ktnef-trinity (>= ${source:Version}), libindex0-trinity (>= ${source:Version}), libtdepim1a-trinity (>= ${source:Version}), libkgantt0-trinity (>= ${source:Version}), libkleopatra1-trinity (>= ${source:Version}) | libkleopatra1t64-trinity (>= ${source:Version}), libkpimexchange1-trinity (>= ${source:Version}), libkpimidentities1-trinity (>= ${source:Version}), libksieve0-trinity (>= ${source:Version}), libktnef1-trinity (>= ${source:Version}), libmimelib1c2a-trinity (>= ${source:Version}) | libmimelib1t64-trinity (>= ${source:Version}) Suggests: tdepim-trinity-doc-html Description: Personal Information Management apps from the official Trinity release TDE (the Trinity Desktop Environment) is a powerful Open Source graphical diff --git a/ubuntu/_base/core/tdepim/debian/rules b/ubuntu/_base/core/tdepim/debian/rules index f2de846ca..874cc57ac 100755 --- a/ubuntu/_base/core/tdepim/debian/rules +++ b/ubuntu/_base/core/tdepim/debian/rules @@ -13,6 +13,13 @@ 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 DEB_CMAKE_EXTRA_FLAGS := \ @@ -86,3 +93,54 @@ KDE_UPSTREAM_VERSION := $(shell echo $(DEB_UPSTREAM_VERSION) | sed -e 's/\.dfsg. KDE_TARBALL := ../$(DEB_SOURCE_PACKAGE)-$(KDE_UPSTREAM_VERSION).tar.bz2 KDE_SOURCEDIR := dfsg-tmp/$(DEB_SOURCE_PACKAGE)-$(KDE_UPSTREAM_VERSION) NEWDEB_SOURCEDIR := $(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION) + +post-patches:: + dh_testdir +ifeq ($(DEB_TIME64_API),true) + # update library package name for TIME64 ABI + ls -d debian/* | \ + grep -E "/libmimelib1c2a" | \ + grep -v "\.t64$$" | \ + while read a; do \ + [ -d $$a ] || [ -f $$a.t64 ] || \ + (cp -a $$a debian/libmimelib1$(DEB_TIME64_SUFFIX)$${a##*c2a} && mv $$a $$a.t64); \ + done + ls -d debian/* | \ + grep -E "/libkleopatra1-" | \ + grep -v "\.t64$$" | \ + while read a; do \ + [ -d $$a ] || [ -f $$a.t64 ] || \ + (cp -a $$a debian/libkleopatra1$(DEB_TIME64_SUFFIX)-$${a##*-} && mv $$a $$a.t64); \ + done + [ -f debian/control.t64 ] || \ + sed -i.t64 \ + -e "s/^\\(Package: libmimelib1\\)c2a-trinity$$/\\1$(DEB_TIME64_SUFFIX)-trinity/" \ + -e "s/^\\(Replaces\\|Breaks\\):\\(.*\\)\\(libmimelib1\\)c2a-trinity\\( \|$$\)/\\1:\\2\\3c2a-trinity, \\3$(DEB_TIME64_SUFFIX)-trinity\\4/" \ + -e "s/\\(libmimelib1\\)c2a-trinity (=/\\1$(DEB_TIME64_SUFFIX)-trinity (=/" \ + \ + -e "s/^\\(Package: libkleopatra1\\)-trinity$$/\\1$(DEB_TIME64_SUFFIX)-trinity/" \ + -e "s/^\\(Replaces\\|Breaks\\):\\(.*\\)\\(libkleopatra1\\)-trinity\\( \|$$\)/\\1:\\2\\3-trinity, \\3$(DEB_TIME64_SUFFIX)-trinity\\4/" \ + -e "s/\\(libkleopatra1\\)-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 "/libmimelib1$(DEB_TIME64_SUFFIX)-" | \ + xargs -r rm + ls -d debian/* | \ + grep -E "/libkleopatra1$(DEB_TIME64_SUFFIX)-" | \ + xargs -r rm + [ ! -f debian/control.t64 ] || \ + mv debian/control.t64 debian/control +endif