[mlpack] 04/09: take upstream patches, one to fix the txt2man single quote escape macro issue

Barak A. Pearlmutter barak+git at cs.nuim.ie
Sat Apr 12 07:35:06 UTC 2014


This is an automated email from the git hooks/post-receive script.

bap pushed a commit to branch master
in repository mlpack.

commit c02e726a66fe3458b1cd58c21bb223b473498313
Author: Barak A. Pearlmutter <barak+git at cs.nuim.ie>
Date:   Mon Apr 7 17:03:12 2014 +0100

    take upstream patches, one to fix the txt2man single quote escape macro issue
---
 debian/patches/doxyfile-path-fix.patch  | 26 ++++++++++++++++++++++++++
 debian/patches/series                   |  2 ++
 debian/patches/troff-single-quote.patch | 28 ++++++++++++++++++++++++++++
 debian/rules                            | 18 ------------------
 4 files changed, 56 insertions(+), 18 deletions(-)

diff --git a/debian/patches/doxyfile-path-fix.patch b/debian/patches/doxyfile-path-fix.patch
new file mode 100644
index 0000000..f25e052
--- /dev/null
+++ b/debian/patches/doxyfile-path-fix.patch
@@ -0,0 +1,26 @@
+From: "Barak A. Pearlmutter" <barak+git at cs.nuim.ie>
+Date: Mon, 7 Apr 2014 17:00:15 +0100
+Subject: doxyfile path fix
+
+---
+ CMake/GenerateDoxyfile.cmake | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/CMake/GenerateDoxyfile.cmake b/CMake/GenerateDoxyfile.cmake
+index 4b00958..da37beb 100644
+--- a/CMake/GenerateDoxyfile.cmake
++++ b/CMake/GenerateDoxyfile.cmake
+@@ -25,5 +25,12 @@ string(REPLACE
+     DOXYFILE_AUXVAR "${DOXYFILE_CONTENTS}"
+ )
+ 
++# Change the STRIP_FROM_PATH so that it works right even in the build directory;
++# otherwise, every file will have the full path in it.
++string(REGEX REPLACE
++    "(STRIP_FROM_PATH[ ]*=) ./"
++    "\\1 ${CMAKE_CURRENT_SOURCE_DIR}/"
++    DOXYFILE_CONTENTS ${DOXYFILE_AUXVAR})
++
+ # Save the Doxyfile to its new location.
+-file(WRITE "${DESTDIR}/Doxyfile" "${DOXYFILE_AUXVAR}")
++file(WRITE "${DESTDIR}/Doxyfile" "${DOXYFILE_CONTENTS}")
diff --git a/debian/patches/series b/debian/patches/series
index 4b2b1fa..c8e1752 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,3 @@
 build-Doxygen.patch
+troff-single-quote.patch
+doxyfile-path-fix.patch
diff --git a/debian/patches/troff-single-quote.patch b/debian/patches/troff-single-quote.patch
new file mode 100644
index 0000000..3f8065d
--- /dev/null
+++ b/debian/patches/troff-single-quote.patch
@@ -0,0 +1,28 @@
+From: "Barak A. Pearlmutter" <barak+git at cs.nuim.ie>
+Date: Mon, 7 Apr 2014 16:59:22 +0100
+Subject: troff single quote
+
+---
+ CMake/exec2man.sh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMake/exec2man.sh b/CMake/exec2man.sh
+index ce59e5b..b0807fc 100755
+--- a/CMake/exec2man.sh
++++ b/CMake/exec2man.sh
+@@ -64,7 +64,7 @@ synopsis="$name [-h] [-v] $reqoptions $options";
+ # correctly so that the entire description of the parameter is on one line (this
+ # helps avoid 'man' warnings).
+ # The sed line at the end removes accidental macros from the output, replacing
+-# 'word' with "word".
++# single-quotes at the beginning of a line with the troff escape code \(aq.
+ ./"$name" -h | \
+   sed 's/^For further information/Additional Information\n\n For further information/' | \
+   sed 's/^consult the documentation/ consult the documentation/' | \
+@@ -76,5 +76,5 @@ synopsis="$name [-h] [-v] $reqoptions $options";
+   awk '/NAME/,/REQUIRED OPTIONS/ { print; } /ADDITIONAL INFORMATION/,0 { print; } /REQUIRED OPTIONS/,/ADDITIONAL INFORMATION/ { if (!/REQUIRED_OPTIONS/ && !/OPTIONS/ && !/ADDITIONAL INFORMATION/) { if (/ --/) { printf "\n" } sub(/^[ ]*/, ""); sub(/ [ ]*/, " "); printf "%s ", $0; } else { if (!/REQUIRED OPTIONS/ && !/ADDITIONAL INFORMATION/) { print "\n"$0; } } }' | \
+   sed 's/  ADDITIONAL INFORMATION/\n\nADDITIONAL INFORMATION/' | \
+   txt2man -P mlpack -t "$name" -d 1 | \
+-  sed "s/^'\([A-Za-z0-9 ]*\)'/\"\1\"/" > "$output"
++  sed "s/^'/\\\\(aq/" > "$output"
+ 
diff --git a/debian/rules b/debian/rules
index af82c51..35785dd 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,27 +11,9 @@ override_dh_auto_build:
 	cd obj-*/doc/latex && \
 	 sed --in-place 's:usepackage\[utf8\]{inputenc}:usepackage[utf8x]{inputenc}:' refman.tex && \
 	 $(MAKE) pdf
-	@echo txt2man should backslash-escape lines starting with a single quote.
-	cd obj-*/share/man &&				\
-	 for f in fastmks.1 nca.1; do			\
-	  gunzip --force --keep $$f.gz &&		\
-	  sed --in-place "s:^[']:\\\\':" $$f &&		\
-	  gzip --force $$f ;				\
-	 done
 
 override_dh_auto_test:
 	@echo do not ask do not tell do not test
 
-override_dh_auto_install:
-	dh_auto_install
-	@echo txt2man should backslash-escape lines starting with a single quote.
-	@echo These are re-generated during installation so we re-fix them here.
-	cd debian/tmp/usr/share/man/man1 &&		\
-	 for f in fastmks.1 nca.1; do			\
-	  gunzip --force --keep $$f.gz &&		\
-	  sed --in-place "s:^[']:\\\\':" $$f &&		\
-	  gzip --force $$f ;				\
-	 done
-
 override_dh_compress:
 	dh_compress -Xrefman.pdf -Xdoc/html/

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git



More information about the debian-science-commits mailing list