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

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

CVSweb <webmaster@jp.NetBSD.org>