Annotation of pkgsrc/lang/ruby/rubyversion.mk, revision 1.175
1.175 ! taca 1: # $NetBSD: rubyversion.mk,v 1.174 2017/04/23 14:21:23 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.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.155 taca 224: # patch level
1.162 taca 225: #RUBY21_PATCHLEVEL= p492
1.170 taca 226: #RUBY22_PATCHLEVEL= p470
1.172 taca 227: #RUBY23_PATCHLEVEL= p301
1.49 taca 228:
1.59 taca 229: # current API compatible version; used for version of shared library
1.112 taca 230: RUBY21_API_VERSION= 2.1.0
1.131 taca 231: RUBY22_API_VERSION= 2.2.0
1.155 taca 232: RUBY23_API_VERSION= 2.3.0
1.131 taca 233:
1.1 taca 234: #
1.169 taca 235: RUBY_VERSION_DEFAULT?= 23
1.64 taca 236:
1.173 taca 237: # supported Ruby's version
1.174 taca 238: RUBY_VERSIONS_SUPPORTED= 23 22 21
1.173 taca 239:
1.169 taca 240: RUBY_VERSIONS_ACCEPTED?= 23 22 21
1.165 joerg 241: RUBY_VERSIONS_INCOMPATIBLE?=
242:
1.173 taca 243: .if empty(RUBY_VERSIONS_SUPPORTED:M${RUBY_VERSION_DEFAULT})
244: .error Unsuported RUBY_VERSION_DEFAULT: ${RUBY_VERSION_DEFAULT}
245: .endif
246:
1.165 joerg 247: .for rv in ${RUBY_VERSIONS_ACCEPTED}
248: . if empty(RUBY_VERSIONS_INCOMPATIBLE:M${rv})
249: _RUBY_VERSIONS_ACCEPTED+= ${rv}
250: . endif
251: .endfor
1.64 taca 252:
1.98 taca 253: .if defined(RUBY_VERSION_REQD)
1.165 joerg 254: . for rv in ${_RUBY_VERSIONS_ACCEPTED}
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)
1.165 joerg 260: . for rv in ${_RUBY_VERSIONS_ACCEPTED}
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.165 joerg 268: . for rv in ${_RUBY_VERSIONS_ACCEPTED}
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.174 taca 279: .if ${RUBY_VER} == "21"
1.112 taca 280: RUBY_VERSION= ${RUBY21_VERSION}
281: RUBY_VERSION_FULL= ${RUBY_VERSION}
1.110 taca 282: RUBY_ABI_VERSION= ${RUBY_VERSION}
283:
1.112 taca 284: RUBY_GEMS_VERSION= 2.2.2
1.110 taca 285: RUBY_RDOC_VERSION= 4.1.0
286: RUBY_RAKE_VERSION= 10.1.0
287: RUBY_JSON_VERSION= 1.8.1
288:
1.156 taca 289: RUBY_BIGDECIMAL_VERSION= 1.2.4
290: RUBY_IO_CONSOLE_VERSION= 0.4.3
291: RUBY_PSYCH_VERSION= 2.0.5
292: RUBY_MINITEST_VERSION= 4.7.5
293: RUBY_TEST_UNIT_VERSION= 2.1.8.0
294:
1.134 taca 295: RUBY_SUFFIX= ${_RUBY_VER_MAJOR}${_RUBY_VER_MINOR}
296:
1.131 taca 297: .elif ${RUBY_VER} == "22"
298: RUBY_VERSION= ${RUBY22_VERSION}
299: RUBY_VERSION_FULL= ${RUBY_VERSION}
300: RUBY_ABI_VERSION= ${RUBY_VERSION}
301:
1.167 taca 302: RUBY_GEMS_VERSION= 2.4.5.2
1.131 taca 303: RUBY_RDOC_VERSION= 4.2.0
304: RUBY_RAKE_VERSION= 10.4.2
305: RUBY_JSON_VERSION= 1.8.1
306:
1.156 taca 307: RUBY_BIGDECIMAL_VERSION= 1.2.6
308: RUBY_IO_CONSOLE_VERSION= 0.4.3
309: RUBY_PSYCH_VERSION= 2.0.8
310: RUBY_MINITEST_VERSION= 5.4.3
311: RUBY_POWER_ASSERT_VERSION= 0.2.2
312: RUBY_TEST_UNIT_VERSION= 3.0.8
313:
1.134 taca 314: RUBY_SUFFIX= ${_RUBY_VER_MAJOR}${_RUBY_VER_MINOR}
315:
1.155 taca 316: .elif ${RUBY_VER} == "23"
317: RUBY_VERSION= ${RUBY23_VERSION}
318: RUBY_VERSION_FULL= ${RUBY_VERSION}
319: RUBY_ABI_VERSION= ${RUBY_VERSION}
320:
1.168 taca 321: RUBY_GEMS_VERSION= 2.5.2
1.155 taca 322: RUBY_RDOC_VERSION= 4.2.1
323: RUBY_RAKE_VERSION= 10.4.2
324: RUBY_JSON_VERSION= 1.8.3
325:
1.156 taca 326: RUBY_BIGDECIMAL_VERSION= 1.2.8
327: RUBY_IO_CONSOLE_VERSION= 0.4.5
1.168 taca 328: RUBY_PSYCH_VERSION= 2.1.0
1.156 taca 329: RUBY_DID_YOU_MEAN_VERSION= 1.0.0
1.168 taca 330: RUBY_MINITEST_VERSION= 5.8.5
1.156 taca 331: RUBY_NET_TELNET_VERSION= 0.1.1
332: RUBY_POWER_ASSERT_VERSION= 0.2.6
333: RUBY_TEST_UNIT_VERSION= 3.1.5
334:
1.155 taca 335: RUBY_SUFFIX= ${_RUBY_VER_MAJOR}${_RUBY_VER_MINOR}
336:
1.64 taca 337: .else
338: PKG_FAIL_REASON+= "Unknown Ruby version specified: ${RUBY_VER}."
1.32 taca 339: .endif
1.1 taca 340:
1.98 taca 341: .if !empty(RUBY_VERSION)
1.64 taca 342: RUBY_PATCHLEVEL= ${RUBY${RUBY_VER}_PATCHLEVEL}
343: RUBY_API_VERSION= ${RUBY${RUBY_VER}_API_VERSION}
1.98 taca 344: .endif
1.64 taca 345:
1.60 wiz 346: # Variable assignment for multi-ruby packages
1.64 taca 347: MULTI+= RUBY_VER=${RUBY_VERS:U${RUBY_VERSION_DEFAULT}}
1.4 taca 348:
1.1 taca 349: # RUBY_NOVERSION should be set to "Yes" if the package dosen't depend on
350: # any specific version of ruby command. In this case, package's
351: # name begin with "ruby-".
352: # If RUBY_NOVERSION is "No" (default), the package's name is begin
1.174 taca 353: # with ${RUBY_NAME}; "ruby22", "ruby23", and so on.
1.1 taca 354: #
1.53 taca 355: # It also affects to RUBY_DOC, RUBY_EG...
1.1 taca 356: #
357: RUBY_NOVERSION?= No
358:
1.174 taca 359: # _RUBY_VER_MAJOR, _RUBY_VER_MINOR
1.29 taca 360: # is defined from version of Ruby. It should not be used in packages'
361: # Makefile.
362: #
1.64 taca 363: _RUBY_VER_MAJOR= ${RUBY_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\1/}
364: _RUBY_VER_MINOR= ${RUBY_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\2/}
1.1 taca 365:
1.64 taca 366: _RUBY_API_MAJOR= ${RUBY_API_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\1\2/}
367: _RUBY_API_MINOR= ${RUBY_API_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\3/}
1.1 taca 368:
1.64 taca 369: RUBY_NAME= ruby${RUBY_SUFFIX}
370: RUBYGEM_NAME= gem${RUBY_SUFFIX}
371: RAKE_NAME= rake${RUBY_SUFFIX}
1.1 taca 372:
1.112 taca 373: RUBY_BASE= ${RUBY_NAME}-base
1.10 taca 374:
1.1 taca 375: RUBY_PKGPREFIX?= ${RUBY_NAME}
376:
1.134 taca 377: RUBY_VER_DIR= ${RUBY_API_VERSION}
1.1 taca 378:
379: .if empty(RUBY_NOVERSION:M[nN][oO])
380: RUBY_SUFFIX=
381: RUBY_NAME= ruby
382: .endif
383:
1.64 taca 384: RUBY_BUILD_RDOC?= Yes
385: RUBY_BUILD_RI?= Yes
1.49 taca 386:
1.15 taca 387: RUBY?= ${PREFIX}/bin/${RUBY_NAME}
1.112 taca 388: RDOC?= ${PREFIX}/bin/rdoc${RUBY_SUFFIX}
1.1 taca 389:
1.132 riastrad 390: RUBY_ARCH?= ${MACHINE_GNU_ARCH}-${LOWER_OPSYS}${APPEND_ELF}${LOWER_OPSYS_VERSUFFIX}${APPEND_ABI}
1.1 taca 391:
1.138 taca 392: RUBY_MAJOR_MINOR= ${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}
393:
1.1 taca 394: #
1.53 taca 395: # Ruby shared and static library version handling.
1.10 taca 396: #
1.49 taca 397: RUBY_SHLIBVER?= ${RUBY_API_VERSION}
1.112 taca 398: RUBY_SHLIB?= ${RUBY_SUFFIX}.${RUBY_SLEXT}.${RUBY_SHLIBVER}
1.53 taca 399: RUBY_SHLIBALIAS?= @comment
1.112 taca 400: RUBY_STATICLIB?= ${RUBY_SUFFIX}-static.a
1.10 taca 401:
402: .if ${OPSYS} == "NetBSD" || ${OPSYS} == "Interix"
1.64 taca 403: RUBY_SHLIBVER= ${_RUBY_API_MAJOR}.${_RUBY_API_MINOR}
1.112 taca 404: _RUBY_SHLIBALIAS= ${RUBY_SUFFIX}.${RUBY_SLEXT}.${_RUBY_API_MAJOR}
1.12 jlam 405: .elif ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly"
1.75 marino 406: RUBY_SHLIBVER= ${_RUBY_VER_MAJOR}${_RUBY_VER_MINOR}${_RUBY_API_MINOR}
1.83 bsiegert 407: .elif ${OPSYS} == "OpenBSD" || ${OPSYS} == "MirBSD"
1.102 taca 408: .if ${_RUBY_VER_MINOR} == 0
409: RUBY_SHLIBVER= ${_RUBY_VER_MAJOR}.${_RUBY_API_MINOR}
410: .else
1.64 taca 411: RUBY_SHLIBVER= ${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}${_RUBY_API_MINOR}
1.102 taca 412: .endif
1.53 taca 413: .elif ${OPSYS} == "Darwin"
1.112 taca 414: RUBY_SHLIB= ${RUBY_SUFFIX}.${RUBY_SHLIBVER}.${RUBY_SLEXT}
1.53 taca 415: _RUBY_SHLIBALIAS= .${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}.${RUBY_SLEXT}
1.112 taca 416: RUBY_STATICLIB= ${RUBY_SUFFIX}.${RUBY_API_VERSION}-static.a
1.10 taca 417: .elif ${OPSYS} == "Linux"
1.112 taca 418: _RUBY_SHLIBALIAS= ${RUBY_SUFFIX}.${RUBY_SLEXT}.${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}
1.56 taca 419: .elif ${OPSYS} == "SunOS"
420: RUBY_SHLIBVER= ${_RUBY_VER_MAJOR}
1.154 rillig 421: _RUBY_SHLIBALIAS= ${RUBY_SUFFIX}.${RUBY_SLEXT}.${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}.${_RUBY_API_MINOR}
1.96 obache 422: .elif ${OPSYS} == "Cygwin"
1.112 taca 423: RUBY_SHLIB= ${RUBY_SUFFIX}${_RUBY_API_MAJOR}${_RUBY_API_MINOR}.dll.a
424: RUBY_SHLIBALIAS= bin/cygruby${RUBY_SUFFIX}${_RUBY_API_MAJOR}${_RUBY_API_MINOR}.dll
425: RUBY_STATICLIB= ${RUBY_SUFFIX}${_RUBY_API_MAJOR}${_RUBY_API_MINOR}-static.a
1.10 taca 426: .endif
427:
1.53 taca 428: .if !empty(_RUBY_SHLIBALIAS)
429: RUBY_SHLIBALIAS= lib/libruby${_RUBY_SHLIBALIAS}
1.10 taca 430: .endif
431:
1.64 taca 432: .if ${_OPSYS_SHLIB_TYPE} == "dylib"
1.5 taca 433: RUBY_DLEXT= bundle
1.53 taca 434: RUBY_SLEXT= dylib
1.5 taca 435: .else
436: RUBY_DLEXT= so
1.53 taca 437: RUBY_SLEXT= so
1.5 taca 438: .endif
439:
1.71 taca 440: RUBY_DISTNAME?= ruby-${RUBY_VERSION}
441:
442: #
1.26 taca 443: # Use pthread library with Ruby
444: #
1.64 taca 445: .if !empty(MACHINE_PLATFORM:MDarwin-9.*-powerpc)
1.42 minskim 446: # Workaround for Ruby Bug #193
447: # http://redmine.ruby-lang.org/issues/show/193
448: RUBY_USE_PTHREAD?= no
1.26 taca 449: .else
450: RUBY_USE_PTHREAD?= yes
451: .endif
452:
1.23 taca 453: RUBY_DYNAMIC_DIRS?= # empty
454:
1.112 taca 455: RUBY_SRCDIR?= ../../lang/ruby${RUBY_VER}-base
1.10 taca 456:
457: #
1.23 taca 458: # common paths
1.1 taca 459: #
1.49 taca 460: RUBY_INC= include/ruby-${RUBY_VER_DIR}
461: RUBY_ARCHINC= ${RUBY_INC}/${RUBY_ARCH}
462: RUBY_LIB_BASE= lib/ruby
463: RUBY_LIB?= ${RUBY_LIB_BASE}/${RUBY_VER_DIR}
1.40 taca 464: RUBY_ARCHLIB?= ${RUBY_LIB}/${RUBY_ARCH}
1.49 taca 465: RUBY_SITELIB_BASE?= ${RUBY_LIB_BASE}/site_ruby
1.40 taca 466: RUBY_SITELIB?= ${RUBY_SITELIB_BASE}/${RUBY_VER_DIR}
467: RUBY_SITEARCHLIB?= ${RUBY_SITELIB}/${RUBY_ARCH}
1.49 taca 468: RUBY_VENDORLIB_BASE?= ${RUBY_LIB_BASE}/vendor_ruby
1.40 taca 469: RUBY_VENDORLIB?= ${RUBY_VENDORLIB_BASE}/${RUBY_VER_DIR}
470: RUBY_VENDORARCHLIB?= ${RUBY_VENDORLIB}/${RUBY_ARCH}
1.49 taca 471:
1.40 taca 472: RUBY_DOC?= share/doc/${RUBY_NAME}
473: RUBY_EG?= share/examples/${RUBY_NAME}
474:
1.64 taca 475:
1.49 taca 476: RUBY_GEM_BASE?= ${RUBY_LIB_BASE}/gems
477: GEM_HOME?= ${RUBY_GEM_BASE}/${RUBY_VER_DIR}
1.31 taca 478:
479: #
480: # ri database relative path
481: #
482: RUBY_RIDIR?= share/ri
1.15 taca 483: RUBY_BASERIDIR?= ${RUBY_RIDIR}/${RUBY_VER_DIR}
484: RUBY_SYSRIDIR?= ${RUBY_BASERIDIR}/system
485: RUBY_SITERIDIR?= ${RUBY_BASERIDIR}/site
1.1 taca 486:
487: #
488: # MAKE_ENV
489: #
1.18 rillig 490: MAKE_ENV+= RUBY=${RUBY:Q} RUBY_VER=${RUBY_VER:Q} \
491: RUBY_VERSION_DEFAULT=${RUBY_VERSION_DEFAULT:Q}
1.15 taca 492:
1.122 taca 493: MAKEFLAGS+= RUBY_VER=${RUBY_VER:Q} \
494: RUBY_VERSION_DEFAULT=${RUBY_VERSION_DEFAULT:Q}
1.15 taca 495:
1.49 taca 496: PLIST_RUBY_DIRS= RUBY_INC=${RUBY_INC:Q} RUBY_ARCHINC=${RUBY_ARCHINC:Q} \
497: RUBY_LIB_BASE=${RUBY_LIB_BASE:Q} \
498: RUBY_LIB=${RUBY_LIB:Q} \
499: RUBY_ARCHLIB=${RUBY_ARCHLIB:Q} \
1.40 taca 500: RUBY_SITELIB_BASE=${RUBY_SITELIB_BASE:Q} \
1.49 taca 501: RUBY_SITELIB=${RUBY_SITELIB:Q} \
502: RUBY_SITEARCHLIB=${RUBY_SITEARCHLIB:Q} \
1.40 taca 503: RUBY_VENDORLIB_BASE=${RUBY_VENDORLIB_BASE:Q} \
504: RUBY_VENDORLIB=${RUBY_VENDORLIB:Q} \
505: RUBY_VENDORARCHLIB=${RUBY_VENDORARCHLIB:Q} \
1.49 taca 506: RUBY_DOC=${RUBY_DOC:Q} \
507: RUBY_EG=${RUBY_EG:Q} \
508: RUBY_GEM_BASE=${RUBY_GEM_BASE:Q} \
509: GEM_HOME=${GEM_HOME:Q} \
510: RUBY_RIDIR=${RUBY_RIDIR:Q} \
511: RUBY_BASERIDIR=${RUBY_BASERIDIR:Q} \
512: RUBY_SYSRIDIR=${RUBY_SYSRIDIR:Q} \
513: RUBY_SITERIDIR=${RUBY_SITERIDIR:Q}
1.1 taca 514:
1.14 taca 515: #
516: # substitutions
517: #
1.18 rillig 518: FILES_SUBST+= RUBY=${RUBY:Q} RUBY_NAME=${RUBY_NAME:Q} \
519: RUBY_PKGPREFIX=${RUBY_PKGPREFIX:Q} \
1.111 taca 520: RUBY_SUFFIX=${RUBY_SUFFIX} \
1.18 rillig 521: RUBY_VER=${RUBY_VER:Q} \
1.15 taca 522: ${PLIST_RUBY_DIRS}
1.14 taca 523:
1.15 taca 524: MESSAGE_SUBST+= RUBY="${RUBY}" RUBY_VER="${RUBY_VER}" \
1.14 taca 525: RUBY_VERSION="${RUBY_VERSION}" \
1.15 taca 526: RUBY_PKGPREFIX="${RUBY_PKGPREFIX}" \
1.111 taca 527: RUBY_SUFFIX=${RUBY_SUFFIX} \
1.15 taca 528: ${PLIST_RUBY_DIRS:S,DIR="${PREFIX}/,DIR=",}
1.14 taca 529:
1.18 rillig 530: PLIST_SUBST+= RUBY=${RUBY:Q} RUBY_VER=${RUBY_VER:Q} \
1.49 taca 531: RUBY_PKGPREFIX=${RUBY_PKGPREFIX} \
1.111 taca 532: RUBY_SUFFIX=${RUBY_SUFFIX} \
1.18 rillig 533: RUBY_VERSION=${RUBY_VERSION:Q} \
534: RUBY_VER_DIR=${RUBY_VER_DIR:Q} \
1.53 taca 535: RUBY_DLEXT=${RUBY_DLEXT:Q} RUBY_SLEXT=${RUBY_SLEXT:Q} \
536: RUBY_SHLIB=${RUBY_SHLIB:Q} \
537: RUBY_SHLIBALIAS=${RUBY_SHLIBALIAS:Q} \
538: RUBY_STATICLIB=${RUBY_STATICLIB:Q} \
1.144 rodent 539: RUBY_API_VERSION=${RUBY_API_VERSION:Q} \
1.39 jlam 540: RUBY_ARCH=${RUBY_ARCH:Q} \
1.138 taca 541: ${PLIST_RUBY_DIRS:S,DIR="${PREFIX}/,DIR=",} \
542: RUBY_MAJOR_MINOR=${RUBY_MAJOR_MINOR}
1.1 taca 543:
1.22 taca 544: #
1.23 taca 545: # make dynamic PLIST
1.22 taca 546: #
1.23 taca 547: .if !empty(RUBY_DYNAMIC_DIRS)
548:
549: RUBY_PLIST_DYNAMIC= ${WRKDIR}/PLIST.work
550:
551: .if !defined(PLIST_SRC)
552: . if exists(${PKGDIR}/PLIST.common)
553: PLIST_SRC+= ${PKGDIR}/PLIST.common
554: . elif exists(${PKGDIR}/PLIST)
555: PLIST_SRC+= ${PKGDIR}/PLIST
556: . endif
557:
558: PLIST_SRC+= ${RUBY_PLIST_DYNAMIC}
559:
560: . if exists(${PKGDIR}/PLIST.common_end)
561: PLIST_SRC+= ${PKGDIR}/PLIST.common_end
562: . endif
563:
564: .endif
565:
566: RUBY_PLIST_COMMENT_CMD= \
567: ${ECHO} "@comment The following lines are automatically generated"
1.37 obache 568: RUBY_PLIST_FILES_CMD= ( cd ${DESTDIR}${PREFIX}; \
1.23 taca 569: ${FIND} ${RUBY_DYNAMIC_DIRS} \( -type f -o -type l \) -print ) | \
570: ${SORT} -u
1.164 rillig 571: RUBY_GENERATE_PLIST= ( \
1.23 taca 572: ${RUBY_PLIST_COMMENT_CMD}; \
1.47 joerg 573: ${RUBY_PLIST_FILES_CMD} ) > ${RUBY_PLIST_DYNAMIC}
1.22 taca 574: .endif
1.23 taca 575:
1.53 taca 576: PRINT_PLIST_AWK+= /lib\/libruby${RUBY_STATICLIB}$$/ \
577: { sub(/${RUBY_STATICLIB}/, "$${RUBY_STATICLIB}"); }
578: PRINT_PLIST_AWK+= /lib\/libruby${RUBY_VER}\.${RUBY_SLEXT}/ \
579: { sub(/${RUBY_VER}\.${RUBY_SLEXT}$$/, \
580: "$${RUBY_VER}.$${RUBY_SLEXT}"); }
581: PRINT_PLIST_AWK+= /${RUBY_SHLIB}$$/ \
582: { sub(/${RUBY_SHLIB}$$/, "$${RUBY_SHLIB}"); }
583: PRINT_PLIST_AWK+= /${RUBY_SLEXT}\.${RUBY_SHLIBVER}$$/ \
584: { sub(/${RUBY_SLEXT}\.${RUBY_SHLIBVER}$$/, \
585: "$${RUBY_SLEXT}.$${RUBY_SHLIBVER}"); }
586: .if ${RUBY_SHLIBALIAS} != "@comment"
587: PRINT_PLIST_AWK+= /${RUBY_SHLIBALIAS:S/\//\\\//}$$/ \
588: { sub(/${RUBY_SHLIBALIAS:S/\//\\\//}$$/, \
589: "$${RUBY_SHLIBALIAS}"); }
1.49 taca 590: .endif
591: PRINT_PLIST_AWK+= /^${RUBY_ARCHINC:S|/|\\/|g}/ \
592: { gsub(/${RUBY_ARCHINC:S|/|\\/|g}/, "$${RUBY_ARCHINC}"); \
593: print; next; }
594: PRINT_PLIST_AWK+= /^${RUBY_INC:S|/|\\/|g}/ \
595: { gsub(/${RUBY_INC:S|/|\\/|g}/, "$${RUBY_INC}"); \
596: print; next; }
1.40 taca 597: PRINT_PLIST_AWK+= /\.${RUBY_DLEXT}$$/ \
598: { gsub(/${RUBY_DLEXT}$$/, "$${RUBY_DLEXT}") }
1.47 joerg 599: PRINT_PLIST_AWK+= /^${RUBY_ARCHLIB:S|/|\\/|g}/ \
1.40 taca 600: { gsub(/${RUBY_ARCHLIB:S|/|\\/|g}/, "$${RUBY_ARCHLIB}"); \
601: print; next; }
1.47 joerg 602: PRINT_PLIST_AWK+= /^${RUBY_VENDORARCHLIB:S|/|\\/|g}/ \
1.40 taca 603: { gsub(/${RUBY_VENDORARCHLIB:S|/|\\/|g}/, "$${RUBY_VENDORARCHLIB}"); \
604: print; next; }
1.47 joerg 605: PRINT_PLIST_AWK+= /^${RUBY_VENDORLIB:S|/|\\/|g}/ \
1.40 taca 606: { gsub(/${RUBY_VENDORLIB:S|/|\\/|g}/, "$${RUBY_VENDORLIB}"); \
607: print; next; }
1.47 joerg 608: PRINT_PLIST_AWK+= /^${RUBY_SITEARCHLIB:S|/|\\/|g}/ \
1.40 taca 609: { gsub(/${RUBY_SITEARCHLIB:S|/|\\/|g}/, "$${RUBY_SITEARCHLIB}"); \
610: print; next; }
1.47 joerg 611: PRINT_PLIST_AWK+= /^${RUBY_SITELIB:S|/|\\/|g}/ \
1.40 taca 612: { gsub(/${RUBY_SITELIB:S|/|\\/|g}/, "$${RUBY_SITELIB}"); \
613: print; next; }
1.49 taca 614: PRINT_PLIST_AWK+= /^${RUBY_SITELIB_BASE:S|/|\\/|g}/ \
1.40 taca 615: { gsub(/${RUBY_SITELIB_BASE:S|/|\\/|g}/, "$${RUBY_SITELIB_BASE}"); \
616: print; next; }
1.49 taca 617: PRINT_PLIST_AWK+= /^${RUBY_VENDORLIB_BASE:S|/|\\/|g}/ \
1.40 taca 618: { gsub(/${RUBY_VENDORLIB_BASE:S|/|\\/|g}/, "$${RUBY_VENDORLIB_BASE}"); \
619: print; next; }
1.47 joerg 620: PRINT_PLIST_AWK+= /^${RUBY_LIB:S|/|\\/|g}/ \
1.40 taca 621: { gsub(/${RUBY_LIB:S|/|\\/|g}/, "$${RUBY_LIB}"); \
622: print; next; }
1.47 joerg 623: PRINT_PLIST_AWK+= /^${RUBY_DOC:S|/|\\/|g}/ \
1.40 taca 624: { gsub(/${RUBY_DOC:S|/|\\/|g}/, "$${RUBY_DOC}"); \
625: print; next; }
1.47 joerg 626: PRINT_PLIST_AWK+= /^${RUBY_EG:S|/|\\/|g}/ \
1.40 taca 627: { gsub(/${RUBY_EG:S|/|\\/|g}/, "$${RUBY_EG}"); \
628: print; next; }
1.47 joerg 629: PRINT_PLIST_AWK+= /^${RUBY_SITERIDIR:S|/|\\/|g}/ \
1.40 taca 630: { gsub(/${RUBY_SITERIDIR:S|/|\\/|g}/, "$${RUBY_SITERIDIR}"); \
631: print; next; }
1.49 taca 632: PRINT_PLIST_AWK+= /^${RUBY_SYSRIDIR:S|/|\\/|g}\// \
633: { next; }
1.117 taca 634:
635: # Insert part of PRINT_PLIST_AWK from gem.mk
636: PRINT_PLIST_AWK+= ${_RUBY_PRINT_PLIST_GEM}
637:
1.49 taca 638: PRINT_PLIST_AWK+= /\/${RUBY_NAME}/ \
639: { sub(/${RUBY_NAME}/, "$${RUBY_NAME}"); }
1.65 taca 640: PRINT_PLIST_AWK+= /^${GEM_HOME:S|/|\\/|g:S|.|\\.|g}/ \
641: { gsub(/${GEM_HOME:S|/|\\/|g}/, "$${GEM_HOME}"); }
1.40 taca 642:
1.166 taca 643: # supporting scripts
644: UPDATE_GEMSPEC= ../../lang/ruby/files/update-gemspec.rb
645:
1.1 taca 646: .endif # _RUBY_MK
CVSweb <webmaster@jp.NetBSD.org>