Annotation of pkgsrc/lang/ruby/rubyversion.mk, revision 1.108

1.108   ! taca        1: # $NetBSD: rubyversion.mk,v 1.107 2014/01/14 11:14:07 obache 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.101     taca       13: #              Possible values: 18 193 200
1.77      taca       14: #              Default: 193
1.64      taca       15: #
                     16: # RUBY_BUILD_RDOC
                     17: #      Build rdoc of this package and so that install formated
                     18: #      documentation.  It is also used in each package.
                     19: #
                     20: #              Possible values: Yes No
                     21: #              Default: Yes
                     22: #
                     23: # RUBY_BUILD_RI
                     24: #      Build ri format of this package so that ri command would be
                     25: #      display class/module definitions.  It is also used in each package.
                     26: #
                     27: #              Possible values: Yes No
                     28: #              Default: Yes
                     29: #
1.89      cheusov    30: # === Infrastructure variables ===
                     31: #
1.88      cheusov    32: # RUBY_VERSION_REQD
1.89      cheusov    33: #      Ruby version to use. This variable should not be set in
                     34: #      packages.  Normally it is used by bulk build tools.
1.88      cheusov    35: #
                     36: #              Possible values: ${RUBY_VERSION_SUPPORTED}
                     37: #              Default:         ${RUBY_VERSION_DEFAULT}
1.64      taca       38: #
                     39: # === Package-settable variables ===
                     40: #
                     41: # RUBY_VERSION_SUPPORTED
                     42: #      The Ruby versions that are acceptable for the package.
                     43: #
1.101     taca       44: #              Possible values: 18 193 200
1.107     obache     45: #              Default: 18 193 200
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.101     taca       51: #      ${RUBY_PKGPREFIX}; "ruby18", "ruby193" or "ruby200".
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.101     taca       72: #              Possible values: 18 193 200
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.
                     80: #
                     81: # RUBY_ABI_VERSION
                     82: #      Ruby's ABI version.
                     83: #
                     84: # RUBY_DLEXT
                     85: #      Suffix of extention library.
                     86: #
                     87: # RUBY_SLEXT
                     88: #      Suffix of shared library.
                     89: #
                     90: # RUBY
                     91: #      Full path of ruby command.
                     92: #
                     93: # RDOC
                     94: #      Full path of rdoc command.
                     95: #
                     96: # RUBY_NAME
                     97: #      Name of ruby command.
                     98: #
                     99: # RUBYGEM_NAME
                    100: #      Name of gem command.
                    101: #
                    102: # RAKE_NAME
                    103: #      Name of rake command.
                    104: #
                    105: # RUBY_SUFFIX
                    106: #      Extra string for each ruby commands; ruby, irb and so on.
                    107: #
                    108: # RUBY_VERSION
                    109: #      Version of real Ruby's version excluding patchlevel.
                    110: #
                    111: # RUBY_VERSION_FULL
                    112: #      Version of Ruby including patchlevel.
1.97      rodent    113: #
1.64      taca      114: # RUBY_BASE
                    115: #      Name of ruby base package's name.
                    116: #
                    117: # RUBY_SRCDIR
                    118: #      Directory of base ruby package.
                    119: #
                    120: # RUBY_SHLIBVER
                    121: #      Suffix of libruby shared library's version.
                    122: #
                    123: # RUBY_SHLIB
                    124: #      String after libruby shared library.
                    125: #
                    126: # RUBY_SHLIBALIAS
                    127: #      Symblic link with libruby shared library with major version only.
                    128: #
                    129: # RUBY_STATICLIB
                    130: #      Name of libruby static library.
                    131: #
                    132: # RUBY_VER_DIR
                    133: #      Name of version directory under each library (and more) directories.
                    134: #
                    135: # RUBY_ARCH
                    136: #      Name of architecture-dependent directory name.
                    137: #
                    138: # RUBY_INC
                    139: #      machine independent include directory of ruby.
                    140: #
                    141: # RUBY_ARCHINC
                    142: #      machine dependent include directory of ruby.
                    143: #
                    144: # RUBY_LIB_BASE
                    145: #      common relative path of ruby's library.
                    146: #
                    147: # RUBY_LIB
                    148: #      version specific relative path of ruby's library.
                    149: #
                    150: # RUBY_ARCHLIB
                    151: #      version specific and machine dependent relative path of ruby's library.
                    152: #
                    153: # RUBY_SITELIB_BASE
                    154: #      common site local directory.
                    155: #
                    156: # RUBY_SITELIB
                    157: #      version specific site local directory.
                    158: #
                    159: # RUBY_SITEARCHLIB
                    160: #      version specific and machine dependent site local directory.
                    161: #
                    162: # RUBY_VENDORLIB_BASE
                    163: #      common vendor (pkgsrc) directory.
                    164: #
                    165: # RUBY_VENDORLIB
                    166: #      version specific vendor local directory.
                    167: #
                    168: # RUBY_VENDORARCHLIB
                    169: #      version specific and machine dependent vendor local directory.
                    170: #
                    171: # RUBY_DOC
                    172: #      version specific document direcotry.
                    173: #
                    174: # RUBY_EG
                    175: #      version specific examples direcotry.
                    176: #
                    177: # RUBY_GEM_BASE
                    178: #      common GEM directory.
