1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-29 01:13:08 +00:00

- Move *_DEPENDS together

- Sort CONFIGURE_ARGS
- Remove duplicate WRKSRC
- Sort USES
- Use pre-install: instead of pre-su-install:
- Convert to new options helper
- Convert to new options target helper
- Change options helper: (copied from ruby22)
  - Use CAPIDOCS_CONFIGURE_ENABLE instead of CAPIDOCS_CONFIGURE_OFF
  - Use RDOC_CONFIGURE_ENABLE instead of RDOC_CONFIGURE_OFF
- Add regression-test:
- Fix typo
- Cosmetic change
- Pet portlint: fix diff header of patch files
- Bump PORTREVISION for package change
This commit is contained in:
Sunpoet Po-Chuan Hsieh 2015-09-07 17:46:06 +00:00
parent 2e9b516c34
commit e9264c81e2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=396292
10 changed files with 70 additions and 79 deletions

View File

@ -172,7 +172,7 @@ RUBY?= ${LOCALBASE}/bin/${RUBY_NAME}
# Ruby 2.0 # Ruby 2.0
# #
RUBY_RELVERSION= 2.0.0 RUBY_RELVERSION= 2.0.0
RUBY_PORTREVISION= 0 RUBY_PORTREVISION= 1
RUBY_PORTEPOCH= 1 RUBY_PORTEPOCH= 1
RUBY_PATCHLEVEL= 645 RUBY_PATCHLEVEL= 645
RUBY20= "" # PLIST_SUB helpers RUBY20= "" # PLIST_SUB helpers

View File

