dev-libs/libcdio-paranoia: fix out-ouf-tree test run, bug #546388

Reported-by: eroen
Reported-by: Paolo Pedroni
Bug: https://bugs.gentoo.org/546388
Package-Manager: Portage-2.3.6, Repoman-2.3.2
This commit is contained in:
Sergei Trofimovich 2017-06-12 21:37:50 +01:00
parent d5141c5ac2
commit db12bf36d4
No known key found for this signature in database
GPG Key ID: 71A1EE76611FF3AA
4 changed files with 54 additions and 0 deletions

View File

@ -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

View 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

View 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

View 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