1.97      rodent    179: #
1.64      taca      180: # GEM_HOME
                    181: #      version specific GEM directory.
                    182: #
                    183: # RUBY_RIDIR
                    184: #      common ri directory.
                    185: #
                    186: # RUBY_BASERIDIR
                    187: #      version specific ri directory.
                    188: #
                    189: # RUBY_SYSRIDIR
                    190: #      version specific system ri directory.
                    191: #
                    192: # RUBY_SITERIDIR
                    193: #      version specific site ri directory.
                    194: #
                    195: # Keywords: ruby
1.1       taca      196: #
                    197: 
1.18      rillig    198: .if !defined(_RUBYVERSION_MK)
1.1       taca      199: _RUBYVERSION_MK=       # defined
                    200: 
                    201: .include "../../mk/bsd.prefs.mk"
                    202: 
1.108   ! taca      203: .if defined(PKGNAME_REQD) && (!empty(PKGNAME_REQD:Mruby[0-9][0-9][0-9]-*) || !empty(PKGNAME_REQD:Mruby[0-9][0-9]-*))
        !           204: RUBY_VERSION_REQD?= ${PKGNAME_REQD:C/ruby([0-9][0-9]+)-.*/\1/}
        !           205: .endif
        !           206: 
1.1       taca      207: # current supported Ruby's version
1.40      taca      208: RUBY18_VERSION=                1.8.7
1.64      taca      209: RUBY193_VERSION=       1.9.3
1.101     taca      210: RUBY200_VERSION=       2.0.0
1.23      taca      211: 
1.32      taca      212: # patch
1.100     taca      213: RUBY18_PATCHLEVEL=     pl374
1.105     taca      214: RUBY193_PATCHLEVEL=    p484
1.106     taca      215: RUBY200_PATCHLEVEL=    p353
1.49      taca      216: 
1.59      taca      217: # current API compatible version; used for version of shared library
1.49      taca      218: RUBY18_API_VERSION=    1.8.7
1.64      taca      219: RUBY193_API_VERSION=   1.9.1
1.101     taca      220: RUBY200_API_VERSION=   2.0.0
1.1       taca      221: 
                    222: #
1.77      taca      223: RUBY_VERSION_DEFAULT?= 193
1.64      taca      224: 
1.101     taca      225: RUBY_VERSION_SUPPORTED?= 200 193 18
1.64      taca      226: 
1.98      taca      227: .if defined(RUBY_VERSION_REQD)
                    228: . for rv in ${RUBY_VERSION_SUPPORTED}
                    229: .  if ${rv} == ${RUBY_VERSION_REQD}
                    230: RUBY_VER=      ${rv}
                    231: .  endif
                    232: . endfor
                    233: .elif !defined(RUBY_VER)
                    234: . for rv in ${RUBY_VERSION_SUPPORTED}
                    235: .  if ${rv} == ${RUBY_VERSION_DEFAULT}
                    236: RUBY_VER=      ${rv}
                    237: .  endif
                    238: . endfor
