El lun, 15 feb 2021 a las 20:55, Agustin Martin (<agmar...@debian.org>) escribió: > > > There is a pending thing about multiarch, the handling of > regina-config is not yet multiarch friendly. An $arch version should > be installed in an arch dependent dir and /usr/bin/regina-config be > made a wrapper to it, considering the architecture for which the > package is built (this is important e.g. when building for amd64/i386 > from the other arch). Once I have something ready I will submit an > additional patch to this bug report, to be appplied after debhelper > migration changes. >
Find attached proposed patch for regina-rexx wrapper under multiarch. -- Agustin
From af56bdfa735531a564be53dd436cd51988d34225 Mon Sep 17 00:00:00 2001 From: Agustin Martin <agmar...@debian.org> Date: Mon, 15 Feb 2021 21:49:26 +0100 Subject: [PATCH] Handle multiarch with regina-config. regina-config must be *exactly* the same across architectures. Auto-generated regina-config may have different stuff like libraries for some co-installable architectures. Install arch dependent regina-config in libregina3 under arch specific dir and a regina-config wrapper in libregina3-dev, which will call arch specific regina-config. Signed-off-by: Agustin Martin <agmar...@debian.org> --- debian/libregina3.install | 1 + .../2000_regina-config_use-wrapper.diff | 22 ++++ debian/patches/series | 1 + debian/regina-config | 112 +++++------------- 4 files changed, 55 insertions(+), 81 deletions(-) create mode 100644 debian/patches/2000_regina-config_use-wrapper.diff diff --git a/debian/libregina3.install b/debian/libregina3.install index 6a3f187..463c2ef 100644 --- a/debian/libregina3.install +++ b/debian/libregina3.install @@ -1,2 +1,3 @@ usr/lib/*/regina-rexx/*/* usr/lib/*/libregina.so.* +usr/lib/*/regina-rexx/regina-config diff --git a/debian/patches/2000_regina-config_use-wrapper.diff b/debian/patches/2000_regina-config_use-wrapper.diff new file mode 100644 index 0000000..d16d3b7 --- /dev/null +++ b/debian/patches/2000_regina-config_use-wrapper.diff @@ -0,0 +1,22 @@ +Index: regina-rexx-debhelper/Makefile.in +=================================================================== +--- regina-rexx-debhelper.orig/Makefile.in 2021-02-15 21:34:08.402245272 +0100 ++++ regina-rexx-debhelper/Makefile.in 2021-02-15 21:34:29.202369805 +0100 +@@ -1206,6 +1206,9 @@ + $(INSTALL) -m 644 -c $(SHLPRE)$(SHLFILE)$(SHLPST).$(ABI) $(libdir)/$(SHLPRE)$(SHLFILE)$(SHLPST).$(ABI) + $(LN_S) -f $(SHLPRE)$(SHLFILE)$(SHLPST).$(ABI) $(libdir)/$(SHLPRE)$(SHLFILE)$(SHLPST).$(ABI_MAJOR) + $(INSTALL) -m 644 -c $(SHLPRE)regutil$(MODPST) $(libdir)/regina-rexx/$(ABI)/$(SHLPRE)regutil$(MODPST) ++# regina-config here is arch dependent. ++ $(INSTALL) -m 755 -d $(libdir)/regina-rexx/ ++ $(INSTALL) -m 755 -c ./regina-config $(libdir)/regina-rexx/regina-config + + install-dev: $(LIBPRE)$(LIBFILE)$(LIBPST) + # header file +@@ -1216,7 +1219,6 @@ + # libregina.so.x -> libregina.so + $(LN_S) -f $(SHLPRE)$(SHLFILE)$(SHLPST).$(ABI) $(libdir)/$(SHLPRE)$(SHLFILE)$(SHLPST) + # regina-config +- $(INSTALL) -m 755 -c ./regina-config $(prefix)/bin/regina-config + $(INSTALL) -c -m 644 $(srcdir)/regina-config.1 $(prefix)/share/man/man1/regina-config.1 + + install-rexx: rexx$(EXE) regina$(EXE) diff --git a/debian/patches/series b/debian/patches/series index d6565de..39a24b0 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ az-patch-01 0000_Makefile.in_set-DESTDIR.diff 0000_Makefile.in_libdir.diff 0000_Makefile.in_sharedir.diff +2000_regina-config_use-wrapper.diff diff --git a/debian/regina-config b/debian/regina-config index fe95aef..8f0791f 100644 --- a/debian/regina-config +++ b/debian/regina-config @@ -1,85 +1,35 @@ #!/bin/sh # -# The idea to this kind of setup info script was stolen from numerous -# other packages, such as neon, libxml and gnome. +# Generic multiarch wrapper for regina-config # -prefix=/usr -exec_prefix=${prefix} -includedir=${prefix}/include -libdir=${exec_prefix}/lib - - -usage() -{ - echo "Usage: regina-config [OPTION]" - echo "" - echo "Available values for OPTION include:" - echo "" - echo " --help display this help and exit" - echo " --cflags pre-processor and compiler flags" - echo " [-I$includedir]" - echo " --multithread yes; if thread-safe library is available; no otherwise" - echo " [yes]" - echo " --libs library linking information" - echo " [-lregina]" - echo " --libs_ts library linking information for thread-safe library" - echo " [-lregina]" - echo " --prefix Regina install prefix" - echo " [$prefix]" - echo " --version output version information" - echo " ["3.5"]" - exit $1 -} - -if test $# -eq 0; then - usage 1 +# This file must be *exactly* the same across architectures. +# Auto-generated regina-config may have different stuff like +# libraries for some co-installable architectures. +# Better safe than sorry, thus we use this wrapper. +# +# Copyright (C) 2013-2021 Agustin Martin <agmar...@debian.org> +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General +# Public License along with this program. If not, see +# <http://www.gnu.org/licenses/>. +# -------------------------------------------------------------------- + +DEB_HOST_MULTIARCH=`dpkg-architecture -qDEB_HOST_MULTIARCH` +CONFIG_SCRIPT="/usr/lib/${DEB_HOST_MULTIARCH}/regina-rexx/regina-config" + +if [ -x ${CONFIG_SCRIPT} ]; then + ${CONFIG_SCRIPT} "$@" +else + echo "regina-config wrapper: missing or non executable ${CONFIG_SCRIPT}. Aborting ..." >&2 + exit 1 fi - -while test $# -gt 0; do - case "$1" in - # this deals with options in the style - # --option=value and extracts the value part - # [not currently used] - -*=*) value=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) value= ;; - esac - - case "$1" in - --prefix) - echo $prefix - ;; - - --multithread) - echo yes - ;; - - --version) - echo "3.5" - exit 0 - ;; - - --help) - usage 0 - ;; - - --cflags) - echo -I$includedir - ;; - - --libs) - echo -lregina - ;; - - --libs_ts) - echo -lregina - ;; - - *) - usage - exit 1 - ;; - esac - shift -done - -exit 0 -- 2.30.0