Annotation of pkgsrc/lang/ruby/platform.mk, revision 1.2

1.2     ! taca        1: # $NetBSD: platform.mk,v 1.1 2016/11/13 15:14:19 taca Exp $
1.1       taca        2: #
                      3: 
                      4: #
                      5: # Common definition for ruby*-base package (except ruby18-base).
                      6: #
                      7: 
                      8: .if !defined(_RUBY_PLATFORM_MK)
                      9: _RUBY_PLATFORM_MK=     # defined
                     10: 
                     11: .include "../../lang/ruby/rubyversion.mk"
                     12: .include "../../mk/compiler.mk"
                     13: 
                     14: MAKE_DIRS+=    ${RUBY_SITEARCHLIB} ${RUBY_VENDORARCHLIB} ${RUBY_SITERIDIR}
                     15: FILES_SUBST+=  DATE=${DATE:Q}
                     16: 
                     17: REQD_DIRS+=    ${GEM_HOME}/cache
                     18: REQD_DIRS+=    ${GEM_HOME}/doc
                     19: 
                     20: #
                     21: # substitute path in rubygems.
                     22: #
                     23: SUBST_CLASSES+=                conf
                     24: SUBST_STAGE.conf=      pre-install
                     25: SUBST_FILES.conf=      lib/rubygems/config_file.rb
                     26: SUBST_SED.conf=                -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
                     27: SUBST_MESSAGE.conf=    Fixing configuration files.
                     28: 
                     29: #
                     30: # Don't reference pkgsrc's INSTALL macro since Ruby expect it could
                     31: # execute by unprivileged user.
                     32: #
                     33: CONFIGURE_ENV+=        INSTALL="${INSTALL} ${COPY}" \
                     34:                INSTALL_DATA= INSTALL_PROGRAM= INSTALL_SCRIPT=
                     35: CONFIGURE_ENV+= ac_cv_prog_PKG_CONFIG=""
                     36: 
                     37: #
                     38: # prevent unwanted mkdir recorded in rbconfig.rb
                     39: #
                     40: CONFIGURE_ENV+=        MKDIR_P=${MKDIR:Q}
                     41: 
                     42: # Ruby build process depends on config.status's content
                     43: CONFIG_STATUS_OVERRIDE=        # empty
                     44: 
                     45: ########
                     46: #
                     47: # Platform
                     48: #
                     49: 
                     50: #
                     51: # Darwin
                     52: #
                     53: # Don't like Apple's builtin OpenSSL.
                     54: #
                     55: .if ${OPSYS} == "Darwin"
                     56: USE_BUILTIN.openssl=   no
                     57: .endif
                     58: 
                     59: #
                     60: # DragonFly
                     61: #
                     62: #
                     63: # Work around for getucontext(3)
                     64: #
                     65: .if ${OPSYS} == "DragonFly" && ${OS_VERSION} == "1.8.0"
                     66: CONFIGURE_ENV+=        ac_cv_header_ucontext_h=no
                     67: .endif
                     68: 
                     69: #
                     70: # Linux
                     71: #
                     72: # /usr/bin/dtrace is not DTrace.
                     73: #
                     74: .if ${OPSYS} == "Linux" && exists(/usr/bin/dtrace)
                     75: CONFIGURE_ARGS+=       --disable-dtrace
                     76: .endif
                     77: 
                     78: #
1.2     ! taca       79: # NetBSD
        !            80: #
        !            81: # dtrace support has problem on i386.  (No official NetBSD release is
        !            82: # built with dtrace enabled yet, so this problem is on 7.99.* only.)
        !            83: #
        !            84: .if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "i386"
        !            85: CONFIGURE_ARGS+=       --disable-dtrace
        !            86: .endif
        !            87: 
        !            88: #
1.1       taca       89: # Solaris
                     90: #
                     91: # fix build with sunpro.
                     92: #
                     93: .if !empty(PKGSRC_COMPILER:Msunpro)
                     94: LIBS.SunOS+=   -B static -lsunmath -B dynamic -lm
                     95: LDFLAGS.SunOS+=        -L${SUNWSPROBASE}/lib -Wl,-R${SUNWSPROBASE}/lib
                     96: CONFIGURE_ENV+=        LDSHARED="${CC} -G"
                     97: .else
                     98: LIBS.SunOS+=   -lm
                     99: .endif
                    100: 
                    101: CONFIGURE_ENV.SunOS+=  OBJCOPY=:
                    102: 
                    103: #
                    104: # MirBSD
                    105: #
                    106: # if present, an unsupported sysconf call is used
                    107: #
                    108: CONFIGURE_ENV.MirBSD+= ac_cv_func_getgrnam_r=no
                    109: 
                    110: # On platforms where DTrace is available, we need to invoke dtrace(1)
                    111: # with the original PATH. Otherwise it gets confused in the presence
                    112: # of our cc wrapper because it tries to invoke the system-default gcc
                    113: # with argv[0] set to "gcc", not the absolute path to gcc.
                    114: .if exists(/usr/sbin/dtrace)
                    115: post-wrapper:
                    116:        ${RUN}(${ECHO} '#!${SH}'; \
                    117:                ${ECHO} 'PATH=/bin:/usr/bin:/sbin:/usr/sbin; export PATH'; \
                    118:                ${ECHO} '/usr/sbin/dtrace $$@') \
                    119:                > "${WRAPPER_BINDIR}/dtrace"
                    120:        ${RUN}${CHMOD} +x "${WRAPPER_BINDIR}/dtrace"
                    121: .endif
                    122: #
                    123: # bmake doesn't like the codesign/POSTLINK constructs for Darwin.
                    124: #
                    125: .if ${OPSYS} == "Cygwin" || ${OPSYS} == "Darwin"
                    126: USE_TOOLS+=    gmake
                    127: MAKE_FILE=     GNUmakefile
                    128: .endif
                    129: 
                    130: ########
                    131: #
                    132: # PLIST
                    133: #
                    134: 
                    135: # Win32 support (for Cygwin)
                    136: #
                    137: PLIST_VARS+=   win32
                    138: .if ${OPSYS} == "Cygwin"
                    139: PLIST.win32=   yes
                    140: .endif
                    141: 
                    142: #
                    143: # IRIX work around which should be fixed.
                    144: #
                    145: PLIST_VARS+=   io
                    146: .if ${OPSYS} != "IRIX"
                    147: PLIST.io=      yes
                    148: .endif
                    149: 
                    150: .endif # _RUBY_REPLACE_MK

CVSweb <webmaster@jp.NetBSD.org>