1.64      taca      239: .endif
1.1       taca      240: 
1.98      taca      241: .if !defined(RUBY_VER)
1.64      taca      242: . for rv in ${RUBY_VERSION_SUPPORTED}
1.98      taca      243: .  if !defined(RUBY_VER)
1.64      taca      244: RUBY_VER=      ${rv}
1.52      joerg     245: .  endif
1.64      taca      246: . endfor
1.1       taca      247: .endif
1.29      taca      248: 
1.81      obache    249: RUBY_VER:=     ${RUBY_VER_MAP.${RUBY_VER}:U${RUBY_VER}}
1.67      joerg     250: 
1.64      taca      251: .if ${RUBY_VER} == "18"
                    252: RUBY_VERSION=          ${RUBY18_VERSION}
                    253: RUBY_VERSION_FULL=     ${RUBY_VERSION}${RUBY_PATCHLEVEL:S/pl/./}
                    254: RUBY_ABI_VERSION=      ${RUBY18_API_VERSION}
                    255: .elif ${RUBY_VER} == "193"
                    256: RUBY_VERSION=          ${RUBY193_VERSION}
                    257: RUBY_VERSION_FULL=     ${RUBY_VERSION}${RUBY_PATCHLEVEL}
                    258: RUBY_ABI_VERSION=      ${RUBY_VERSION}
1.101     taca      259: .elif ${RUBY_VER} == "200"
                    260: RUBY_VERSION=          ${RUBY200_VERSION}
                    261: RUBY_VERSION_FULL=     ${RUBY_VERSION}${RUBY_PATCHLEVEL}
                    262: RUBY_ABI_VERSION=      ${RUBY_VERSION}
1.64      taca      263: .else
                    264: PKG_FAIL_REASON+= "Unknown Ruby version specified: ${RUBY_VER}."
1.32      taca      265: .endif
1.1       taca      266: 
1.98      taca      267: .if !empty(RUBY_VERSION)
1.64      taca      268: RUBY_PATCHLEVEL=       ${RUBY${RUBY_VER}_PATCHLEVEL}
                    269: RUBY_API_VERSION=      ${RUBY${RUBY_VER}_API_VERSION}
1.98      taca      270: .endif
1.64      taca      271: 
1.60      wiz       272: # Variable assignment for multi-ruby packages
1.64      taca      273: MULTI+=        RUBY_VER=${RUBY_VERS:U${RUBY_VERSION_DEFAULT}}
1.4       taca      274: 
1.1       taca      275: # RUBY_NOVERSION should be set to "Yes" if the package dosen't depend on
                    276: #      any specific version of ruby command.  In this case, package's
                    277: #      name begin with "ruby-".
                    278: #      If RUBY_NOVERSION is "No" (default), the package's name is begin
1.87      taca      279: #      with ${RUBY_NAME}; "ruby18", "ruby193",  and so on.
1.1       taca      280: #
1.53      taca      281: #      It also affects to RUBY_DOC, RUBY_EG...
1.1       taca      282: #
                    283: RUBY_NOVERSION?=       No
                    284: 
1.29      taca      285: # _RUBY_VER_MAJOR, _RUBY_VER_MINOR, _RUBY_VER_TEENY and _RUBY_PATCHLEVEL
                    286: # is defined from version of Ruby.  It should not be used in packages'
                    287: # Makefile.
                    288: #
1.64      taca      289: _RUBY_VER_MAJOR=       ${RUBY_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\1/}
                    290: _RUBY_VER_MINOR=       ${RUBY_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\2/}
                    291: _RUBY_VER_TEENY=       ${RUBY_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\3/}
1.1       taca      292: 
1.64      taca      293: _RUBY_API_MAJOR=       ${RUBY_API_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\1\2/}
                    294: _RUBY_API_MINOR=       ${RUBY_API_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\3/}
1.1       taca      295: 
1.64      taca      296: RUBY_SUFFIX=           ${RUBY_VER}
1.49      taca      297: 
1.64      taca      298: RUBY_NAME=             ruby${RUBY_SUFFIX}
                    299: RUBYGEM_NAME=          gem${RUBY_SUFFIX}
                    300: RAKE_NAME=             rake${RUBY_SUFFIX}
1.1       taca      301: 
1.49      taca      302: RUBY_ENCODING_ARG?=
                    303: 
1.10      taca      304: RUBY_BASE=             ruby${RUBY_VER}-base
                    305: 
1.1       taca      306: RUBY_PKGPREFIX?=       ${RUBY_NAME}
                    307: 
1.87      taca      308: .if ${RUBY_VER} == "18"
1.64      taca      309: RUBY_VER_DIR=          ${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}
                    310: .else
                    311: RUBY_VER_DIR=          ${RUBY_VERSION}
1.1       taca      312: .endif
                    313: 
                    314: .if empty(RUBY_NOVERSION:M[nN][oO])
                    315: RUBY_SUFFIX=
                    316: RUBY_NAME=             ruby
                    317: .endif
                    318: 
