dev-libs/libcdio-paranoia: fix out-ouf-tree test run, bug #546388
authorSergei Trofimovich <slyfox@gentoo.org>
Mon, 12 Jun 2017 20:37:50 +0000 (21:37 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Mon, 12 Jun 2017 20:38:02 +0000 (21:38 +0100)
Reported-by: eroen
Reported-by: Paolo Pedroni
Bug: https://bugs.gentoo.org/546388
Package-Manager: Portage-2.3.6, Repoman-2.3.2

dev-libs/libcdio-paranoia/files/libcdio-paranoia-0.90-oos-tests.patch [new file with mode: 0644]
dev-libs/libcdio-paranoia/libcdio-paranoia-0.93_p1-r1.ebuild
dev-libs/libcdio-paranoia/libcdio-paranoia-0.93_p1.ebuild
dev-libs/libcdio-paranoia/libcdio-paranoia-0.94_p1-r1.ebuild

diff --git a/dev-libs/libcdio-paranoia/files/libcdio-paranoia-0.90-oos-tests.patch b/dev-libs/libcdio-paranoia/files/libcdio-paranoia-0.90-oos-tests.patch
new file mode 100644 (file)
index 0000000..86cf9da
--- /dev/null
@@ -0,0 +1,48 @@
+From 4803c621d4f907402f29eba8cc3a6515bdda2ee2 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Mon, 12 Jun 2017 21:20:35 +0100
+Subject: [PATCH] configure.ac: fix out-of-tree tests
+
+To reproduce the test failure one needs to run
+configure using absolute path in a directory
+outside source tree. For example:
+
+    $ $(pwd)/../libcdio-paranoia/configure
+    $ make
+    $ make check
+
+This will cause 'native_abs_top_srcdir' to contain wrong path.
+
+It happens because '[]' is an escape in autoconf.
+As a the following configure.ac snippet:
+    [\\/]* | ?:[\\/]* )  # Absolute name.
+gets translated into the following shell code:
+    \\/* | ?:\\/* )  # Absolute name.
+
+The fix is to change quotes from '[]' for a short while.
+
+Reported-by: eroen
+Reported-by: Paolo Pedroni
+Bug: https://bugs.gentoo.org/546388
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ configure.ac | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index a502273..608277b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -243,7 +243,9 @@ dnl native_abs_top_srcdir is used here.
+ case $srcdir in
+   .)  # We are building in place.
+    native_abs_top_srcdir=$ac_pwd ;;
++  changequote(`,')
+   [\\/]* | ?:[\\/]* )  # Absolute name.
++  changequote([,])
+     native_abs_top_srcdir=$srcdir ;;
+   *) # Relative name.
+     native_abs_top_srcdir=$ac_pwd/$srcdir ;;
+-- 
+2.13.1
+
index d446d2caa05d263ea5974843a454e647e15efefb..080c36095a31a524ff7d723ceeea3aecdbe2a049 100644 (file)
@@ -32,6 +32,8 @@ S=${WORKDIR}/${MY_P}
 
 DOCS=( AUTHORS ChangeLog NEWS README THANKS )
 
+PATCHES=("${FILESDIR}"/${PN}-0.90-oos-tests.patch)
+
 src_prepare() {
        sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.ac || die #466410
        default
index 2c02e162a4f889cd856640b967512910e419fe98..80cd5caae9e732aa335078315c934fca0e54b963 100644 (file)
@@ -34,6 +34,8 @@ S=${WORKDIR}/${MY_P}
 
 DOCS=( AUTHORS ChangeLog NEWS README THANKS )
 
+PATCHES=("${FILESDIR}"/${PN}-0.90-oos-tests.patch)
+
 src_prepare() {
        sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.ac || die #466410
        autotools-multilib_src_prepare
index 7075f83d7a6ac407e08a0f413313e6388c51c9d3..e144afa35ec96603b3bd8f74bb47a825d5e474b8 100644 (file)
@@ -32,6 +32,8 @@ S="${WORKDIR}/${MY_P}"
 
 DOCS=( AUTHORS ChangeLog NEWS README.md THANKS )
 
+PATCHES=("${FILESDIR}"/${PN}-0.90-oos-tests.patch)
+
 src_prepare() {
        sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.ac || die #466410
        default