From nobody Mon May 15 05:33:24 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QKShP1FTDz4B9jM; Mon, 15 May 2023 05:33:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QKShP0rh1z3Gdq; Mon, 15 May 2023 05:33:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684128805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hm7FYzUz7qIFpmoXdZ5KzLegN4Jyy2htnClwlTPzdLY=; b=MoNXo/tU5cDrDG/EbV/iZNgg5Au5h56VIdDpOE2U43i1+b99bg6PeI9mUpepRT2ROBDSHg 1bto6CDuCzEu8ypHupWl20ua9vJrxD8LxcIh2UDgCbEueEwgHF0Uxjg+DZS22DYrLeyaYO /OSb+8OkFDttUbe/0s9hQB7i7X8v+0nJYpUOW8f8vphsR6GqzpWGtRmlhoSSANzQDFuh4s CCfaTiC3Or5U7jAQz4R5T+eGUsTxIH1G4qRE3JhSRyLgi4riqtR92THop+TRCniVqiB9Sk yoS9GZFbkW+YCapXaaU2Z7VbcfdXHaOCwqOgrcvXYKSGa5uu2fYg2njIxO21Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684128805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hm7FYzUz7qIFpmoXdZ5KzLegN4Jyy2htnClwlTPzdLY=; b=RAlevx2i1MpUCFRhoLykMyNkGQT9O6WsKkIQE0vgx0FoJnClvuCIiuLI/HXc0NTAd0Gn34 2W+sHkPzfmJfCqI8RcUd/9E8o1BCO9VEf6syXQQSkYW/MNJKN9Vc4+BH+dgq0F3cOk7Ie5 SJqAQ/pWhxYQ/56MvD3lxNOfCH/2u6fiPvjcJTIlBqeixR0JDXvRMzkO9Z54Jebd8zTsWP 6dU03ycG6nS3Ri2cJreVbR3/Os6OhYucXtvwvy7FJQ5xX+in+gz9OQ7jTcYHr0N53P+xSm klMw/aJ1b3IxHyGQM7SvLF+VoYyBx/TQ3s1g0rOomHZ324s2zOT3AukXmcmCYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684128805; a=rsa-sha256; cv=none; b=Xz1THce6BBXTmf1YO20tgwltZj89u29+KrW3cfNnmS3Omglst/K2CIwY937S6g3CuZKW2n tSih6bjXdEcfy41F9nKEjBgGKFvB5pxslVoKPejp1NZY8DKMi64qojM5Wqx2cLzC7gwilc VsILVuTH6OMWf9v1I42h0ybOR+QOz1MQa5ifxhMI1fzmVjP58DtvZHym52CSRQtIvusdjR al1zVJm5yyr2zZbkB12XxJds438QY6rsDWJIV74EZ9ydxx2uAb5ikufyfGBv+pepcN/ehq 7TSKg2baEYdoTw2eN5hbfRE4SnE62S6zdVMITEH31qA+QDA9nOCEOGg+BYYDEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QKShN70yGzTDk; Mon, 15 May 2023 05:33:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34F5XOFT069872; Mon, 15 May 2023 05:33:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34F5XOMC069871; Mon, 15 May 2023 05:33:24 GMT (envelope-from git) Date: Mon, 15 May 2023 05:33:24 GMT Message-Id: <202305150533.34F5XOMC069871@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yasuhiro Kimura Subject: git: a1e6f9f31860 - main - lang/ruby33: Add new port List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yasu X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a1e6f9f318602d2566fa4194532c0f8b35c1d1f4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yasu: URL: https://cgit.FreeBSD.org/ports/commit/?id=a1e6f9f318602d2566fa4194532c0f8b35c1d1f4 commit a1e6f9f318602d2566fa4194532c0f8b35c1d1f4 Author: Yasuhiro Kimura AuthorDate: 2023-05-12 12:19:23 +0000 Commit: Yasuhiro Kimura CommitDate: 2023-05-15 05:32:23 +0000 lang/ruby33: Add new port Add preview1 of Ruby 3.3 series. ReleaseNotes: https://www.ruby-lang.org/en/news/2023/05/12/ruby-3-3-0-preview1-released/ PR: 271387 Approved by: meta (ruby@) --- Mk/Uses/ruby.mk | 10 +- Mk/bsd.default-versions.mk | 2 +- lang/Makefile | 1 + lang/ruby33/Makefile | 211 + lang/ruby33/distinfo | 3 + lang/ruby33/files/patch-configure.ac | 36 + lang/ruby33/files/patch-lib_mkmf.rb | 11 + .../files/patch-lib_rdoc_generator_json__index.rb | 20 + lang/ruby33/files/patch-tool_mkconfig.rb | 14 + lang/ruby33/files/patch-tool_rbinstall.rb | 172 + lang/ruby33/pkg-descr | 17 + lang/ruby33/pkg-message | 37 + lang/ruby33/pkg-plist | 13787 +++++++++++++++++++ 13 files changed, 14319 insertions(+), 2 deletions(-) diff --git a/Mk/Uses/ruby.mk b/Mk/Uses/ruby.mk index af0b672c3043..69b44d398069 100644 --- a/Mk/Uses/ruby.mk +++ b/Mk/Uses/ruby.mk @@ -164,13 +164,20 @@ RUBY_PORTREVISION= 1 RUBY_DISTVERSION= 3.2.2 RUBY_PORTREVISION= 1 +. elif ${RUBY_VER} == 3.3 +# +# Ruby 3.2 +# +RUBY_DISTVERSION= 3.3.0-preview1 +RUBY_PORTREVISION= 0 + # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. . else # # Other versions # -IGNORE= Only ruby 3.0, 3.1 and 3.2 are supported +IGNORE= Only ruby 3.0, 3.1, 3,2 and 3.3 are supported _INVALID_RUBY_VER= 1 . endif RUBY_PORTEPOCH= 1 @@ -182,6 +189,7 @@ RUBY_VERSION= ${RUBY_DISTVERSION:C/^([0-9]+\.[0-9]+\.[0-9]+).*/\1/} RUBY30?= "@comment " RUBY31?= "@comment " RUBY32?= "@comment " +RUBY33?= "@comment " . if defined(BROKEN_RUBY${RUBY_VER:R}${RUBY_VER:E}) . if ${BROKEN_RUBY${RUBY_VER:R}${RUBY_VER:E}} == "yes" diff --git a/Mk/bsd.default-versions.mk b/Mk/bsd.default-versions.mk index 36f1db62e49b..10d6be970fbf 100644 --- a/Mk/bsd.default-versions.mk +++ b/Mk/bsd.default-versions.mk @@ -126,7 +126,7 @@ PYTHON_DEFAULT?= 3.9 PYTHON2_DEFAULT?= 2.7 # Possible values: 3.7, 3.8, 3.9, 3.10, 3.11 PYTHON3_DEFAULT?= 3.9 -# Possible values: 3.0, 3.1, 3.2 +# Possible values: 3.0, 3.1, 3.2, 3.3 RUBY_DEFAULT?= 3.1 # Possible values: rust, rust-nightly RUST_DEFAULT?= rust diff --git a/lang/Makefile b/lang/Makefile index ab8700913696..4e10f6c1869e 100644 --- a/lang/Makefile +++ b/lang/Makefile @@ -312,6 +312,7 @@ SUBDIR += ruby30 SUBDIR += ruby31 SUBDIR += ruby32 + SUBDIR += ruby33 SUBDIR += rubygem-ruby_language_server SUBDIR += runawk SUBDIR += rust diff --git a/lang/ruby33/Makefile b/lang/ruby33/Makefile new file mode 100644 index 000000000000..d63f4e413e08 --- /dev/null +++ b/lang/ruby33/Makefile @@ -0,0 +1,211 @@ +PORTNAME= ruby +DISTVERSION= ${RUBY_DISTVERSION} +PORTREVISION= ${RUBY_PORTREVISION} +PORTEPOCH= ${RUBY_PORTEPOCH} +CATEGORIES= lang ruby +MASTER_SITES= RUBY/${MASTER_SITE_SUBDIR_RUBY} +DIST_SUBDIR= ruby + +MAINTAINER= ruby@FreeBSD.org +COMMENT= Object-oriented interpreted scripting language +WWW= https://www.ruby-lang.org/en/ + +LICENSE= BSD2CLAUSE RUBY +LICENSE_COMB= dual +LICENSE_FILE_BSD2CLAUSE= ${WRKSRC}/BSDL +LICENSE_FILE_RUBY= ${WRKSRC}/COPYING + +# Using LIB_DEPENDS finds the libffi from gcc which causes problems +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 +CPE_VENDOR= ruby-lang +CPE_VERSION= ${RUBY_RELVERSION} +CPE_UPDATE= p${RUBY_PATCHLEVEL} +USE_LDCONFIG= yes + +GNU_CONFIGURE= yes +CONFIGURE_ARGS= ${RUBY_CONFIGURE_ARGS} \ + --disable-rpath \ + --enable-install-static-library \ + --enable-pthread \ + --enable-shared \ + --with-ruby-version="${RUBY_VER}" \ + --with-sitedir="${PREFIX}/lib/ruby/site_ruby" \ + --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 +WRKSRC= ${RUBY_WRKSRC} + +RUBY_VER= 3.3 + +OPTIONS_DEFINE= CAPIDOCS DEBUG DOCS EXAMPLES GMP RDOC YJIT +OPTIONS_DEFAULT= RDOC +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 +YJIT_DESC= Enable YJIT (Yet Another Ruby JIT) + +CAPIDOCS_BUILD_DEPENDS= dot:graphics/graphviz \ + doxygen>=1.8.13,2:devel/doxygen +CAPIDOCS_CONFIGURE_ENABLE= install-capi +GMP_LIB_DEPENDS= libgmp.so:math/gmp +GMP_CONFIGURE_WITH= gmp +RDOC_CONFIGURE_ENABLE= install-rdoc +YJIT_BUILD_DEPENDS= ${RUST_DEFAULT}>=1.58.0:lang/${RUST_DEFAULT} +YJIT_CONFIGURE_ENABLE= yjit + +.include + +# PORTREVISION/PORTEPOCH hack + +.if ${PORTREVISION} != 0 +_SUF1= _${PORTREVISION} +.endif + +.if ${PORTEPOCH} != 0 +_SUF2= ,${PORTEPOCH} +.endif + +#.if ${OPSYS} == "FreeBSD" +#.if exists(/usr/sbin/dtrace) && (${ARCH} == amd64 || ${ARCH} == i386 || ${ARCH} == powerpc64le || ${ARCH} == powerpc64 || ${ARCH} == powerpc) +#CONFIGURE_ARGS+=--enable-dtrace +#.else +#CONFIGURE_ARGS+=--disable-dtrace +#.endif +#.endif + +# keep in sync with all platforms where libunwind is available +.if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH} == armv7 || ${ARCH} == \ + i386 || ${ARCH} == powerpc || ${ARCH} == powerpc64 || ${ARCH} == powerpc64le +LIB_DEPENDS+= libunwind.so:devel/libunwind +.endif + +.if defined(PPC_ABI) && ${PPC_ABI} == ELFv1 +USE_GCC= yes +.endif + +.if ${ARCH} == armv6 || ${ARCH} == armv7 || ${ARCH} == powerpc +CONFIGURE_ARGS+= --with-setjmp-type=_setjmp +CONFIGURE_ENV+= ac_cv_func__setjmp=yes +.endif + +.if ${RUBY_VER} == ${RUBY_DEFAULT_VER} +PLIST_SUB+= IF_DEFAULT="" +.else +PKGNAMESUFFIX= ${RUBY_SUFFIX} +PLIST_SUB+= IF_DEFAULT="@comment " +.endif + +INSTALLED_SCRIPTS= ruby +INSTALLED_MANUALS= ruby + +EXTSAMPLES= bigdecimal/sample/*.rb + +EXTDOCS= ripper/README stringio/README.md syslog/syslog.txt + +# Macros to change variables in rbconfig.rb +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 +# privileges +# + @${RB_SET_CONF_VAR} "prefix" "ENV['PREFIX'] || \3" + @${RB_SET_CONF_VAR} "INSTALL" "'/usr/bin/install -c'" + @${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}'" + +post-build-CAPIDOCS-on: + @${FIND} ${WRKSRC}/doc -type d -empty -delete + +pre-install: + ${MKDIR} ${STAGEDIR}${RUBY_SITEARCHLIBDIR} + ${MKDIR} ${STAGEDIR}${RUBY_VENDORARCHLIBDIR} + +pre-install-DOCS-on: + ${MKDIR} ${STAGEDIR}${RUBY_DOCDIR} + +pre-install-EXAMPLES-on: + ${MKDIR} ${STAGEDIR}${RUBY_EXAMPLESDIR} + +pre-install-RDOC-on: + ${MKDIR} ${STAGEDIR}${RUBY_RIDIR} + ${MKDIR} ${STAGEDIR}${RUBY_SITERIDIR} + +post-install: +.if ${RUBY_VER} == ${RUBY_DEFAULT_VER} +# +# Link just installed "ruby" to "ruby31", etc. +# +. for FILE in ${INSTALLED_SCRIPTS} + ${LN} -fs ${FILE}${RUBY_SUFFIX} ${STAGEDIR}${PREFIX}/bin/${FILE} +. endfor +# +# Link "ruby.1.gz" to "ruby31.1.gz", etc. +# +. for FILE in ${INSTALLED_MANUALS} + ${LN} -fs ${FILE}${RUBY_SUFFIX}.1.gz ${STAGEDIR}${MANPREFIX}/man/man1/${FILE}.1.gz +. endfor +.endif + +post-install-CAPIDOCS-on: + ${RM} ${WRKSRC}/doc/capi/.timestamp ${STAGEDIR}${PREFIX}/share/doc/ruby${RUBY_SUFFIX}/capi/.timestamp + cd ${STAGEDIR}${PREFIX} && ${FIND} share/doc/ruby${RUBY_SUFFIX}/capi/ -type f >> ${TMPPLIST} + +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${RUBY_SUFFIX} + ${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 available in STABLE yet :-() + ${MKDIR} ${EXTDOCS:C|^([^/]+)/.*|\1|:S|^|${STAGEDIR}${RUBY_DOCDIR}/|} +.for FILE in ${EXTDOCS} + ${INSTALL_DATA} ${WRKSRC}/ext/${FILE} \ + ${STAGEDIR}${RUBY_DOCDIR}/${FILE:C|^([^/]+)/.*|\1|}/ +.endfor + @(cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${RUBY_DOCDIR}/) + ${INSTALL_DATA} ${WRKSRC}/COPYING* \ + ${WRKSRC}/ChangeLog \ + ${WRKSRC}/LEGAL \ + ${WRKSRC}/README* \ + ${STAGEDIR}${RUBY_DOCDIR}/ + +post-install-EXAMPLES-on: +# Create all dirs required (":u" isn't available 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}/) + +do-test: + cd ${WRKSRC} && ${MAKE_CMD} test + +.include diff --git a/lang/ruby33/distinfo b/lang/ruby33/distinfo new file mode 100644 index 000000000000..d59222a4ec84 --- /dev/null +++ b/lang/ruby33/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1683894232 +SHA256 (ruby/ruby-3.3.0-preview1.tar.xz) = ae300b49e06c13087dd163b97eddd38db895dc8e0c9904284119795d75303fbb +SIZE (ruby/ruby-3.3.0-preview1.tar.xz) = 15074600 diff --git a/lang/ruby33/files/patch-configure.ac b/lang/ruby33/files/patch-configure.ac new file mode 100644 index 000000000000..e4be99dafceb --- /dev/null +++ b/lang/ruby33/files/patch-configure.ac @@ -0,0 +1,36 @@ +--- configure.ac.orig 2023-05-12 09:25:10 UTC ++++ configure.ac +@@ -1342,7 +1342,7 @@ AC_CHECK_HEADERS(syscall.h) + AC_CHECK_HEADERS(time.h) + AC_CHECK_HEADERS(ucontext.h) + AC_CHECK_HEADERS(utime.h) +-AS_CASE("$target_cpu", [x64|x86_64|i[3-6]86*], [ ++AS_CASE("$target_cpu", [amd64|x64|x86_64|i[3-6]86*], [ + AC_CHECK_HEADERS(x86intrin.h) + ]) + RUBY_UNIVERSAL_CHECK_HEADER([x86_64, i386], x86intrin.h) +@@ -3056,7 +3056,7 @@ AC_SUBST(EXTOBJS) + : ${LDSHARED='$(CC) -shared'} + AS_IF([test "$rb_cv_binary_elf" = yes], [ + LDFLAGS="$LDFLAGS -rdynamic" +- DLDFLAGS="$DLDFLAGS "'-Wl,-soname,$@' ++ DLDFLAGS="$DLDFLAGS "'-Wl,-E' + ], [ + test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED='$(LD) -Bshareable' + ]) +@@ -3515,6 +3515,7 @@ AS_CASE("$enable_shared", [yes], [ + [freebsd*|dragonfly*], [ + LIBRUBY_SO='lib$(RUBY_SO_NAME).$(SOEXT).$(MAJOR)$(MINOR)' + LIBRUBY_SONAME='$(LIBRUBY_SO)' ++ RUBY_APPEND_OPTIONS(LIBRUBY_DLDFLAGS, ['-Wl,-soname,${LIBRUBY_SO}']) + AS_IF([test "$rb_cv_binary_elf" != "yes" ], [ + LIBRUBY_SO="$LIBRUBY_SO.\$(TEENY)" + LIBRUBY_ALIASES='' +@@ -4325,6 +4326,7 @@ AS_IF([test "${universal_binary-no}" = yes ], [ + arch="${target_cpu}-mingw-ucrt" + ], [ + arch="${target_cpu}-${target_os}" ++ AS_CASE(["$target_cpu-$target_os"], [x86_64-freebsd*],[arch=amd64-${target_os}]) + ]) + AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "$arch") + ]) diff --git a/lang/ruby33/files/patch-lib_mkmf.rb b/lang/ruby33/files/patch-lib_mkmf.rb new file mode 100644 index 000000000000..bc9be47fbaad --- /dev/null +++ b/lang/ruby33/files/patch-lib_mkmf.rb @@ -0,0 +1,11 @@ +--- lib/mkmf.rb.orig 2023-05-12 09:25:10 UTC ++++ lib/mkmf.rb +@@ -222,7 +222,7 @@ module MakeMakefile + end + $extmk ||= false + if not $extmk and File.exist?(($hdrdir = RbConfig::CONFIG["rubyhdrdir"]) + "/ruby/ruby.h") +- $topdir = $hdrdir ++ $topdir = $hdrdir + "/" + "#{CONFIG['arch']}/ruby/" + $top_srcdir = $hdrdir + $arch_hdrdir = RbConfig::CONFIG["rubyarchhdrdir"] + elsif File.exist?(($hdrdir = ($top_srcdir ||= topdir) + "/include") + "/ruby.h") diff --git a/lang/ruby33/files/patch-lib_rdoc_generator_json__index.rb b/lang/ruby33/files/patch-lib_rdoc_generator_json__index.rb new file mode 100644 index 000000000000..7f6277092c56 --- /dev/null +++ b/lang/ruby33/files/patch-lib_rdoc_generator_json__index.rb @@ -0,0 +1,20 @@ +--- lib/rdoc/generator/json_index.rb.orig 2023-05-12 09:25:10 UTC ++++ lib/rdoc/generator/json_index.rb +@@ -178,7 +178,7 @@ class RDoc::Generator::JsonIndex + debug_msg "Writing gzipped search index to %s" % outfile + + Zlib::GzipWriter.open(outfile) do |gz| +- gz.mtime = File.mtime(search_index_file) ++ gz.mtime = 1 + gz.orig_name = search_index_file.basename.to_s + gz.write search_index + gz.close +@@ -196,7 +196,7 @@ class RDoc::Generator::JsonIndex + debug_msg "Writing gzipped file to %s" % outfile + + Zlib::GzipWriter.open(outfile) do |gz| +- gz.mtime = File.mtime(dest) ++ gz.mtime = 1 + gz.orig_name = dest.basename.to_s + gz.write data + gz.close diff --git a/lang/ruby33/files/patch-tool_mkconfig.rb b/lang/ruby33/files/patch-tool_mkconfig.rb new file mode 100644 index 000000000000..0ae0d3482f7d --- /dev/null +++ b/lang/ruby33/files/patch-tool_mkconfig.rb @@ -0,0 +1,14 @@ +--- tool/mkconfig.rb.orig 2023-05-12 09:25:10 UTC ++++ tool/mkconfig.rb +@@ -169,8 +169,9 @@ def vars.expand(val, config = self) + val.replace(newval) unless newval == val + val + end +-prefix = vars.expand(vars["prefix"] ||= "") +-rubyarchdir = vars.expand(vars["rubyarchdir"] ||= "") ++prefix = vars.expand(vars["rubyarchdir"]) ++major, minor, *rest = RUBY_VERSION.split('.') ++rubyarchdir = "/lib/ruby/#{major}.#{minor}/#{arch}" + relative_archdir = rubyarchdir.rindex(prefix, 0) ? rubyarchdir[prefix.size..-1] : rubyarchdir + + puts %[\ diff --git a/lang/ruby33/files/patch-tool_rbinstall.rb b/lang/ruby33/files/patch-tool_rbinstall.rb new file mode 100644 index 000000000000..2afb8e198290 --- /dev/null +++ b/lang/ruby33/files/patch-tool_rbinstall.rb @@ -0,0 +1,172 @@ +--- tool/rbinstall.rb.orig 2023-05-12 09:25:10 UTC ++++ tool/rbinstall.rb +@@ -909,169 +909,6 @@ end + + # :startdoc: + +-install?(:ext, :comm, :gem, :'default-gems', :'default-gems-comm') do +- install_default_gem('lib', srcdir, bindir) +-end +-install?(:ext, :arch, :gem, :'default-gems', :'default-gems-arch') do +- install_default_gem('ext', srcdir, bindir) +-end +- +-def load_gemspec(file, base = nil) +- file = File.realpath(file) +- code = File.read(file, encoding: "utf-8:-") +- code.gsub!(/(?:`git[^\`]*`|%x\[git[^\]]*\])\.split\([^\)]*\)/m) do +- files = [] +- if base +- Dir.glob("**/*", File::FNM_DOTMATCH, base: base) do |n| +- case File.basename(n); when ".", ".."; next; end +- next if File.directory?(File.join(base, n)) +- files << n.dump +- end +- end +- "[" + files.join(", ") + "]" +- end +- spec = eval(code, binding, file) +- unless Gem::Specification === spec +- raise TypeError, "[#{file}] isn't a Gem::Specification (#{spec.class} instead)." +- end +- spec.loaded_from = base ? File.join(base, File.basename(file)) : file +- spec.files.reject! {|n| n.end_with?(".gemspec") or n.start_with?(".git")} +- spec.date = RUBY_RELEASE_DATE +- +- spec +-end +- +-def install_default_gem(dir, srcdir, bindir) +- gem_dir = Gem.default_dir +- install_dir = with_destdir(gem_dir) +- prepare "default gems from #{dir}", gem_dir +- RbInstall.no_write do +- makedirs(Gem.ensure_default_gem_subdirectories(install_dir, $dir_mode).map {|d| File.join(gem_dir, d)}) +- end +- +- options = { +- :install_dir => with_destdir(gem_dir), +- :bin_dir => with_destdir(bindir), +- :ignore_dependencies => true, +- :dir_mode => $dir_mode, +- :data_mode => $data_mode, +- :prog_mode => $script_mode, +- :wrappers => true, +- :format_executable => true, +- :install_as_default => true, +- } +- default_spec_dir = Gem.default_specifications_dir +- +- base = "#{srcdir}/#{dir}" +- gems = Dir.glob("**/*.gemspec", base: base).map {|src| +- spec = load_gemspec("#{base}/#{src}") +- file_collector = RbInstall::Specs::FileCollector.for(srcdir, dir, src) +- files = file_collector.collect +- if file_collector.skip_install?(files) +- next +- end +- spec.files = files +- spec +- } +- gems.compact.sort_by(&:name).each do |gemspec| +- old_gemspecs = Dir[File.join(with_destdir(default_spec_dir), "#{gemspec.name}-*.gemspec")] +- if old_gemspecs.size > 0 +- old_gemspecs.each {|spec| rm spec } +- end +- +- full_name = "#{gemspec.name}-#{gemspec.version}" +- +- gemspec.loaded_from = File.join srcdir, gemspec.spec_name +- +- package = RbInstall::DirPackage.new gemspec, {gemspec.bindir => 'libexec'} +- ins = RbInstall::UnpackedInstaller.new(package, options) +- puts "#{INDENT}#{gemspec.name} #{gemspec.version}" +- ins.install +- end +-end +- +-install?(:ext, :comm, :gem, :'bundled-gems') do +- gem_dir = Gem.default_dir +- install_dir = with_destdir(gem_dir) +- prepare "bundled gems", gem_dir +- RbInstall.no_write do +- makedirs(Gem.ensure_gem_subdirectories(install_dir, $dir_mode).map {|d| File.join(gem_dir, d)}) +- end +- +- installed_gems = {} +- skipped = {} +- options = { +- :install_dir => install_dir, +- :bin_dir => with_destdir(bindir), +- :domain => :local, +- :ignore_dependencies => true, +- :dir_mode => $dir_mode, +- :data_mode => $data_mode, +- :prog_mode => $script_mode, +- :wrappers => true, +- :format_executable => true, +- } +- +- extensions_dir = Gem::StubSpecification.gemspec_stub("", gem_dir, gem_dir).extensions_dir +- specifications_dir = File.join(gem_dir, "specifications") +- build_dir = Gem::StubSpecification.gemspec_stub("", ".bundle", ".bundle").extensions_dir +- +- # We are about to build extensions, and want to configure extensions with the +- # newly installed ruby. +- Gem.instance_variable_set(:@ruby, with_destdir(File.join(bindir, ruby_install_name))) +- # Prevent fake.rb propagation. It conflicts with the natural mkmf configs of +- # the newly installed ruby. +- ENV.delete('RUBYOPT') +- +- File.foreach("#{srcdir}/gems/bundled_gems") do |name| +- next if /^\s*(?:#|$)/ =~ name +- next unless /^(\S+)\s+(\S+).*/ =~ name +- gem_name = "#$1-#$2" +- # Try to find the gemspec file for C ext gems +- # ex .bundle/gems/debug-1.7.1/debug-1.7.1.gemspec +- # This gemspec keep the original dependencies +- path = "#{srcdir}/.bundle/gems/#{gem_name}/#{gem_name}.gemspec" +- unless File.exist?(path) +- path = "#{srcdir}/.bundle/specifications/#{gem_name}.gemspec" +- unless File.exist?(path) +- skipped[gem_name] = "gemspec not found" +- next +- end +- end +- spec = load_gemspec(path, "#{srcdir}/.bundle/gems/#{gem_name}") +- unless spec.platform == Gem::Platform::RUBY +- skipped[gem_name] = "not ruby platform (#{spec.platform})" +- next +- end +- unless spec.full_name == gem_name +- skipped[gem_name] = "full name unmatch #{spec.full_name}" +- next +- end +- spec.extension_dir = "#{extensions_dir}/#{spec.full_name}" +- package = RbInstall::DirPackage.new spec +- ins = RbInstall::UnpackedInstaller.new(package, options) +- puts "#{INDENT}#{spec.name} #{spec.version}" +- ins.install +- install_recursive("#{build_dir}/#{gem_name}", "#{extensions_dir}/#{gem_name}") do |src, dest| +- # puts "#{INDENT} #{dest[extensions_dir.size+gem_name.size+2..-1]}" +- install src, dest, :mode => (File.executable?(src) ? $prog_mode : $data_mode) +- end +- installed_gems[spec.full_name] = true +- end +- installed_gems, gems = Dir.glob(srcdir+'/gems/*.gem').partition {|gem| installed_gems.key?(File.basename(gem, '.gem'))} +- unless installed_gems.empty? +- prepare "bundled gem cache", gem_dir+"/cache" +- install installed_gems, gem_dir+"/cache" +- end +- unless gems.empty? +- skipped.default = "not found in bundled_gems" +- puts "skipped bundled gems:" +- gems.each do |gem| +- printf " %-32s%s\n", File.basename(gem), skipped[gem] +- end +- end +-end +- + parse_args() + + include FileUtils diff --git a/lang/ruby33/pkg-descr b/lang/ruby33/pkg-descr new file mode 100644 index 000000000000..a537df18eb88 --- /dev/null +++ b/lang/ruby33/pkg-descr @@ -0,0 +1,17 @@ +Ruby is the interpreted scripting language for quick and +easy object-oriented programming. It has many features to +process text files and to do system management tasks (as in +Perl). It is simple, straight-forward, and extensible. + +Features of Ruby are shown below. + + + Simple Syntax + + *Normal* Object-Oriented features(ex. class, method calls) + + *Advanced* Object-Oriented features(ex. Mix-in, Singleton-method) + + Operator Overloading + + Exception Handling + + Iterators and Closures + + Garbage Collection + + Dynamic Loading of Object files(on some architecture) + + Highly Portable(works on many UNIX machines, and on DOS, + Windows, Mac, BeOS etc.) diff --git a/lang/ruby33/pkg-message b/lang/ruby33/pkg-message new file mode 100644 index 000000000000..d1c7209d19ff --- /dev/null +++ b/lang/ruby33/pkg-message @@ -0,0 +1,37 @@ +[ +{ type: install + message: <