1.64      taca      319: RUBY_BUILD_RDOC?=      Yes
                    320: RUBY_BUILD_RI?=                Yes
1.49      taca      321: 
1.15      taca      322: RUBY?=                 ${PREFIX}/bin/${RUBY_NAME}
                    323: RDOC?=                 ${PREFIX}/bin/rdoc${RUBY_VER}
1.1       taca      324: 
1.104     taca      325: RUBY_ARCH?= ${MACHINE_GNU_ARCH}-${LOWER_OPSYS}${APPEND_ELF}${LOWER_OPSYS_VERSUFFIX}
1.1       taca      326: 
                    327: #
1.53      taca      328: # Ruby shared and static library version handling.
1.10      taca      329: #
1.49      taca      330: RUBY_SHLIBVER?=                ${RUBY_API_VERSION}
1.53      taca      331: RUBY_SHLIB?=           ${RUBY_VER}.${RUBY_SLEXT}.${RUBY_SHLIBVER}
                    332: RUBY_SHLIBALIAS?=      @comment
                    333: RUBY_STATICLIB?=       ${RUBY_VER}-static.a
1.10      taca      334: 
                    335: .if ${OPSYS} == "NetBSD" || ${OPSYS} == "Interix"
1.64      taca      336: RUBY_SHLIBVER=         ${_RUBY_API_MAJOR}.${_RUBY_API_MINOR}
                    337: _RUBY_SHLIBALIAS=      ${RUBY_VER}.${RUBY_SLEXT}.${_RUBY_API_MAJOR}
1.12      jlam      338: .elif ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly"
1.87      taca      339: .if ${RUBY_VER} == "18"
1.12      jlam      340: RUBY_SHLIBVER=         ${RUBY_VER}
1.75      marino    341: .else
                    342: RUBY_SHLIBVER=         ${_RUBY_VER_MAJOR}${_RUBY_VER_MINOR}${_RUBY_API_MINOR}
                    343: .endif
1.83      bsiegert  344: .elif ${OPSYS} == "OpenBSD" || ${OPSYS} == "MirBSD"
1.102     taca      345: .if ${_RUBY_VER_MINOR} == 0
                    346: RUBY_SHLIBVER=         ${_RUBY_VER_MAJOR}.${_RUBY_API_MINOR}
                    347: .else
1.64      taca      348: RUBY_SHLIBVER=         ${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}${_RUBY_API_MINOR}
1.102     taca      349: .endif
1.53      taca      350: .elif ${OPSYS} == "Darwin"
                    351: RUBY_SHLIB=            ${RUBY_VER}.${RUBY_SHLIBVER}.${RUBY_SLEXT}
                    352: .if ${RUBY_VER} == "18"
                    353: _RUBY_SHLIBALIAS=      ${RUBY_VER}.${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}.${RUBY_SLEXT}
                    354: .else
                    355: _RUBY_SHLIBALIAS=      .${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}.${RUBY_SLEXT}
                    356: RUBY_STATICLIB=                ${RUBY_VER}.${RUBY_API_VERSION}-static.a
                    357: .endif
1.10      taca      358: .elif ${OPSYS} == "Linux"
1.54      taca      359: _RUBY_SHLIBALIAS=      ${RUBY_VER}.${RUBY_SLEXT}.${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}
1.56      taca      360: .elif ${OPSYS} == "SunOS"
                    361: RUBY_SHLIBVER=         ${_RUBY_VER_MAJOR}
1.64      taca      362:  _RUBY_SHLIBALIAS=     ${RUBY_VER}.${RUBY_SLEXT}.${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}.${_RUBY_API_MINOR}
1.96      obache    363: .elif ${OPSYS} == "Cygwin"
                    364: RUBY_SHLIB=            ${RUBY_VER}${_RUBY_API_MAJOR}${_RUBY_API_MINOR}.dll.a
                    365: RUBY_SHLIBALIAS=       bin/cygruby${RUBY_VER}${_RUBY_API_MAJOR}${_RUBY_API_MINOR}.dll
                    366: RUBY_STATICLIB=                ${RUBY_VER}${_RUBY_API_MAJOR}${_RUBY_API_MINOR}-static.a
1.10      taca      367: .endif
                    368: 
1.53      taca      369: .if !empty(_RUBY_SHLIBALIAS)
                    370: RUBY_SHLIBALIAS=       lib/libruby${_RUBY_SHLIBALIAS}
