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

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

CVSweb <webmaster@jp.NetBSD.org>