Commit Graph

33 Commits

Author SHA1 Message Date
Fred Wright 32ba7b9f91 ruby26: Fix build on macOS 12+, plus cleanups.
Note that building for macOS 12.x previously worked before upgrading
to Xcode 14.  Building for macOS 13.x never worked.

Cherry-picks upstream change to fix Xcode 14+ build for macOS 12+.
This changes content even on working builds, hence the revbump.

Fixes issue with building bigdecimal with Xcode 14+ for macOS 12+, by
disabling chained fixups and allowing the needed linker option.  See
the commit in the fork for more details.

Replaces ugly Portfile hacks for 10.5 x86_64 with proper fixes
developed for ruby27.

Replaces topical patchfiles with consolidated patchfiles derived
from the GitHub fork at fhgwright/ruby.

Fixes a couple of typos in a Portfile comment.

Also adds self as co-maintainer.

TESTED:
Built on OSX 10.4-10.5 ppc, 10.4-10.6 i386, 10.5-10.15 x86_64, and
11.x-13.x arm64, including universal builds for all but 10.4, where
dependency issues prevent building.  Also tested all variants in a
subset of cases.
2023-05-06 19:01:51 -04:00
kimura wataru 38bf2bbb6c lang/ruby26: update to 2.6.10, includes security fix
see http://www.ruby-lang.org/en/news/2022/04/12/ruby-2-6-10-released/
ruby-2.6 was EOLed at this release(2.6.10).
2022-04-17 14:45:59 +09:00
Evan Miller d210cc8bb5 ruby*: enable tests 2022-04-13 06:56:02 -04:00
Ryan Schmidt 92d2eaae43 multiple ports: Fix typo (suport -> support) 2021-12-28 13:20:37 -06:00
kimura wataru 3f4caec5e4 sysutils/ruby_select, lang/ruby*: update select files, ruby-3.1 introduced bin/rdbg 2021-12-27 08:27:48 +09:00
kimura wataru 67f8f332a1 lang/ruby26: update to 2.6.9, includes security fixes
see https://www.ruby-lang.org/en/news/2021/11/24/ruby-2-6-9-released/
2021-11-25 23:56:01 +09:00
Christopher Nielsen 51e0639923 lang/ruby30, ruby27, ruby26: enable parallel build (#12891)
delete "use_parallel_build no" in Portfile, these versions of ruby allow paralell build.

See: https://trac.macports.org/ticket/63895
2021-11-12 08:00:22 +09:00
kimura wataru 75cd6c1d0a lang/ruby30 .. ruby24: fix build error at ext/openssl
see https://trac.macports.org/ticket/63845

pkg-config in ext/openssl/extconf.rb ignores PKG_CONFIG_PATH.
it leads conflict between openssl-1.1 (from configure args --with-openssl-...)
and openssl-3 (from $prefix/lib/pkgconfig/openssl.pc).

ext/openssl allows compiling without pkgconfig, then commented out pkg_config()
in ext/openssl/extconf.rb.

note: ruby23 or earlier might need same fix.
2021-11-09 00:24:50 +09:00
kimura wataru 36878b9a51 lang/ruby24 .. ruby30: use openssl11 clearly
default version of openssl will become 3.
but current version of ruby/openssl does not support openssl-3.

see https://github.com/macports/macports-ports/pull/12807

I tested these changes like this:

```
% port deps ruby24 | grep ssl
Library Dependencies: readline, zlib, libyaml, libffi, gdbm, openssl11
% sudo port -nsf -k upgrade ruby24
% DYLD_PRINT_LIBRARIES=YES ruby2.4 -e 'require "openssl"' |& grep ssl
dyld: loaded: <22F19195-2D1D-3D46-8530-2B309350B3DD> /opt/local/lib/ruby2.4/2.4.0/x86_64-darwin20/openssl.bundle
dyld: loaded: <D2533122-B166-35AD-9FA0-E43A5611963B> /opt/local/libexec/openssl11/lib/libssl.1.1.dylib
dyld: loaded: <F2F6853D-15E9-3382-96B0-BC38A6E2BA30> /opt/local/libexec/openssl11/lib/libcrypto.1.1.dylib
% cd `port work ruby24`/ruby*
% sudo chown -R ${USER} .
% make TESTS=openssl test-all
    :
Finished tests in 3.903854s, 97.3397 tests/s, 1067.6629 assertions/s.
380 tests, 4168 assertions, 0 failures, 0 errors, 2 skips
% popd
% sudo port clean ruby24
```

note: ruby23 or earlier uses openssl10.
2021-11-06 11:37:44 +09:00
kimura wataru cabc46e29d lang/ruby30, ruby27, .. ruby19, ruby: introduce notes about 'port select'
closes: https://trac.macports.org/ticket/63602

{{{
$ sudo port install ruby30
--->  Computing dependencies for ruby30
   :
--->  Some of the ports you installed have notes:
  ruby30 has the following notes:
    To make this the default Ruby (i.e., the version run by the 'ruby', 'gem' or 'bundle' commands),
    run:
        sudo port select --set ruby ruby30
$

$ port notes ruby30
--->  ruby30 has the following notes:
  To make this the default Ruby (i.e., the version run by the 'ruby', 'gem' or 'bundle' commands),
  run:
      sudo port select --set ruby ruby30
$
}}}
2021-10-13 21:37:50 +09:00
Fred Wright e95b071b7b ruby26: Fix build issues on 10.4, 10.5.
This includes a patch for some OS version issues common to earlier
Ruby versions:

The OS version conditional in dln.c is comparing an undefined macro to
a sometimes undefined (and essentially useless) macro.  However, the
relevant code doesn't seem to be built for any OS version, making the
bug irrelevant.  Nevertheless, it's now fixed, since another, similar
fix was needed, anyway, and it might become relevant if something else
changes.

The OS version conditionals in error.c were using another useless
macro for the comparison, this time with a real effect, though only in
a couple of messages related to crash reports on < 10.6.  This is now
fixed.

It also includes an updated patch for a 10.4 issue:

The context register naming issue on 10.4 was sort of fixed upstream
but tied to an inappropriate config flag.  The patched version uses an
SDK version macro to make the decision.

A newly discovered issue, common to some older Ruby versions, is:

The 10.5 x86_64 build fails if libunwind-headers is active.  Since
this is an unusual configuration, and the need for libunwind-headers
seems to be waning, it's not worth fixing "right".  This just adds the
usual failure for such cases.  It's unknown why this only affects 10.5
x86_64 (and perhaps 10.4 x86_64, though that's untested).

The remaining issues were new in ruby26:

The syntax-checking compiler invocations in transform_mjit_header.rb
require a C99 or later compiler, but don't include compiler flags from
the build.  There's code to detect the non-C99 case and add -std=c99
to the real uses, but it relies on matching the error message from the
test case.  Recent versions of gcc use locale-dependent quotes which
may break such comparisons, depending on the current locale settings.
The fix recommended by gcc documentation is to run it with LC_ALL=C to
get traditional ASCII quotes.  This adds code to apply that
environment to the compiler test invocation.

For some strange reason, using gcc-4.2 for Ruby's coroutine-related
assembler code on x86_64 passes "-arch i386" to the assembler, thereby
causing failures on x86_64 register references.  To fix that, cases
with gcc-4.2 and x86_64 targeted now pass the correct architecture in
ASFLAGS.

Also corrects a small typo in the description.

Also fixes some lint errors in the Portfile.

Since this affects the installed code for < 10.6, it includes a
revbump.

Universal builds still fail on 10.4 i386 due to a weird configure bug,
and 10.4 ppc has broken universal dependencies.

TESTED:
Built -universal on 10.4-10.5 ppc, 10.4-10.6 i386, and 10.6-10.15
x86_64.  Built +universal on 10.5-10.13.
2021-09-25 12:07:00 -07:00
Joshua Root 949b3480c3 Rev bump libffi dependents
Version 3.4 broke binary compatibility.
2021-09-01 06:34:10 +10:00
kimura wataru 76e075d4ed lang/ruby26: update to 2.6.8, includes security fixes
see https://www.ruby-lang.org/en/news/2021/07/07/ruby-2-6-8-released/
2021-07-10 13:10:02 +09:00
kimura wataru b962aaaeb8 lang/ruby26: fix "implicit declaration of function" at vm.c
fix missing declaration of `rb_native_mutex_destroy()`
https://bugs.ruby-lang.org/issues/17777
2021-04-11 20:42:54 +09:00
kimura wataru ff88854dc6 lang/ruby26: update to 2.6.7 includes security fixes
- https://www.ruby-lang.org/en/news/2021/04/05/ruby-2-6-7-released/
2021-04-10 14:29:16 +09:00
kimura wataru 1b360ced19 lang/ruby27 .. ruby19, ruby: update select file and revbump 2020-12-30 20:20:45 +09:00
kimura wataru b5cdf65240 lang/ruby26 .. ruby19: fix "invalid suffix on literal" with C++11
insert spaces between literal and identifier in config.h.

    // before
    #define RUBY_ARCH "universal-"RUBY_PLATFORM_OS
    #define RUBY_PLATFORM "universal."RUBY_PLATFORM_CPU"-"RUBY_PLATFORM_OS

    // after
    #define RUBY_ARCH "universal-" RUBY_PLATFORM_OS
    #define RUBY_PLATFORM "universal." RUBY_PLATFORM_CPU "-" RUBY_PLATFORM_OS

note: ruby-2.5 or earlier, `configure` does not accept "--with-arch=arm64"

Closes: https://trac.macports.org/ticket/58255
2020-12-30 20:20:45 +09:00
kimura wataru 20e9f727c7 lang/ruby30, ruby27, ruby26: fix target OS versions of sdkroot hack
target OS versions: darwin 20 (macOS 11) *or later*

rewrite sdkroot in rbconfig.rb and ruby-*.pc to MacOSX.sdk from MacOS11.x.sdk.
see https://trac.macports.org/ticket/61899
2020-12-30 20:20:45 +09:00
kimura wataru 06938beeea lang/ruby27, ruby26: fix build error of ruby extentions on macOS 11
macOS 11 and Xcode 12 changes SDK path for macOS minor versions.
this breaks building ruby binary extentions.

   /Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk
-> /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk (11.0 removed)
                                                    ^^^
To fix this problem, port:ruby2x rewrites SDKROOT to "MacOSX.sdk" (symlink)
from "MacOSX11.x.sdk" in rbconfig.rb and ruby-2.x.pc at `post-build`.

Closes: https://trac.macports.org/ticket/61827
Closes: https://trac.macports.org/ticket/61899
2020-12-26 15:46:32 +09:00
David B. Evans bd5d680082 ports that link with libffi: rebuild with libffi 3.3
* excludes known broken ports
* includes only ports that actually link with libffi 3.3
2020-09-05 20:00:58 -07:00
kimura wataru e058d10ee3 lang/ruby26: update to 2.6.6, contains security fixes
see https://www.ruby-lang.org/en/news/2020/03/31/ruby-2-6-6-released/
2020-04-01 08:39:36 +09:00
Ryan Schmidt a9e15268c0 ruby2*: Escape periods in livecheck.regex 2019-12-27 17:40:15 -06:00
kimura wataru 67cfc54194 lang/ruby26: update to 2.6.5, including security fixes
see https://www.ruby-lang.org/en/news/2019/10/01/ruby-2-6-5-released/
2019-10-07 01:03:13 +09:00
Chih-Hsuan Yen 157ebbff36 openssl: Rev-bump dependents
Generated with the following command:

rg -l -g Portfile ':openssl\b' ../macports-ports | grep -v '/lang/php/' | grep -v '/aqua/qt5' | xargs ./revbump-ports.sh

revbump-ports.sh is from https://github.com/yan12125/revbump-ports/tree/4a47ad53d5bc1553b86f48dfbf946bc9a466306c

Skipping lang/php and aqua/qt5 as only php*-{ftp,openssl} and
qt*-qtbase subports need revbumping, respectively.
2019-09-07 22:35:16 +08:00
kimura wataru ea4ce7899c lang/ruby26: update to 2.6.4 2019-09-02 23:03:06 +09:00