Control: reopen 909740
Control: found 909740 2.0.8+dfsg1-2
Control: fixed 909740 2.0.8+dfsg1-3
Control: found 909740 2.0.8+dfsg1-3.1

On Sun, 30 Sep 2018 at 17:44:10 +0200, Manuel A. Fernandez Montecelo wrote:
> Em dom, 30 de set de 2018 às 16:57, Simon McVittie <s...@debian.org> escreveu:
> > For the short term, I'm preparing a NMU that reverts the multiarch change
> > and adds an autopkgtest that confirms that the package is usable, because
> > libsdl2-dev is currently unusable, and that's a considerably worse bug
> > than not being multiarch-friendly.
> 
> For the record: I spoke to Simon and acked the NMU with no delay, to
> avoid affecting more packages.

I've uploaded without delay as requested. Please merge
https://salsa.debian.org/sdl-team/libsdl2/merge_requests/1 or see attached.

    smcv
diffstat for libsdl2-2.0.8+dfsg1 libsdl2-2.0.8+dfsg1

 changelog           |   10 +++++++
 control             |    1 
 copyright           |    2 +
 libsdl2-dev.install |    1 
 rules               |    5 ---
 tests/build         |   70 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/control       |    3 ++
 7 files changed, 85 insertions(+), 7 deletions(-)

