[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1014744: marked as done (libcaca-dev: please make it multi-arch co-installable)



Your message dated Tue, 12 Jul 2022 09:06:14 +0000
with message-id <E1oBBqQ-0004z9-Ch@fasolo.debian.org>
and subject line Bug#1014744: fixed in libcaca 0.99.beta20-3
has caused the Debian Bug report #1014744,
regarding libcaca-dev: please make it multi-arch co-installable
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1014744: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1014744
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libcaca-dev
Version: 0.99.beta20-2
Severity: wishlist
Tags: patch
Control: block 932372 by -1

While looking at libsdl1.2 I noticed that its dependency libcaca-dev
cannot be co-installed for amd64 and i386, because it is not marked as
Multi-Arch: same. This is because /usr/bin/caca-config varies between
architectures.

It is fairly straightforward to solve this by patching caca-config to
avoid references to @libdir@, similar to what we already do in SDL2.
Please consider applying the attached patches.

Thanks,
    smcv
>From 08c048c188b758b68dc16e12afc1bbd3b6368214 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@debian.org>
Date: Mon, 11 Jul 2022 08:58:39 +0100
Subject: [PATCH 1/3] Make libcaca-dev multi-arch co-installable

This allows dependent libraries like libsdl1.2 to be built for more than
one architecture without removing packages. It requires a small
non-upstreamable patch to make caca-config co-installable, similar to
what is done in other packages with legacy -config scripts (such as SDL).
---
 debian/control                                |  1 +
 ...ca-config.in-Avoid-mentioning-libdir.patch | 45 +++++++++++++++++++
 debian/patches/series                         |  1 +
 3 files changed, 47 insertions(+)
 create mode 100644 debian/patches/caca-config.in-Avoid-mentioning-libdir.patch
 create mode 100644 debian/patches/series

diff --git a/debian/control b/debian/control
index 7d91002..fc552ad 100644
--- a/debian/control
+++ b/debian/control
@@ -22,6 +22,7 @@ Homepage: http://caca.zoy.org/wiki/libcaca
 Package: libcaca-dev
 Section: libdevel
 Architecture: any
+Multi-Arch: same
 Depends:
  libcaca0 (= ${binary:Version}),
  libslang2-dev,
diff --git a/debian/patches/caca-config.in-Avoid-mentioning-libdir.patch b/debian/patches/caca-config.in-Avoid-mentioning-libdir.patch
new file mode 100644
index 0000000..d8c057d
--- /dev/null
+++ b/debian/patches/caca-config.in-Avoid-mentioning-libdir.patch
@@ -0,0 +1,45 @@
+From: Simon McVittie <smcv@debian.org>
+Date: Mon, 11 Jul 2022 08:57:31 +0100
+Subject: caca-config.in: Avoid mentioning @libdir@
+
+The upstream version of this script needs -L@libdir@ because it is
+unknown whether libcaca was installed into a directory in the compiler's
+default search path, but for Debian it is safe to omit that linker
+option and rely on the default search path.
+
+Avoiding all mentions of @libdir@ means the generated caca-config
+script ends up identical for all architectures, allowing libcaca-dev
+to become multiarch co-installable.
+
+Forwarded: not-needed, Debian-specific
+---
+ caca-config.in | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/caca-config.in b/caca-config.in
+index a54e6e1..9dc9530 100644
+--- a/caca-config.in
++++ b/caca-config.in
+@@ -5,7 +5,6 @@
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ 
+-lib_dir=@libdir@
+ include_dir=@includedir@
+ 
+ usage()
+@@ -107,12 +106,12 @@ fi
+ 
+ if test "$echo_ldflags" = "yes"
+ then
+-  ldflags="-L$lib_dir"
++  ldflags=""
+   echo $ldflags
+ fi
+ 
+ if test "$echo_libs" = "yes"
+ then
+-  echo -L@libdir@ $libs
++  echo $libs
+ fi
+ 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..55204c0
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+caca-config.in-Avoid-mentioning-libdir.patch
-- 
2.36.1

>From 6cb1da8cef24f4df91f8b05ca63ef10056db3ca3 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@debian.org>
Date: Mon, 11 Jul 2022 09:15:17 +0100
Subject: [PATCH 2/3] d/tests/build: Also exercise C++ linking

libcaca-dev provides two separate interfaces, C and C++, so it's good
to verify that they both work.
---
 debian/tests/build | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)
 mode change 100644 => 100755 debian/tests/build

diff --git a/debian/tests/build b/debian/tests/build
old mode 100644
new mode 100755
index d639d10..e3cdf08
--- a/debian/tests/build
+++ b/debian/tests/build
@@ -12,6 +12,8 @@ else
     CROSS_COMPILE=
 fi
 
+export TERM=linux
+
 WORKDIR=$(mktemp -d)
 trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
 cd $WORKDIR
@@ -37,7 +39,26 @@ EOF
 ${CROSS_COMPILE}gcc -o caca_test caca_test.c `${CROSS_COMPILE}pkg-config --cflags --libs caca` -Wall -Werror
 echo "build: OK"
 [ -x caca_test ]
-export TERM=linux
 ./caca_test
 echo "run: OK"
 