1.10      taca      371: .endif
                    372: 
1.64      taca      373: .if ${_OPSYS_SHLIB_TYPE} == "dylib"
1.5       taca      374: RUBY_DLEXT=    bundle
1.53      taca      375: RUBY_SLEXT=    dylib
1.5       taca      376: .else
                    377: RUBY_DLEXT=    so
1.53      taca      378: RUBY_SLEXT=    so
1.5       taca      379: .endif
                    380: 
                    381: #
1.71      taca      382: # Ruby distribution file, few package need it.
                    383: #
                    384: _RUBY_PATCHLEVEL=      ${RUBY_PATCHLEVEL:S/pl/p/:S/pre/preview/}
                    385: 
                    386: .if !empty(_RUBY_PATCHLEVEL)
                    387: RUBY_DISTNAME?=                ruby-${RUBY_VERSION}-${_RUBY_PATCHLEVEL}
                    388: .else
                    389: RUBY_DISTNAME?=                ruby-${RUBY_VERSION}
                    390: .endif
                    391: 
                    392: #
1.26      taca      393: # Use pthread library with Ruby
                    394: #
1.64      taca      395: .if !empty(MACHINE_PLATFORM:MDarwin-9.*-powerpc)
1.42      minskim   396: # Workaround for Ruby Bug #193
                    397: # http://redmine.ruby-lang.org/issues/show/193
                    398: RUBY_USE_PTHREAD?=     no
1.26      taca      399: .else
                    400: RUBY_USE_PTHREAD?=     yes
                    401: .endif
                    402: 
1.23      taca      403: RUBY_DYNAMIC_DIRS?=    # empty
                    404: 
1.10      taca      405: RUBY_SRCDIR?=  ${_PKGSRC_TOPDIR}/lang/${RUBY_BASE}
                    406: 
                    407: #
1.23      taca      408: # common paths
1.1       taca      409: #
1.49      taca      410: RUBY_INC=              include/ruby-${RUBY_VER_DIR}
                    411: RUBY_ARCHINC=          ${RUBY_INC}/${RUBY_ARCH}
                    412: RUBY_LIB_BASE=         lib/ruby
                    413: RUBY_LIB?=             ${RUBY_LIB_BASE}/${RUBY_VER_DIR}
1.40      taca      414: RUBY_ARCHLIB?=         ${RUBY_LIB}/${RUBY_ARCH}
1.49      taca      415: RUBY_SITELIB_BASE?=    ${RUBY_LIB_BASE}/site_ruby
1.40      taca      416: RUBY_SITELIB?=         ${RUBY_SITELIB_BASE}/${RUBY_VER_DIR}
                    417: RUBY_SITEARCHLIB?=     ${RUBY_SITELIB}/${RUBY_ARCH}
1.49      taca      418: RUBY_VENDORLIB_BASE?=  ${RUBY_LIB_BASE}/vendor_ruby
1.40      taca      419: RUBY_VENDORLIB?=       ${RUBY_VENDORLIB_BASE}/${RUBY_VER_DIR}
                    420: RUBY_VENDORARCHLIB?=   ${RUBY_VENDORLIB}/${RUBY_ARCH}
1.49      taca      421: 
1.40      taca      422: RUBY_DOC?=             share/doc/${RUBY_NAME}
                    423: RUBY_EG?=              share/examples/${RUBY_NAME}
                    424: 
1.64      taca      425: 
1.49      taca      426: RUBY_GEM_BASE?=                ${RUBY_LIB_BASE}/gems
                    427: GEM_HOME?=             ${RUBY_GEM_BASE}/${RUBY_VER_DIR}
1.31      taca      428: 
                    429: #
                    430: # ri database relative path
                    431: #
                    432: RUBY_RIDIR?=           share/ri
1.15      taca      433: RUBY_BASERIDIR?=       ${RUBY_RIDIR}/${RUBY_VER_DIR}
                    434: RUBY_SYSRIDIR?=                ${RUBY_BASERIDIR}/system
                    435: RUBY_SITERIDIR?=       ${RUBY_BASERIDIR}/site
1.1       taca      436: 
                    437: #
                    438: # MAKE_ENV
                    439: #
1.18      rillig    440: MAKE_ENV+=             RUBY=${RUBY:Q} RUBY_VER=${RUBY_VER:Q} \
                    441:                        RUBY_VERSION_DEFAULT=${RUBY_VERSION_DEFAULT:Q}
