summaryrefslogtreecommitdiff
path: root/lang/ruby/Makefile.inc
diff options
context:
space:
mode:
Diffstat (limited to 'lang/ruby/Makefile.inc')
-rw-r--r--lang/ruby/Makefile.inc95
1 files changed, 95 insertions, 0 deletions
diff --git a/lang/ruby/Makefile.inc b/lang/ruby/Makefile.inc
new file mode 100644
index 0000000..578cd75
--- /dev/null
+++ b/lang/ruby/Makefile.inc
@@ -0,0 +1,95 @@
1COMMENT-main ?= object oriented script language with threads
2COMMENT-ri_docs ?= ri documentation files for ruby
3
4DISTNAME ?= ruby-${VERSION}
5
6PKGNAME-main ?= ruby-${VERSION}
7PKGNAME-ri_docs ?= ruby${BINREV}-ri_docs-${VERSION}
8
9PKG_ARCH-ri_docs ?= *
10WANTLIB-ri_docs ?= # empty
11
12PKGSPEC-main ?= ruby->=${REV},<${NEXTVER}
13
14CATEGORIES ?= lang
15
16HOMEPAGE ?= https://www.ruby-lang.org/
17
18MAINTAINER ?= Jeremy Evans <jeremy@openbsd.org>
19
20# GPL/Artistic/BSD/Public Domain/Beer-Ware
21PERMIT_PACKAGE?= Yes
22
23SITES ?= https://cache.ruby-lang.org/pub/ruby/${VERSION:R}/
24SITES.p ?= https://github.com/ruby/ruby/commit/
25PATCH_DIST_STRIP ?= -p1
26PATCHORIG = .orig
27
28CONFIGURE_STYLE ?= gnu
29CONFIGURE_ARGS += --enable-shared \
30 --program-suffix=${BINREV} \
31 --with-soname=ruby${BINREV} \
32 --with-ruby-version=${REV} \
33 --with-mantype=doc \
34 --with-setjmp-type=_setjmp \
35 --enable-pthread \
36 --enable-ipv6 \
37 --without-baseruby \
38 --without-bundled-libffi \
39 --disable-option-checking
40# dwz errors out if it encounters an already compressed debug section
41CONFIGURE_ARGS += --with-compress-debug-sections=no
42
43CONFIGURE_ENV += LIBruby${BINREV}_VERSION=${LIBruby${BINREV}_VERSION} \
44 PREFIX="${PREFIX}" \
45 optflags="" \
46 CPPFLAGS="-DOPENSSL_NO_STATIC_ENGINE -I${LOCALBASE}/include" \
47 LDFLAGS="-L${LOCALBASE}/lib" \
48 DLDFLAGS="-L${LOCALBASE}/lib" \
49 ac_cv_prog_DOXYGEN="" \
50 ac_cv_prog_DOT=""
51
52MAKE_ENV += DLDFLAGS="-I${LOCALBASE}/lib"
53
54WANTLIB-main += c crypto ffi gmp m pthread ssl util yaml-0 z
55LIB_DEPENDS-main += devel/gmp \
56 devel/libyaml \
57 devel/libffi
58
59DEBUG_PACKAGES ?= -main
60
61ALL_TARGET = V=1 main
62INSTALL_TARGET = V=1 install-nodoc
63
64TEST_DEPENDS ?= ${FULLPKGNAME-main}:${BUILD_PKGPATH}
65
66POST_EXTRACT ?= rm -rf ${WRKSRC}/ext/fiddle/libffi-* \
67 ${WRKSRC}/tool/downloader.rb;
68
69# cc(1) uses too much ram to build ext/ripper/ripper.c
70# XXX remove arch if vmparam.h + login.conf give more than 1024M to pbuild
71.if ${MACHINE_ARCH:Malpha} || ${MACHINE_ARCH:Marm} || ${MACHINE_ARCH:Mhppa}
72CFLAGS_OVERRIDE = -O1
73.endif
74
75FIX_RIPPER ?= sed -i 's/%%CFLAGS_OVERRIDE%%/${CFLAGS_OVERRIDE}/g' \
76 ${WRKSRC}/ext/ripper/depend;
77
78PRE_INSTALL ?= find ${WRKSRC} -name '*.orig' -delete; \
79 ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/ruby \
80 ${PREFIX}/lib/ruby/gems/${REV}/extensions/${SUB} \
81 ${PREFIX}/lib/ruby/gems/${REV}/extensions/${SUB}/${REV};
82
83# Ruby itself is clean, but some extensions (e.g. devel/ruby-therubyracer)
84# need W|X mappings.
85USE_WXNEEDED ?= Yes
86
87REV ?= ${VERSION:R}
88BINREV ?= ${REV:S/.//}
89SUB ?= ${MACHINE_ARCH:S/amd64/x86_64/}-openbsd
90SUBST_VARS += SUB REV
91FILESDIR ?= ${.CURDIR}/../files
92
93FIX_RBCONFIG ?= sed 's/INSTALL_ARGS/-c -o ${BINOWN} -g ${BINGRP}/' < \
94 ${FILESDIR}/rbconfig_fix.rb >> \
95 ${PREFIX}/lib/ruby/${REV}/${SUB}/rbconfig.rb