Annotation of pkgsrc/lang/ruby/rubyversion.mk, revision 1.176
1.176 ! taca 1: # $NetBSD: rubyversion.mk,v 1.175 2017/05/04 07:47:22 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.176 ! taca 388: RAKE?= ${PREFIX}/bin/${RAKE_NAME}
1.112 taca 389: RDOC?= ${PREFIX}/bin/rdoc${RUBY_SUFFIX}
1.1 taca 390:
1.132 riastrad 391: RUBY_ARCH?= ${MACHINE_GNU_ARCH}-${LOWER_OPSYS}${APPEND_ELF}${LOWER_OPSYS_VERSUFFIX}${APPEND_ABI}
1.1 taca 392:
1.138 taca 393: RUBY_MAJOR_MINOR= ${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}
394:
1.1 taca 395: #
1.53 taca 396: # Ruby shared and static library version handling.
1.10 taca 397: #
1.49 taca 398: RUBY_SHLIBVER?= ${RUBY_API_VERSION}
1.112 taca 399: RUBY_SHLIB?= ${RUBY_SUFFIX}.${RUBY_SLEXT}.${RUBY_SHLIBVER}
1.53 taca 400: RUBY_SHLIBALIAS?= @comment
1.112 taca 401: RUBY_STATICLIB?= ${RUBY_SUFFIX}-static.a
1.10 taca 402:
403: .if ${OPSYS} == "NetBSD" || ${OPSYS} == "Interix"
1.64 taca 404: RUBY_SHLIBVER= ${_RUBY_API_MAJOR}.${_RUBY_API_MINOR}
1.112 taca 405: _RUBY_SHLIBALIAS= ${RUBY_SUFFIX}.${RUBY_SLEXT}.${_RUBY_API_MAJOR}
1.12 jlam 406: .elif ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly"
1.75 marino 407: RUBY_SHLIBVER= ${_RUBY_VER_MAJOR}${_RUBY_VER_MINOR}${_RUBY_API_MINOR}
1.83 bsiegert 408: .elif ${OPSYS} == "OpenBSD" || ${OPSYS} == "MirBSD"
1.102 taca 409: .if ${_RUBY_VER_MINOR} == 0
410: RUBY_SHLIBVER= ${_RUBY_VER_MAJOR}.${_RUBY_API_MINOR}
411: .else
1.64 taca 412: RUBY_SHLIBVER= ${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}${_RUBY_API_MINOR}
1.102 taca 413: .endif
1.53 taca 414: .elif ${OPSYS} == "Darwin"
1.112 taca 415: RUBY_SHLIB= ${RUBY_SUFFIX}.${RUBY_SHLIBVER}.${RUBY_SLEXT}
1.53 taca 416: _RUBY_SHLIBALIAS= .${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}.${RUBY_SLEXT}
1.112 taca 417: RUBY_STATICLIB= ${RUBY_SUFFIX}.${RUBY_API_VERSION}-static.a
1.10 taca 418: .elif ${OPSYS} == "Linux"
1.112 taca 419: _RUBY_SHLIBALIAS= ${RUBY_SUFFIX}.${RUBY_SLEXT}.${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}
1.56 taca 420: .elif ${OPSYS} == "SunOS"
421: RUBY_SHLIBVER= ${_RUBY_VER_MAJOR}
1.154 rillig 422: _RUBY_SHLIBALIAS= ${RUBY_SUFFIX}.${RUBY_SLEXT}.${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}.${_RUBY_API_MINOR}
1.96 obache 423: .elif ${OPSYS} == "Cygwin"
1.112 taca 424: RUBY_SHLIB= ${RUBY_SUFFIX}${_RUBY_API_MAJOR}${_RUBY_API_MINOR}.dll.a
425: RUBY_SHLIBALIAS= bin/cygruby${RUBY_SUFFIX}${_RUBY_API_MAJOR}${_RUBY_API_MINOR}.dll
426: RUBY_STATICLIB= ${RUBY_SUFFIX}${_RUBY_API_MAJOR}${_RUBY_API_MINOR}-static.a
1.10 taca 427: .endif
428:
1.53 taca 429: .if !empty(_RUBY_SHLIBALIAS)
430: RUBY_SHLIBALIAS= lib/libruby${_RUBY_SHLIBALIAS}
1.10 taca 431: .endif
432:
1.64 taca 433: .if ${_OPSYS_SHLIB_TYPE} == "dylib"
1.5 taca 434: RUBY_DLEXT= bundle
1.53 taca 435: RUBY_SLEXT= dylib
1.5 taca 436: .else
437: RUBY_DLEXT= so
1.53 taca 438: RUBY_SLEXT= so
1.5 taca 439: .endif
440:
1.71 taca 441: RUBY_DISTNAME?= ruby-${RUBY_VERSION}
442:
443: #
1.26 taca 444: # Use pthread library with Ruby
445: #
1.64 taca 446: .if !empty(MACHINE_PLATFORM:MDarwin-9.*-powerpc)
1.42 minskim 447: # Workaround for Ruby Bug #193
448: # http://redmine.ruby-lang.org/issues/show/193
449: RUBY_USE_PTHREAD?= no
1.26 taca 450: .else
451: RUBY_USE_PTHREAD?= yes
452: .endif
453:
1.23 taca 454: RUBY_DYNAMIC_DIRS?= # empty
455:
1.112 taca 456: RUBY_SRCDIR?= ../../lang/ruby${RUBY_VER}-base
1.10 taca 457:
458: #
1.23 taca 459: # common paths
1.1 taca 460: #
1.49 taca 461: RUBY_INC= include/ruby-${RUBY_VER_DIR}
462: RUBY_ARCHINC= ${RUBY_INC}/${RUBY_ARCH}
463: RUBY_LIB_BASE= lib/ruby
464: RUBY_LIB?= ${RUBY_LIB_BASE}/${RUBY_VER_DIR}
1.40 taca 465: RUBY_ARCHLIB?= ${RUBY_LIB}/${RUBY_ARCH}
1.49 taca 466: RUBY_SITELIB_BASE?= ${RUBY_LIB_BASE}/site_ruby
1.40 taca 467: RUBY_SITELIB?= ${RUBY_SITELIB_BASE}/${RUBY_VER_DIR}
468: RUBY_SITEARCHLIB?= ${RUBY_SITELIB}/${RUBY_ARCH}
1.49 taca 469: RUBY_VENDORLIB_BASE?= ${RUBY_LIB_BASE}/vendor_ruby
1.40 taca 470: RUBY_VENDORLIB?= ${RUBY_VENDORLIB_BASE}/${RUBY_VER_DIR}
471: RUBY_VENDORARCHLIB?= ${RUBY_VENDORLIB}/${RUBY_ARCH}
1.49 taca 472:
1.40 taca 473: RUBY_DOC?= share/doc/${RUBY_NAME}
474: RUBY_EG?= share/examples/${RUBY_NAME}
475:
1.64 taca 476:
1.49 taca 477: RUBY_GEM_BASE?= ${RUBY_LIB_BASE}/gems
478: GEM_HOME?= ${RUBY_GEM_BASE}/${RUBY_VER_DIR}
1.31 taca 479:
480: #
481: # ri database relative path
482: #
483: RUBY_RIDIR?= share/ri
1.15 taca 484: RUBY_BASERIDIR?= ${RUBY_RIDIR}/${RUBY_VER_DIR}
485: RUBY_SYSRIDIR?= ${RUBY_BASERIDIR}/system
486: RUBY_SITERIDIR?= ${RUBY_BASERIDIR}/site
1.1 taca 487:
488: #
489: # MAKE_ENV
490: #
1.18 rillig 491: MAKE_ENV+= RUBY=${RUBY:Q} RUBY_VER=${RUBY_VER:Q} \
1.176 ! taca 492: RUBY_VERSION_DEFAULT=${RUBY_VERSION_DEFAULT:Q} \
! 493: RAKE=${RAKE:Q}
1.15 taca 494:
1.122 taca 495: MAKEFLAGS+= RUBY_VER=${RUBY_VER:Q} \
496: RUBY_VERSION_DEFAULT=${RUBY_VERSION_DEFAULT:Q}
1.15 taca 497:
1.49 taca 498: PLIST_RUBY_DIRS= RUBY_INC=${RUBY_INC:Q} RUBY_ARCHINC=${RUBY_ARCHINC:Q} \
499: RUBY_LIB_BASE=${RUBY_LIB_BASE:Q} \
500: RUBY_LIB=${RUBY_LIB:Q} \
501: RUBY_ARCHLIB=${RUBY_ARCHLIB:Q} \
1.40 taca 502: RUBY_SITELIB_BASE=${RUBY_SITELIB_BASE:Q} \
1.49 taca 503: RUBY_SITELIB=${RUBY_SITELIB:Q} \
504: RUBY_SITEARCHLIB=${RUBY_SITEARCHLIB:Q} \
1.40 taca 505: RUBY_VENDORLIB_BASE=${RUBY_VENDORLIB_BASE:Q} \
506: RUBY_VENDORLIB=${RUBY_VENDORLIB:Q} \
507: RUBY_VENDORARCHLIB=${RUBY_VENDORARCHLIB:Q} \
1.49 taca 508: RUBY_DOC=${RUBY_DOC:Q} \
509: RUBY_EG=${RUBY_EG:Q} \
510: RUBY_GEM_BASE=${RUBY_GEM_BASE:Q} \
511: GEM_HOME=${GEM_HOME:Q} \
512: RUBY_RIDIR=${RUBY_RIDIR:Q} \
513: RUBY_BASERIDIR=${RUBY_BASERIDIR:Q} \
514: RUBY_SYSRIDIR=${RUBY_SYSRIDIR:Q} \
515: RUBY_SITERIDIR=${RUBY_SITERIDIR:Q}
1.1 taca 516:
1.14 taca 517: #
518: # substitutions
519: #
1.18 rillig 520: FILES_SUBST+= RUBY=${RUBY:Q} RUBY_NAME=${RUBY_NAME:Q} \
521: RUBY_PKGPREFIX=${RUBY_PKGPREFIX:Q} \
1.111 taca 522: RUBY_SUFFIX=${RUBY_SUFFIX} \
1.18 rillig 523: RUBY_VER=${RUBY_VER:Q} \
1.15 taca 524: ${PLIST_RUBY_DIRS}
1.14 taca 525:
1.15 taca 526: MESSAGE_SUBST+= RUBY="${RUBY}" RUBY_VER="${RUBY_VER}" \
1.14 taca 527: RUBY_VERSION="${RUBY_VERSION}" \
1.15 taca 528: RUBY_PKGPREFIX="${RUBY_PKGPREFIX}" \
1.111 taca 529: RUBY_SUFFIX=${RUBY_SUFFIX} \
1.15 taca 530: ${PLIST_RUBY_DIRS:S,DIR="${PREFIX}/,DIR=",}
1.14 taca 531:
1.18 rillig 532: PLIST_SUBST+= RUBY=${RUBY:Q} RUBY_VER=${RUBY_VER:Q} \
1.49 taca 533: RUBY_PKGPREFIX=${RUBY_PKGPREFIX} \
1.111 taca 534: RUBY_SUFFIX=${RUBY_SUFFIX} \
1.18 rillig 535: RUBY_VERSION=${RUBY_VERSION:Q} \
536: RUBY_VER_DIR=${RUBY_VER_DIR:Q} \
1.53 taca 537: RUBY_DLEXT=${RUBY_DLEXT:Q} RUBY_SLEXT=${RUBY_SLEXT:Q} \
538: RUBY_SHLIB=${RUBY_SHLIB:Q} \
539: RUBY_SHLIBALIAS=${RUBY_SHLIBALIAS:Q} \
540: RUBY_STATICLIB=${RUBY_STATICLIB:Q} \
1.144 rodent 541: RUBY_API_VERSION=${RUBY_API_VERSION:Q} \
1.39 jlam 542: RUBY_ARCH=${RUBY_ARCH:Q} \
1.138 taca 543: ${PLIST_RUBY_DIRS:S,DIR="${PREFIX}/,DIR=",} \
544: RUBY_MAJOR_MINOR=${RUBY_MAJOR_MINOR}
1.1 taca 545:
1.22 taca 546: #
1.23 taca 547: # make dynamic PLIST
1.22 taca 548: #
1.23 taca 549: .if !empty(RUBY_DYNAMIC_DIRS)
550:
551: RUBY_PLIST_DYNAMIC= ${WRKDIR}/PLIST.work
552:
553: .if !defined(PLIST_SRC)
554: . if exists(${PKGDIR}/PLIST.common)
555: PLIST_SRC+= ${PKGDIR}/PLIST.common
556: . elif exists(${PKGDIR}/PLIST)
557: PLIST_SRC+= ${PKGDIR}/PLIST
558: . endif
559:
560: PLIST_SRC+= ${RUBY_PLIST_DYNAMIC}
561:
562: . if exists(${PKGDIR}/PLIST.common_end)
563: PLIST_SRC+= ${PKGDIR}/PLIST.common_end
564: . endif
565:
566: .endif
567:
568: RUBY_PLIST_COMMENT_CMD= \
569: ${ECHO} "@comment The following lines are automatically generated"
1.37 obache 570: RUBY_PLIST_FILES_CMD= ( cd ${DESTDIR}${PREFIX}; \
1.23 taca 571: ${FIND} ${RUBY_DYNAMIC_DIRS} \( -type f -o -type l \) -print ) | \
572: ${SORT} -u
1.164 rillig 573: RUBY_GENERATE_PLIST= ( \
1.23 taca 574: ${RUBY_PLIST_COMMENT_CMD}; \
1.47 joerg 575: ${RUBY_PLIST_FILES_CMD} ) > ${RUBY_PLIST_DYNAMIC}
1.22 taca 576: .endif
1.23 taca 577:
1.53 taca 578: PRINT_PLIST_AWK+= /lib\/libruby${RUBY_STATICLIB}$$/ \
579: { sub(/${RUBY_STATICLIB}/, "$${RUBY_STATICLIB}"); }
580: PRINT_PLIST_AWK+= /lib\/libruby${RUBY_VER}\.${RUBY_SLEXT}/ \
581: { sub(/${RUBY_VER}\.${RUBY_SLEXT}$$/, \
582: "$${RUBY_VER}.$${RUBY_SLEXT}"); }
583: PRINT_PLIST_AWK+= /${RUBY_SHLIB}$$/ \
584: { sub(/${RUBY_SHLIB}$$/, "$${RUBY_SHLIB}"); }
585: PRINT_PLIST_AWK+= /${RUBY_SLEXT}\.${RUBY_SHLIBVER}$$/ \
586: { sub(/${RUBY_SLEXT}\.${RUBY_SHLIBVER}$$/, \
587: "$${RUBY_SLEXT}.$${RUBY_SHLIBVER}"); }
588: .if ${RUBY_SHLIBALIAS} != "@comment"
589: PRINT_PLIST_AWK+= /${RUBY_SHLIBALIAS:S/\//\\\//}$$/ \
590: { sub(/${RUBY_SHLIBALIAS:S/\//\\\//}$$/, \
591: "$${RUBY_SHLIBALIAS}"); }
1.49 taca 592: .endif
593: PRINT_PLIST_AWK+= /^${RUBY_ARCHINC:S|/|\\/|g}/ \
594: { gsub(/${RUBY_ARCHINC:S|/|\\/|g}/, "$${RUBY_ARCHINC}"); \
595: print; next; }
596: PRINT_PLIST_AWK+= /^${RUBY_INC:S|/|\\/|g}/ \
597: { gsub(/${RUBY_INC:S|/|\\/|g}/, "$${RUBY_INC}"); \
598: print; next; }
1.40 taca 599: PRINT_PLIST_AWK+= /\.${RUBY_DLEXT}$$/ \
600: { gsub(/${RUBY_DLEXT}$$/, "$${RUBY_DLEXT}") }
1.47 joerg 601: PRINT_PLIST_AWK+= /^${RUBY_ARCHLIB:S|/|\\/|g}/ \
1.40 taca 602: { gsub(/${RUBY_ARCHLIB:S|/|\\/|g}/, "$${RUBY_ARCHLIB}"); \
603: print; next; }
1.47 joerg 604: PRINT_PLIST_AWK+= /^${RUBY_VENDORARCHLIB:S|/|\\/|g}/ \
1.40 taca 605: { gsub(/${RUBY_VENDORARCHLIB:S|/|\\/|g}/, "$${RUBY_VENDORARCHLIB}"); \
606: print; next; }
1.47 joerg 607: PRINT_PLIST_AWK+= /^${RUBY_VENDORLIB:S|/|\\/|g}/ \
1.40 taca 608: { gsub(/${RUBY_VENDORLIB:S|/|\\/|g}/, "$${RUBY_VENDORLIB}"); \
609: print; next; }
1.47 joerg 610: PRINT_PLIST_AWK+= /^${RUBY_SITEARCHLIB:S|/|\\/|g}/ \
1.40 taca 611: { gsub(/${RUBY_SITEARCHLIB:S|/|\\/|g}/, "$${RUBY_SITEARCHLIB}"); \
612: print; next; }
1.47 joerg 613: PRINT_PLIST_AWK+= /^${RUBY_SITELIB:S|/|\\/|g}/ \
1.40 taca 614: { gsub(/${RUBY_SITELIB:S|/|\\/|g}/, "$${RUBY_SITELIB}"); \
615: print; next; }
1.49 taca 616: PRINT_PLIST_AWK+= /^${RUBY_SITELIB_BASE:S|/|\\/|g}/ \
1.40 taca 617: { gsub(/${RUBY_SITELIB_BASE:S|/|\\/|g}/, "$${RUBY_SITELIB_BASE}"); \
618: print; next; }
1.49 taca 619: PRINT_PLIST_AWK+= /^${RUBY_VENDORLIB_BASE:S|/|\\/|g}/ \
1.40 taca 620: { gsub(/${RUBY_VENDORLIB_BASE:S|/|\\/|g}/, "$${RUBY_VENDORLIB_BASE}"); \
621: print; next; }
1.47 joerg 622: PRINT_PLIST_AWK+= /^${RUBY_LIB:S|/|\\/|g}/ \
1.40 taca 623: { gsub(/${RUBY_LIB:S|/|\\/|g}/, "$${RUBY_LIB}"); \
624: print; next; }
1.47 joerg 625: PRINT_PLIST_AWK+= /^${RUBY_DOC:S|/|\\/|g}/ \
1.40 taca 626: { gsub(/${RUBY_DOC:S|/|\\/|g}/, "$${RUBY_DOC}"); \
627: print; next; }
1.47 joerg 628: PRINT_PLIST_AWK+= /^${RUBY_EG:S|/|\\/|g}/ \
1.40 taca 629: { gsub(/${RUBY_EG:S|/|\\/|g}/, "$${RUBY_EG}"); \
630: print; next; }
1.47 joerg 631: PRINT_PLIST_AWK+= /^${RUBY_SITERIDIR:S|/|\\/|g}/ \
1.40 taca 632: { gsub(/${RUBY_SITERIDIR:S|/|\\/|g}/, "$${RUBY_SITERIDIR}"); \
633: print; next; }
1.49 taca 634: PRINT_PLIST_AWK+= /^${RUBY_SYSRIDIR:S|/|\\/|g}\// \
635: { next; }
1.117 taca 636:
637: # Insert part of PRINT_PLIST_AWK from gem.mk
638: PRINT_PLIST_AWK+= ${_RUBY_PRINT_PLIST_GEM}
639:
1.49 taca 640: PRINT_PLIST_AWK+= /\/${RUBY_NAME}/ \
641: { sub(/${RUBY_NAME}/, "$${RUBY_NAME}"); }
1.65 taca 642: PRINT_PLIST_AWK+= /^${GEM_HOME:S|/|\\/|g:S|.|\\.|g}/ \
643: { gsub(/${GEM_HOME:S|/|\\/|g}/, "$${GEM_HOME}"); }
1.40 taca 644:
1.166 taca 645: # supporting scripts
646: UPDATE_GEMSPEC= ../../lang/ruby/files/update-gemspec.rb
647:
1.1 taca 648: .endif # _RUBY_MK
CVSweb <webmaster@jp.NetBSD.org>