+cat <<EOF > caca_test.cpp
+#include <caca++.h>
+#include <iostream>
+
+int main(void)
+{
+	std::cout << "Testing libcaca version " << Caca::getVersion() << std::endl;
+
+	Canvas c;
+	c.Clear();
+
+	return 0;
+}
+EOF
+
+${CROSS_COMPILE}g++ -o caca_test_cpp caca_test.cpp `${CROSS_COMPILE}pkg-config --cflags --libs caca++` -Wall -Werror
+echo "build C++: OK"
+[ -x caca_test_cpp ]
+./caca_test_cpp
+echo "run C++: OK"
-- 
2.36.1

>From 85bb4229b620ecefbb75fe9ba661160ea3bdfb63 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@debian.org>
Date: Mon, 11 Jul 2022 09:19:42 +0100
Subject: [PATCH 3/3] d/tests/build: Also exercise legacy caca-config script

caca-config is deprecated in favour of pkg-config, but libsdl1.2 and
mplayer still use it.
---
 debian/tests/build | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/debian/tests/build b/debian/tests/build
index e3cdf08..f438cb5 100755
--- a/debian/tests/build
+++ b/debian/tests/build
@@ -42,6 +42,12 @@ echo "build: OK"
 ./caca_test
 echo "run: OK"
 
+${CROSS_COMPILE}gcc -o caca_test_legacy caca_test.c `caca-config --cflags --libs` -Wall -Werror
+echo "build (legacy caca-config script): OK"
+[ -x caca_test_legacy ]
+./caca_test_legacy
+echo "run: OK"
+
 cat <<EOF > caca_test.cpp
 #include <caca++.h>
 #include <iostream>
-- 
2.36.1


--- End Message ---
--- Begin Message ---
Source: libcaca
Source-Version: 0.99.beta20-3
Done: Sebastian Ramacher <sramacher@debian.org>

We believe that the bug you reported is fixed in the latest version of
libcaca, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1014744@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sebastian Ramacher <sramacher@debian.org> (supplier of updated libcaca package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 12 Jul 2022 10:50:07 +0200
Source: libcaca
Architecture: source
Version: 0.99.beta20-3
Distribution: unstable
Urgency: medium
Maintainer: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>
Changed-By: Sebastian Ramacher <sramacher@debian.org>
Closes: 1014744
Changes:
 libcaca (0.99.beta20-3) unstable; urgency=medium
 .
   [ Sebastian Ramacher ]
   * debian/control: Remove obsolete Pre-Depends
   * debian/: Remove obsolete postinst and prerm scripts
   * debian/tests: Do not build autopkgtests with -Werror
 .
   [ Simon McVittie ]
   * Make libcaca-dev multi-arch co-installable (Closes: #1014744)
   * d/tests/build: Also exercise C++ linking
   * d/tests/build: Also exercise legacy caca-config script
Checksums-Sha1:
 ccef8be808ed223f162fa89523719e1b1f50cda3 2266 libcaca_0.99.beta20-3.dsc
 cc7846c5e7e8f15f809f32d8cb5401b756960068 10076 libcaca_0.99.beta20-3.debian.tar.xz
Checksums-Sha256:
 7e127704c2bcffbcc2ac5a3804416ad81ad1aaca06de64ae42691750f5ee0ab4 2266 libcaca_0.99.beta20-3.dsc
 ee7ef2959556a0e9216ed3b585a5940078b2ab438c9d502d64cf445cfb22daef 10076 libcaca_0.99.beta20-3.debian.tar.xz
Files:
 b1f4df7a011faee0bbcbff3dd1a74382 2266 libs optional libcaca_0.99.beta20-3.dsc
 2295e5ac4bd78de649a58f7f763894a9 10076 libs optional libcaca_0.99.beta20-3.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE94y6B4F7sUmhHTOQafL8UW6nGZMFAmLNNokACgkQafL8UW6n
GZNMERAAsqlifNZKPubT0H7mDOq+E4E6CMxiLwajEyTf0lN6z00HdIbzQGOTL21F
psVbbdz9xrm6Bcts6SCVR4p8DWpcMLEjXyCvM1SDECFaAUWect9QnajVVMyi8UGS
dCrMEgfLDCypfR2Rzchdi1Z1DkJNe4RzTHprqbe6zzVl5WIFe4gkK8pkpsNw4S6p
jWuL1NTuR6PSSkTFU/2re7b0ZVzXdhZVyeOBPol4vspjCyh0BZNtGu/Xm3dkBNUs
cbp5JMlFeHbfdAezgJnMAD3CKerf/GaBmxsVBQNV6dv+eMJSGzd1n7PJ+6lLgeU9
1Ai1XgagBP6pteNETNsFTFFqUmSMsxTzOjIuO9OHlinKB+5s5gxiZCUwjv1XsUTO
iKKrtSL/0tp4YovCjJY79cFiK7a4VeY4rqAE4th3XA6cWohly/Xigc+Vh90OE2It
+nmfU+jduULW3Y9SXhFxFQyV6Q4CVUFmb8z4tH9h7fBVWUTzdzVH9wi9owQjiGOc
TSI9PnLw+uR/9mnweDU28+SQlorZeZw7fqAE+itbFuPp16Bczpyvu3uqdOm1R/pL
/n33Dr0QXRvzgwr17d7qcATNS2Zh8C0dAUdrsH7cDaOZVyYiMGcrJ5vg9uey/lLe
Xs7fcs2Lz02pbg1MpqLVkb+1eB/byodcHVeHBraPXwZnZ0EiaIQ=
=CSsv
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: