From f11ef30f7fe576723f71c2c6a9061ec7ef9472bd Mon Sep 17 00:00:00 2001 From: Thanos Doukoudakis Date: Sun, 24 Feb 2019 23:26:08 +0000 Subject: Fix library search path for man page generation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch will fix an issue that occurs when generating the man pages for swift-im. The man page is generated from the Swiften library using help2man. The issue occurs when the library cannot be found during build time and help2man is generating a man page with the output of that error, ignoring the return error code from swift-im. To avoid this happening in future builds, swift-im --help is run before generating the page and checked if the execution was successful. If yes we proceed with the generation, if not we stop the build and throw an error. swiften-config man page generation was not affected by this issue. Test-Information: Build with ubuntu 18.04 on a machine that hasn’t got Swift or Swiften installed. Build the Debian package for Debian stretch with pbuilder, and installed on a clean docker container (Debian stretch). Repeated the test with Debian sid but with packages build from docker containers. Change-Id: Icf8a84ba7f4810c87e5835e5ac1a91d1324ddac8 diff --git a/Swift/Packaging/SConscript b/Swift/Packaging/SConscript index 556c596..fda5182 100644 --- a/Swift/Packaging/SConscript +++ b/Swift/Packaging/SConscript @@ -23,7 +23,7 @@ if env["SCONS_STAGE"] == "build" : action = Action('$HELP2MAN --no-discard-stderr -m "Swift Manual" -S "swiften-config" -n "swiften-config" -N $SOURCE > $TARGET', cmdstr = "$HELP2MANSTR")) swiftHelp = env.Command( target='$HELP2MAN_DEBIAN_DIR/swift-im.1', source='#/Swift/QtUI/swift-im', - action = Action('$HELP2MAN --no-discard-stderr -m "Swift Manual" -S "Swift" -n "swift-im" -N $SOURCE > $TARGET', cmdstr = "$HELP2MANSTR")) + action = Action('$HELP2MAN --no-discard-stderr -m "Swift Manual" -S "Swift" -n "swift-im" -N "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./Swiften $SOURCE" > $TARGET', cmdstr = "$HELP2MANSTR")) else: print("Enabled help2man but help2man is not in the PATH of the current environment.") Exit(1) -- cgit v0.10.2-6-g49f6