Hi Gianfranco,

On Fri, 22 Apr 2016 14:23:53 +0200 Gianfranco Costamagna
<locutusofb...@debian.org> wrote:
> Hi,
> > set(SDL2_LIBRARIES "-L${SDL2_LIBDIR}  -lSDL2 ")
> 
> I know where that space comes from:
> 
> quoting configure.in
> 
> SDL_LIBS="-lSDL2 $BASE_LDFLAGS"
> 
> 
> changing to 
> SDL_LIBS="-lSDL2$BASE_LDFLAGS"
> 
> fixes the issue, because in our case BASE_LDFLAGS is undefined.
> 
> I'm not sure why the cmake build is not even creating it, and I'm not sure how
> to best fix the issue.
> 
> I think a patch would be welcome, so the maintainers can apply it if needed :)

I attached a patch, would something like this be an acceptable solution
? If yes I think we should forward upstream

> 
> thanks for the bug report,
> 
> Gianfranco
> 

-- 
Jason Pleau
>From bdab9ab551bd388f3a985909a5534535899048cc Mon Sep 17 00:00:00 2001
From: Jason Pleau <ja...@jpleau.ca>
Date: Sun, 24 Apr 2016 13:13:35 -0400
Subject: [PATCH] patch to remove trailing whitespace in sdl2-config.cmake

---
 debian/changelog                                   |  5 +++-
 .../patches/remove_trailing_whitespace_cmake.patch | 27 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 32 insertions(+), 1 deletion(-)
 create mode 100644 debian/patches/remove_trailing_whitespace_cmake.patch

diff --git a/debian/changelog b/debian/changelog
index 3c85867..59ff8a5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -22,7 +22,10 @@ libsdl2 (2.0.4+dfsg2-1) UNRELEASED; urgency=medium
       this repack can be removed in the next upstream tarball import.
       (Closes: #814276).
 
- -- Manuel A. Fernandez Montecelo <m...@debian.org>  Sun, 21 Feb 2016 19:08:44 +0000
+  [ Jason Pleau ]
+  * patch to remove trailing whitespace in sdl2-config.cmake (Closes: #822210)
+
+ -- Jason Pleau <ja...@jpleau.ca>  Sun, 24 Apr 2016 13:08:58 -0400
 
 libsdl2 (2.0.4+dfsg1-2) unstable; urgency=low
 
diff --git a/debian/patches/remove_trailing_whitespace_cmake.patch b/debian/patches/remove_trailing_whitespace_cmake.patch
new file mode 100644
index 0000000..c9d5f0a
--- /dev/null
+++ b/debian/patches/remove_trailing_whitespace_cmake.patch
@@ -0,0 +1,27 @@
+Description: remove the trailing whitespace in sdl2-config.cmake
+ CMake complains that there is trailing whitespace for the SDL2_LIBARIES
+ directive. This patch removes the space before $BASE_LDFLAGS in configure.in
+ which results in no extra whitespace in sdl2-config.cmake.
+Author: Jason Pleau <ja...@jpleau.ca>
+Bug-Debian: https://bugs.debian.org/822210
+
+--- a/configure.in
++++ b/configure.in
+@@ -97,7 +97,7 @@
+ 
+         if test x$have_no_cygwin = xyes; then
+             BASE_CFLAGS="-mno-cygwin"
+-            BASE_LDFLAGS="-mno-cygwin"
++            BASE_LDFLAGS=" -mno-cygwin"
+         fi
+         BASE_CFLAGS="$BASE_CFLAGS -I/usr/include/mingw"
+         ;;
+@@ -123,7 +123,7 @@
+ #    fi
+ #done
+ SDL_CFLAGS="$BASE_CFLAGS"
+-SDL_LIBS="-lSDL2 $BASE_LDFLAGS"
++SDL_LIBS="-lSDL2$BASE_LDFLAGS"
+ CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS"
+ CFLAGS="$CFLAGS $EXTRA_CFLAGS"
+ LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
diff --git a/debian/patches/series b/debian/patches/series
index 642e32f..8f1b1e9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
+remove_trailing_whitespace_cmake.patch
 SDL2_dont_propagate_lpthread.diff
 replace-relicenced-SDL_qsort.patch
-- 
2.8.1

Reply via email to