Annotation of pkgsrc/lang/ruby/rubyversion.mk, revision 1.163
1.163 ! taca 1: # $NetBSD: rubyversion.mk,v 1.162 2016/05/15 14:15:14 taca Exp $
1.64 taca 2: #
3:
4: # This file determines which Ruby version is used as a dependency for
5: # a package.
6: #
7: #
8: # === User-settable variables ===
9: #
10: # RUBY_VERSION_DEFAULT
11: # The preferered Ruby version to use.
12: #
1.160 taca 13: # Possible values: 18 21 22 23
1.159 taca 14: # Default: 22
1.64 taca 15: #
16: # RUBY_BUILD_RDOC
17: # Build rdoc of this package and so that install formated
18: # documentation. It is also used in each package.
19: #
20: # Possible values: Yes No
21: # Default: Yes
22: #
23: # RUBY_BUILD_RI
24: # Build ri format of this package so that ri command would be
25: # display class/module definitions. It is also used in each package.
26: #
27: # Possible values: Yes No
28: # Default: Yes
29: #
1.89 cheusov 30: # === Infrastructure variables ===
31: #
1.88 cheusov 32: # RUBY_VERSION_REQD
1.89 cheusov 33: # Ruby version to use. This variable should not be set in
34: # packages. Normally it is used by bulk build tools.
1.88 cheusov 35: #
36: # Possible values: ${RUBY_VERSION_SUPPORTED}
37: # Default: ${RUBY_VERSION_DEFAULT}
1.64 taca 38: #
39: # === Package-settable variables ===
40: #
41: # RUBY_VERSION_SUPPORTED
42: # The Ruby versions that are acceptable for the package.
43: #
1.160 taca 44: # Possible values: 18 21 22 23
45: # Default: 21 22 23
1.64 taca 46: #
47: # RUBY_NOVERSION
48: # If "Yes", the package dosen't depend on any version of Ruby, such
49: # as editing mode for emacs. In this case, package's name would begin
50: # with "ruby-". Otherwise, the package's name is begin with
1.124 taca 51: # ${RUBY_PKGPREFIX}.
1.64 taca 52: #
53: # Possible values: Yes No
54: # Default: No
55: #
56: # RUBY_DYNAMIC_DIRS
57: # Build dynamic PLIST from directories.
58: #
59: # Default: (empty)
60: #
61: # RUBY_ENCODING_ARG
62: #
63: # Optional encoding argument for shbang line.
64: #
65: # Default: (empty)
66: #
67: # === Defined variables ===
68: #
69: # RUBY_VER
1.87 taca 70: # Really selected version of ruby.
1.64 taca 71: #
1.160 taca 72: # Possible values: 18 21 22 23
1.64 taca 73: #
74: # Use this variable in pkgsrc's Makefile
75: #
76: # RUBY_PKGPREFIX
77: # Prefix part for ruby based packages. It is recommended that to
78: # use RUBY_PKGPREFIX with ruby related packages since you can supply
79: # different binary packages as each version of Ruby.
1.124 taca 80: #
1.160 taca 81: # Example values: ruby18 ruby21 ruby22 ruby23
1.64 taca 82: #
83: # RUBY_ABI_VERSION
84: # Ruby's ABI version.
85: #
86: # RUBY_DLEXT
87: # Suffix of extention library.
88: #
89: # RUBY_SLEXT
90: # Suffix of shared library.
91: #
92: # RUBY
93: # Full path of ruby command.
94: #
95: # RDOC
96: # Full path of rdoc command.
97: #
98: # RUBY_NAME
99: # Name of ruby command.
100: #
101: # RUBYGEM_NAME
102: # Name of gem command.
103: #
104: # RAKE_NAME
105: # Name of rake command.
106: #
107: # RUBY_SUFFIX
108: # Extra string for each ruby commands; ruby, irb and so on.
1.124 taca 109: #
1.160 taca 110: # Possible values: 18 21 22 23
1.64 taca 111: #
112: # RUBY_VERSION
113: # Version of real Ruby's version excluding patchlevel.
114: #
115: # RUBY_VERSION_FULL
116: # Version of Ruby including patchlevel.
1.97 rodent 117: #
1.131 taca 118: # RUBY_GEMS_PKGSRC_VERS
119: # Version of rubygems provided by misc/rubygems.
120: #
121: # RUBY_RDOC_PKGSRC_VERS
122: # Version of rdoc provided by devel/rdoc.
123: #
1.64 taca 124: # RUBY_BASE
125: # Name of ruby base package's name.
126: #
127: # RUBY_SRCDIR
1.112 taca 128: # Relative path to directory of base ruby package.
1.64 taca 129: #
130: # RUBY_SHLIBVER
131: # Suffix of libruby shared library's version.
132: #
133: # RUBY_SHLIB
134: # String after libruby shared library.
135: #
136: # RUBY_SHLIBALIAS
137: # Symblic link with libruby shared library with major version only.
138: #
139: # RUBY_STATICLIB
140: # Name of libruby static library.
141: #
142: # RUBY_VER_DIR
143: # Name of version directory under each library (and more) directories.
144: #
145: # RUBY_ARCH
146: # Name of architecture-dependent directory name.
147: #
148: # RUBY_INC
149: # machine independent include directory of ruby.
150: #
151: # RUBY_ARCHINC
152: # machine dependent include directory of ruby.
153: #
154: # RUBY_LIB_BASE
155: # common relative path of ruby's library.
156: #
157: # RUBY_LIB
158: # version specific relative path of ruby's library.
159: #
160: # RUBY_ARCHLIB
161: # version specific and machine dependent relative path of ruby's library.
162: #
163: # RUBY_SITELIB_BASE
164: # common site local directory.
165: #
166: # RUBY_SITELIB
167: # version specific site local directory.
168: #
169: # RUBY_SITEARCHLIB
170: # version specific and machine dependent site local directory.
171: #
172: # RUBY_VENDORLIB_BASE
173: # common vendor (pkgsrc) directory.
174: #
175: # RUBY_VENDORLIB
176: # version specific vendor local directory.
177: #
178: # RUBY_VENDORARCHLIB
179: # version specific and machine dependent vendor local directory.
180: #
181: # RUBY_DOC
182: # version specific document direcotry.
183: #
184: # RUBY_EG
185: # version specific examples direcotry.
186: #
187: # RUBY_GEM_BASE
188: # common GEM directory.
1.97 rodent 189: #
1.64 taca 190: # GEM_HOME
191: # version specific GEM directory.
192: #
193: # RUBY_RIDIR
194: # common ri directory.
195: #
196: # RUBY_BASERIDIR
197: # version specific ri directory.
198: #
199: # RUBY_SYSRIDIR
200: # version specific system ri directory.
201: #
202: # RUBY_SITERIDIR
203: # version specific site ri directory.
204: #
205: # Keywords: ruby
1.1 taca 206: #
207:
1.18 rillig 208: .if !defined(_RUBYVERSION_MK)
1.1 taca 209: _RUBYVERSION_MK= # defined
210:
211: .include "../../mk/bsd.prefs.mk"
212:
1.109 taca 213: .if defined(PKGNAME_REQD)
214: . if !empty(PKGNAME_REQD:Mruby[0-9][0-9][0-9]-*) || !empty(PKGNAME_REQD:Mruby[0-9][0-9]-*)
1.112 taca 215: _RUBY_VERSION_REQD:= ${PKGNAME_REQD:C/ruby([0-9][0-9]+)-.*/\1/}
1.150 taca 216: . if ${_RUBY_VERSION_REQD} == "18"
1.119 taca 217: RUBY_VERSION_REQD?= ${PKGNAME_REQD:C/ruby([0-9][0-9])[0-9]-.*/\1/}
218: . else
1.108 taca 219: RUBY_VERSION_REQD?= ${PKGNAME_REQD:C/ruby([0-9][0-9]+)-.*/\1/}
1.112 taca 220: . endif
1.109 taca 221: . endif
1.108 taca 222: .endif
223:
1.1 taca 224: # current supported Ruby's version
1.40 taca 225: RUBY18_VERSION= 1.8.7
1.162 taca 226: RUBY21_VERSION= 2.1.10
1.161 taca 227: RUBY22_VERSION= 2.2.5
1.163 ! taca 228: RUBY23_VERSION= 2.3.1
1.23 taca 229:
1.155 taca 230: # patch level
1.100 taca 231: RUBY18_PATCHLEVEL= pl374
1.162 taca 232: #RUBY21_PATCHLEVEL= p492
1.161 taca 233: #RUBY22_PATCHLEVEL= p319
1.163 ! taca 234: #RUBY23_PATCHLEVEL= p112
1.49 taca 235:
1.59 taca 236: # current API compatible version; used for version of shared library
1.49 taca 237: RUBY18_API_VERSION= 1.8.7
1.112 taca 238: RUBY21_API_VERSION= 2.1.0
1.131 taca 239: RUBY22_API_VERSION= 2.2.0
1.155 taca 240: RUBY23_API_VERSION= 2.3.0
1.131 taca 241:
242: # pkgsrc's rubygems's version
1.143 taca 243: RUBY_GEMS_PKGSRC_VERS= 2.4.8
1.131 taca 244:
245: # pkgsrc's rdoc's version
1.158 taca 246: RUBY_RDOC_PKGSRC_VERS= 4.2.2
1.1 taca 247:
248: #
1.159 taca 249: RUBY_VERSION_DEFAULT?= 22
1.64 taca 250:
1.160 taca 251: RUBY_VERSION_SUPPORTED?= 22 23 21
1.64 taca 252:
1.98 taca 253: .if defined(RUBY_VERSION_REQD)
254: . for rv in ${RUBY_VERSION_SUPPORTED}
1.109 taca 255: . if "${rv}" == ${RUBY_VERSION_REQD}
1.98 taca 256: RUBY_VER= ${rv}
257: . endif
258: . endfor
259: .elif !defined(RUBY_VER)
260: . for rv in ${RUBY_VERSION_SUPPORTED}
1.109 taca 261: . if "${rv}" == ${RUBY_VERSION_DEFAULT}
1.98 taca 262: RUBY_VER= ${rv}
263: . endif
264: . endfor
1.64 taca 265: .endif
1.1 taca 266:
1.98 taca 267: .if !defined(RUBY_VER)
1.64 taca 268: . for rv in ${RUBY_VERSION_SUPPORTED}
1.98 taca 269: . if !defined(RUBY_VER)
1.64 taca 270: RUBY_VER= ${rv}
1.52 joerg 271: . endif
1.64 taca 272: . endfor
1.1 taca 273: .endif
1.29 taca 274:
1.81 obache 275: RUBY_VER:= ${RUBY_VER_MAP.${RUBY_VER}:U${RUBY_VER}}
1.67 joerg 276:
1.112 taca 277: RUBY_SUFFIX?= ${_RUBY_VER_MAJOR}${_RUBY_VER_MINOR}${_RUBY_VER_TEENY}
278:
1.64 taca 279: .if ${RUBY_VER} == "18"
280: RUBY_VERSION= ${RUBY18_VERSION}
281: RUBY_VERSION_FULL= ${RUBY_VERSION}${RUBY_PATCHLEVEL:S/pl/./}
282: RUBY_ABI_VERSION= ${RUBY18_API_VERSION}
1.110 taca 283:
284: RUBY_RDOC_VERSION= 1.0.1
285:
1.112 taca 286: RUBY_SUFFIX= ${RUBY_VER}
287:
288: .elif ${RUBY_VER} == "21"
289: RUBY_VERSION= ${RUBY21_VERSION}
290: RUBY_VERSION_FULL= ${RUBY_VERSION}
1.110 taca 291: RUBY_ABI_VERSION= ${RUBY_VERSION}
292:
1.112 taca 293: RUBY_GEMS_VERSION= 2.2.2
1.110 taca 294: RUBY_RDOC_VERSION= 4.1.0
295: RUBY_RAKE_VERSION= 10.1.0
296: RUBY_JSON_VERSION= 1.8.1
297:
1.156 taca 298: RUBY_BIGDECIMAL_VERSION= 1.2.4
299: RUBY_IO_CONSOLE_VERSION= 0.4.3
300: RUBY_PSYCH_VERSION= 2.0.5
301: RUBY_MINITEST_VERSION= 4.7.5
302: RUBY_TEST_UNIT_VERSION= 2.1.8.0
303:
1.134 taca 304: RUBY_SUFFIX= ${_RUBY_VER_MAJOR}${_RUBY_VER_MINOR}
305:
1.131 taca 306: .elif ${RUBY_VER} == "22"
307: RUBY_VERSION= ${RUBY22_VERSION}
308: RUBY_VERSION_FULL= ${RUBY_VERSION}
309: RUBY_ABI_VERSION= ${RUBY_VERSION}
310:
311: RUBY_GEMS_VERSION= 2.4.5
312: RUBY_RDOC_VERSION= 4.2.0
313: RUBY_RAKE_VERSION= 10.4.2
314: RUBY_JSON_VERSION= 1.8.1
315:
1.156 taca 316: RUBY_BIGDECIMAL_VERSION= 1.2.6
317: RUBY_IO_CONSOLE_VERSION= 0.4.3
318: RUBY_PSYCH_VERSION= 2.0.8
319: RUBY_MINITEST_VERSION= 5.4.3
320: RUBY_POWER_ASSERT_VERSION= 0.2.2
321: RUBY_TEST_UNIT_VERSION= 3.0.8
322:
1.134 taca 323: RUBY_SUFFIX= ${_RUBY_VER_MAJOR}${_RUBY_VER_MINOR}
324:
1.155 taca 325: .elif ${RUBY_VER} == "23"
326: RUBY_VERSION= ${RUBY23_VERSION}
327: RUBY_VERSION_FULL= ${RUBY_VERSION}
328: RUBY_ABI_VERSION= ${RUBY_VERSION}
329:
330: RUBY_GEMS_VERSION= 2.5.1
331: RUBY_RDOC_VERSION= 4.2.1
332: RUBY_RAKE_VERSION= 10.4.2
333: RUBY_JSON_VERSION= 1.8.3
334:
1.156 taca 335: RUBY_BIGDECIMAL_VERSION= 1.2.8
336: RUBY_IO_CONSOLE_VERSION= 0.4.5
337: RUBY_PSYCH_VERSION= 2.0.17
338: RUBY_DID_YOU_MEAN_VERSION= 1.0.0
339: RUBY_MINITEST_VERSION= 5.8.3
340: RUBY_NET_TELNET_VERSION= 0.1.1
341: RUBY_POWER_ASSERT_VERSION= 0.2.6
342: RUBY_TEST_UNIT_VERSION= 3.1.5
343:
1.155 taca 344: RUBY_SUFFIX= ${_RUBY_VER_MAJOR}${_RUBY_VER_MINOR}
345:
1.64 taca 346: .else
347: PKG_FAIL_REASON+= "Unknown Ruby version specified: ${RUBY_VER}."
1.32 taca 348: .endif
1.1 taca 349:
1.98 taca 350: .if !empty(RUBY_VERSION)
1.64 taca 351: RUBY_PATCHLEVEL= ${RUBY${RUBY_VER}_PATCHLEVEL}
352: RUBY_API_VERSION= ${RUBY${RUBY_VER}_API_VERSION}
1.98 taca 353: .endif
1.64 taca 354:
1.60 wiz 355: # Variable assignment for multi-ruby packages
1.64 taca 356: MULTI+= RUBY_VER=${RUBY_VERS:U${RUBY_VERSION_DEFAULT}}
1.4 taca 357:
1.1 taca 358: # RUBY_NOVERSION should be set to "Yes" if the package dosen't depend on
359: # any specific version of ruby command. In this case, package's
360: # name begin with "ruby-".
361: # If RUBY_NOVERSION is "No" (default), the package's name is begin
1.160 taca 362: # with ${RUBY_NAME}; "ruby18", "ruby21", and so on.
1.1 taca 363: #
1.53 taca 364: # It also affects to RUBY_DOC, RUBY_EG...
1.1 taca 365: #
366: RUBY_NOVERSION?= No
367:
1.29 taca 368: # _RUBY_VER_MAJOR, _RUBY_VER_MINOR, _RUBY_VER_TEENY and _RUBY_PATCHLEVEL
369: # is defined from version of Ruby. It should not be used in packages'
370: # Makefile.
371: #
1.64 taca 372: _RUBY_VER_MAJOR= ${RUBY_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\1/}
373: _RUBY_VER_MINOR= ${RUBY_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\2/}
374: _RUBY_VER_TEENY= ${RUBY_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\3/}
1.1 taca 375:
1.64 taca 376: _RUBY_API_MAJOR= ${RUBY_API_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\1\2/}
377: _RUBY_API_MINOR= ${RUBY_API_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\3/}
1.1 taca 378:
1.64 taca 379: RUBY_NAME= ruby${RUBY_SUFFIX}
380: RUBYGEM_NAME= gem${RUBY_SUFFIX}
381: RAKE_NAME= rake${RUBY_SUFFIX}
1.1 taca 382:
1.49 taca 383: RUBY_ENCODING_ARG?=
384:
1.112 taca 385: RUBY_BASE= ${RUBY_NAME}-base
1.10 taca 386:
1.1 taca 387: RUBY_PKGPREFIX?= ${RUBY_NAME}
388:
1.87 taca 389: .if ${RUBY_VER} == "18"
1.64 taca 390: RUBY_VER_DIR= ${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}
1.134 taca 391: .else
392: RUBY_VER_DIR= ${RUBY_API_VERSION}
1.1 taca 393: .endif
394:
395: .if empty(RUBY_NOVERSION:M[nN][oO])
396: RUBY_SUFFIX=
397: RUBY_NAME= ruby
398: .endif
399:
1.64 taca 400: RUBY_BUILD_RDOC?= Yes
401: RUBY_BUILD_RI?= Yes
1.49 taca 402:
1.15 taca 403: RUBY?= ${PREFIX}/bin/${RUBY_NAME}
1.112 taca 404: RDOC?= ${PREFIX}/bin/rdoc${RUBY_SUFFIX}
1.1 taca 405:
1.132 riastrad 406: RUBY_ARCH?= ${MACHINE_GNU_ARCH}-${LOWER_OPSYS}${APPEND_ELF}${LOWER_OPSYS_VERSUFFIX}${APPEND_ABI}
1.1 taca 407:
1.138 taca 408: RUBY_MAJOR_MINOR= ${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}
409:
1.1 taca 410: #
1.53 taca 411: # Ruby shared and static library version handling.
1.10 taca 412: #
1.49 taca 413: RUBY_SHLIBVER?= ${RUBY_API_VERSION}
1.112 taca 414: RUBY_SHLIB?= ${RUBY_SUFFIX}.${RUBY_SLEXT}.${RUBY_SHLIBVER}
1.53 taca 415: RUBY_SHLIBALIAS?= @comment
1.112 taca 416: RUBY_STATICLIB?= ${RUBY_SUFFIX}-static.a
1.10 taca 417:
418: .if ${OPSYS} == "NetBSD" || ${OPSYS} == "Interix"
1.64 taca 419: RUBY_SHLIBVER= ${_RUBY_API_MAJOR}.${_RUBY_API_MINOR}
1.112 taca 420: _RUBY_SHLIBALIAS= ${RUBY_SUFFIX}.${RUBY_SLEXT}.${_RUBY_API_MAJOR}
1.12 jlam 421: .elif ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly"
1.87 taca 422: .if ${RUBY_VER} == "18"
1.112 taca 423: RUBY_SHLIBVER= ${RUBY_SUFFIX}
1.75 marino 424: .else
425: RUBY_SHLIBVER= ${_RUBY_VER_MAJOR}${_RUBY_VER_MINOR}${_RUBY_API_MINOR}
426: .endif
1.83 bsiegert 427: .elif ${OPSYS} == "OpenBSD" || ${OPSYS} == "MirBSD"
1.102 taca 428: .if ${_RUBY_VER_MINOR} == 0
429: RUBY_SHLIBVER= ${_RUBY_VER_MAJOR}.${_RUBY_API_MINOR}
430: .else
1.64 taca 431: RUBY_SHLIBVER= ${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}${_RUBY_API_MINOR}
1.102 taca 432: .endif
1.53 taca 433: .elif ${OPSYS} == "Darwin"
1.112 taca 434: RUBY_SHLIB= ${RUBY_SUFFIX}.${RUBY_SHLIBVER}.${RUBY_SLEXT}
1.53 taca 435: .if ${RUBY_VER} == "18"
1.112 taca 436: _RUBY_SHLIBALIAS= ${RUBY_SUFFIX}.${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}.${RUBY_SLEXT}
1.53 taca 437: .else
438: _RUBY_SHLIBALIAS= .${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}.${RUBY_SLEXT}
1.112 taca 439: RUBY_STATICLIB= ${RUBY_SUFFIX}.${RUBY_API_VERSION}-static.a
1.53 taca 440: .endif
1.10 taca 441: .elif ${OPSYS} == "Linux"
1.112 taca 442: _RUBY_SHLIBALIAS= ${RUBY_SUFFIX}.${RUBY_SLEXT}.${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}
1.56 taca 443: .elif ${OPSYS} == "SunOS"
444: RUBY_SHLIBVER= ${_RUBY_VER_MAJOR}
1.154 rillig 445: _RUBY_SHLIBALIAS= ${RUBY_SUFFIX}.${RUBY_SLEXT}.${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}.${_RUBY_API_MINOR}
1.96 obache 446: .elif ${OPSYS} == "Cygwin"
1.112 taca 447: RUBY_SHLIB= ${RUBY_SUFFIX}${_RUBY_API_MAJOR}${_RUBY_API_MINOR}.dll.a
448: RUBY_SHLIBALIAS= bin/cygruby${RUBY_SUFFIX}${_RUBY_API_MAJOR}${_RUBY_API_MINOR}.dll
449: RUBY_STATICLIB= ${RUBY_SUFFIX}${_RUBY_API_MAJOR}${_RUBY_API_MINOR}-static.a
1.10 taca 450: .endif
451:
1.53 taca 452: .if !empty(_RUBY_SHLIBALIAS)
453: RUBY_SHLIBALIAS= lib/libruby${_RUBY_SHLIBALIAS}
1.10 taca 454: .endif
455:
1.64 taca 456: .if ${_OPSYS_SHLIB_TYPE} == "dylib"
1.5 taca 457: RUBY_DLEXT= bundle
1.53 taca 458: RUBY_SLEXT= dylib
1.5 taca 459: .else
460: RUBY_DLEXT= so
1.53 taca 461: RUBY_SLEXT= so
1.5 taca 462: .endif
463:
464: #
1.71 taca 465: # Ruby distribution file, few package need it.
466: #
467: _RUBY_PATCHLEVEL= ${RUBY_PATCHLEVEL:S/pl/p/:S/pre/preview/}
468:
469: .if !empty(_RUBY_PATCHLEVEL)
470: RUBY_DISTNAME?= ruby-${RUBY_VERSION}-${_RUBY_PATCHLEVEL}
471: .else
472: RUBY_DISTNAME?= ruby-${RUBY_VERSION}
473: .endif
474:
475: #
1.26 taca 476: # Use pthread library with Ruby
477: #
1.64 taca 478: .if !empty(MACHINE_PLATFORM:MDarwin-9.*-powerpc)
1.42 minskim 479: # Workaround for Ruby Bug #193
480: # http://redmine.ruby-lang.org/issues/show/193
481: RUBY_USE_PTHREAD?= no
1.26 taca 482: .else
483: RUBY_USE_PTHREAD?= yes
484: .endif
485:
1.23 taca 486: RUBY_DYNAMIC_DIRS?= # empty
487:
1.112 taca 488: RUBY_SRCDIR?= ../../lang/ruby${RUBY_VER}-base
1.10 taca 489:
490: #
1.23 taca 491: # common paths
1.1 taca 492: #
1.49 taca 493: RUBY_INC= include/ruby-${RUBY_VER_DIR}
494: RUBY_ARCHINC= ${RUBY_INC}/${RUBY_ARCH}
495: RUBY_LIB_BASE= lib/ruby
496: RUBY_LIB?= ${RUBY_LIB_BASE}/${RUBY_VER_DIR}
1.40 taca 497: RUBY_ARCHLIB?= ${RUBY_LIB}/${RUBY_ARCH}
1.49 taca 498: RUBY_SITELIB_BASE?= ${RUBY_LIB_BASE}/site_ruby
1.40 taca 499: RUBY_SITELIB?= ${RUBY_SITELIB_BASE}/${RUBY_VER_DIR}
500: RUBY_SITEARCHLIB?= ${RUBY_SITELIB}/${RUBY_ARCH}
1.49 taca 501: RUBY_VENDORLIB_BASE?= ${RUBY_LIB_BASE}/vendor_ruby
1.40 taca 502: RUBY_VENDORLIB?= ${RUBY_VENDORLIB_BASE}/${RUBY_VER_DIR}
503: RUBY_VENDORARCHLIB?= ${RUBY_VENDORLIB}/${RUBY_ARCH}
1.49 taca 504:
1.40 taca 505: RUBY_DOC?= share/doc/${RUBY_NAME}
506: RUBY_EG?= share/examples/${RUBY_NAME}
507:
1.64 taca 508:
1.49 taca 509: RUBY_GEM_BASE?= ${RUBY_LIB_BASE}/gems
510: GEM_HOME?= ${RUBY_GEM_BASE}/${RUBY_VER_DIR}
1.31 taca 511:
512: #
513: # ri database relative path
514: #
515: RUBY_RIDIR?= share/ri
1.15 taca 516: RUBY_BASERIDIR?= ${RUBY_RIDIR}/${RUBY_VER_DIR}
517: RUBY_SYSRIDIR?= ${RUBY_BASERIDIR}/system
518: RUBY_SITERIDIR?= ${RUBY_BASERIDIR}/site
1.1 taca 519:
520: #
521: # MAKE_ENV
522: #
1.18 rillig 523: MAKE_ENV+= RUBY=${RUBY:Q} RUBY_VER=${RUBY_VER:Q} \
524: RUBY_VERSION_DEFAULT=${RUBY_VERSION_DEFAULT:Q}
1.15 taca 525:
1.122 taca 526: MAKEFLAGS+= RUBY_VER=${RUBY_VER:Q} \
527: RUBY_VERSION_DEFAULT=${RUBY_VERSION_DEFAULT:Q}
1.15 taca 528:
1.49 taca 529: #
1.98 taca 530: # PLIST_VARS for x11/ruby-tk package.
1.1 taca 531: #
1.150 taca 532: PLIST_VARS+= ruby200
1.98 taca 533: .if ${RUBY_VER} != "18"
1.101 taca 534: PLIST.ruby200= yes
1.49 taca 535: .endif
536:
537: PLIST_RUBY_DIRS= RUBY_INC=${RUBY_INC:Q} RUBY_ARCHINC=${RUBY_ARCHINC:Q} \
538: RUBY_LIB_BASE=${RUBY_LIB_BASE:Q} \
539: RUBY_LIB=${RUBY_LIB:Q} \
540: RUBY_ARCHLIB=${RUBY_ARCHLIB:Q} \
1.40 taca 541: RUBY_SITELIB_BASE=${RUBY_SITELIB_BASE:Q} \
1.49 taca 542: RUBY_SITELIB=${RUBY_SITELIB:Q} \
543: RUBY_SITEARCHLIB=${RUBY_SITEARCHLIB:Q} \
1.40 taca 544: RUBY_VENDORLIB_BASE=${RUBY_VENDORLIB_BASE:Q} \
545: RUBY_VENDORLIB=${RUBY_VENDORLIB:Q} \
546: RUBY_VENDORARCHLIB=${RUBY_VENDORARCHLIB:Q} \
1.49 taca 547: RUBY_DOC=${RUBY_DOC:Q} \
548: RUBY_EG=${RUBY_EG:Q} \
549: RUBY_GEM_BASE=${RUBY_GEM_BASE:Q} \
550: GEM_HOME=${GEM_HOME:Q} \
551: RUBY_RIDIR=${RUBY_RIDIR:Q} \
552: RUBY_BASERIDIR=${RUBY_BASERIDIR:Q} \
553: RUBY_SYSRIDIR=${RUBY_SYSRIDIR:Q} \
554: RUBY_SITERIDIR=${RUBY_SITERIDIR:Q}
1.1 taca 555:
1.14 taca 556: #
557: # substitutions
558: #
1.18 rillig 559: FILES_SUBST+= RUBY=${RUBY:Q} RUBY_NAME=${RUBY_NAME:Q} \
560: RUBY_PKGPREFIX=${RUBY_PKGPREFIX:Q} \
1.111 taca 561: RUBY_SUFFIX=${RUBY_SUFFIX} \
1.18 rillig 562: RUBY_VER=${RUBY_VER:Q} \
1.15 taca 563: ${PLIST_RUBY_DIRS}
1.14 taca 564:
1.15 taca 565: MESSAGE_SUBST+= RUBY="${RUBY}" RUBY_VER="${RUBY_VER}" \
1.14 taca 566: RUBY_VERSION="${RUBY_VERSION}" \
1.15 taca 567: RUBY_PKGPREFIX="${RUBY_PKGPREFIX}" \
1.111 taca 568: RUBY_SUFFIX=${RUBY_SUFFIX} \
1.15 taca 569: ${PLIST_RUBY_DIRS:S,DIR="${PREFIX}/,DIR=",}
1.14 taca 570:
1.18 rillig 571: PLIST_SUBST+= RUBY=${RUBY:Q} RUBY_VER=${RUBY_VER:Q} \
1.49 taca 572: RUBY_PKGPREFIX=${RUBY_PKGPREFIX} \
1.111 taca 573: RUBY_SUFFIX=${RUBY_SUFFIX} \
1.18 rillig 574: RUBY_VERSION=${RUBY_VERSION:Q} \
575: RUBY_VER_DIR=${RUBY_VER_DIR:Q} \
1.53 taca 576: RUBY_DLEXT=${RUBY_DLEXT:Q} RUBY_SLEXT=${RUBY_SLEXT:Q} \
577: RUBY_SHLIB=${RUBY_SHLIB:Q} \
578: RUBY_SHLIBALIAS=${RUBY_SHLIBALIAS:Q} \
579: RUBY_STATICLIB=${RUBY_STATICLIB:Q} \
1.144 rodent 580: RUBY_API_VERSION=${RUBY_API_VERSION:Q} \
1.39 jlam 581: RUBY_ARCH=${RUBY_ARCH:Q} \
1.138 taca 582: ${PLIST_RUBY_DIRS:S,DIR="${PREFIX}/,DIR=",} \
583: RUBY_MAJOR_MINOR=${RUBY_MAJOR_MINOR}
1.1 taca 584:
1.22 taca 585: #
1.23 taca 586: # make dynamic PLIST
1.22 taca 587: #
1.23 taca 588: .if !empty(RUBY_DYNAMIC_DIRS)
589:
590: RUBY_PLIST_DYNAMIC= ${WRKDIR}/PLIST.work
591:
592: .if !defined(PLIST_SRC)
593: . if exists(${PKGDIR}/PLIST.common)
594: PLIST_SRC+= ${PKGDIR}/PLIST.common
595: . elif exists(${PKGDIR}/PLIST)
596: PLIST_SRC+= ${PKGDIR}/PLIST
597: . endif
598:
599: PLIST_SRC+= ${RUBY_PLIST_DYNAMIC}
600:
601: . if exists(${PKGDIR}/PLIST.common_end)
602: PLIST_SRC+= ${PKGDIR}/PLIST.common_end
603: . endif
604:
605: .endif
606:
607: RUBY_PLIST_COMMENT_CMD= \
608: ${ECHO} "@comment The following lines are automatically generated"
1.37 obache 609: RUBY_PLIST_FILES_CMD= ( cd ${DESTDIR}${PREFIX}; \
1.23 taca 610: ${FIND} ${RUBY_DYNAMIC_DIRS} \( -type f -o -type l \) -print ) | \
611: ${SORT} -u
612: RUBY_GENERATE_PLIST = ( \
613: ${RUBY_PLIST_COMMENT_CMD}; \
1.47 joerg 614: ${RUBY_PLIST_FILES_CMD} ) > ${RUBY_PLIST_DYNAMIC}
1.22 taca 615: .endif
1.23 taca 616:
1.53 taca 617: PRINT_PLIST_AWK+= /lib\/libruby${RUBY_STATICLIB}$$/ \
618: { sub(/${RUBY_STATICLIB}/, "$${RUBY_STATICLIB}"); }
619: PRINT_PLIST_AWK+= /lib\/libruby${RUBY_VER}\.${RUBY_SLEXT}/ \
620: { sub(/${RUBY_VER}\.${RUBY_SLEXT}$$/, \
621: "$${RUBY_VER}.$${RUBY_SLEXT}"); }
622: PRINT_PLIST_AWK+= /${RUBY_SHLIB}$$/ \
623: { sub(/${RUBY_SHLIB}$$/, "$${RUBY_SHLIB}"); }
624: PRINT_PLIST_AWK+= /${RUBY_SLEXT}\.${RUBY_SHLIBVER}$$/ \
625: { sub(/${RUBY_SLEXT}\.${RUBY_SHLIBVER}$$/, \
626: "$${RUBY_SLEXT}.$${RUBY_SHLIBVER}"); }
627: .if ${RUBY_SHLIBALIAS} != "@comment"
628: PRINT_PLIST_AWK+= /${RUBY_SHLIBALIAS:S/\//\\\//}$$/ \
629: { sub(/${RUBY_SHLIBALIAS:S/\//\\\//}$$/, \
630: "$${RUBY_SHLIBALIAS}"); }
1.49 taca 631: .endif
632: PRINT_PLIST_AWK+= /^${RUBY_ARCHINC:S|/|\\/|g}/ \
633: { gsub(/${RUBY_ARCHINC:S|/|\\/|g}/, "$${RUBY_ARCHINC}"); \
634: print; next; }
635: PRINT_PLIST_AWK+= /^${RUBY_INC:S|/|\\/|g}/ \
636: { gsub(/${RUBY_INC:S|/|\\/|g}/, "$${RUBY_INC}"); \
637: print; next; }
1.40 taca 638: PRINT_PLIST_AWK+= /\.${RUBY_DLEXT}$$/ \
639: { gsub(/${RUBY_DLEXT}$$/, "$${RUBY_DLEXT}") }
1.47 joerg 640: PRINT_PLIST_AWK+= /^${RUBY_ARCHLIB:S|/|\\/|g}/ \
1.40 taca 641: { gsub(/${RUBY_ARCHLIB:S|/|\\/|g}/, "$${RUBY_ARCHLIB}"); \
642: print; next; }
1.47 joerg 643: PRINT_PLIST_AWK+= /^${RUBY_VENDORARCHLIB:S|/|\\/|g}/ \
1.40 taca 644: { gsub(/${RUBY_VENDORARCHLIB:S|/|\\/|g}/, "$${RUBY_VENDORARCHLIB}"); \
645: print; next; }
1.47 joerg 646: PRINT_PLIST_AWK+= /^${RUBY_VENDORLIB:S|/|\\/|g}/ \
1.40 taca 647: { gsub(/${RUBY_VENDORLIB:S|/|\\/|g}/, "$${RUBY_VENDORLIB}"); \
648: print; next; }
1.47 joerg 649: PRINT_PLIST_AWK+= /^${RUBY_SITEARCHLIB:S|/|\\/|g}/ \
1.40 taca 650: { gsub(/${RUBY_SITEARCHLIB:S|/|\\/|g}/, "$${RUBY_SITEARCHLIB}"); \
651: print; next; }
1.47 joerg 652: PRINT_PLIST_AWK+= /^${RUBY_SITELIB:S|/|\\/|g}/ \
1.40 taca 653: { gsub(/${RUBY_SITELIB:S|/|\\/|g}/, "$${RUBY_SITELIB}"); \
654: print; next; }
1.49 taca 655: PRINT_PLIST_AWK+= /^${RUBY_SITELIB_BASE:S|/|\\/|g}/ \
1.40 taca 656: { gsub(/${RUBY_SITELIB_BASE:S|/|\\/|g}/, "$${RUBY_SITELIB_BASE}"); \
657: print; next; }
1.49 taca 658: PRINT_PLIST_AWK+= /^${RUBY_VENDORLIB_BASE:S|/|\\/|g}/ \
1.40 taca 659: { gsub(/${RUBY_VENDORLIB_BASE:S|/|\\/|g}/, "$${RUBY_VENDORLIB_BASE}"); \
660: print; next; }
1.47 joerg 661: PRINT_PLIST_AWK+= /^${RUBY_LIB:S|/|\\/|g}/ \
1.40 taca 662: { gsub(/${RUBY_LIB:S|/|\\/|g}/, "$${RUBY_LIB}"); \
663: print; next; }
1.47 joerg 664: PRINT_PLIST_AWK+= /^${RUBY_DOC:S|/|\\/|g}/ \
1.40 taca 665: { gsub(/${RUBY_DOC:S|/|\\/|g}/, "$${RUBY_DOC}"); \
666: print; next; }
1.47 joerg 667: PRINT_PLIST_AWK+= /^${RUBY_EG:S|/|\\/|g}/ \
1.40 taca 668: { gsub(/${RUBY_EG:S|/|\\/|g}/, "$${RUBY_EG}"); \
669: print; next; }
1.47 joerg 670: PRINT_PLIST_AWK+= /^${RUBY_SITERIDIR:S|/|\\/|g}/ \
1.40 taca 671: { gsub(/${RUBY_SITERIDIR:S|/|\\/|g}/, "$${RUBY_SITERIDIR}"); \
672: print; next; }
1.49 taca 673: PRINT_PLIST_AWK+= /^${RUBY_SYSRIDIR:S|/|\\/|g}\// \
674: { next; }
1.117 taca 675:
676: # Insert part of PRINT_PLIST_AWK from gem.mk
677: PRINT_PLIST_AWK+= ${_RUBY_PRINT_PLIST_GEM}
678:
1.49 taca 679: PRINT_PLIST_AWK+= /\/${RUBY_NAME}/ \
680: { sub(/${RUBY_NAME}/, "$${RUBY_NAME}"); }
1.65 taca 681: PRINT_PLIST_AWK+= /^${GEM_HOME:S|/|\\/|g:S|.|\\.|g}/ \
682: { gsub(/${GEM_HOME:S|/|\\/|g}/, "$${GEM_HOME}"); }
1.40 taca 683:
1.1 taca 684: .endif # _RUBY_MK
CVSweb <webmaster@jp.NetBSD.org>