blob: 4be5e7cb9be1685924259e0863862e42f341ee41 (
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# $NetBSD: rdoc.mk,v 1.17 2014/02/02 07:46:16 taca Exp $
.if !defined(_RUBY_RDOC_MK)
_RUBY_RDOC_MK= # defined
#
# === Package-settable variables ===
#
# RUBY_RDOC_REQD
# Specify later version of rdoc. Ruby base packages contain:
#
# ruby18-base: rdoc 1.0.1 - 20041108
# ruby193-base: rdoc 3.9.4
# ruby200-base: rdoc 4.0.0
#
# If a package has a trouble with these version, please specify the
# version of rdoc to RDOC_REQD.
#
.if !empty(RUBY_RDOC_REQD)
RUBY18_RDOC_VERS= 1.0.1
RUBY193_RDOC_VERS= 3.9.4
RUBY200_RDOC_VERS= 4.0.0
RUBY210_RDOC_VERS= 4.1.0
_RDOC_REQD_MAJOR= ${RUBY_RDOC_REQD:C/\.[0-9\.]+$//}
_RDOC_REQD_MINORS= ${RUBY_RDOC_REQD:C/^([0-9]+)\.*//}
. if ${RUBY_VER} == "18"
_RUBY_RDOC_MAJOR= ${RUBY18_RDOC_VERS:C/\.[0-9\.]+$//}
_RUBY_RDOC_MINORS= ${RUBY18_RDOC_VERS:C/^([0-9]+)\.*//}
.elif ${RUBY_VER} == "193"
_RUBY_RDOC_MAJOR= ${RUBY193_RDOC_VERS:C/\.[0-9\.]+$//}
_RUBY_RDOC_MINORS= ${RUBY193_RDOC_VERS:C/^([0-9]+)\.*//}
.elif ${RUBY_VER} == "200"
_RUBY_RDOC_MAJOR= ${RUBY200_RDOC_VERS:C/\.[0-9\.]+$//}
_RUBY_RDOC_MINORS= ${RUBY200_RDOC_VERS:C/^([0-9]+)\.*//}
.elif ${RUBY_VER} == "210"
_RUBY_RDOC_MAJOR= ${RUBY210_RDOC_VERS:C/\.[0-9\.]+$//}
_RUBY_RDOC_MINORS= ${RUBY210_RDOC_VERS:C/^([0-9]+)\.*//}
.else
PKG_FAIL_REASON+= "Unknown Ruby version specified: ${RUBY_VER}."
. endif
_RUBY_RDOC_REQD= NO
. if ${_RDOC_REQD_MAJOR} > ${_RUBY_RDOC_MAJOR}
_RUBY_RDOC_REQD= YES
. elif ${_RDOC_REQD_MAJOR} == ${_RUBY_RDOC_MAJOR}
. if !empty(_RUBY_RDOC_MINORS) && ${_RDOC_REQD_MINORS} > ${_RUBY_RDOC_MINORS}
_RUBY_RDOC_REQD= YES
. endif
. endif
. if empty(_RUBY_RDOC_REQD:M[nN][oO])
RDOC= ${PREFIX}/bin/rdoc
. if empty(RUBY_BUILD_RI:M[nN][oO]) && empty(RUBY_BUILD_RDOC:M[nN][oO])
# rdoc will be required at runtime, too.
DEPENDS+= ${RUBY_PKGPREFIX}-rdoc>=${RUBY_RDOC_REQD}:../../devel/ruby-rdoc
. endif
. endif
.endif
.endif
|