summaryrefslogtreecommitdiff
path: root/lang/ruby/Makefile.common
blob: 424cf39ad31053d005e9851eb4f13d92f5c1069e (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
66
67
68
# $NetBSD: Makefile.common,v 1.4 2005/01/21 06:13:36 tv Exp $
#
# Ruby base distribution common definition

#
# Ruby distribution sites.
#
MASTER_SITE_RUBY?= \
	ftp://ftp.ruby-lang.org/pub/ruby/${RUBY_SITE_SUBDIR}/ \
	ftp://www.ibiblio.org/pub/languages/ruby/${RUBY_SITE_SUBDIR}/ \
	ftp://xyz.lcs.mit.edu/pub/ruby/${RUBY_SITE_SUBDIR}/ \
	ftp://gd.tuwien.ac.at/languages/ruby/${RUBY_SITE_SUBDIR}/ \
	ftp://ftp.fu-berlin.de/unix/languages/ruby/${RUBY_SITE_SUBDIR}/ \
	ftp://ftp.easynet.be/ruby/ruby/${RUBY_SITE_SUBDIR}/ \
	ftp://ftp.ntua.gr/pub/lang/ruby/${RUBY_SITE_SUBDIR}/ \
	ftp://sunsite.dk/mirrors/ruby/${RUBY_SITE_SUBDIR}/ \
	ftp://ruby.cdpa.nsysu.edu.tw/ruby/${RUBY_SITE_SUBDIR}/ \
	ftp://ftp.chg.ru/pub/lang/ruby/${RUBY_SITE_SUBDIR}/ \
	ftp://ftp.ring.gr.jp/pub/lang/ruby/${RUBY_SITE_SUBDIR}/ \
	ftp://ftp.iij.ad.jp/pub/lang/ruby/${RUBY_SITE_SUBDIR}/ \
	ftp://ftp.idaemons.org/pub/mirror/ftp.ruby-lang.org/ruby/${RUBY_SITE_SUBDIR}/
RUBY_SITE_SUBDIR?=	${RUBY_VER_DIR}

# Ruby distribution
RUBY_DISTINFO_FILE=	${.CURDIR}/../../lang/ruby${RUBY_VER}/distinfo

RUBY_HOMEPAGE=		http://www.ruby-lang.org/en/

# common default
RUBY_DISTNAME?=		ruby-${RUBY_VERSION}
RUBY_WRKSRC?=		${WRKDIR}/${RUBY_DISTNAME}
DIST_SUBDIR?=		ruby
STRIP?=			strip
DIST_SUBDIR?=		${RUBY_DIST_SUBDIR}

#
# Ruby shared library version handling.
#
RUBY_SHLIBMAJOR?=	${_RUBY_VER_MAJOR}
RUBY_SHLIBVER?=		${RUBY_VERSION}

.if ${OPSYS} == "NetBSD" || ${OPSYS} == "Interix"
RUBY_SHLIBMAJOR=	${RUBY_VER}
RUBY_SHLIBVER=		${RUBY_VER}.${_RUBY_VERS_TEENY}
.elif ${OPSYS} == "FreeBSD"
RUBY_SHLIBMAJOR=	# unused
RUBY_SHLIBVER=		${_RUBY_VERS_TEENY}
.elif ${OPSYS} == "IRIX"
RUBY_SHLIBMAJOR=	# unused
.elif ${OPSYS} == "Linux"
RUBY_SHLIBMAJOR=	${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}
.endif

.if empty(RUBY_SHLIBMAJOR)
RUBY_NOSHLIBMAJOR=	"@comment "
.else
RUBY_NOSHLIBMAJOR=
.endif

#
# PLIST substitution
#
PLIST_SUBST+=		RUBY_SHLIBVER="${RUBY_SHLIBVER}" \
			RUBY_SHLIBMAJOR="${RUBY_SHLIBMAJOR}" \
			RUBY_NOSHLIBMAJOR=${RUBY_NOSHLIBMAJOR} \
			RUBY_NAME="${RUBY_NAME}"

.include "replace.mk"