Annotation of pkgsrc/lang/ruby18-base/Makefile, Revision 1.83
1.83 ! taca 1: # $NetBSD: Makefile,v 1.82 2014/06/26 15:59:31 jperkin Exp $
1.1 taca 2: #
3:
4: DISTNAME= ${RUBY_DISTNAME}
1.66 taca 5: PKGNAME= ${RUBY_PKGPREFIX}-base-${RUBY_VERSION_FULL}
1.83 ! taca 6: PKGREVISION= 2
1.1 taca 7: CATEGORIES= lang ruby
8: MASTER_SITES= ${MASTER_SITE_RUBY}
9:
10: MAINTAINER= taca@NetBSD.org
11: HOMEPAGE= ${RUBY_HOMEPAGE}
1.2 minskim 12: COMMENT= Ruby 1.8 based release minimum package
1.58 taca 13: LICENSE= gnu-gpl-v2 OR ruby-license
1.1 taca 14:
1.66 taca 15: RUBY_VERSION_SUPPORTED= 18
1.10 taca 16:
1.29 taca 17: CONFLICTS= ${RUBY_PKGPREFIX}-dbm-[0-9]* \
18: ${RUBY_PKGPREFIX}-digest-[0-9]* \
19: ${RUBY_PKGPREFIX}-iconv-[0-9]* \
20: ${RUBY_PKGPREFIX}-openssl-[0-9]* \
21: ${RUBY_PKGPREFIX}-tcltk-[0-9]*
22:
1.80 jperkin 23: USE_GCC_RUNTIME=yes
1.29 taca 24: USE_LANGUAGES= c
1.43 taca 25: USE_TOOLS+= pax yacc
1.29 taca 26: GNU_CONFIGURE= yes
27: TEST_TARGET= test
28: CONFIGURE_ARGS+= --enable-shared \
1.10 taca 29: --with-ssl-include="${BUILDLINK_PREFIX.openssl}/include" \
30: --with-ssl-lib="${BUILDLINK_PREFIX.openssl}/lib"
1.31 taca 31: WRKSRC= ${RUBY_WRKSRC}
1.35 dmcmahil 32:
1.57 taca 33: #
34: # Don't refrect pkgsrc's INSTALL macro since Ruby expect it could
35: # execute by unprivileged user.
36: #
37: CONFIGURE_ENV+= INSTALL="${INSTALL} ${COPY}" \
38: INSTALL_DATA= INSTALL_PROGRAM= INSTALL_SCRIPT=
39:
1.35 dmcmahil 40: .include "../../mk/compiler.mk"
41:
42: .if !empty(PKGSRC_COMPILER:Msunpro)
1.39 grant 43: LIBS.SunOS+= -B static -lsunmath -B dynamic -lm
1.54 taca 44: LDFLAGS.SunOS+= -L${SUNWSPROBASE}/lib ${COMPILER_RPATH_FLAG}${SUNWSPROBASE}/lib
1.46 taca 45: CONFIGURE_ENV+= LDSHARED="${CC} -G"
1.35 dmcmahil 46: .else
47: LIBS.SunOS+= -lm
48: .endif
1.1 taca 49:
1.69 joerg 50: .if !empty(PKGSRC_COMPILER:Mclang)
51: CONFIGURE_ARGS+= --enable-frame-address
52: .endif
53:
1.71 fhajny 54: # Avoid segfaults as per https://bugs.ruby-lang.org/issues/6383
55: .if !empty(CC_VERSION:Mgcc-4.[7-9].*)
56: CFLAGS+= -fno-tree-dce -fno-optimize-sibling-calls
57: .endif
58:
1.1 taca 59: # Ruby build process depends on config.status's content
60: CONFIG_STATUS_OVERRIDE= # empty
61:
1.10 taca 62: MAKE_DIRS+= ${RUBY_SITERIDIR}
1.30 taca 63: FILES_SUBST+= DATE=${DATE:Q}
64:
65: .include "options.mk"
1.10 taca 66:
1.1 taca 67: .include "../../lang/ruby/rubyversion.mk"
68:
69: .if !empty(RUBY_SUFFIX)
1.13 rillig 70: CONFIGURE_ARGS+= --program-suffix=${RUBY_SUFFIX:Q}
1.1 taca 71: .endif
72:
1.82 jperkin 73: # bmake doesn't like the codesign/POSTLINK constructs.
74: .if ${OPSYS} == "Darwin"
75: USE_TOOLS+= gmake
76: .endif
77:
1.10 taca 78: #
1.15 taca 79: # IRIX work around which should be fixed.
1.10 taca 80: #
1.41 jlam 81: PLIST_VARS+= io
82: .if ${OPSYS} != "IRIX"
83: PLIST.io= yes
1.5 jschauma 84: .endif
85:
1.19 taca 86: #
1.51 hasso 87: # Work around for ucontext(3). It was broken in older DragonFly
88: # versions and is slow in newer ones.
1.34 joerg 89: #
1.51 hasso 90: .if ${OPSYS} == "DragonFly"
1.34 joerg 91: CONFIGURE_ENV+= ac_cv_header_ucontext_h=no
92: .endif
93:
94: #
1.27 taca 95: # work around for getaddrinfo(3)
1.19 taca 96: #
1.65 obache 97: .if ${OPSYS} == "SunOS" && !empty(OS_VERSION:M5.[6-9])
1.19 taca 98: CONFIGURE_ARGS+= --enable-wide-getaddrinfo
99: .endif
100:
1.31 taca 101: DOCS= COPYING COPYING.ja ChangeLog NEWS README \
1.1 taca 102: README.EXT README.EXT.ja README.ja ToDo \
1.31 taca 103: doc/ChangeLog-1.8.0 doc/NEWS-1.8.0 \
1.1 taca 104: doc/forwardable.rd doc/forwardable.rd.ja \
1.31 taca 105: doc/irb/irb-tools.rd.ja doc/irb/irb.rd doc/irb/irb.rd.ja \
106: doc/shell.rd doc/shell.rd.ja
1.1 taca 107: EXT_DOCS= bigdecimal/bigdecimal_en.html bigdecimal/bigdecimal_ja.html \
1.43 taca 108: dl/doc/dl.txt etc/etc.txt etc/etc.txt.ja syslog/syslog.txt \
1.10 taca 109: zlib/doc/zlib.rd
1.1 taca 110:
111: BIGDECIMAL_EXAMPLES= linear.rb nlsolve.rb pi.rb
112: DL_EXAMPLES= c++sample.C c++sample.rb drives.rb getch.rb libc.rb \
113: msgbox.rb msgbox2.rb stream.rb
1.10 taca 114: OPENSSL_EXAMPLES= c_rehash.rb cert2text.rb cert_store_view.rb \
115: certstore.rb cipher.rb crlstore.rb echo_cli.rb \
116: echo_svr.rb gen_csr.rb smime_read.rb smime_write.rb \
117: wget.rb
1.1 taca 118: PTY_EXAMPLES= expect_sample.rb script.rb shl.rb
119:
1.42 jlam 120: REPLACE_RUBY_DIRS= bin ext lib sample
1.48 taca 121: REPLACE_RUBY= ext/dl/h2rb
1.43 taca 122: INSTALLATION_DIRS= bin ${RUBY_ARCHLIB} ${RUBY_DOC}/irb ${RUBY_DOC}/pty \
1.44 obache 123: ${RUBY_EG}/bigdecimal ${RUBY_EG}/dl \
1.43 taca 124: ${RUBY_EG}/openssl ${RUBY_EG}/pty
125: FIX_PERM= ${RUBY_ARCHLIB}/digest.h ${RUBY_ARCHLIB}/dl.h \
126: ${RUBY_ARCHLIB}/dlconfig.h
1.1 taca 127:
128: pre-configure:
129: ${RM} -f ${WRKSRC}/ext/curses/extconf.rb
130: ${RM} -f ${WRKSRC}/ext/gdbm/extconf.rb
131: ${RM} -f ${WRKSRC}/ext/readline/extconf.rb
132: ${RM} -f ${WRKSRC}/ext/tk/extconf.rb
133:
1.21 taca 134: pre-install:
1.29 taca 135: cd ${WRKSRC}; ${FIND} . \( -name '*.orig' -o -name '*.orig_dist' \) \
136: -exec ${RM} -f {} \;
1.1 taca 137:
138: post-install:
1.43 taca 139: ${INSTALL_DATA} ${FILESDIR}/CHANGES.pkgsrc ${DESTDIR}${PREFIX}/${RUBY_DOC}
1.1 taca 140: .for f in ${DOCS}
1.43 taca 141: ${INSTALL_DATA} ${WRKSRC}/${f} ${DESTDIR}${PREFIX}/${RUBY_DOC}/${f:C/^doc\///}
1.1 taca 142: .endfor
1.81 taca 143: ${INSTALL_SCRIPT} ${WRKSRC}/ext/dl/h2rb ${DESTDIR}${PREFIX}/bin/h2rb${RUBY_SUFFIX}
1.1 taca 144: .for f in ${EXT_DOCS}
1.43 taca 145: ${INSTALL_DATA} ${WRKSRC}/ext/${f} ${DESTDIR}${PREFIX}/${RUBY_DOC}
1.1 taca 146: .endfor
1.43 taca 147: cd ${WRKSRC}/ext/pty; ${PAX} -rw README.* ${DESTDIR}${PREFIX}/${RUBY_DOC}/pty
148: cd ${WRKSRC}/sample; ${PAX} -rw . ${DESTDIR}${PREFIX}/${RUBY_EG}
1.1 taca 149: .for f in ${BIGDECIMAL_EXAMPLES}
150: ${INSTALL_DATA} ${RUBY_WRKSRC}/ext/bigdecimal/sample/${f} \
1.43 taca 151: ${DESTDIR}${PREFIX}/${RUBY_EG}/bigdecimal
1.1 taca 152: .endfor
153: .for f in ${DL_EXAMPLES}
154: ${INSTALL_DATA} ${RUBY_WRKSRC}/ext/dl/sample/${f} \
1.43 taca 155: ${DESTDIR}${PREFIX}/${RUBY_EG}/dl
1.1 taca 156: .endfor
1.10 taca 157: .for f in ${OPENSSL_EXAMPLES}
158: ${INSTALL_DATA} ${RUBY_WRKSRC}/sample/openssl/${f} \
1.43 taca 159: ${DESTDIR}${PREFIX}/${RUBY_EG}/openssl
1.10 taca 160: .endfor
1.1 taca 161: .for f in ${PTY_EXAMPLES}
1.43 taca 162: ${INSTALL_DATA} ${WRKSRC}/ext/pty/${f} ${DESTDIR}${PREFIX}/${RUBY_EG}/pty
163: .endfor
164: .for f in ${FIX_PERM}
165: ${CHMOD} ${SHAREMODE} ${DESTDIR}${PREFIX}/${f}
1.1 taca 166: .endfor
1.25 taca 167: ${RUBY_GENERATE_PLIST}
1.1 taca 168:
1.70 taca 169: .include "../../mk/bdb.buildlink3.mk"
170: .include "../../converters/libiconv/buildlink3.mk"
171: .include "../../devel/zlib/buildlink3.mk"
172: .include "../../security/openssl/buildlink3.mk"
1.1 taca 173: .include "../../lang/ruby/Makefile.common"
174: .include "../../mk/bsd.pkg.mk"
CVSweb <webmaster@jp.NetBSD.org>