diff options
author | sunpoet <sunpoet@FreeBSD.org> | 2015-09-08 01:46:52 +0800 |
---|---|---|
committer | sunpoet <sunpoet@FreeBSD.org> | 2015-09-08 01:46:52 +0800 |
commit | b0bb119620dba9c38c4eff1e09069133a68248d0 (patch) | |
tree | 1c952e6eefebf1e957e64f6d3c4809564a6a29a5 /lang | |
parent | bbe726c45c5dc6adcc9cad1fe5ee75fe4ca45e69 (diff) | |
download | freebsd-ports-gnome-b0bb119620dba9c38c4eff1e09069133a68248d0.tar.gz freebsd-ports-gnome-b0bb119620dba9c38c4eff1e09069133a68248d0.tar.zst freebsd-ports-gnome-b0bb119620dba9c38c4eff1e09069133a68248d0.zip |
- Move *_DEPENDS together
- Add GMP option: libgmp.so is linked if present
- 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 dependency and package change
Diffstat (limited to 'lang')
-rw-r--r-- | lang/ruby21/Makefile | 120 | ||||
-rw-r--r-- | lang/ruby21/files/patch-Makefile.in | 4 | ||||
-rw-r--r-- | lang/ruby21/files/patch-configure.in | 4 | ||||
-rw-r--r-- | lang/ruby21/files/patch-lib-rdoc-single_class.rb | 2 | ||||
-rw-r--r-- | lang/ruby21/files/patch-lib_mkmf.rb | 4 | ||||
-rw-r--r-- | lang/ruby21/files/patch-tool_mkconfig.rb | 4 | ||||
-rw-r--r-- | lang/ruby21/files/patch-tool_rbinstall.rb | 4 |
7 files changed, 68 insertions, 74 deletions
diff --git a/lang/ruby21/Makefile b/lang/ruby21/Makefile index 483e500c6381..dc79355859d6 100644 --- a/lang/ruby21/Makefile +++ b/lang/ruby21/Makefile @@ -6,7 +6,7 @@ PORTVERSION= ${RUBY_PORTVERSION} PORTREVISION= ${RUBY_PORTREVISION} PORTEPOCH= ${RUBY_PORTEPOCH} CATEGORIES= lang ruby ipv6 -MASTER_SITES= RUBY/${MASTER_SITE_SUBDIR_RUBY} +MASTER_SITES= RUBY/${MASTER_SITE_SUBDIR_RUBY} DISTNAME= ${RUBY_DISTNAME} DIST_SUBDIR= ruby @@ -16,51 +16,58 @@ COMMENT?= Object-oriented interpreted scripting language LICENSE= BSD2CLAUSE RUBY LICENSE_COMB= dual -LIB_DEPENDS= libyaml.so:${PORTSDIR}/textproc/libyaml - # Using LIB_DEPENDS finds the libffi from gcc which causes problems BUILD_DEPENDS= libffi>=0:${PORTSDIR}/devel/libffi +LIB_DEPENDS= libyaml.so:${PORTSDIR}/textproc/libyaml RUN_DEPENDS= libffi>=0:${PORTSDIR}/devel/libffi -GNU_CONFIGURE= yes -WRKSRC= ${RUBY_WRKSRC} CONFIGURE_ARGS= ${RUBY_CONFIGURE_ARGS} \ - --enable-shared \ - --enable-pthread \ --disable-rpath \ + --enable-pthread \ + --enable-shared \ --with-ruby-version=minor \ --with-sitedir="${PREFIX}/lib/ruby/site_ruby" \ --with-vendordir="${PREFIX}/lib/ruby/vendor_ruby" -USE_OPENSSL= yes -USE_LDCONFIG= yes +CONFIGURE_ENV= LC_ALL=C debugflags= +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 - -CONFIGURE_ENV+= LC_ALL=C -MAKE_ENV+= LC_ALL=C - -WRKSRC= ${WRKDIR}/${PORTNAME}-${RUBY_DISTVERSION} +USE_LDCONFIG= yes +USE_OPENSSL= yes +USES= cpe execinfo tar:xz +WRKSRC= ${RUBY_WRKSRC} RUBY_VER= 2.1 USE_RUBY= yes RUBY_NO_BUILD_DEPENDS= yes RUBY_NO_RUN_DEPENDS= yes -OPTIONS_DEFINE= CAPIDOCS DEBUG DOCS EXAMPLES RDOC +OPTIONS_DEFINE= CAPIDOCS DEBUG DOCS EXAMPLES GMP RDOC OPTIONS_DEFAULT= RDOC LIBEDIT OPTIONS_SINGLE= EDIT OPTIONS_SINGLE_EDIT= LIBEDIT READLINE OPTIONS_SUB= yes CAPIDOCS_DESC= Build and install C API documents +GMP_DESC= Use GMP to accelerate Bignum operations RDOC_DESC= Build and install Rdoc indexes EDIT_DESC= Which line editing lib to use LIBEDIT_DESC= Use libedit READLINE_DESC= Use libreadline CAPIDOCS_BUILD_DEPENDS= doxygen>0:${PORTSDIR}/devel/doxygen \ dot:${PORTSDIR}/graphics/graphviz -CAPIDOCS_CONFIGURE_OFF= --disable-install-capi -RDOC_CONFIGURE_OFF= --disable-install-rdoc - -USES= execinfo cpe tar:xz +CAPIDOCS_CONFIGURE_ENABLE= install-capi +GMP_CONFIGURE_WITH= gmp +GMP_LIB_DEPENDS= libgmp.so:${PORTSDIR}/math/gmp +LIBEDIT_BUILD_DEPENDS= libedit>=0:${PORTSDIR}/devel/libedit +LIBEDIT_CONFIGURE_ON= --enable-libedit --with-libedit-prefix=${LOCALBASE} +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_VERSION= ${RUBY_RELVERSION} @@ -78,10 +85,6 @@ _SUF2= ,${PORTEPOCH} _SUF1= _${PORTREVISION} .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 exists(/usr/sbin/dtrace) && (${OSVERSION} > 1100032) && (${ARCH} == "amd64" || ${ARCH} == "i386") CONFIGURE_ARGS+= --enable-dtrace @@ -94,24 +97,10 @@ CONFIGURE_ARGS+= --disable-dtrace CONFIGURE_ARGS+= --with-setjmp-type=_setjmp .endif -CONFIGURE_ENV= debugflags= - .if ${PORT_OPTIONS:MCAPIDOCS} MAKE_JOBS_UNSAFE= yes .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} MLINKS= ${RUBY_NAME}.1 ruby.1 PLIST_SUB+= IF_DEFAULT="" @@ -175,36 +164,26 @@ post-build: @${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_DATA" "ENV['RB_USER_INSTALL'] ? '${INSTALL} ${COPY} -m ${SHAREMODE}' : '${INSTALL_DATA}'" -.if ${PORT_OPTIONS:MCAPIDOCS} + +post-build-CAPIDOCS-on: ${FIND} ${WRKSRC}/doc -type d -empty -delete -.endif -pre-su-install: +pre-install: ${MKDIR} ${STAGEDIR}${RUBY_SITEARCHLIBDIR} ${MKDIR} ${STAGEDIR}${RUBY_VENDORARCHLIBDIR} -.if ${PORT_OPTIONS:MDOCS} + +pre-install-DOCS-on: ${MKDIR} ${STAGEDIR}${RUBY_DOCDIR} -.endif -.if ${PORT_OPTIONS:MEXAMPLES} + +pre-install-EXAMPLES-on: ${MKDIR} ${STAGEDIR}${RUBY_EXAMPLESDIR} -.endif -.if ${PORT_OPTIONS:MRDOC} + +pre-install-RDOC-on: ${MKDIR} ${STAGEDIR}${RUBY_RIDIR} ${MKDIR} ${STAGEDIR}${RUBY_SITERIDIR} -.endif 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 "ruby21", etc. # .if ${RUBY_VER} == ${RUBY_DEFAULT_VER} @@ -213,18 +192,24 @@ post-install: . endfor .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 :-() - ${MKDIR} ${EXTSAMPLES:C,^([^/]+)/.*,\1,:S,^,${STAGEDIR}${RUBY_EXAMPLESDIR}/,} ${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} ${INSTALL_DATA} ${WRKSRC}/ext/${FILE} \ ${STAGEDIR}${RUBY_DOCDIR}/${FILE:C,^([^/]+)/.*,\1,}/ .endfor - @(cd ${WRKSRC}/sample/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${RUBY_EXAMPLESDIR}/) @(cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${RUBY_DOCDIR}/) ${INSTALL_DATA} ${WRKSRC}/COPYING* \ ${WRKSRC}/ChangeLog \ @@ -232,7 +217,16 @@ post-install: ${WRKSRC}/README* \ ${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) validate: diff --git a/lang/ruby21/files/patch-Makefile.in b/lang/ruby21/files/patch-Makefile.in index d82bd726b228..9af59caf82a1 100644 --- a/lang/ruby21/files/patch-Makefile.in +++ b/lang/ruby21/files/patch-Makefile.in @@ -1,5 +1,5 @@ ---- Makefile.in.orig 2014-10-01 13:48:32.240448887 +0000 -+++ Makefile.in 2014-10-01 13:49:42.263443819 +0000 +--- Makefile.in.orig 2014-10-01 13:48:32 UTC ++++ Makefile.in @@ -347,7 +347,7 @@ .d.h: diff --git a/lang/ruby21/files/patch-configure.in b/lang/ruby21/files/patch-configure.in index fffa001b8b7e..5ecb8174e599 100644 --- a/lang/ruby21/files/patch-configure.in +++ b/lang/ruby21/files/patch-configure.in @@ -1,5 +1,5 @@ ---- configure.in.orig 2014-10-01 13:46:05.488459511 +0000 -+++ configure.in 2014-10-01 13:45:56.345459984 +0000 +--- configure.in.orig 2014-10-01 13:46:05 UTC ++++ configure.in @@ -570,7 +570,7 @@ [AC_CACHE_CHECK(whether dtrace USDT is available, rb_cv_dtrace_available, [ diff --git a/lang/ruby21/files/patch-lib-rdoc-single_class.rb b/lang/ruby21/files/patch-lib-rdoc-single_class.rb index a1e9a7706dad..ef7152d0a277 100644 --- a/lang/ruby21/files/patch-lib-rdoc-single_class.rb +++ b/lang/ruby21/files/patch-lib-rdoc-single_class.rb @@ -1,4 +1,4 @@ ---- lib/rdoc/single_class.rb +--- lib/rdoc/single_class.rb 2014-11-26 19:29:03 UTC +++ lib/rdoc/single_class.rb @@ -10,6 +10,10 @@ def ancestors superclass ? super + [superclass] : super diff --git a/lang/ruby21/files/patch-lib_mkmf.rb b/lang/ruby21/files/patch-lib_mkmf.rb index dd2bb418ed6c..d31d982cacb5 100644 --- a/lang/ruby21/files/patch-lib_mkmf.rb +++ b/lang/ruby21/files/patch-lib_mkmf.rb @@ -1,5 +1,5 @@ ---- lib/mkmf.rb.orig 2013-06-26 07:03:38.000000000 -0700 -+++ lib/mkmf.rb 2013-07-03 17:43:05.000000000 -0700 +--- lib/mkmf.rb.orig 2013-06-26 14:03:38 UTC ++++ lib/mkmf.rb @@ -226,7 +226,7 @@ end $extmk ||= false diff --git a/lang/ruby21/files/patch-tool_mkconfig.rb b/lang/ruby21/files/patch-tool_mkconfig.rb index d9163e72ae3d..17b8111aaec3 100644 --- a/lang/ruby21/files/patch-tool_mkconfig.rb +++ b/lang/ruby21/files/patch-tool_mkconfig.rb @@ -1,5 +1,5 @@ ---- tool/mkconfig.rb.orig 2013-05-27 03:20:03.501815638 +0000 -+++ tool/mkconfig.rb 2013-05-27 03:20:31.093814303 +0000 +--- tool/mkconfig.rb.orig 2013-05-27 03:20:04 UTC ++++ tool/mkconfig.rb @@ -173,7 +173,8 @@ end vars["prefix"] = "" diff --git a/lang/ruby21/files/patch-tool_rbinstall.rb b/lang/ruby21/files/patch-tool_rbinstall.rb index edb42aec697b..43632b2d75f0 100644 --- a/lang/ruby21/files/patch-tool_rbinstall.rb +++ b/lang/ruby21/files/patch-tool_rbinstall.rb @@ -1,5 +1,5 @@ ---- tool/rbinstall.rb.orig 2013-11-09 16:37:46.000000000 +0000 -+++ tool/rbinstall.rb 2014-02-15 19:19:08.049165962 +0000 +--- tool/rbinstall.rb.orig 2013-11-09 16:37:46 UTC ++++ tool/rbinstall.rb @@ -318,6 +318,7 @@ libdir = CONFIG[CONFIG.fetch("libdirname", "libdir"), true] rubyhdrdir = CONFIG["rubyhdrdir", true] |