Skip to content

Commit

Permalink
Merge pull request #1560 from hadfl/ruby
Browse files Browse the repository at this point in the history
ruby should not undefine _XOPEN_SOURCE in c++ context
  • Loading branch information
oetiker authored Dec 20, 2024
2 parents 684a7e1 + 8cc7062 commit 94a58cb
Show file tree
Hide file tree
Showing 18 changed files with 69 additions and 13 deletions.
1 change: 1 addition & 0 deletions build/ruby/build-30.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ init
download_source $PROG $PROG $VER
patch_source
prep_build
run_autoconf -f
build
make_package
clean_up
Expand Down
1 change: 1 addition & 0 deletions build/ruby/build-31.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ init
download_source $PROG $PROG $VER
patch_source
prep_build
run_autoconf -f
build
make_package
clean_up
Expand Down
3 changes: 2 additions & 1 deletion build/ruby/build-32.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
. ../../lib/build.sh

PROG=ruby
VER=3.2.5
VER=3.2.6
PKG=ooce/runtime/ruby-32
SUMMARY="Ruby"
DESC="A dynamic, open source programming language "
Expand Down Expand Up @@ -61,6 +61,7 @@ init
download_source $PROG $PROG $VER
patch_source
prep_build
run_autoconf -f
build
make_package
clean_up
Expand Down
3 changes: 2 additions & 1 deletion build/ruby/build-33.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
. ../../lib/build.sh

PROG=ruby
VER=3.3.5
VER=3.3.6
PKG=ooce/runtime/ruby-33
SUMMARY="Ruby"
DESC="A dynamic, open source programming language "
Expand Down Expand Up @@ -61,6 +61,7 @@ init
download_source $PROG $PROG $VER
patch_source
prep_build
run_autoconf -f
build
make_package
clean_up
Expand Down
6 changes: 3 additions & 3 deletions build/ruby/patches-30/02-config.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Changes were developed in-house, are Solaris specific,
# and are not suitable for upstream.

diff -wpruN '--exclude=*.orig' a~/tool/config.guess a/tool/config.guess
diff -wpruN --no-dereference '--exclude=*.orig' a~/tool/config.guess a/tool/config.guess
--- a~/tool/config.guess 1970-01-01 00:00:00
+++ a/tool/config.guess 1970-01-01 00:00:00
@@ -409,19 +409,9 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAM
Expand All @@ -29,10 +29,10 @@ diff -wpruN '--exclude=*.orig' a~/tool/config.guess a/tool/config.guess
echo "$SUN_ARCH"-pc-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"
exit ;;
sun4*:SunOS:6*:*)
diff -wpruN '--exclude=*.orig' a~/tool/config.sub a/tool/config.sub
diff -wpruN --no-dereference '--exclude=*.orig' a~/tool/config.sub a/tool/config.sub
--- a~/tool/config.sub 1970-01-01 00:00:00
+++ a/tool/config.sub 1970-01-01 00:00:00
@@ -1011,7 +1011,7 @@ case $cpu-$vendor in
@@ -1028,7 +1028,7 @@ case $cpu-$vendor in