1.15      taca      442: 
1.64      taca      443: MAKEFLAGS+=            RUBY_VERSION_DEFAULT=${RUBY_VERSION_DEFAULT:Q}
1.15      taca      444: 
1.49      taca      445: #
1.98      taca      446: # PLIST_VARS for x11/ruby-tk package.
1.1       taca      447: #
1.101     taca      448: PLIST_VARS+=           ruby19 ruby200
1.98      taca      449: .if ${RUBY_VER} != "18"
1.64      taca      450: PLIST.ruby19=          yes
1.101     taca      451: . if ${RUBY_VER} != "193"
                    452: PLIST.ruby200=         yes
                    453: . endif
1.49      taca      454: .endif
                    455: 
                    456: PLIST_RUBY_DIRS=       RUBY_INC=${RUBY_INC:Q} RUBY_ARCHINC=${RUBY_ARCHINC:Q} \
                    457:                        RUBY_LIB_BASE=${RUBY_LIB_BASE:Q} \
                    458:                        RUBY_LIB=${RUBY_LIB:Q} \
                    459:                        RUBY_ARCHLIB=${RUBY_ARCHLIB:Q} \
1.40      taca      460:                        RUBY_SITELIB_BASE=${RUBY_SITELIB_BASE:Q} \
1.49      taca      461:                        RUBY_SITELIB=${RUBY_SITELIB:Q} \
                    462:                        RUBY_SITEARCHLIB=${RUBY_SITEARCHLIB:Q} \
1.40      taca      463:                        RUBY_VENDORLIB_BASE=${RUBY_VENDORLIB_BASE:Q} \
                    464:                        RUBY_VENDORLIB=${RUBY_VENDORLIB:Q} \
                    465:                        RUBY_VENDORARCHLIB=${RUBY_VENDORARCHLIB:Q} \
1.49      taca      466:                        RUBY_DOC=${RUBY_DOC:Q} \
                    467:                        RUBY_EG=${RUBY_EG:Q} \
                    468:                        RUBY_GEM_BASE=${RUBY_GEM_BASE:Q} \
                    469:                        GEM_HOME=${GEM_HOME:Q} \
                    470:                        RUBY_RIDIR=${RUBY_RIDIR:Q} \
                    471:                        RUBY_BASERIDIR=${RUBY_BASERIDIR:Q} \
                    472:                        RUBY_SYSRIDIR=${RUBY_SYSRIDIR:Q} \
                    473:                        RUBY_SITERIDIR=${RUBY_SITERIDIR:Q}
1.1       taca      474: 
1.14      taca      475: #
                    476: # substitutions
                    477: #
1.18      rillig    478: FILES_SUBST+=          RUBY=${RUBY:Q} RUBY_NAME=${RUBY_NAME:Q} \
                    479:                        RUBY_PKGPREFIX=${RUBY_PKGPREFIX:Q} \
                    480:                        RUBY_VER=${RUBY_VER:Q} \
1.15      taca      481:                        ${PLIST_RUBY_DIRS}
1.14      taca      482: 
1.15      taca      483: MESSAGE_SUBST+=                RUBY="${RUBY}" RUBY_VER="${RUBY_VER}" \
1.14      taca      484:                        RUBY_VERSION="${RUBY_VERSION}" \
1.15      taca      485:                        RUBY_PKGPREFIX="${RUBY_PKGPREFIX}" \
                    486:                        ${PLIST_RUBY_DIRS:S,DIR="${PREFIX}/,DIR=",}
1.14      taca      487: 
1.18      rillig    488: PLIST_SUBST+=          RUBY=${RUBY:Q} RUBY_VER=${RUBY_VER:Q} \
1.49      taca      489:                        RUBY_PKGPREFIX=${RUBY_PKGPREFIX} \
1.18      rillig    490:                        RUBY_VERSION=${RUBY_VERSION:Q} \
                    491:                        RUBY_VER_DIR=${RUBY_VER_DIR:Q} \
1.53      taca      492:                        RUBY_DLEXT=${RUBY_DLEXT:Q} RUBY_SLEXT=${RUBY_SLEXT:Q} \
                    493:                        RUBY_SHLIB=${RUBY_SHLIB:Q} \
                    494:                        RUBY_SHLIBALIAS=${RUBY_SHLIBALIAS:Q} \
                    495:                        RUBY_STATICLIB=${RUBY_STATICLIB:Q} \
