summaryrefslogtreecommitdiff
path: root/dev-libs/libcdio-paranoia/files/libcdio-paranoia-0.90-oos-tests.patch
blob: 86cf9da8d0fd6e245825abc95d9358eb544bef22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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