# Here we normalize CPU types irrespective of the vendor
amd64-*)
Expand Down
12 changes: 12 additions & 0 deletions build/ruby/patches-30/no-_XOPEN_SOURCE-undefine.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -wpruN --no-dereference '--exclude=*.orig' a~/configure.ac a/configure.ac
--- a~/configure.ac 1970-01-01 00:00:00
+++ a/configure.ac 1970-01-01 00:00:00
@@ -1064,8 +1064,6 @@ main()
AC_MSG_RESULT($define_xopen_source)
AS_IF([test x"$define_xopen_source" != xno], [
RUBY_APPEND_OPTIONS(CPPFLAGS, -D_XOPEN_SOURCE=$define_xopen_source)
- # _XOPEN_SOURCE should not be defined for C++ on Solaris.
- RUBY_APPEND_OPTIONS(CXXFLAGS, -U_XOPEN_SOURCE)
])
])
],
2 changes: 1 addition & 1 deletion build/ruby/patches-30/openssl-EAGAIN.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
diff -wpruN '--exclude=*.orig' a~/ext/openssl/ossl_ssl.c a/ext/openssl/ossl_ssl.c
diff -wpruN --no-dereference '--exclude=*.orig' a~/ext/openssl/ossl_ssl.c a/ext/openssl/ossl_ssl.c
--- a~/ext/openssl/ossl_ssl.c 1970-01-01 00:00:00
+++ a/ext/openssl/ossl_ssl.c 1970-01-01 00:00:00
@@ -1893,6 +1893,7 @@ ossl_ssl_read_internal(int argc, VALUE *
Expand Down
4 changes: 2 additions & 2 deletions build/ruby/patches-30/openssl3.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
diff -wpruN '--exclude=*.orig' a~/ext/openssl/extconf.rb a/ext/openssl/extconf.rb
diff -wpruN --no-dereference '--exclude=*.orig' a~/ext/openssl/extconf.rb a/ext/openssl/extconf.rb
--- a~/ext/openssl/extconf.rb 1970-01-01 00:00:00
+++ a/ext/openssl/extconf.rb 1970-01-01 00:00:00
@@ -105,12 +105,11 @@ version_ok = if have_macro("LIBRESSL_VER
Expand All @@ -17,7 +17,7 @@ diff -wpruN '--exclude=*.orig' a~/ext/openssl/extconf.rb a/ext/openssl/extconf.r
end

# Prevent wincrypt.h from being included, which defines conflicting macro with openssl/x509.h
diff -wpruN '--exclude=*.orig' a~/ext/openssl/ossl_pkey_rsa.c a/ext/openssl/ossl_pkey_rsa.c
diff -wpruN --no-dereference '--exclude=*.orig' a~/ext/openssl/ossl_pkey_rsa.c a/ext/openssl/ossl_pkey_rsa.c
--- a~/ext/openssl/ossl_pkey_rsa.c 1970-01-01 00:00:00
+++ a/ext/openssl/ossl_pkey_rsa.c 1970-01-01 00:00:00
@@ -947,7 +947,9 @@ Init_ossl_rsa(void)
Expand Down
1 change: 1 addition & 0 deletions build/ruby/patches-30/series
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
02-config.patch
openssl-EAGAIN.patch
openssl3.patch
no-_XOPEN_SOURCE-undefine.patch
4 changes: 2 additions & 2 deletions build/ruby/patches-31/02-config.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Changes were developed in-house, are Solaris specific,
# and are not suitable for upstream.

diff -wpruN '--exclude=*.orig' a~/tool/config.guess a/tool/config.guess
diff -wpruN --no-dereference '--exclude=*.orig' a~/tool/config.guess a/tool/config.guess
--- a~/tool/config.guess 1970-01-01 00:00:00
+++ a/tool/config.guess 1970-01-01 00:00:00
@@ -409,19 +409,9 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAM
Expand All @@ -29,7 +29,7 @@ diff -wpruN '--exclude=*.orig' a~/tool/config.guess a/tool/config.guess
echo "$SUN_ARCH"-pc-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"
exit ;;
sun4*:SunOS:6*:*)
diff -wpruN '--exclude=*.orig' a~/tool/config.sub a/tool/config.sub
diff -wpruN --no-dereference '--exclude=*.orig' a~/tool/config.sub a/tool/config.sub
--- a~/tool/config.sub 1970-01-01 00:00:00
+++ a/tool/config.sub 1970-01-01 00:00:00
@@ -1028,7 +1028,7 @@ case $cpu-$vendor in
Expand Down
12 changes: 12 additions & 0 deletions build/ruby/patches-31/no-_XOPEN_SOURCE-undefine.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -wpruN --no-dereference '--exclude=*.orig' a~/configure.ac a/configure.ac
--- a~/configure.ac 1970-01-01 00:00:00
+++ a/configure.ac 1970-01-01 00:00:00
@@ -1151,8 +1151,6 @@ main()
AC_MSG_RESULT($define_xopen_source)
AS_IF([test x"$define_xopen_source" != xno], [
RUBY_APPEND_OPTIONS(CPPFLAGS, -D_XOPEN_SOURCE=$define_xopen_source)
- # _XOPEN_SOURCE should not be defined for C++ on Solaris.
- RUBY_APPEND_OPTIONS(CXXFLAGS, -U_XOPEN_SOURCE)
])
])
AC_CHECK_TYPES([caddr_t],[],[],[@%:@include <sys/types.h>])
2 changes: 1 addition & 1 deletion build/ruby/patches-31/openssl-EAGAIN.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
diff -wpruN '--exclude=*.orig' a~/ext/openssl/ossl_ssl.c a/ext/openssl/ossl_ssl.c
diff -wpruN --no-dereference '--exclude=*.orig' a~/ext/openssl/ossl_ssl.c a/ext/openssl/ossl_ssl.c
--- a~/ext/openssl/ossl_ssl.c 1970-01-01 00:00:00
+++ a/ext/openssl/ossl_ssl.c 1970-01-01 00:00:00
@@ -1850,6 +1850,7 @@ ossl_ssl_read_internal(int argc, VALUE *
Expand Down
1 change: 1 addition & 0 deletions build/ruby/patches-31/series
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
02-config.patch
openssl-EAGAIN.patch
no-_XOPEN_SOURCE-undefine.patch
12 changes: 12 additions & 0 deletions build/ruby/patches-32/no-_XOPEN_SOURCE-undefine.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -wpruN --no-dereference '--exclude=*.orig' a~/configure.ac a/configure.ac
--- a~/configure.ac 1970-01-01 00:00:00
+++ a/configure.ac 1970-01-01 00:00:00
@@ -1144,8 +1144,6 @@ main()
AC_MSG_RESULT($define_xopen_source)
AS_IF([test x"$define_xopen_source" != xno], [
RUBY_APPEND_OPTIONS(CPPFLAGS, -D_XOPEN_SOURCE=$define_xopen_source)
- # _XOPEN_SOURCE should not be defined for C++ on Solaris.
- RUBY_APPEND_OPTIONS(CXXFLAGS, -U_XOPEN_SOURCE)
])
])
AC_CHECK_TYPES([caddr_t],[],[],[@%:@include <sys/types.h>])
1 change: 1 addition & 0 deletions build/ruby/patches-32/series
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
02-config.patch
openssl-EAGAIN.patch
no-_XOPEN_SOURCE-undefine.patch
12 changes: 12 additions & 0 deletions build/ruby/patches-33/no-_XOPEN_SOURCE-undefine.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -wpruN --no-dereference '--exclude=*.orig' a~/configure.ac a/configure.ac
--- a~/configure.ac 1970-01-01 00:00:00
+++ a/configure.ac 1970-01-01 00:00:00
@@ -1152,8 +1152,6 @@ main()
AC_MSG_RESULT($define_xopen_source)
AS_IF([test x"$define_xopen_source" != xno], [
RUBY_APPEND_OPTIONS(CPPFLAGS, -D_XOPEN_SOURCE=$define_xopen_source)
- # _XOPEN_SOURCE should not be defined for C++ on Solaris.
- RUBY_APPEND_OPTIONS(CXXFLAGS, -U_XOPEN_SOURCE)
])
])
AC_CHECK_TYPES([caddr_t],[],[],[@%:@include <sys/types.h>])
1 change: 1 addition & 0 deletions build/ruby/patches-33/series
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
02-config.patch
openssl-EAGAIN.patch
no-_XOPEN_SOURCE-undefine.patch
4 changes: 2 additions & 2 deletions doc/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@
| ooce/runtime/node-22 | 22.12.0 | https://nodejs.org/download/release/index.json https://nodejs.org/en/download/ | [omniosorg](https://github.com/omniosorg)
| ooce/runtime/ruby-30 | 3.0.7 | https://www.ruby-lang.org/en/downloads/ | [omniosorg](https://github.com/omniosorg)
| ooce/runtime/ruby-31 | 3.1.6 | https://www.ruby-lang.org/en/downloads/ | [omniosorg](https://github.com/omniosorg)
| ooce/runtime/ruby-32 | 3.2.5 | https://www.ruby-lang.org/en/downloads/ | [omniosorg](https://github.com/omniosorg)
| ooce/runtime/ruby-33 | 3.3.5 | https://www.ruby-lang.org/en/downloads/ | [omniosorg](https://github.com/omniosorg)
| ooce/runtime/ruby-32 | 3.2.6 | https://www.ruby-lang.org/en/downloads/ | [omniosorg](https://github.com/omniosorg)
| ooce/runtime/ruby-33 | 3.3.6 | https://www.ruby-lang.org/en/downloads/ | [omniosorg](https://github.com/omniosorg)
| ooce/runtime/tcl | 8.6.14 | https://sourceforge.net/projects/tcl/files/Tcl/ https://www.tcl.tk/software/tcltk/download.html | [omniosorg](https://github.com/omniosorg)
| ooce/security/gnupg | 2.4.5 | https://gnupg.org/download/ | [omniosorg](https://github.com/omniosorg)
| ooce/security/minisign | 0.11 | https://github.com/jedisct1/minisign/releases | [omniosorg](https://github.com/omniosorg)
Expand Down

0 comments on commit 94a58cb

Please sign in to comment.