Annotation of pkgsrc/lang/ruby/rubyversion.mk, revision 1.174
1.174 ! taca 1: # $NetBSD: rubyversion.mk,v 1.173 2017/04/22 18:29:31 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.174 ! taca 13: # Possible values: 21 22 23
1.169 taca 14: # Default: 23
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: #
1.165 joerg 36: # Possible values: ${RUBY_VERSIONS_ACCEPTED}
1.88 cheusov 37: # Default: ${RUBY_VERSION_DEFAULT}
1.64 taca 38: #
39: # === Package-settable variables ===
40: #
1.165 joerg 41: # RUBY_VERSIONS_ACCEPTED
1.64 taca 42: # The Ruby versions that are acceptable for the package.
43: #
1.174 ! taca 44: # Possible values: 21 22 23
1.173 taca 45: # Default: 23 22 21
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.174 ! taca 72: # Possible values: 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.174 ! taca 81: # Example values: 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.174 ! taca 110: # Possible values: 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_RDOC_PKGSRC_VERS
119: # Version of rdoc provided by devel/rdoc.
120: #
1.64 taca 121: # RUBY_BASE
122: # Name of ruby base package's name.
123: #
124: # RUBY_SRCDIR
1.112 taca 125: # Relative path to directory of base ruby package.
1.64 taca 126: #
127: # RUBY_SHLIBVER
128: # Suffix of libruby shared library's version.
129: #
130: # RUBY_SHLIB
131: # String after libruby shared library.
132: #
133: # RUBY_SHLIBALIAS
134: # Symblic link with libruby shared library with major version only.
135: #
136: # RUBY_STATICLIB
137: # Name of libruby static library.
138: #
139: # RUBY_VER_DIR
140: # Name of version directory under each library (and more) directories.
141: #
142: # RUBY_ARCH
143: # Name of architecture-dependent directory name.
144: #
145: # RUBY_INC
146: # machine independent include directory of ruby.
147: #
148: # RUBY_ARCHINC
149: # machine dependent include directory of ruby.
150: #
151: # RUBY_LIB_BASE
152: # common relative path of ruby's library.
153: #
154: # RUBY_LIB
155: # version specific relative path of ruby's library.
156: #
157: # RUBY_ARCHLIB
158: # version specific and machine dependent relative path of ruby's library.
159: #
160: # RUBY_SITELIB_BASE
161: # common site local directory.
162: #
163: # RUBY_SITELIB
164: # version specific site local directory.
165: #
166: # RUBY_SITEARCHLIB
167: # version specific and machine dependent site local directory.
168: #
169: # RUBY_VENDORLIB_BASE
170: # common vendor (pkgsrc) directory.
171: #
172: # RUBY_VENDORLIB
173: # version specific vendor local directory.
174: #
175: # RUBY_VENDORARCHLIB
176: # version specific and machine dependent vendor local directory.
177: #
178: # RUBY_DOC
179: # version specific document direcotry.
180: #
181: # RUBY_EG
182: # version specific examples direcotry.
183: #
184: # RUBY_GEM_BASE
185: # common GEM directory.
1.97 rodent 186: #
1.64 taca 187: # GEM_HOME
188: # version specific GEM directory.
189: #
190: # RUBY_RIDIR
191: # common ri directory.
192: #
193: # RUBY_BASERIDIR
194: # version specific ri directory.
195: #
196: # RUBY_SYSRIDIR
197: # version specific system ri directory.
198: #
199: # RUBY_SITERIDIR
200: # version specific site ri directory.
201: #
1.166 taca 202: # === supporting scripts ===
203: #
204: # UPDATE_GEMSPEC
205: # a tool to modify gemspec file.
206: #
1.64 taca 207: # Keywords: ruby
1.1 taca 208: #
209:
1.18 rillig 210: .if !defined(_RUBYVERSION_MK)
1.1 taca 211: _RUBYVERSION_MK= # defined
212:
213: .include "../../mk/bsd.prefs.mk"
214:
1.109 taca 215: .if defined(PKGNAME_REQD)
1.174 ! taca 216: . if !empty(PKGNAME_REQD:Mruby[0-9][0-9]-*)
! 217: _RUBY_VERSION_REQD:= ${PKGNAME_REQD:C/ruby([0-9][0-9])-.*/\1/}
! 218: RUBY_VERSION_REQD?= ${PKGNAME_REQD:C/ruby([0-9][0-9])-.*/\1/}
1.109 taca 219: . endif
1.108 taca 220: .endif
221:
1.1 taca 222: # current supported Ruby's version
1.162 taca 223: RUBY21_VERSION= 2.1.10
1.170 taca 224: RUBY22_VERSION= 2.2.7
1.172 taca 225: RUBY23_VERSION= 2.3.4
1.23 taca 226:
1.155 taca 227: # patch level
1.162 taca 228: #RUBY21_PATCHLEVEL= p492
1.170 taca 229: #RUBY22_PATCHLEVEL= p470
1.172 taca 230: #RUBY23_PATCHLEVEL= p301
1.49 taca 231:
1.59 taca 232: # current API compatible version; used for version of shared library
1.112 taca 233: RUBY21_API_VERSION= 2.1.0
1.131 taca 234: RUBY22_API_VERSION= 2.2.0
1.155 taca 235: RUBY23_API_VERSION= 2.3.0
1.131 taca 236:
237: # pkgsrc's rdoc's version
1.158 taca 238: RUBY_RDOC_PKGSRC_VERS= 4.2.2
1.1 taca 239:
240: #
1.169 taca 241: RUBY_VERSION_DEFAULT?= 23
1.64 taca 242:
1.173 taca 243: # supported Ruby's version
1.174 ! taca 244: RUBY_VERSIONS_SUPPORTED= 23 22 21
1.173 taca 245:
1.169 taca 246: RUBY_VERSIONS_ACCEPTED?= 23 22 21
1.165 joerg 247: RUBY_VERSIONS_INCOMPATIBLE?=
248:
1.173 taca 249: .if empty(RUBY_VERSIONS_SUPPORTED:M${RUBY_VERSION_DEFAULT})
250: .error Unsuported RUBY_VERSION_DEFAULT: ${RUBY_VERSION_DEFAULT}
251: .endif
252:
1.165 joerg 253: .for rv in ${RUBY_VERSIONS_ACCEPTED}
254: . if empty(RUBY_VERSIONS_INCOMPATIBLE:M${rv})
255: _RUBY_VERSIONS_ACCEPTED+= ${rv}
256: . endif
257: .endfor
1.64 taca 258:
1.98 taca 259: .if defined(RUBY_VERSION_REQD)
1.165 joerg 260: . for rv in ${_RUBY_VERSIONS_ACCEPTED}
1.109 taca 261: . if "${rv}" == ${RUBY_VERSION_REQD}
1.98 taca 262: RUBY_VER= ${rv}
263: . endif
264: . endfor
265: .elif !defined(RUBY_VER)
1.165 joerg 266: . for rv in ${_RUBY_VERSIONS_ACCEPTED}
1.109 taca 267: . if "${rv}" == ${RUBY_VERSION_DEFAULT}
1.98 taca 268: RUBY_VER= ${rv}
269: . endif
270: . endfor
1.64 taca 271: .endif
1.1 taca 272:
1.98 taca 273: .if !defined(RUBY_VER)
1.165 joerg 274: . for rv in ${_RUBY_VERSIONS_ACCEPTED}
1.98 taca 275: . if !defined(RUBY_VER)
1.64 taca 276: RUBY_VER= ${rv}
1.52 joerg 277: . endif
1.64 taca 278: . endfor
1.1 taca 279: .endif
1.29 taca 280:
1.81 obache 281: RUBY_VER:= ${RUBY_VER_MAP.${RUBY_VER}:U${RUBY_VER}}
1.67 joerg 282:
1.112 taca 283: RUBY_SUFFIX?= ${_RUBY_VER_MAJOR}${_RUBY_VER_MINOR}${_RUBY_VER_TEENY}
284:
1.174 ! taca 285: .if ${RUBY_VER} == "21"
1.112 taca 286: RUBY_VERSION= ${RUBY21_VERSION}
287: RUBY_VERSION_FULL= ${RUBY_VERSION}
1.110 taca 288: RUBY_ABI_VERSION= ${RUBY_VERSION}
289:
1.112 taca 290: RUBY_GEMS_VERSION= 2.2.2
1.110 taca 291: RUBY_RDOC_VERSION= 4.1.0
292: RUBY_RAKE_VERSION= 10.1.0
293: RUBY_JSON_VERSION= 1.8.1
294:
1.156 taca 295: RUBY_BIGDECIMAL_VERSION= 1.2.4
296: RUBY_IO_CONSOLE_VERSION= 0.4.3
297: RUBY_PSYCH_VERSION= 2.0.5
298: RUBY_MINITEST_VERSION= 4.7.5
299: RUBY_TEST_UNIT_VERSION= 2.1.8.0
300:
1.134 taca 301: RUBY_SUFFIX= ${_RUBY_VER_MAJOR}${_RUBY_VER_MINOR}
302:
1.131 taca 303: .elif ${RUBY_VER} == "22"
304: RUBY_VERSION= ${RUBY22_VERSION}
305: RUBY_VERSION_FULL= ${RUBY_VERSION}
306: RUBY_ABI_VERSION= ${RUBY_VERSION}
307:
1.167 taca 308: RUBY_GEMS_VERSION= 2.4.5.2
1.131 taca 309: RUBY_RDOC_VERSION= 4.2.0
310: RUBY_RAKE_VERSION= 10.4.2
311: RUBY_JSON_VERSION= 1.8.1
312:
1.156 taca 313: RUBY_BIGDECIMAL_VERSION= 1.2.6
314: RUBY_IO_CONSOLE_VERSION= 0.4.3
315: RUBY_PSYCH_VERSION= 2.0.8
316: RUBY_MINITEST_VERSION= 5.4.3
317: RUBY_POWER_ASSERT_VERSION= 0.2.2
318: RUBY_TEST_UNIT_VERSION= 3.0.8
319:
1.134 taca 320: RUBY_SUFFIX= ${_RUBY_VER_MAJOR}${_RUBY_VER_MINOR}
321:
1.155 taca 322: .elif ${RUBY_VER} == "23"
323: RUBY_VERSION= ${RUBY23_VERSION}
324: RUBY_VERSION_FULL= ${RUBY_VERSION}
325: RUBY_ABI_VERSION= ${RUBY_VERSION}
326:
1.168 taca 327: RUBY_GEMS_VERSION= 2.5.2
1.155 taca 328: RUBY_RDOC_VERSION= 4.2.1
329: RUBY_RAKE_VERSION= 10.4.2
330: RUBY_JSON_VERSION= 1.8.3
331:
1.156 taca 332: RUBY_BIGDECIMAL_VERSION= 1.2.8
333: RUBY_IO_CONSOLE_VERSION= 0.4.5
1.168 taca 334: RUBY_PSYCH_VERSION= 2.1.0
1.156 taca 335: RUBY_DID_YOU_MEAN_VERSION= 1.0.0
1.168 taca 336: RUBY_MINITEST_VERSION= 5.8.5
1.156 taca 337: RUBY_NET_TELNET_VERSION= 0.1.1
338: RUBY_POWER_ASSERT_VERSION= 0.2.6
339: RUBY_TEST_UNIT_VERSION= 3.1.5
340:
1.155 taca 341: RUBY_SUFFIX= ${_RUBY_VER_MAJOR}${_RUBY_VER_MINOR}
342:
1.64 taca 343: .else
344: PKG_FAIL_REASON+= "Unknown Ruby version specified: ${RUBY_VER}."
1.32 taca 345: .endif
1.1 taca 346:
1.98 taca 347: .if !empty(RUBY_VERSION)
1.64 taca 348: RUBY_PATCHLEVEL= ${RUBY${RUBY_VER}_PATCHLEVEL}
349: RUBY_API_VERSION= ${RUBY${RUBY_VER}_API_VERSION}
1.98 taca 350: .endif
1.64 taca 351:
1.60 wiz 352: # Variable assignment for multi-ruby packages
1.64 taca 353: MULTI+= RUBY_VER=${RUBY_VERS:U${RUBY_VERSION_DEFAULT}}
1.4 taca 354:
1.1 taca 355: # RUBY_NOVERSION should be set to "Yes" if the package dosen't depend on
356: # any specific version of ruby command. In this case, package's
357: # name begin with "ruby-".
358: # If RUBY_NOVERSION is "No" (default), the package's name is begin
1.174 ! taca 359: # with ${RUBY_NAME}; "ruby22", "ruby23", and so on.
1.1 taca 360: #
1.53 taca 361: # It also affects to RUBY_DOC, RUBY_EG...
1.1 taca 362: #
363: RUBY_NOVERSION?= No
364:
1.174 ! taca 365: # _RUBY_VER_MAJOR, _RUBY_VER_MINOR
1.29 taca 366: # is defined from version of Ruby. It should not be used in packages'
367: # Makefile.
368: #
1.64 taca 369: _RUBY_VER_MAJOR= ${RUBY_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\1/}
370: _RUBY_VER_MINOR= ${RUBY_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\2/}
1.1 taca 371:
1.64 taca 372: _RUBY_API_MAJOR= ${RUBY_API_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\1\2/}
373: _RUBY_API_MINOR= ${RUBY_API_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\3/}
1.1 taca 374:
1.64 taca 375: RUBY_NAME= ruby${RUBY_SUFFIX}
376: RUBYGEM_NAME= gem${RUBY_SUFFIX}
377: RAKE_NAME= rake${RUBY_SUFFIX}
1.1 taca 378:
1.112 taca 379: RUBY_BASE= ${RUBY_NAME}-base
1.10 taca 380:
1.1 taca 381: RUBY_PKGPREFIX?= ${RUBY_NAME}
382:
1.134 taca 383: RUBY_VER_DIR= ${RUBY_API_VERSION}
1.1 taca 384:
385: .if empty(RUBY_NOVERSION:M[nN][oO])
386: RUBY_SUFFIX=
387: RUBY_NAME= ruby
388: .endif
389:
1.64 taca 390: RUBY_BUILD_RDOC?= Yes
391: RUBY_BUILD_RI?= Yes
1.49 taca 392:
1.15 taca 393: RUBY?= ${PREFIX}/bin/${RUBY_NAME}
1.112 taca 394: RDOC?= ${PREFIX}/bin/rdoc${RUBY_SUFFIX}
1.1 taca 395:
1.132 riastrad 396: RUBY_ARCH?= ${MACHINE_GNU_ARCH}-${LOWER_OPSYS}${APPEND_ELF}${LOWER_OPSYS_VERSUFFIX}${APPEND_ABI}
1.1 taca 397:
1.138 taca 398: RUBY_MAJOR_MINOR= ${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}
399:
1.1 taca 400: #
1.53 taca 401: # Ruby shared and static library version handling.
1.10 taca 402: #
1.49 taca 403: RUBY_SHLIBVER?= ${RUBY_API_VERSION}
1.112 taca 404: RUBY_SHLIB?= ${RUBY_SUFFIX}.${RUBY_SLEXT}.${RUBY_SHLIBVER}
1.53 taca 405: RUBY_SHLIBALIAS?= @comment
1.112 taca 406: RUBY_STATICLIB?= ${RUBY_SUFFIX}-static.a
1.10 taca 407:
408: .if ${OPSYS} == "NetBSD" || ${OPSYS} == "Interix"
1.64 taca 409: RUBY_SHLIBVER= ${_RUBY_API_MAJOR}.${_RUBY_API_MINOR}
1.112 taca 410: _RUBY_SHLIBALIAS= ${RUBY_SUFFIX}.${RUBY_SLEXT}.${_RUBY_API_MAJOR}
1.12 jlam 411: .elif ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly"
1.75 marino 412: RUBY_SHLIBVER= ${_RUBY_VER_MAJOR}${_RUBY_VER_MINOR}${_RUBY_API_MINOR}
1.83 bsiegert 413: .elif ${OPSYS} == "OpenBSD" || ${OPSYS} == "MirBSD"
1.102 taca 414: .if ${_RUBY_VER_MINOR} == 0
415: RUBY_SHLIBVER= ${_RUBY_VER_MAJOR}.${_RUBY_API_MINOR}
416: .else
1.64 taca 417: RUBY_SHLIBVER= ${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}${_RUBY_API_MINOR}
1.102 taca 418: .endif
1.53 taca 419: .elif ${OPSYS} == "Darwin"
1.112 taca 420: RUBY_SHLIB= ${RUBY_SUFFIX}.${RUBY_SHLIBVER}.${RUBY_SLEXT}
1.53 taca 421: _RUBY_SHLIBALIAS= .${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}.${RUBY_SLEXT}
1.112 taca 422: RUBY_STATICLIB= ${RUBY_SUFFIX}.${RUBY_API_VERSION}-static.a
1.10 taca 423: .elif ${OPSYS} == "Linux"
1.112 taca 424: _RUBY_SHLIBALIAS= ${RUBY_SUFFIX}.${RUBY_SLEXT}.${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}
1.56 taca 425: .elif ${OPSYS} == "SunOS"
426: RUBY_SHLIBVER= ${_RUBY_VER_MAJOR}
1.154 rillig 427: _RUBY_SHLIBALIAS= ${RUBY_SUFFIX}.${RUBY_SLEXT}.${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}.${_RUBY_API_MINOR}
1.96 obache 428: .elif ${OPSYS} == "Cygwin"
1.112 taca 429: RUBY_SHLIB= ${RUBY_SUFFIX}${_RUBY_API_MAJOR}${_RUBY_API_MINOR}.dll.a
430: RUBY_SHLIBALIAS= bin/cygruby${RUBY_SUFFIX}${_RUBY_API_MAJOR}${_RUBY_API_MINOR}.dll
431: RUBY_STATICLIB= ${RUBY_SUFFIX}${_RUBY_API_MAJOR}${_RUBY_API_MINOR}-static.a
1.10 taca 432: .endif
433:
1.53 taca 434: .if !empty(_RUBY_SHLIBALIAS)
435: RUBY_SHLIBALIAS= lib/libruby${_RUBY_SHLIBALIAS}
1.10 taca 436: .endif
437:
1.64 taca 438: .if ${_OPSYS_SHLIB_TYPE} == "dylib"
1.5 taca 439: RUBY_DLEXT= bundle
1.53 taca 440: RUBY_SLEXT= dylib
1.5 taca 441: .else
442: RUBY_DLEXT= so
1.53 taca 443: RUBY_SLEXT= so
1.5 taca 444: .endif
445:
1.71 taca 446: RUBY_DISTNAME?= ruby-${RUBY_VERSION}
447:
448: #
1.26 taca 449: # Use pthread library with Ruby
450: #
1.64 taca 451: .if !empty(MACHINE_PLATFORM:MDarwin-9.*-powerpc)
1.42 minskim 452: # Workaround for Ruby Bug #193
453: # http://redmine.ruby-lang.org/issues/show/193
454: RUBY_USE_PTHREAD?= no
1.26 taca 455: .else
456: RUBY_USE_PTHREAD?= yes
457: .endif
458:
1.23 taca 459: RUBY_DYNAMIC_DIRS?= # empty
460:
1.112 taca 461: RUBY_SRCDIR?= ../../lang/ruby${RUBY_VER}-base
1.10 taca 462:
463: #
1.23 taca 464: # common paths
1.1 taca 465: #
1.49 taca 466: RUBY_INC= include/ruby-${RUBY_VER_DIR}
467: RUBY_ARCHINC= ${RUBY_INC}/${RUBY_ARCH}
468: RUBY_LIB_BASE= lib/ruby
469: RUBY_LIB?= ${RUBY_LIB_BASE}/${RUBY_VER_DIR}
1.40 taca 470: RUBY_ARCHLIB?= ${RUBY_LIB}/${RUBY_ARCH}
1.49 taca 471: RUBY_SITELIB_BASE?= ${RUBY_LIB_BASE}/site_ruby
1.40 taca 472: RUBY_SITELIB?= ${RUBY_SITELIB_BASE}/${RUBY_VER_DIR}
473: RUBY_SITEARCHLIB?= ${RUBY_SITELIB}/${RUBY_ARCH}
1.49 taca 474: RUBY_VENDORLIB_BASE?= ${RUBY_LIB_BASE}/vendor_ruby
1.40 taca 475: RUBY_VENDORLIB?= ${RUBY_VENDORLIB_BASE}/${RUBY_VER_DIR}
476: RUBY_VENDORARCHLIB?= ${RUBY_VENDORLIB}/${RUBY_ARCH}
1.49 taca 477:
1.40 taca 478: RUBY_DOC?= share/doc/${RUBY_NAME}
479: RUBY_EG?= share/examples/${RUBY_NAME}
480:
1.64 taca 481:
1.49 taca 482: RUBY_GEM_BASE?= ${RUBY_LIB_BASE}/gems
483: GEM_HOME?= ${RUBY_GEM_BASE}/${RUBY_VER_DIR}
1.31 taca 484:
485: #
486: # ri database relative path
487: #
488: RUBY_RIDIR?= share/ri
1.15 taca 489: RUBY_BASERIDIR?= ${RUBY_RIDIR}/${RUBY_VER_DIR}
490: RUBY_SYSRIDIR?= ${RUBY_BASERIDIR}/system
491: RUBY_SITERIDIR?= ${RUBY_BASERIDIR}/site
1.1 taca 492:
493: #
494: # MAKE_ENV
495: #
1.18 rillig 496: MAKE_ENV+= RUBY=${RUBY:Q} RUBY_VER=${RUBY_VER:Q} \
497: RUBY_VERSION_DEFAULT=${RUBY_VERSION_DEFAULT:Q}
1.15 taca 498:
1.122 taca 499: MAKEFLAGS+= RUBY_VER=${RUBY_VER:Q} \
500: RUBY_VERSION_DEFAULT=${RUBY_VERSION_DEFAULT:Q}
1.15 taca 501:
1.49 taca 502: PLIST_RUBY_DIRS= RUBY_INC=${RUBY_INC:Q} RUBY_ARCHINC=${RUBY_ARCHINC:Q} \
503: RUBY_LIB_BASE=${RUBY_LIB_BASE:Q} \
504: RUBY_LIB=${RUBY_LIB:Q} \
505: RUBY_ARCHLIB=${RUBY_ARCHLIB:Q} \
1.40 taca 506: RUBY_SITELIB_BASE=${RUBY_SITELIB_BASE:Q} \
1.49 taca 507: RUBY_SITELIB=${RUBY_SITELIB:Q} \
508: RUBY_SITEARCHLIB=${RUBY_SITEARCHLIB:Q} \
1.40 taca 509: RUBY_VENDORLIB_BASE=${RUBY_VENDORLIB_BASE:Q} \
510: RUBY_VENDORLIB=${RUBY_VENDORLIB:Q} \
511: RUBY_VENDORARCHLIB=${RUBY_VENDORARCHLIB:Q} \
1.49 taca 512: RUBY_DOC=${RUBY_DOC:Q} \
513: RUBY_EG=${RUBY_EG:Q} \
514: RUBY_GEM_BASE=${RUBY_GEM_BASE:Q} \
515: GEM_HOME=${GEM_HOME:Q} \
516: RUBY_RIDIR=${RUBY_RIDIR:Q} \
517: RUBY_BASERIDIR=${RUBY_BASERIDIR:Q} \
518: RUBY_SYSRIDIR=${RUBY_SYSRIDIR:Q} \
519: RUBY_SITERIDIR=${RUBY_SITERIDIR:Q}
1.1 taca 520:
1.14 taca 521: #
522: # substitutions
523: #
1.18 rillig 524: FILES_SUBST+= RUBY=${RUBY:Q} RUBY_NAME=${RUBY_NAME:Q} \
525: RUBY_PKGPREFIX=${RUBY_PKGPREFIX:Q} \
1.111 taca 526: RUBY_SUFFIX=${RUBY_SUFFIX} \
1.18 rillig 527: RUBY_VER=${RUBY_VER:Q} \
1.15 taca 528: ${PLIST_RUBY_DIRS}
1.14 taca 529:
1.15 taca 530: MESSAGE_SUBST+= RUBY="${RUBY}" RUBY_VER="${RUBY_VER}" \
1.14 taca 531: RUBY_VERSION="${RUBY_VERSION}" \
1.15 taca 532: RUBY_PKGPREFIX="${RUBY_PKGPREFIX}" \
1.111 taca 533: RUBY_SUFFIX=${RUBY_SUFFIX} \
1.15 taca 534: ${PLIST_RUBY_DIRS:S,DIR="${PREFIX}/,DIR=",}
1.14 taca 535:
1.18 rillig 536: PLIST_SUBST+= RUBY=${RUBY:Q} RUBY_VER=${RUBY_VER:Q} \
1.49 taca 537: RUBY_PKGPREFIX=${RUBY_PKGPREFIX} \
1.111 taca 538: RUBY_SUFFIX=${RUBY_SUFFIX} \
1.18 rillig 539: RUBY_VERSION=${RUBY_VERSION:Q} \
540: RUBY_VER_DIR=${RUBY_VER_DIR:Q} \
1.53 taca 541: RUBY_DLEXT=${RUBY_DLEXT:Q} RUBY_SLEXT=${RUBY_SLEXT:Q} \
542: RUBY_SHLIB=${RUBY_SHLIB:Q} \
543: RUBY_SHLIBALIAS=${RUBY_SHLIBALIAS:Q} \
544: RUBY_STATICLIB=${RUBY_STATICLIB:Q} \
1.144 rodent 545: RUBY_API_VERSION=${RUBY_API_VERSION:Q} \
1.39 jlam 546: RUBY_ARCH=${RUBY_ARCH:Q} \
1.138 taca 547: ${PLIST_RUBY_DIRS:S,DIR="${PREFIX}/,DIR=",} \
548: RUBY_MAJOR_MINOR=${RUBY_MAJOR_MINOR}
1.1 taca 549:
1.22 taca 550: #
1.23 taca 551: # make dynamic PLIST
1.22 taca 552: #
1.23 taca 553: .if !empty(RUBY_DYNAMIC_DIRS)
554:
555: RUBY_PLIST_DYNAMIC= ${WRKDIR}/PLIST.work
556:
557: .if !defined(PLIST_SRC)
558: . if exists(${PKGDIR}/PLIST.common)
559: PLIST_SRC+= ${PKGDIR}/PLIST.common
560: . elif exists(${PKGDIR}/PLIST)
561: PLIST_SRC+= ${PKGDIR}/PLIST
562: . endif
563:
564: PLIST_SRC+= ${RUBY_PLIST_DYNAMIC}
565:
566: . if exists(${PKGDIR}/PLIST.common_end)
567: PLIST_SRC+= ${PKGDIR}/PLIST.common_end
568: . endif
569:
570: .endif
571:
572: RUBY_PLIST_COMMENT_CMD= \
573: ${ECHO} "@comment The following lines are automatically generated"
1.37 obache 574: RUBY_PLIST_FILES_CMD= ( cd ${DESTDIR}${PREFIX}; \
1.23 taca 575: ${FIND} ${RUBY_DYNAMIC_DIRS} \( -type f -o -type l \) -print ) | \
576: ${SORT} -u
1.164 rillig 577: RUBY_GENERATE_PLIST= ( \
1.23 taca 578: ${RUBY_PLIST_COMMENT_CMD}; \
1.47 joerg 579: ${RUBY_PLIST_FILES_CMD} ) > ${RUBY_PLIST_DYNAMIC}
1.22 taca 580: .endif
1.23 taca 581:
1.53 taca 582: PRINT_PLIST_AWK+= /lib\/libruby${RUBY_STATICLIB}$$/ \
583: { sub(/${RUBY_STATICLIB}/, "$${RUBY_STATICLIB}"); }
584: PRINT_PLIST_AWK+= /lib\/libruby${RUBY_VER}\.${RUBY_SLEXT}/ \
585: { sub(/${RUBY_VER}\.${RUBY_SLEXT}$$/, \
586: "$${RUBY_VER}.$${RUBY_SLEXT}"); }
587: PRINT_PLIST_AWK+= /${RUBY_SHLIB}$$/ \
588: { sub(/${RUBY_SHLIB}$$/, "$${RUBY_SHLIB}"); }
589: PRINT_PLIST_AWK+= /${RUBY_SLEXT}\.${RUBY_SHLIBVER}$$/ \
590: { sub(/${RUBY_SLEXT}\.${RUBY_SHLIBVER}$$/, \
591: "$${RUBY_SLEXT}.$${RUBY_SHLIBVER}"); }
592: .if ${RUBY_SHLIBALIAS} != "@comment"
593: PRINT_PLIST_AWK+= /${RUBY_SHLIBALIAS:S/\//\\\//}$$/ \
594: { sub(/${RUBY_SHLIBALIAS:S/\//\\\//}$$/, \
595: "$${RUBY_SHLIBALIAS}"); }
1.49 taca 596: .endif
597: PRINT_PLIST_AWK+= /^${RUBY_ARCHINC:S|/|\\/|g}/ \
598: { gsub(/${RUBY_ARCHINC:S|/|\\/|g}/, "$${RUBY_ARCHINC}"); \
599: print; next; }
600: PRINT_PLIST_AWK+= /^${RUBY_INC:S|/|\\/|g}/ \
601: { gsub(/${RUBY_INC:S|/|\\/|g}/, "$${RUBY_INC}"); \
602: print; next; }
1.40 taca 603: PRINT_PLIST_AWK+= /\.${RUBY_DLEXT}$$/ \
604: { gsub(/${RUBY_DLEXT}$$/, "$${RUBY_DLEXT}") }
1.47 joerg 605: PRINT_PLIST_AWK+= /^${RUBY_ARCHLIB:S|/|\\/|g}/ \
1.40 taca 606: { gsub(/${RUBY_ARCHLIB:S|/|\\/|g}/, "$${RUBY_ARCHLIB}"); \
607: print; next; }
1.47 joerg 608: PRINT_PLIST_AWK+= /^${RUBY_VENDORARCHLIB:S|/|\\/|g}/ \
1.40 taca 609: { gsub(/${RUBY_VENDORARCHLIB:S|/|\\/|g}/, "$${RUBY_VENDORARCHLIB}"); \
610: print; next; }
1.47 joerg 611: PRINT_PLIST_AWK+= /^${RUBY_VENDORLIB:S|/|\\/|g}/ \
1.40 taca 612: { gsub(/${RUBY_VENDORLIB:S|/|\\/|g}/, "$${RUBY_VENDORLIB}"); \
613: print; next; }
1.47 joerg 614: PRINT_PLIST_AWK+= /^${RUBY_SITEARCHLIB:S|/|\\/|g}/ \
1.40 taca 615: { gsub(/${RUBY_SITEARCHLIB:S|/|\\/|g}/, "$${RUBY_SITEARCHLIB}"); \
616: print; next; }
1.47 joerg 617: PRINT_PLIST_AWK+= /^${RUBY_SITELIB:S|/|\\/|g}/ \
1.40 taca 618: { gsub(/${RUBY_SITELIB:S|/|\\/|g}/, "$${RUBY_SITELIB}"); \
619: print; next; }
1.49 taca 620: PRINT_PLIST_AWK+= /^${RUBY_SITELIB_BASE:S|/|\\/|g}/ \
1.40 taca 621: { gsub(/${RUBY_SITELIB_BASE:S|/|\\/|g}/, "$${RUBY_SITELIB_BASE}"); \
622: print; next; }
1.49 taca 623: PRINT_PLIST_AWK+= /^${RUBY_VENDORLIB_BASE:S|/|\\/|g}/ \
1.40 taca 624: { gsub(/${RUBY_VENDORLIB_BASE:S|/|\\/|g}/, "$${RUBY_VENDORLIB_BASE}"); \
625: print; next; }
1.47 joerg 626: PRINT_PLIST_AWK+= /^${RUBY_LIB:S|/|\\/|g}/ \
1.40 taca 627: { gsub(/${RUBY_LIB:S|/|\\/|g}/, "$${RUBY_LIB}"); \
628: print; next; }
1.47 joerg 629: PRINT_PLIST_AWK+= /^${RUBY_DOC:S|/|\\/|g}/ \
1.40 taca 630: { gsub(/${RUBY_DOC:S|/|\\/|g}/, "$${RUBY_DOC}"); \
631: print; next; }
1.47 joerg 632: PRINT_PLIST_AWK+= /^${RUBY_EG:S|/|\\/|g}/ \
1.40 taca 633: { gsub(/${RUBY_EG:S|/|\\/|g}/, "$${RUBY_EG}"); \
634: print; next; }
1.47 joerg 635: PRINT_PLIST_AWK+= /^${RUBY_SITERIDIR:S|/|\\/|g}/ \
1.40 taca 636: { gsub(/${RUBY_SITERIDIR:S|/|\\/|g}/, "$${RUBY_SITERIDIR}"); \
637: print; next; }
1.49 taca 638: PRINT_PLIST_AWK+= /^${RUBY_SYSRIDIR:S|/|\\/|g}\// \
639: { next; }
1.117 taca 640:
641: # Insert part of PRINT_PLIST_AWK from gem.mk
642: PRINT_PLIST_AWK+= ${_RUBY_PRINT_PLIST_GEM}
643:
1.49 taca 644: PRINT_PLIST_AWK+= /\/${RUBY_NAME}/ \
645: { sub(/${RUBY_NAME}/, "$${RUBY_NAME}"); }
1.65 taca 646: PRINT_PLIST_AWK+= /^${GEM_HOME:S|/|\\/|g:S|.|\\.|g}/ \
647: { gsub(/${GEM_HOME:S|/|\\/|g}/, "$${GEM_HOME}"); }
1.40 taca 648:
1.166 taca 649: # supporting scripts
650: UPDATE_GEMSPEC= ../../lang/ruby/files/update-gemspec.rb
651:
1.1 taca 652: .endif # _RUBY_MK
CVSweb <webmaster@jp.NetBSD.org>