Skip to content
Snippets Groups Projects
Commit 84f001c6 authored by Daniel Engberg's avatar Daniel Engberg Committed by Yasuhiro Kimura
Browse files

lang/ruby3[1-3]: Refine ports

* Skip extracting unnecessary files by setting EXTRACT_AFTER_ARGS
  instead of removing them with post-patch target after they are
  extracted.
* Use 'USES=localbase' to set path of header and library files.

PR:		278764
parent 2122fe18
No related branches found
No related tags found
No related merge requests found
......@@ -23,12 +23,22 @@ BUILD_DEPENDS= libffi>=0:devel/libffi
LIB_DEPENDS= libyaml.so:textproc/libyaml
RUN_DEPENDS= libffi>=0:devel/libffi
USES= autoreconf cpe ruby:none ssl tar:xz
USES= autoreconf cpe localbase ruby:none ssl tar:xz
CPE_VENDOR= ruby-lang
CPE_VERSION= ${RUBY_RELVERSION}
CPE_UPDATE= p${RUBY_PATCHLEVEL}
USE_LDCONFIG= yes
# We get these from other ports
EXTRACT_AFTER_ARGS= --exclude ${DISTNAME}/bin/gem \
--exclude ${DISTNAME}/ext/win32* \
--exclude ${DISTNAME}/lib/bundler* \
--exclude ${DISTNAME}/libexec/bundler \
--exclude ${DISTNAME}/man/erb.1 \
--exclude ${DISTNAME}/man/irb.1 \
--exclude ${DISTNAME}/man/ri.1 \
--no-same-owner --no-same-permissions
GNU_CONFIGURE= yes
CONFIGURE_ARGS= ${RUBY_CONFIGURE_ARGS} \
--disable-rpath \
......@@ -40,9 +50,8 @@ CONFIGURE_ARGS= ${RUBY_CONFIGURE_ARGS} \
--with-vendordir="${PREFIX}/lib/ruby/vendor_ruby"
CONFIGURE_ENV= debugflags=
CPPFLAGS+= -I${LOCALBASE}/include
# Keep this, else ruby will fail to load libraries dependent of libpthread.
LIBS+= -lpthread -L${LOCALBASE}/lib
LIBS+= -lpthread
WRKSRC= ${RUBY_WRKSRC}
RUBY_VER= 3.1
......@@ -124,13 +133,6 @@ RB_SET_CONF_VAR= ${SH} -c \
'${REINPLACE_CMD} -E -e "s,(CONFIG\[\"$$0\"\][[:space:]]*=[[:space:]]*)(\(?)(.*)(\)?),\1\2$$1\4," ${WRKSRC}/rbconfig.rb' \
--
post-patch:
# We get these from other ports
.for d in bin/* ext/dbm ext/gdbm ext/win32* lib/bundler* libexec/bundler* \
man/bundle* man/erb.1 man/gemfile* man/irb.1 man/ri.1
@${RM} -r ${BUILD_WRKSRC}/${d}
.endfor
post-build:
#
# Hack to allow modules to be installed into separate PREFIX and/or under user
......
......@@ -19,12 +19,22 @@ BUILD_DEPENDS= libffi>=0:devel/libffi
LIB_DEPENDS= libyaml.so:textproc/libyaml
RUN_DEPENDS= libffi>=0:devel/libffi
USES= autoreconf cpe ruby:none ssl tar:xz
USES= autoreconf cpe localbase ruby:none ssl tar:xz
CPE_VENDOR= ruby-lang
CPE_VERSION= ${RUBY_RELVERSION}
CPE_UPDATE= p${RUBY_PATCHLEVEL}
USE_LDCONFIG= yes
# We get these from other ports
EXTRACT_AFTER_ARGS= --exclude ${DISTNAME}/bin/gem \
--exclude ${DISTNAME}/ext/win32* \
--exclude ${DISTNAME}/lib/bundler* \
--exclude ${DISTNAME}/libexec/bundler \
--exclude ${DISTNAME}/man/erb.1 \
--exclude ${DISTNAME}/man/irb.1 \
--exclude ${DISTNAME}/man/ri.1 \
--no-same-owner --no-same-permissions
GNU_CONFIGURE= yes
CONFIGURE_ARGS= ${RUBY_CONFIGURE_ARGS} \
--disable-rpath \
......@@ -36,9 +46,8 @@ CONFIGURE_ARGS= ${RUBY_CONFIGURE_ARGS} \
--with-vendordir="${PREFIX}/lib/ruby/vendor_ruby"
CONFIGURE_ENV= debugflags=
CPPFLAGS+= -I${LOCALBASE}/include
# Keep this, else ruby will fail to load libraries dependent of libpthread.
LIBS+= -lpthread -L${LOCALBASE}/lib
LIBS+= -lpthread
WRKSRC= ${RUBY_WRKSRC}
RUBY_VER= 3.2
......@@ -123,13 +132,6 @@ RB_SET_CONF_VAR= ${SH} -c \
'${REINPLACE_CMD} -E -e "s,(CONFIG\[\"$$0\"\][[:space:]]*=[[:space:]]*)(\(?)(.*)(\)?),\1\2$$1\4," ${WRKSRC}/rbconfig.rb' \
--
post-patch:
# We get these from other ports
.for d in bin/* ext/dbm ext/gdbm ext/win32* lib/bundler* libexec/bundler* \
man/bundle* man/erb.1 man/gemfile* man/irb.1 man/ri.1
@${RM} -r ${BUILD_WRKSRC}/${d}
.endfor
post-build:
#
# Hack to allow modules to be installed into separate PREFIX and/or under user
......
......@@ -20,12 +20,22 @@ BUILD_DEPENDS= libffi>=0:devel/libffi
LIB_DEPENDS= libyaml.so:textproc/libyaml
RUN_DEPENDS= libffi>=0:devel/libffi
USES= autoreconf cpe ruby:none ssl tar:xz
USES= autoreconf cpe localbase ruby:none ssl tar:xz
CPE_VENDOR= ruby-lang
CPE_VERSION= ${RUBY_RELVERSION}
CPE_UPDATE= p${RUBY_PATCHLEVEL}
USE_LDCONFIG= yes
# We get these from other ports
EXTRACT_AFTER_ARGS= --exclude ${DISTNAME}/bin/gem \
--exclude ${DISTNAME}/ext/win32* \
--exclude ${DISTNAME}/lib/bundler* \
--exclude ${DISTNAME}/libexec/bundler \
--exclude ${DISTNAME}/man/erb.1 \
--exclude ${DISTNAME}/man/irb.1 \
--exclude ${DISTNAME}/man/ri.1 \
--no-same-owner --no-same-permissions
GNU_CONFIGURE= yes
CONFIGURE_ARGS= ${RUBY_CONFIGURE_ARGS} \
--disable-rpath \
......@@ -37,9 +47,8 @@ CONFIGURE_ARGS= ${RUBY_CONFIGURE_ARGS} \
--with-vendordir="${PREFIX}/lib/ruby/vendor_ruby"
CONFIGURE_ENV= debugflags=
CPPFLAGS+= -I${LOCALBASE}/include
# Keep this, else ruby will fail to load libraries dependent of libpthread.
LIBS+= -lpthread -L${LOCALBASE}/lib
LIBS+= -lpthread
WRKSRC= ${RUBY_WRKSRC}
RUBY_VER= 3.3
......@@ -115,13 +124,6 @@ RB_SET_CONF_VAR= ${SH} -c \
post-extract-DOCS-on:
${MV} ${WRKSRC}/ChangeLog ${WRKSRC}/doc/ChangeLog
post-patch:
# We get these from other ports
.for d in bin/* ext/dbm ext/gdbm ext/win32* lib/bundler* libexec/bundler* \
man/bundle* man/erb.1 man/gemfile* man/irb.1 man/ri.1
@${RM} -r ${BUILD_WRKSRC}/${d}
.endfor
post-build:
#
# Hack to allow modules to be installed into separate PREFIX and/or under user
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment