Workaround for ram-constrained archs: build ext/ripper/ripper.c with -O1

ok phessler@ jeremy@ (maintainer)
This commit is contained in:
jca 2017-02-21 16:45:36 +00:00
parent 2174da5e26
commit b40bb7b3ca
2 changed files with 22 additions and 5 deletions

View File

@ -1,8 +1,4 @@
# $OpenBSD: Makefile,v 1.15 2016/12/21 07:22:20 phessler Exp $
BROKEN-arm = OOM when building ext/ripper/ripper.c
BROKEN-hppa = OOM when building ext/ripper/ripper.c
BROKEN-powerpc = OOM when building ext/ripper/ripper.c
# $OpenBSD: Makefile,v 1.16 2017/02/21 16:45:36 jca Exp $
COMMENT-main = object oriented script language with threads
COMMENT-gdbm = gdbm interface for ruby
@ -92,6 +88,15 @@ TEST_DEPENDS = ${FULLPKGNAME-main}:${BUILD_PKGPATH}
post-extract:
rm -rf ${WRKSRC}/ext/fiddle/libffi-* ${WRKSRC}/tool/downloader.rb
# cc(1) uses too much ram to build ext/ripper/ripper.c
# XXX remove arch if vmparam.h + login.conf give more than 1024M to pbuild
.if ${MACHINE_ARCH:Malpha} || ${MACHINE_ARCH:Marm} || ${MACHINE_ARCH:Mhppa}
CFLAGS_OVERRIDE = -O1
.endif
pre-configure:
sed -i 's/%%CFLAGS_OVERRIDE%%/${CFLAGS_OVERRIDE}/g' \
${WRKSRC}/ext/ripper/depend
pre-install:
find ${WRKSRC} -name '*.orig' -print0 | xargs -0r rm
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/ruby \

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-ext_ripper_depend,v 1.1 2017/02/21 16:45:36 jca Exp $
--- ext/ripper/depend.orig Fri Dec 19 14:34:54 2014
+++ ext/ripper/depend Tue Feb 21 07:02:06 2017
@@ -43,6 +43,8 @@ ripper.E: ripper.c
$(ECHO) preprocessing ripper.c
$(Q) $(CC) -E $(CPPFLAGS) ripper.c | $(RUBY) $(srcdir)/tools/strip.rb > $@
+CFLAGS += %%CFLAGS_OVERRIDE%%
+
# AUTOGENERATED DEPENDENCIES START
ripper.o: $(RUBY_EXTCONF_H)
ripper.o: $(arch_hdrdir)/ruby/config.h