@ -6,7 +6,7 @@ PORTVERSION= ${RUBY_PORTVERSION}
PORTREVISION= ${RUBY_PORTREVISION} PORTREVISION= ${RUBY_PORTREVISION}
PORTEPOCH= ${RUBY_PORTEPOCH} PORTEPOCH= ${RUBY_PORTEPOCH}
CATEGORIES= lang ruby ipv6 CATEGORIES= lang ruby ipv6
MASTER_SITES= RUBY/${MASTER_SITE_SUBDIR_RUBY} MASTER_SITES= RUBY/${MASTER_SITE_SUBDIR_RUBY}
DISTNAME= ${RUBY_DISTNAME} DISTNAME= ${RUBY_DISTNAME}
DIST_SUBDIR= ruby DIST_SUBDIR= ruby
@ -16,29 +16,29 @@ COMMENT?= Object-oriented interpreted scripting language
LICENSE= BSD2CLAUSE RUBY LICENSE= BSD2CLAUSE RUBY
LICENSE_COMB= dual LICENSE_COMB= dual
LIB_DEPENDS= libyaml.so:${PORTSDIR}/textproc/libyaml
# Using LIB_DEPENDS finds the libffi from gcc which causes problems # Using LIB_DEPENDS finds the libffi from gcc which causes problems
BUILD_DEPENDS= libffi>=0:${PORTSDIR}/devel/libffi BUILD_DEPENDS= libffi>=0:${PORTSDIR}/devel/libffi
LIB_DEPENDS= libyaml.so:${PORTSDIR}/textproc/libyaml
RUN_DEPENDS= libffi>=0:${PORTSDIR}/devel/libffi RUN_DEPENDS= libffi>=0:${PORTSDIR}/devel/libffi
GNU_CONFIGURE= yes
WRKSRC= ${RUBY_WRKSRC}
CONFIGURE_ARGS= ${RUBY_CONFIGURE_ARGS} \ CONFIGURE_ARGS= ${RUBY_CONFIGURE_ARGS} \
--enable-shared \
--enable-pthread \
--disable-rpath \ --disable-rpath \
--enable-pthread \
--enable-shared \
--with-ruby-version=minor \ --with-ruby-version=minor \
--with-sitedir="${PREFIX}/lib/ruby/site_ruby" \ --with-sitedir="${PREFIX}/lib/ruby/site_ruby" \
--with-vendordir="${PREFIX}/lib/ruby/vendor_ruby" --with-vendordir="${PREFIX}/lib/ruby/vendor_ruby"
USE_OPENSSL= yes CONFIGURE_ENV= LC_ALL=C debugflags=
USE_LDCONFIG= yes CPPFLAGS+= -I${LOCALBASE}/include
GNU_CONFIGURE= yes
# Keep this, else ruby will fail to load libraries dependent of libpthread.
LIBS+= -lpthread -L${LOCALBASE}/lib
MAKE_ENV= LC_ALL=C
USE_AUTOTOOLS= autoconf USE_AUTOTOOLS= autoconf
USE_LDCONFIG= yes
CONFIGURE_ENV+= LC_ALL=C USE_OPENSSL= yes
MAKE_ENV+= LC_ALL=C USES= cpe execinfo tar:bzip2
WRKSRC= ${RUBY_WRKSRC}
WRKSRC= ${WRKDIR}/${PORTNAME}-${RUBY_DISTVERSION}
RUBY_VER= 2.0 RUBY_VER= 2.0
USE_RUBY= yes USE_RUBY= yes
@ -57,10 +57,14 @@ LIBEDIT_DESC= Use libedit
READLINE_DESC= Use libreadline READLINE_DESC= Use libreadline
CAPIDOCS_BUILD_DEPENDS= doxygen>0:${PORTSDIR}/devel/doxygen \ CAPIDOCS_BUILD_DEPENDS= doxygen>0:${PORTSDIR}/devel/doxygen \
dot:${PORTSDIR}/graphics/graphviz dot:${PORTSDIR}/graphics/graphviz
CAPIDOCS_CONFIGURE_OFF= --disable-install-capi CAPIDOCS_CONFIGURE_ENABLE= install-capi
RDOC_CONFIGURE_OFF= --disable-install-rdoc LIBEDIT_BUILD_DEPENDS= libedit>=0:${PORTSDIR}/devel/libedit
LIBEDIT_CONFIGURE_ON= --enable-libedit --with-libedit-prefix=${LOCALBASE}
USES= execinfo cpe tar:bzip2 LIBEDIT_RUN_DEPENDS= libedit>=0:${PORTSDIR}/devel/libedit
RDOC_CONFIGURE_ENABLE= install-rdoc
READLINE_BUILD_DEPENDS= readline>=0:${PORTSDIR}/devel/readline
READLINE_CONFIGURE_ON= --disable-libedit --with-readline-prefix=${LOCALBASE}
READLINE_RUN_DEPENDS= readline>=0:${PORTSDIR}/devel/readline
CPE_VENDOR= ruby-lang CPE_VENDOR= ruby-lang
CPE_VERSION= ${RUBY_RELVERSION} CPE_VERSION= ${RUBY_RELVERSION}
@ -78,10 +82,6 @@ _SUF2= ,${PORTEPOCH}
_SUF1= _${PORTREVISION} _SUF1= _${PORTREVISION}
.endif .endif
CPPFLAGS+= -I${LOCALBASE}/include
# Keep this, else ruby will fail to load libraries dependent op libpthread.
LIBS+= -lpthread -L${LOCALBASE}/lib
.if ${OPSYS} == "FreeBSD" .if ${OPSYS} == "FreeBSD"
.if exists(/usr/sbin/dtrace) && (${OSVERSION} > 1100032) && (${ARCH} == "amd64" || ${ARCH} == "i386") .if exists(/usr/sbin/dtrace) && (${OSVERSION} > 1100032) && (${ARCH} == "amd64" || ${ARCH} == "i386")
CONFIGURE_ARGS+= --enable-dtrace CONFIGURE_ARGS+= --enable-dtrace
@ -94,24 +94,10 @@ CONFIGURE_ARGS+= --disable-dtrace
CONFIGURE_ARGS+= --with-setjmp-type=_setjmp CONFIGURE_ARGS+= --with-setjmp-type=_setjmp
.endif .endif
CONFIGURE_ENV= debugflags=
.if ${PORT_OPTIONS:MCAPIDOCS} .if ${PORT_OPTIONS:MCAPIDOCS}
MAKE_JOBS_UNSAFE= yes MAKE_JOBS_UNSAFE= yes
.endif .endif
.if ${PORT_OPTIONS:MLIBEDIT}
BUILD_DEPENDS+= libedit>=0:${PORTSDIR}/devel/libedit
RUN_DEPENDS+= libedit>=0:${PORTSDIR}/devel/libedit
CONFIGURE_ARGS+= --enable-libedit --with-libedit-prefix=${LOCALBASE}
.endif
.if ${PORT_OPTIONS:MREADLINE}
BUILD_DEPENDS+= readline>=0:${PORTSDIR}/devel/readline
RUN_DEPENDS+= readline>=0:${PORTSDIR}/devel/readline
CONFIGURE_ARGS+= --disable-libedit --with-readline-prefix=${LOCALBASE}
.endif
.if ${RUBY_VER} == ${RUBY_DEFAULT_VER} .if ${RUBY_VER} == ${RUBY_DEFAULT_VER}
MLINKS= ${RUBY_NAME}.1 ruby.1 MLINKS= ${RUBY_NAME}.1 ruby.1
PLIST_SUB+= IF_DEFAULT="" PLIST_SUB+= IF_DEFAULT=""
@ -179,35 +165,25 @@ post-build:
@${RB_SET_CONF_VAR} "INSTALL_PROGRAM" "ENV['RB_USER_INSTALL'] ? '${INSTALL} ${COPY} ${STRIP} -m ${BINMODE}' : '${INSTALL_PROGRAM}'" @${RB_SET_CONF_VAR} "INSTALL_PROGRAM" "ENV['RB_USER_INSTALL'] ? '${INSTALL} ${COPY} ${STRIP} -m ${BINMODE}' : '${INSTALL_PROGRAM}'"
@${RB_SET_CONF_VAR} "INSTALL_SCRIPT" "ENV['RB_USER_INSTALL'] ? '${INSTALL} ${COPY} -m ${BINMODE}' : '${INSTALL_SCRIPT}'" @${RB_SET_CONF_VAR} "INSTALL_SCRIPT" "ENV['RB_USER_INSTALL'] ? '${INSTALL} ${COPY} -m ${BINMODE}' : '${INSTALL_SCRIPT}'"
@${RB_SET_CONF_VAR} "INSTALL_DATA" "ENV['RB_USER_INSTALL'] ? '${INSTALL} ${COPY} -m ${SHAREMODE}' : '${INSTALL_DATA}'" @${RB_SET_CONF_VAR} "INSTALL_DATA" "ENV['RB_USER_INSTALL'] ? '${INSTALL} ${COPY} -m ${SHAREMODE}' : '${INSTALL_DATA}'"
.if ${PORT_OPTIONS:MCAPIDOCS}
${FIND} ${WRKSRC}/doc -type d -empty -delete
.endif
pre-su-install: post-build-CAPIDOCS-on:
${FIND} ${WRKSRC}/doc -type d -empty -delete
pre-install:
${MKDIR} ${STAGEDIR}${RUBY_SITEARCHLIBDIR} ${MKDIR} ${STAGEDIR}${RUBY_SITEARCHLIBDIR}
${MKDIR} ${STAGEDIR}${RUBY_VENDORARCHLIBDIR} ${MKDIR} ${STAGEDIR}${RUBY_VENDORARCHLIBDIR}
.if ${PORT_OPTIONS:MDOCS}
pre-install-DOCS-on:
${MKDIR} ${STAGEDIR}${RUBY_DOCDIR} ${MKDIR} ${STAGEDIR}${RUBY_DOCDIR}
.endif
.if ${PORT_OPTIONS:MEXAMPLES} pre-install-EXAMPLES-on:
${MKDIR} ${STAGEDIR}${RUBY_EXAMPLESDIR} ${MKDIR} ${STAGEDIR}${RUBY_EXAMPLESDIR}
.endif
.if ${PORT_OPTIONS:MRDOC} pre-install-RDOC-on:
${MKDIR} ${STAGEDIR}${RUBY_RIDIR} ${MKDIR} ${STAGEDIR}${RUBY_RIDIR}
${MKDIR} ${STAGEDIR}${RUBY_SITERIDIR} ${MKDIR} ${STAGEDIR}${RUBY_SITERIDIR}
.endif
post-install: post-install:
#
# XXX: hack to strip ruby binary. Ruby uses its own install script that seems
# bogus to hack.
#
.if defined(STRIP) && ${STRIP} == -s && ! ${PORT_OPTIONS:MDEBUG}
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${RUBY_NAME}
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libruby${RUBY_SHLIBVER}.so.${RUBY_SHLIBVER}
${FIND} ${STAGEDIR}${RUBY_ARCHLIBDIR} -type f -name '*\.so' -exec ${STRIP_CMD} {} \;
.endif
# #
# Link just installed "ruby" to "ruby20", etc. # Link just installed "ruby" to "ruby20", etc.
# #
@ -217,18 +193,24 @@ post-install:
. endfor . endfor
.endif .endif
post-install-DEBUG-off:
#
# XXX: hack to strip ruby binary. Ruby uses its own install script that seems
# bogus to hack.
#
.if defined(STRIP) && ${STRIP} == -s
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${RUBY_NAME}
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libruby${RUBY_SHLIBVER}.so.${RUBY_SHLIBVER}
${FIND} ${STAGEDIR}${RUBY_ARCHLIBDIR} -type f -name '*\.so' -exec ${STRIP_CMD} {} \;
.endif
post-install-DOCS-on:
# Create all dirs required (":u" isn't avaiable in STABLE yet :-() # Create all dirs required (":u" isn't avaiable in STABLE yet :-()
${MKDIR} ${EXTSAMPLES:C,^([^/]+)/.*,\1,:S,^,${STAGEDIR}${RUBY_EXAMPLESDIR}/,}
${MKDIR} ${EXTDOCS:C,^([^/]+)/.*,\1,:S,^,${STAGEDIR}${RUBY_DOCDIR}/,} ${MKDIR} ${EXTDOCS:C,^([^/]+)/.*,\1,:S,^,${STAGEDIR}${RUBY_DOCDIR}/,}
.for FILE in ${EXTSAMPLES}
${INSTALL_DATA} ${WRKSRC}/ext/${FILE} \
${STAGEDIR}${RUBY_EXAMPLESDIR}/${FILE:C,^([^/]+)/.*,\1,}/
.endfor
.for FILE in ${EXTDOCS} .for FILE in ${EXTDOCS}
${INSTALL_DATA} ${WRKSRC}/ext/${FILE} \ ${INSTALL_DATA} ${WRKSRC}/ext/${FILE} \
${STAGEDIR}${RUBY_DOCDIR}/${FILE:C,^([^/]+)/.*,\1,}/ ${STAGEDIR}${RUBY_DOCDIR}/${FILE:C,^([^/]+)/.*,\1,}/
.endfor .endfor
@(cd ${WRKSRC}/sample/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${RUBY_EXAMPLESDIR}/)
@(cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${RUBY_DOCDIR}/) @(cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${RUBY_DOCDIR}/)
${INSTALL_DATA} ${WRKSRC}/COPYING* \ ${INSTALL_DATA} ${WRKSRC}/COPYING* \
${WRKSRC}/ChangeLog \ ${WRKSRC}/ChangeLog \
@ -236,7 +218,16 @@ post-install:
${WRKSRC}/README* \ ${WRKSRC}/README* \
${STAGEDIR}${RUBY_DOCDIR}/ ${STAGEDIR}${RUBY_DOCDIR}/
test: post-install-EXAMPLES-on:
# Create all dirs required (":u" isn't avaiable in STABLE yet :-()
${MKDIR} ${EXTSAMPLES:C,^([^/]+)/.*,\1,:S,^,${STAGEDIR}${RUBY_EXAMPLESDIR}/,}
.for FILE in ${EXTSAMPLES}
${INSTALL_DATA} ${WRKSRC}/ext/${FILE} \
${STAGEDIR}${RUBY_EXAMPLESDIR}/${FILE:C,^([^/]+)/.*,\1,}/
.endfor
@(cd ${WRKSRC}/sample/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${RUBY_EXAMPLESDIR}/)
regression-test test:
@(cd ${WRKSRC}; ${MAKE} test) @(cd ${WRKSRC}; ${MAKE} test)
validate: validate:

