Merge from vendor branch TNF:
[pkgsrcv2.git] / regress / ignore-tools / spec
1 # $NetBSD: spec,v 1.2 2004/08/28 02:21:54 jlam Exp $
2
3 # Trigger the circular dependency detection logic to fail the package build before
4 # actually wasting time building anything.
5
6 _PKGSRC_DEPS=`cd ../../devel/bison && make show-var VARNAME=PKGNAME`
7 MAKEARGS_TEST="install _PKGSRC_DEPS=${_PKGSRC_DEPS}"
8 MAKEARGS_CLEAN="clean clean-depends"
9
10 # This test doesn't work if flex or bison are installed.
11
12 if pkg_info -qe flex
13 then
14         MAKEARGS_TEST="PKG_FAIL_REASON=flex-must-be-deinstalled"
15 fi
16
17 if pkg_info -qe bison
18 then
19         MAKEARGS_TEST="PKG_FAIL_REASON=bison-must-be-deinstalled"
20 fi
21
22 check_result()
23 {
24
25 # This test should fail with a circular dependency error
26
27 exit_status 1
28
29 output_require "Required package bison"
30 output_require "Circular dependency detected"
31
32 # This test should not start configuring anything
33
34 output_prohibit "Configuring for"
35 output_prohibit "bison-must-be-deinstalled"
36 output_prohibit "flex-must-be-deinstalled"
37
38 }
39