1.39      jlam      496:                        RUBY_ARCH=${RUBY_ARCH:Q} \
1.58      taca      497:                        ${PLIST_RUBY_DIRS:S,DIR="${PREFIX}/,DIR=",}
1.1       taca      498: 
1.22      taca      499: #
1.23      taca      500: # make dynamic PLIST
1.22      taca      501: #
1.23      taca      502: .if !empty(RUBY_DYNAMIC_DIRS)
                    503: 
                    504: RUBY_PLIST_DYNAMIC=    ${WRKDIR}/PLIST.work
                    505: 
                    506: .if !defined(PLIST_SRC)
                    507: .  if exists(${PKGDIR}/PLIST.common)
                    508: PLIST_SRC+=            ${PKGDIR}/PLIST.common
                    509: .  elif exists(${PKGDIR}/PLIST)
                    510: PLIST_SRC+=            ${PKGDIR}/PLIST
                    511: .  endif
                    512: 
                    513: PLIST_SRC+=            ${RUBY_PLIST_DYNAMIC}
                    514: 
                    515: .  if exists(${PKGDIR}/PLIST.common_end)
                    516: PLIST_SRC+=            ${PKGDIR}/PLIST.common_end
                    517: .  endif
                    518: 
                    519: .endif
                    520: 
                    521: RUBY_PLIST_COMMENT_CMD= \
                    522:        ${ECHO} "@comment The following lines are automatically generated"
