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