Files
macports-ports/lang/ruby31/files/patch-configure.diff
kimura wataru 477af2eda9 lang/ruby31: fix missing linker flag "-framework Security" for 10.7 .. 10.9
refs: https://trac.macports.org/ticket/65290

[note] other problem looks remain on 10.8 and 10.9.
       generating ext/-test-/RUBY_ALIGNOF/Makefile overwrites topdir's Makefile.

- fix detecting macOS version in configure and dln.c
    - AvailabirityMacros.h does not contains macros future versions.
      for example, "MAC_OS_X_VERSION_10_10" does not defined in 10.9's headerfile.
- fix dsymutil error at build phase when using macports-clang-* as configure.compiler.
  but this error might not affect build result.

```
$ sw_vers -productVersion
10.9.5
$ uname -r
13.4.0
$ cat conftest.c
/* end confdefs.h.  */

	#include <AvailabilityMacros.h>
int
main ()
{
static int test_array [1 - 2 * !(MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 &&
                 MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_10)];
test_array [0] = 0;
return test_array [0];

  ;
  return 0;
}
$ cc -c conftest.c
conftest.c:8:50: error: use of undeclared identifier 'MAC_OS_X_VERSION_10_10'
                 MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_10)];
                                                 ^
1 error generated.
```
2022-06-26 11:26:46 +09:00

14 lines
468 B
Diff

--- configure.orig 2022-04-12 20:11:17.000000000 +0900
+++ configure 2022-06-24 23:16:18.000000000 +0900
@@ -31718,8 +31718,8 @@
int
main ()
{
-static int test_array [1 - 2 * !(MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 &&
- MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_10)];
+static int test_array [1 - 2 * !(MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 &&
+ MAC_OS_X_VERSION_MIN_REQUIRED < 101000)];
test_array [0] = 0;
return test_array [0];