1.37      obache    523: RUBY_PLIST_FILES_CMD= ( cd ${DESTDIR}${PREFIX}; \
1.23      taca      524:        ${FIND} ${RUBY_DYNAMIC_DIRS} \( -type f -o -type l \) -print ) | \
                    525:        ${SORT} -u
                    526: RUBY_GENERATE_PLIST =  ( \
                    527:        ${RUBY_PLIST_COMMENT_CMD}; \
1.47      joerg     528:        ${RUBY_PLIST_FILES_CMD} ) > ${RUBY_PLIST_DYNAMIC}
1.22      taca      529: .endif
1.23      taca      530: 
1.53      taca      531: PRINT_PLIST_AWK+=      /lib\/libruby${RUBY_STATICLIB}$$/ \
                    532:                        { sub(/${RUBY_STATICLIB}/, "$${RUBY_STATICLIB}"); }
                    533: PRINT_PLIST_AWK+=      /lib\/libruby${RUBY_VER}\.${RUBY_SLEXT}/ \
                    534:                        { sub(/${RUBY_VER}\.${RUBY_SLEXT}$$/, \
                    535:                        "$${RUBY_VER}.$${RUBY_SLEXT}"); }
                    536: PRINT_PLIST_AWK+=      /${RUBY_SHLIB}$$/ \
                    537:                        { sub(/${RUBY_SHLIB}$$/, "$${RUBY_SHLIB}"); }
                    538: PRINT_PLIST_AWK+=      /${RUBY_SLEXT}\.${RUBY_SHLIBVER}$$/ \
                    539:                        { sub(/${RUBY_SLEXT}\.${RUBY_SHLIBVER}$$/, \
                    540:                        "$${RUBY_SLEXT}.$${RUBY_SHLIBVER}"); }
                    541: .if ${RUBY_SHLIBALIAS} != "@comment"
                    542: PRINT_PLIST_AWK+=      /${RUBY_SHLIBALIAS:S/\//\\\//}$$/ \
                    543:                        { sub(/${RUBY_SHLIBALIAS:S/\//\\\//}$$/, \
                    544:                        "$${RUBY_SHLIBALIAS}"); }
1.49      taca      545: .endif
                    546: PRINT_PLIST_AWK+=      /^${RUBY_ARCHINC:S|/|\\/|g}/ \
                    547:                        { gsub(/${RUBY_ARCHINC:S|/|\\/|g}/, "$${RUBY_ARCHINC}"); \
                    548:                        print; next; }
                    549: PRINT_PLIST_AWK+=      /^${RUBY_INC:S|/|\\/|g}/ \
                    550:                        { gsub(/${RUBY_INC:S|/|\\/|g}/, "$${RUBY_INC}"); \
                    551:                        print; next; }
1.40      taca      552: PRINT_PLIST_AWK+=      /\.${RUBY_DLEXT}$$/ \
                    553:                        { gsub(/${RUBY_DLEXT}$$/, "$${RUBY_DLEXT}") }
1.47      joerg     554: PRINT_PLIST_AWK+=      /^${RUBY_ARCHLIB:S|/|\\/|g}/ \
1.40      taca      555:                        { gsub(/${RUBY_ARCHLIB:S|/|\\/|g}/, "$${RUBY_ARCHLIB}"); \
                    556:                        print; next; }
1.47      joerg     557: PRINT_PLIST_AWK+=      /^${RUBY_VENDORARCHLIB:S|/|\\/|g}/ \
1.40      taca      558:                        { gsub(/${RUBY_VENDORARCHLIB:S|/|\\/|g}/, "$${RUBY_VENDORARCHLIB}"); \
                    559:                        print; next; }
1.47      joerg     560: PRINT_PLIST_AWK+=      /^${RUBY_VENDORLIB:S|/|\\/|g}/ \
1.40      taca      561:                        { gsub(/${RUBY_VENDORLIB:S|/|\\/|g}/, "$${RUBY_VENDORLIB}"); \
                    562:                        print; next; }
1.47      joerg     563: PRINT_PLIST_AWK+=      /^${RUBY_SITEARCHLIB:S|/|\\/|g}/ \
1.40      taca      564:                        { gsub(/${RUBY_SITEARCHLIB:S|/|\\/|g}/, "$${RUBY_SITEARCHLIB}"); \
                    565:                        print; next; }
1.47      joerg     566: PRINT_PLIST_AWK+=      /^${RUBY_SITELIB:S|/|\\/|g}/ \
1.40      taca      567:                        { gsub(/${RUBY_SITELIB:S|/|\\/|g}/, "$${RUBY_SITELIB}"); \
                    568:                        print; next; }
1.49      taca      569: PRINT_PLIST_AWK+=      /^${RUBY_SITELIB_BASE:S|/|\\/|g}/ \
1.40      taca      570:                        { gsub(/${RUBY_SITELIB_BASE:S|/|\\/|g}/, "$${RUBY_SITELIB_BASE}"); \
                    571:                        print; next; }
1.49      taca      572: PRINT_PLIST_AWK+=      /^${RUBY_VENDORLIB_BASE:S|/|\\/|g}/ \
1.40      taca      573:                        { gsub(/${RUBY_VENDORLIB_BASE:S|/|\\/|g}/, "$${RUBY_VENDORLIB_BASE}"); \
                    574:                        print; next; }
1.47      joerg     575: PRINT_PLIST_AWK+=      /^${RUBY_LIB:S|/|\\/|g}/ \
1.40      taca      576:                        { gsub(/${RUBY_LIB:S|/|\\/|g}/, "$${RUBY_LIB}"); \
                    577:                        print; next; }
1.47      joerg     578: PRINT_PLIST_AWK+=      /^${RUBY_DOC:S|/|\\/|g}/ \
1.40      taca      579:                        { gsub(/${RUBY_DOC:S|/|\\/|g}/, "$${RUBY_DOC}"); \
                    580:                        print; next; }
1.47      joerg     581: PRINT_PLIST_AWK+=      /^${RUBY_EG:S|/|\\/|g}/ \
1.40      taca      582:                        { gsub(/${RUBY_EG:S|/|\\/|g}/, "$${RUBY_EG}"); \
                    583:                        print; next; }
1.47      joerg     584: PRINT_PLIST_AWK+=      /^${RUBY_SITERIDIR:S|/|\\/|g}/ \
1.40      taca      585:                        { gsub(/${RUBY_SITERIDIR:S|/|\\/|g}/, "$${RUBY_SITERIDIR}"); \
                    586:                        print; next; }
1.49      taca      587: PRINT_PLIST_AWK+=      /^${RUBY_SYSRIDIR:S|/|\\/|g}\// \
                    588:                        { next; }
                    589: PRINT_PLIST_AWK+=      /\/${RUBY_NAME}/ \
                    590:                        { sub(/${RUBY_NAME}/, "$${RUBY_NAME}"); }
1.65      taca      591: PRINT_PLIST_AWK+=      /^${GEM_HOME:S|/|\\/|g:S|.|\\.|g}/ \
                    592:                        { gsub(/${GEM_HOME:S|/|\\/|g}/, "$${GEM_HOME}"); }
1.40      taca      593: 
1.1       taca      594: .endif # _RUBY_MK

CVSweb <webmaster@jp.NetBSD.org>