View File

@ -1,5 +1,5 @@
--- Makefile.in.orig 2014-09-26 18:04:17.720164117 +0000 --- Makefile.in.orig 2014-09-26 18:04:18 UTC
+++ Makefile.in 2014-09-26 18:04:53.535161754 +0000 +++ Makefile.in
@@ -342,7 +342,7 @@ @@ -342,7 +342,7 @@
.d.h: .d.h:

View File

@ -1,5 +1,5 @@
--- configure.in.orig 2014-09-26 17:17:06.072358809 +0000 --- configure.in.orig 2014-09-26 17:17:06 UTC
+++ configure.in 2014-09-26 17:17:32.251357664 +0000 +++ configure.in
@@ -515,7 +515,7 @@ @@ -515,7 +515,7 @@
[AC_CACHE_CHECK(whether dtrace USDT is available, rb_cv_dtrace_available, [AC_CACHE_CHECK(whether dtrace USDT is available, rb_cv_dtrace_available,
[ [

View File

@ -1,5 +1,5 @@
--- cont.c.orig 2013-10-09 15:37:54.000000000 +0000 --- cont.c.orig 2013-10-09 15:37:54 UTC
+++ cont.c 2013-11-22 15:05:19.138396780 +0000 +++ cont.c
@@ -44,6 +44,8 @@ @@ -44,6 +44,8 @@
/* At least, Linux/ia64's getcontext(3) doesn't save register window. /* At least, Linux/ia64's getcontext(3) doesn't save register window.
*/ */

View File

@ -1,4 +1,4 @@
--- lib/rdoc/single_class.rb --- lib/rdoc/single_class.rb 2012-11-27 04:28:14 UTC
+++ lib/rdoc/single_class.rb +++ lib/rdoc/single_class.rb
@@ -10,6 +10,10 @@ def ancestors @@ -10,6 +10,10 @@ def ancestors
superclass ? super + [superclass] : super superclass ? super + [superclass] : super

View File

@ -1,5 +1,5 @@
--- ./lib/rdoc/ruby_lex.rb.orig 2012-12-18 07:31:36.000000000 +0000 --- ./lib/rdoc/ruby_lex.rb.orig 2012-12-18 07:31:36 UTC
+++ ./lib/rdoc/ruby_lex.rb 2014-01-02 01:09:06.630327388 +0000 +++ ./lib/rdoc/ruby_lex.rb
@@ -1028,6 +1028,8 @@ @@ -1028,6 +1028,8 @@
end end

View File

@ -1,5 +1,5 @@
--- lib/mkmf.rb.orig 2013-06-26 07:03:38.000000000 -0700 --- lib/mkmf.rb.orig 2013-06-26 14:03:38 UTC
+++ lib/mkmf.rb 2013-07-03 17:43:05.000000000 -0700 +++ lib/mkmf.rb
@@ -226,7 +226,7 @@ @@ -226,7 +226,7 @@
end end
$extmk ||= false $extmk ||= false

View File

@ -1,5 +1,5 @@
--- tool/mkconfig.rb.orig 2013-05-27 03:20:03.501815638 +0000 --- tool/mkconfig.rb.orig 2013-05-27 03:20:04 UTC
+++ tool/mkconfig.rb 2013-05-27 03:20:31.093814303 +0000 +++ tool/mkconfig.rb
@@ -173,7 +173,8 @@ @@ -173,7 +173,8 @@
end end
vars["prefix"] = "" vars["prefix"] = ""

View File

@ -1,5 +1,5 @@
--- tool/rbinstall.rb.orig 2013-02-07 08:02:31.000000000 +0000 --- tool/rbinstall.rb.orig 2013-02-07 08:02:31 UTC
+++ tool/rbinstall.rb 2013-02-17 21:44:37.906833639 +0000 +++ tool/rbinstall.rb
@@ -307,6 +307,7 @@ @@ -307,6 +307,7 @@
libdir = CONFIG["libdir", true] libdir = CONFIG["libdir", true]
rubyhdrdir = CONFIG["rubyhdrdir", true] rubyhdrdir = CONFIG["rubyhdrdir", true]