Source: signon-plugin-oauth2
Version: 0.22-1
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap
signon-plugin-oauth2 fails to cross build from source for multiple
reasons:
* It does not pass cross tools to qmake. This task can be easily
deferred to dh_auto_configure these days, but it doesn't fully work,
so in the best case dh_auto_build will fail until debhelper is fixed.
* It uses uname -m to discover the host cpu, but that returns the build
cpu of course.
* It uses plain pkg-config, which is the build architecture pkg-config
while the host architecture one was expected.
After fixing all of the above, the package fails with the expected
failure in dh_auto_build to be fixed in debhelper. Please consider
applying the attached patch.
Helmut
diff --minimal -Nru signon-plugin-oauth2-0.22/debian/changelog
signon-plugin-oauth2-0.22/debian/changelog
--- signon-plugin-oauth2-0.22/debian/changelog 2015-11-07 07:34:11.0
+0100
+++ signon-plugin-oauth2-0.22/debian/changelog 2017-11-14 21:44:59.0
+0100
@@ -1,3 +1,13 @@
+signon-plugin-oauth2 (0.22-1.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix some cross build issues: (closes: #-1)
++ Let dh_auto_configure pass cross tools to qmake.
++ Do not use uname -m to discover the host cpu.
++ Allow substituting pkg-config.
+
+ -- Helmut Grohne Tue, 14 Nov 2017 21:44:59 +0100
+
signon-plugin-oauth2 (0.22-1) unstable; urgency=low
* Initial release
diff --minimal -Nru signon-plugin-oauth2-0.22/debian/patches/cross.patch
signon-plugin-oauth2-0.22/debian/patches/cross.patch
--- signon-plugin-oauth2-0.22/debian/patches/cross.patch1970-01-01
01:00:00.0 +0100
+++ signon-plugin-oauth2-0.22/debian/patches/cross.patch2017-11-14
21:44:59.0 +0100
@@ -0,0 +1,33 @@
+Index: signon-plugin-oauth2-0.22/common-project-config.pri
+===
+--- signon-plugin-oauth2-0.22.orig/common-project-config.pri
signon-plugin-oauth2-0.22/common-project-config.pri
+@@ -47,14 +47,7 @@
+ message(" install prefix set to `$${INSTALL_PREFIX}'")
+ }
+
+-# Setup the library installation directory
+-exists( meego-release ) {
+-ARCH = $$system(tail -n1 meego-release)
+-} else {
+-ARCH = $$system(uname -m)
+-}
+-
+-contains( ARCH, x86_64 ) {
++contains( QMAKE_HOST.arch, x86_64 ) {
+ INSTALL_LIBDIR = $${INSTALL_PREFIX}/lib64
+ } else {
+ INSTALL_LIBDIR = $${INSTALL_PREFIX}/lib
+@@ -73,7 +66,11 @@
+ }
+
+ # Default directory for signond extensions
+-_PLUGINS = $$system(pkg-config --variable=plugindir signon-plugins)
++pkgConfig = $${PKG_CONFIG}
++isEmpty( pkgConfig ) {
++pkgConfig = "pkg-config"
++}
++_PLUGINS = $$system($$pkgConfig --variable=plugindir signon-plugins)
+ isEmpty(_PLUGINS) {
+ error("plugin directory not available through pkg-config")
+ } else {
diff --minimal -Nru signon-plugin-oauth2-0.22/debian/patches/series
signon-plugin-oauth2-0.22/debian/patches/series
--- signon-plugin-oauth2-0.22/debian/patches/series 2015-10-15
19:42:14.0 +0200
+++ signon-plugin-oauth2-0.22/debian/patches/series 2017-11-14
21:44:59.0 +0100
@@ -1,3 +1,4 @@
dont-install-examples.patch
hardening.patch
unused-variable.patch
+cross.patch
diff --minimal -Nru signon-plugin-oauth2-0.22/debian/rules
signon-plugin-oauth2-0.22/debian/rules
--- signon-plugin-oauth2-0.22/debian/rules 2015-11-07 19:07:43.0
+0100
+++ signon-plugin-oauth2-0.22/debian/rules 2017-11-14 21:42:26.0
+0100
@@ -8,7 +8,7 @@
dh $@ --buildsystem qmake
override_dh_auto_configure:
- qmake PREFIX=/usr LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)
+ dh_auto_configure -- PREFIX=/usr LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)
override_dh_auto_clean:
if [ -f Makefile ] ; then make distclean; fi