diff -Nru libsdl2-2.0.8+dfsg1/debian/changelog libsdl2-2.0.8+dfsg1/debian/changelog
--- libsdl2-2.0.8+dfsg1/debian/changelog	2018-09-27 15:21:47.000000000 +0100
+++ libsdl2-2.0.8+dfsg1/debian/changelog	2018-09-30 16:13:38.000000000 +0100
@@ -1,3 +1,13 @@
+libsdl2 (2.0.8+dfsg1-3.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * d/tests/build: Add autopkgtest to check that dynamic linking with
+    either pkg-config or sdl2-config works correctly
+  * Revert "Make libsdl2-dev coinstallable again"
+    (Closes: #909778) (reopens: #909740)
+
+ -- Simon McVittie <s...@debian.org>  Sun, 30 Sep 2018 16:13:38 +0100
+
 libsdl2 (2.0.8+dfsg1-3) unstable; urgency=medium
 
   [ Hugh McMaster <hugh.mcmas...@outlook.com> ]
diff -Nru libsdl2-2.0.8+dfsg1/debian/control libsdl2-2.0.8+dfsg1/debian/control
--- libsdl2-2.0.8+dfsg1/debian/control	2018-09-27 15:20:43.000000000 +0100
+++ libsdl2-2.0.8+dfsg1/debian/control	2018-09-30 16:13:38.000000000 +0100
@@ -66,7 +66,6 @@
 Package: libsdl2-dev
 Section: libdevel
 Architecture: any
-Multi-Arch: same
 Depends:
  libasound2-dev [linux-any],
  libdbus-1-dev,
diff -Nru libsdl2-2.0.8+dfsg1/debian/copyright libsdl2-2.0.8+dfsg1/debian/copyright
--- libsdl2-2.0.8+dfsg1/debian/copyright	2018-09-27 15:19:31.000000000 +0100
+++ libsdl2-2.0.8+dfsg1/debian/copyright	2018-09-30 16:13:38.000000000 +0100
@@ -113,6 +113,8 @@
            2002-2007, Josselin Mouette <j...@debian.org>
            2001, Christian T. Steigies <c...@debian.org>
            2001, Branden Robinson <bran...@debian.org>
+           2012, Canonical Ltd.
+           2018, Simon McVittie
 License: LGPL-2.1+
 
 License: SGI-Free-Software-License-B
diff -Nru libsdl2-2.0.8+dfsg1/debian/libsdl2-dev.install libsdl2-2.0.8+dfsg1/debian/libsdl2-dev.install
--- libsdl2-2.0.8+dfsg1/debian/libsdl2-dev.install	2018-09-27 15:20:49.000000000 +0100
+++ libsdl2-2.0.8+dfsg1/debian/libsdl2-dev.install	2018-09-30 16:13:38.000000000 +0100
@@ -1,5 +1,4 @@
 usr/bin/sdl2-config
-usr/include/*/SDL2
 usr/include/SDL2
 usr/lib/*/cmake/SDL2/sdl2-config.cmake
 usr/lib/*/libSDL2*.so
diff -Nru libsdl2-2.0.8+dfsg1/debian/rules libsdl2-2.0.8+dfsg1/debian/rules
--- libsdl2-2.0.8+dfsg1/debian/rules	2018-09-27 15:20:51.000000000 +0100
+++ libsdl2-2.0.8+dfsg1/debian/rules	2018-09-30 16:13:38.000000000 +0100
@@ -69,11 +69,6 @@
 	rm -f debian/examples.tar.gz
 	rm -rf output
 
-override_dh_install:
-	mkdir -p debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/SDL2
-	mv debian/tmp/usr/include/SDL2/SDL_config.h debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/SDL2
-	dh_install
-
 override_dh_missing:
 	dh_missing --fail-missing -XlibSDL2.la -XlibSDL2main.la -XlibSDL2_test.la
 
diff -Nru libsdl2-2.0.8+dfsg1/debian/tests/build libsdl2-2.0.8+dfsg1/debian/tests/build
--- libsdl2-2.0.8+dfsg1/debian/tests/build	1970-01-01 01:00:00.000000000 +0100
+++ libsdl2-2.0.8+dfsg1/debian/tests/build	2018-09-30 16:13:38.000000000 +0100
@@ -0,0 +1,70 @@
+#!/bin/sh
+# autopkgtest check: Build and run a program against SDL, to verify that the
+# headers and pkg-config file are installed correctly
+#
+# Based on glib2.0's debian/tests/build
+# (C) 2012 Canonical Ltd.
+# (C) 2018 Simon McVittie
+# Authors: Martin Pitt, Simon McVittie
+
+set -eux
+
+# Ideally this test could be re-run with mode=static. However, statically
+# linking libSDL2 doesn't actually work, because there is no libasound.a
+# in libasound-dev (since 1.0.27-3 in 2013).
+mode=dynamic
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+cat <<EOF > use-sdl.c
+#undef NDEBUG
+#include <assert.h>
+
+#include <SDL_version.h>
+
+int main(void)
+{
+    SDL_version compiled;
+    SDL_version linked;
+
+    SDL_VERSION(&compiled);
+    SDL_GetVersion(&linked);
+
+    assert(compiled.major == 2);
+    assert(linked.major == 2);
+
+    return 0;
+}
+EOF
+
+for tool in pkg-config sdl2-config; do
+    cflags=
+    pcflags=
+    scflags=--libs
+
+    case "$mode" in
+    (static)
+        cflags=-static
+        pcflags=--static
+        scflags=--static-libs
+        ;;
+    esac
+
+    case "$tool" in
+    (pkg-config)
+        gcc $cflags -o use-${tool}-${mode} use-sdl.c `pkg-config $pcflags --cflags --libs sdl2`
+        ;;
+    (sdl2-config)
+        gcc $cflags -o use-${tool}-${mode} use-sdl.c `sdl2-config --cflags $scflags`
+        ;;
+    (*)
+        exit 1
+        ;;
+    esac
+
+    echo "build (with $tool, $mode): OK"
+    [ -x use-${tool}-${mode} ]
+    ./use-${tool}-${mode}
+    echo "run (with $tool, $mode): OK"
+done
diff -Nru libsdl2-2.0.8+dfsg1/debian/tests/control libsdl2-2.0.8+dfsg1/debian/tests/control
--- libsdl2-2.0.8+dfsg1/debian/tests/control	1970-01-01 01:00:00.000000000 +0100
+++ libsdl2-2.0.8+dfsg1/debian/tests/control	2018-09-30 16:13:38.000000000 +0100
@@ -0,0 +1,3 @@
+Tests: build
+Depends: libsdl2-dev, build-essential
+Restrictions: allow-stderr

Reply via email to