Bug#845539: Avoid building documentation on arch-dep-only builds

2016-11-24 Thread Iain Lane
On Thu, Nov 24, 2016 at 04:19:44PM +0100, Ansgar Burchardt wrote:
> I don't maintain the package, but I was wondering:
 
> With both override_dh_auto_configure-arch and -indep, what happens when
>  building both arch-indep and arch-dep packages?

I did that to pass the enable and/or disable flags as appropriate. What
happens is that it works, in my sbuild and on Ubuntu's buildds anyway.

Is it more idiomatic to have override_dh_auto_configure and
override_dh_auto_configure-arch?

Ta,

-- 
Iain Lane  [ i...@orangesquash.org.uk ]
Debian Developer   [ la...@debian.org ]
Ubuntu Developer   [ la...@ubuntu.com ]


signature.asc
Description: PGP signature


Bug#845539: Avoid building documentation on arch-dep-only builds

2016-11-24 Thread Ansgar Burchardt
I don't maintain the package, but I was wondering:

With both override_dh_auto_configure-arch and -indep, what happens when
 building both arch-indep and arch-dep packages?

Ansgar



Bug#845539: Avoid building documentation on arch-dep-only builds

2016-11-24 Thread Iain Lane
Package: hkl
Version: 5.0.0.2173-2
Severity: wishlist
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu zesty ubuntu-patch

Ahoy,

In Ubuntu I noticed that I couldn't build hkl (needed for the glew
transition, indirectly) on ppc64el because emacs is FTBFSing there.

After having a look at the package, I figured out that it's actually not
necessary to have emacs around except for the Arch: all -doc package. A
small patch (or you could do similar in packaging) is required to
install the manpage even if --disable-hkl-doc is passed. Attached.

Ever yours,

-- 
Iain Lane  [ i...@orangesquash.org.uk ]
Debian Developer   [ la...@debian.org ]
Ubuntu Developer   [ la...@ubuntu.com ]
diff -Nru hkl-5.0.0.2173/debian/control hkl-5.0.0.2173/debian/control
--- hkl-5.0.0.2173/debian/control	2016-10-31 09:28:34.0 +
+++ hkl-5.0.0.2173/debian/control	2016-11-24 11:55:22.0 +
@@ -5,9 +5,7 @@
 Priority: extra
 Build-Depends: debhelper (>= 9),
dh-autoreconf,
-   emacs24 | org-mode (>= 8.0.7-2~),
gobject-introspection,
-   gtk-doc-tools,
libbullet-dev,
libg3d-dev,
libg3d-plugins,
@@ -19,6 +17,8 @@
python-gi,
python-matplotlib,
python-tk
+Build-Depends-Indep: emacs24 | org-mode (>= 8.0.7-2~),
+ gtk-doc-tools
 Standards-Version: 3.9.8
 Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/hkl.git
 Vcs-Git: https://anonscm.debian.org/git/debian-science/packages/hkl.git
diff -Nru hkl-5.0.0.2173/debian/patches/always-install-man hkl-5.0.0.2173/debian/patches/always-install-man
--- hkl-5.0.0.2173/debian/patches/always-install-man	1970-01-01 01:00:00.0 +0100
+++ hkl-5.0.0.2173/debian/patches/always-install-man	2016-11-24 11:55:04.0 +
@@ -0,0 +1,45 @@
+Description: Always install the man page. For Debian, this is in the main package so we want to build it even on a non-indep build. It's pre-generated so doesn't rely on emacs (etc).
+Author: Iain Lane 
+
+Index: b/Makefile.am
+===
+--- a/Makefile.am
 b/Makefile.am
+@@ -3,16 +3,13 @@
+ ACLOCAL_AMFLAGS = -I m4
+ AM_DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection --enable-hkl3d
+ 
+-SUBDIRS = hkl
++SUBDIRS = hkl Documentation
+ if HKL3D
+ SUBDIRS += hkl3d data
+ endif
+ if GUI
+ SUBDIRS += gui
+ endif
+-if HKL_DOC
+-SUBDIRS += Documentation
+-endif
+ SUBDIRS += tests
+ if CONTRIB
+ SUBDIRS += contrib
+Index: b/Documentation/Makefile.am
+===
+--- a/Documentation/Makefile.am
 b/Documentation/Makefile.am
+@@ -1,7 +1,8 @@
+-SUBDIRS=api figures sphinx
+-
+ dist_man_MANS = ghkl.1
+ 
++if HKL_DOC
++SUBDIRS=api figures sphinx
++
+ AM_LDFLAGS = $(top_builddir)/hkl/libhkl.la
+ 
+ dist_html_DATA=hkl.html
+@@ -24,3 +25,4 @@
+ 	sensible-browser $(builddir)/hkl.html
+ 
+ .PHONY: doc-edit doc-show
++endif
diff -Nru hkl-5.0.0.2173/debian/patches/series hkl-5.0.0.2173/debian/patches/series
--- hkl-5.0.0.2173/debian/patches/series	1970-01-01 01:00:00.0 +0100
+++ hkl-5.0.0.2173/debian/patches/series	2016-11-24 11:44:46.0 +
@@ -0,0 +1 @@
+always-install-man
diff -Nru hkl-5.0.0.2173/debian/rules hkl-5.0.0.2173/debian/rules
--- hkl-5.0.0.2173/debian/rules	2016-10-31 09:28:34.0 +
+++ hkl-5.0.0.2173/debian/rules	2016-11-24 11:25:01.0 +
@@ -8,7 +8,10 @@
 %:
 	dh $@ --with autoreconf,gir --dbg-package=libhkl-dbg
 
-override_dh_auto_configure:
+override_dh_auto_configure-arch:
+	dh_auto_configure -- --enable-hkl3d --disable-static --disable-hkl-doc --disable-gtk-doc
+
+override_dh_auto_configure-indep:
 	dh_auto_configure -- --enable-gtk-doc --enable-hkl3d --disable-static --htmldir=/usr/share/doc/libhkl-doc
 
 override_dh_install: