Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 libxs (1.2.0-2) unstable; urgency=medium
 .
   [ Laszlo Boszormenyi (GCS) ]
   * configure.ac: Update for libpgm 5.2 transition (Closes: #815685)
 .
   [ Robert Edmonds ]
   * debian/control: Update Maintainer
   * debian/control: Update Vcs-Browser
   * debian/control: Delete Homepage
   * debian/control: Bump Standards-Version to 3.9.7 (no changes)
   * debian/: Remove libxs-compat-libzmq* packages (Closes: #715128)
   * configure.ac: Disable -Werror, don't FTBFS due to compiler diagnostics
     (Closes: #754324)
   * debian/gbp.conf: New
   * debian/: Run "wrap-and-sort -sabt"
   * debian/: Remove libxs2-dbg package
   * debian/compat: 8 -> 9
   * debian/*.install: Update for multi-arch paths
Author: Robert Edmonds <edmonds@debian.org>
Bug-Debian: https://bugs.debian.org/715128
Bug-Debian: https://bugs.debian.org/754324
Bug-Debian: https://bugs.debian.org/815685

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- libxs-1.2.0.orig/configure.ac
+++ libxs-1.2.0/configure.ac
@@ -77,8 +77,8 @@ AC_CHECK_LIB([rt], [clock_gettime])
 # Set pedantic
 libxs_pedantic="yes"
 
-# By default compiling with -Werror except OSX.
-libxs_werror="yes"
+# Don't FTBFS due to compiler diagnostics (Debian BTS #754324)
+libxs_werror="no"
 
 # By default use DSO visibility
 libxs_dso_visibility="yes"
@@ -473,10 +473,9 @@ AS_IF([test "x$with_pgm_ext" != "xno"],
 # Build with system openpgm
 AS_IF([test "x$with_system_pgm_ext" != "xno"], [
     m4_ifdef([PKG_CHECK_MODULES], [
-        PKG_CHECK_MODULES([OpenPGM], [openpgm-5.1 >= 5.1])
+        PKG_CHECK_MODULES([OpenPGM], [openpgm-5.2 >= 5.2])
         AC_DEFINE([XS_HAVE_OPENPGM], [1], [Have OpenPGM extension])
         LIBXS_EXTRA_CXXFLAGS="$OpenPGM_CFLAGS $LIBXS_EXTRA_CXXFLAGS"
-        LIBS="$OpenPGM_LIBS $LIBS"
     ],
     [AC_MSG_ERROR([--with-system-pgm requires a working pkg-config installation])])
 ])
--- libxs-1.2.0.orig/src/Makefile.am
+++ libxs-1.2.0/src/Makefile.am
@@ -159,6 +159,8 @@ libxs_la_CXXFLAGS = @LIBXS_EXTRA_CXXFLAG
 if BUILD_PGM
 libxs_la_CPPFLAGS += -I$(top_srcdir)/@pgm_srcdir@/include/
 libxs_la_LIBADD = $(top_srcdir)/@pgm_srcdir@/libpgm_noinst.la
+else
+libxs_la_LIBADD = $(OpenPGM_LIBS)
 endif
 
 if BUILD_LIBZMQ
--- libxs-1.2.0.orig/src/atomic_ptr.hpp
+++ libxs-1.2.0/src/atomic_ptr.hpp
@@ -132,6 +132,7 @@ namespace xs
                 "1:     ldrex   %1, [%3]\n\t"
                 "       mov     %0, #0\n\t"
                 "       teq     %1, %4\n\t"
+                "       it      eq\n"
                 "       strexeq %0, %5, [%3]\n\t"
                 "       teq     %0, #0\n\t"
                 "       bne     1b\n\t"
