Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
tdkscms
omnibus-gitlab
Commits
edb06ab2
Commit
edb06ab2
authored
Jul 16, 2024
by
徐豪
Browse files
init
parents
Changes
532
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
1748 additions
and
0 deletions
+1748
-0
config/patches/openssl/openssl-1.1.1f-do-not-install-docs.patch
.../patches/openssl/openssl-1.1.1f-do-not-install-docs.patch
+48
-0
config/patches/patroni/add-license-file.patch
config/patches/patroni/add-license-file.patch
+27
-0
config/patches/postgresql/no_docs.patch
config/patches/postgresql/no_docs.patch
+22
-0
config/patches/prometheus/rpi-correct-platform.patch
config/patches/prometheus/rpi-correct-platform.patch
+13
-0
config/patches/python-docutils/license/0.19/add-license-file.patch
...tches/python-docutils/license/0.19/add-license-file.patch
+161
-0
config/patches/python3/custom-openssl.patch
config/patches/python3/custom-openssl.patch
+22
-0
config/patches/python3/readline-3-9.patch
config/patches/python3/readline-3-9.patch
+780
-0
config/patches/python3/skip-nis-build.patch
config/patches/python3/skip-nis-build.patch
+16
-0
config/patches/redis/jemalloc-extra-config-flags.patch
config/patches/redis/jemalloc-extra-config-flags.patch
+13
-0
config/patches/registry/license/2.6.2-with-patch/add-license-file.patch
.../registry/license/2.6.2-with-patch/add-license-file.patch
+208
-0
config/patches/remote-syslog/license/1.6.15/add-license-file.patch
...tches/remote-syslog/license/1.6.15/add-license-file.patch
+27
-0
config/patches/ruby-grpc/grpc-system-ssl-1.42.0.patch
config/patches/ruby-grpc/grpc-system-ssl-1.42.0.patch
+26
-0
config/patches/ruby-grpc/grpc-system-ssl-1.48.0.patch
config/patches/ruby-grpc/grpc-system-ssl-1.48.0.patch
+26
-0
config/patches/ruby/fiddle-closure-3.1.patch
config/patches/ruby/fiddle-closure-3.1.patch
+145
-0
config/patches/ruby/fix-ruby-xfree-for-libxml2-2.7.patch
config/patches/ruby/fix-ruby-xfree-for-libxml2-2.7.patch
+23
-0
config/patches/ruby/fix-ruby-xfree-for-libxml2-3.0.patch
config/patches/ruby/fix-ruby-xfree-for-libxml2-3.0.patch
+23
-0
config/patches/ruby/fix-ruby-xfree-for-libxml2-3.1.patch
config/patches/ruby/fix-ruby-xfree-for-libxml2-3.1.patch
+23
-0
config/patches/ruby/patch-configure
config/patches/ruby/patch-configure
+103
-0
config/patches/ruby/ruby-disable-copy-file-range.patch
config/patches/ruby/ruby-disable-copy-file-range.patch
+13
-0
config/patches/ruby/ruby-mkmf.patch
config/patches/ruby/ruby-mkmf.patch
+29
-0
No files found.
Too many changes to show.
To preserve performance only
532 of 532+
files are displayed.
Plain diff
Email patch
config/patches/openssl/openssl-1.1.1f-do-not-install-docs.patch
0 → 100644
View file @
edb06ab2
diff --git a/Makefile b/Makefile
index d20571fa64..004a557e6d 100644
--- a/Makefile
+++ b/Makefile
@@ -223,7 +223,7 @@
list-tests:
$(PERL) $(SRCDIR)/test/run_tests.pl list
@ :
-install: install_sw install_ssldirs install_docs
+install: install_sw install_ssldirs
uninstall: uninstall_docs uninstall_sw
@@ -271,8 +271,6 @@
install_sw: install_dev install_engines install_runtime
uninstall_sw: uninstall_runtime uninstall_engines uninstall_dev
-install_docs: install_man_docs install_html_docs
-
uninstall_docs: uninstall_man_docs uninstall_html_docs
$(RM) -r "$(DESTDIR)$(DOCDIR)"
@@ -496,25 +494,12 @@
uninstall_runtime_libs:
@$(ECHO) "*** Uninstalling runtime libraries"
@ :
-
-install_man_docs:
- @[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1)
- @$(ECHO) "*** Installing manpages"
- $(PERL) $(SRCDIR)/util/process_docs.pl \
- "--destdir=$(DESTDIR)$(MANDIR)" --type=man --suffix=$(MANSUFFIX)
-
uninstall_man_docs:
@$(ECHO) "*** Uninstalling manpages"
$(PERL) $(SRCDIR)/util/process_docs.pl \
"--destdir=$(DESTDIR)$(MANDIR)" --type=man --suffix=$(MANSUFFIX) \
--remove
-install_html_docs:
- @[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1)
- @$(ECHO) "*** Installing HTML manpages"
- $(PERL) $(SRCDIR)/util/process_docs.pl \
- "--destdir=$(DESTDIR)$(HTMLDIR)" --type=html
-
uninstall_html_docs:
@$(ECHO) "*** Uninstalling manpages"
$(PERL) $(SRCDIR)/util/process_docs.pl \
config/patches/patroni/add-license-file.patch
0 → 100644
View file @
edb06ab2
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..e06d208
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Compose, Zalando SE
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
config/patches/postgresql/no_docs.patch
0 → 100644
View file @
edb06ab2
diff --git a/GNUmakefile.in b/GNUmakefile.in
index 2352fc1..0191427 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -13,7 +13,7 @@
$(call recurse,all install,src config)
docs:
$(MAKE) -C doc all
-$(call recurse,world,doc src config contrib,all)
+$(call recurse,world,src config contrib,all)
# build src/ before contrib/
world-contrib-recurse: world-src-recurse
@@ -29,7 +29,7 @@
html man:
install-docs:
$(MAKE) -C doc install
-$(call recurse,install-world,doc src config contrib,install)
+$(call recurse,install-world,src config contrib,install)
# build src/ before contrib/
install-world-contrib-recurse: install-world-src-recurse
config/patches/prometheus/rpi-correct-platform.patch
0 → 100644
View file @
edb06ab2
diff --git a/Makefile.common b/Makefile.common
index 0acfb9d80..8fede188e 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -40,7 +40,7 @@
PROMU := $(FIRST_GOPATH)/bin/promu
pkgs = ./...
ifeq (arm, $(GOHOSTARCH))
- GOHOSTARM ?= $(shell GOARM= $(GO) env GOARM)
+ GOHOSTARM ?= $(shell GOARM= $(GO) env GOARM | cut -d, -f1)
GO_BUILD_PLATFORM ?= $(GOHOSTOS)-$(GOHOSTARCH)v$(GOHOSTARM)
else
GO_BUILD_PLATFORM ?= $(GOHOSTOS)-$(GOHOSTARCH)
config/patches/python-docutils/license/0.19/add-license-file.patch
0 → 100644
View file @
edb06ab2
diff --color -Naur a/COPYING.txt b/COPYING.txt
--- a/COPYING.txt 1969-12-31 18:00:00
+++ b/COPYING.txt 2023-03-09 14:11:28
@@ -0,0 +1,157 @@
+==================
+ Copying Docutils
+==================
+
+:Author: David Goodger
+:Contact: goodger@python.org
+:Date: $Date: 2022-05-30 18:54:46 +0200 (Mo, 30. Mai 2022) $
+:Web site: https://docutils.sourceforge.io/
+:Copyright: This document has been placed in the public domain.
+
+Most of the files included in this project have been placed in the
+public domain, and therefore have no license requirements and no
+restrictions on copying or usage; see the `Public Domain Dedication`_
+below. There are a few exceptions_, listed below.
+Files in the Sandbox_ are not distributed with Docutils releases and
+may have different license terms.
+
+
+Public Domain Dedication
+========================
+
+The persons who have associated their work with this project (the
+"Dedicator": David Goodger and the many contributors to the Docutils
+project) hereby dedicate the entire copyright, less the exceptions_
+listed below, in the work of authorship known as "Docutils" identified
+below (the "Work") to the public domain.
+
+The primary repository for the Work is the Internet World Wide Web
+site <https://docutils.sourceforge.io/>. The Work consists of the
+files within the "docutils" module of the Docutils project Subversion
+repository (http://svn.code.sf.net/p/docutils/code/),
+whose Internet web interface is located at
+<https://sourceforge.net/p/docutils/code>. Files dedicated to the
+public domain may be identified by the inclusion, near the beginning
+of each file, of a declaration of the form::
+
+ Copyright: This document/module/DTD/stylesheet/file/etc. has been
+ placed in the public domain.
+
+Dedicator makes this dedication for the benefit of the public at large
+and to the detriment of Dedicator's heirs and successors. Dedicator
+intends this dedication to be an overt act of relinquishment in
+perpetuity of all present and future rights under copyright law,
+whether vested or contingent, in the Work. Dedicator understands that
+such relinquishment of all rights includes the relinquishment of all
+rights to enforce (by lawsuit or otherwise) those copyrights in the
+Work.
+
+Dedicator recognizes that, once placed in the public domain, the Work
+may be freely reproduced, distributed, transmitted, used, modified,
+built upon, or otherwise exploited by anyone for any purpose,
+commercial or non-commercial, and in any way, including by methods
+that have not yet been invented or conceived.
+
+(This dedication is derived from the text of the `Creative Commons
+Public Domain Dedication`. [#]_)
+
+.. [#] Creative Commons has `retired this legal tool`__ and does not
+ recommend that it be applied to works: This tool is based on United
+ States law and may not be applicable outside the US. For dedicating new
+ works to the public domain, Creative Commons recommend the replacement
+ Public Domain Dedication CC0_ (CC zero, "No Rights Reserved"). So does
+ the Free Software Foundation in its license-list_.
+
+ __ http://creativecommons.org/retiredlicenses
+ .. _CC0: http://creativecommons.org/about/cc0
+
+Exceptions
+==========
+
+The exceptions to the `Public Domain Dedication`_ above are:
+
+* docutils/utils/smartquotes.py
+
+ Copyright © 2011 Günter Milde,
+ based on `SmartyPants`_ © 2003 John Gruber
+ (released under a "revised" `BSD 3-Clause License`_ included in the file)
+ and smartypants.py © 2004, 2007 Chad Miller.
+ Released under the terms of the `BSD 2-Clause License`_
+ (`local copy <licenses/BSD-2-Clause.txt>`__).
+
+ .. _SmartyPants: http://daringfireball.net/projects/smartypants/
+
+* docutils/utils/math/latex2mathml.py
+
+ Copyright © Jens Jørgen Mortensen, Günter Milde.
+ Released under the terms of the `BSD 2-Clause License`_
+ (`local copy <licenses/BSD-2-Clause.txt>`__).
+
+* docutils/utils/math/math2html.py,
+ docutils/writers/html5_polyglot/math.css
+
+ Copyright © 2009,2010 Alex Fernández; 2021 Günter Milde
+
+ These files were part of eLyXer_, released under the `GNU
+ General Public License`_ version 3 or later. The author relicensed
+ them for Docutils under the terms of the `BSD 2-Clause License`_
+ (`local copy <licenses/BSD-2-Clause.txt>`__).
+
+ .. _eLyXer: https://github.com/alexfernandez/elyxer
+
+* docutils/__main__.py,
+ docutils/parsers/commonmark_wrapper.py,
+ docutils/parsers/recommonmark_wrapper.py,
+ docutils/utils/error_reporting.py,
+ docutils/utils/math/__init__.py,
+ docutils/utils/math/latex2mathml.py,
+ docutils/utils/math/tex2mathml_extern.py,
+ docutils/utils/punctuation_chars.py,
+ docutils/utils/smartquotes.py,
+ docutils/writers/html5_polyglot/__init__.py,
+ docutils/writers/html5_polyglot/*.css,
+ docutils/writers/latex2e/docutils.sty,
+ docutils/writers/xetex/__init__.py,
+ test/test_parsers/test_recommonmark/\*.py,
+ test/test_parsers/test_rst/test_directives/test__init__.py,
+ test/test_parsers/test_rst/test_directives/test_code_parsing.py,
+ test/test_parsers/test_rst/test_line_length_limit_default.py,
+ test/test_parsers/test_rst/test_line_length_limit.py,
+ test/test_writers/test_latex2e_misc.py,
+ test/transforms/test_smartquotes.py,
+ tools/docutils-cli.py,
+ tools/rst2html5.py
+
+ Copyright © Günter Milde.
+ Released under the terms of the `BSD 2-Clause License`_
+ (`local copy <licenses/BSD-2-Clause.txt>`__).
+
+* docutils/utils/roman.py
+
+ copyright by Mark Pilgrim, released under the
+ `Python 2.1.1 license`_ (`local copy`__).
+
+ __ licenses/python-2-1-1.txt
+
+* tools/editors/emacs/rst.el
+
+ copyright by Free Software Foundation, Inc.,
+ released under the `GNU General Public License`_ version 3 or later
+ (`local copy`__).
+
+ __ licenses/gpl-3-0.txt
+
+All used licenses are OSI-approved_ and GPL-compatible_.
+
+Plaintext versions of all the linked-to licenses are provided in the
+licenses_ directory.
+
+.. _sandbox: https://docutils.sourceforge.io/sandbox/README.html
+.. _licenses: licenses/
+.. _Python 2.1.1 license: https://docs.python.org/3/license.html
+.. _GNU General Public License: https://www.gnu.org/copyleft/gpl.html
+.. _BSD 2-Clause License: http://opensource.org/licenses/BSD-2-Clause
+.. _BSD 3-Clause License: https://opensource.org/licenses/BSD-3-Clause
+.. _OSI-approved: http://opensource.org/licenses/
+.. _license-list:
+.. _GPL-compatible: https://www.gnu.org/licenses/license-list.html
config/patches/python3/custom-openssl.patch
0 → 100644
View file @
edb06ab2
--- Python-3.9.6/Modules/Setup 2021-06-28 08:26:18.000000000 +0000
+++ Python-3.9.6.mine/Modules/Setup 2023-01-16 19:52:08.643849006 +0000
@@ -207,14 +207,14 @@
#_csv _csv.c
# Socket module helper for socket(2)
-#_socket socketmodule.c
+_socket socketmodule.c
# Socket module helper for SSL support; you must comment out the other
# socket line above, and possibly edit the SSL variable:
-#SSL=/usr/local/ssl
-#_ssl _ssl.c \
-# -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
-# -L$(SSL)/lib -lssl -lcrypto
+SSL=/usr/local/openssl
+_ssl _ssl.c \
+ -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
+ -L$(SSL)/lib -lssl -lcrypto
# The crypt module is now disabled by default because it breaks builds
# on many systems (where -lcrypt is needed), e.g. Linux (I believe).
config/patches/python3/readline-3-9.patch
0 → 100644
View file @
edb06ab2
From 0b989c687ce05dcadbbf672d9c400223cf0eb162 Mon Sep 17 00:00:00 2001
From: Roland Hieber <rhi@pengutronix.de>
Date: Sun, 10 Jan 2021 20:35:33 +0100
Subject: [PATCH] bpo-13501: allow choosing between readline and libedit
In contrast to macOS, libedit is available as its own include file and
library on Linux systems to prevent file name clashes. So if both
libraries are available on the system, readline is currently chosen by
default; and if only libedit is available, it is not found at all. This
patch adds a way to link against libedit by adding the following
arguments to configure:
--with-readline link against libreadline (the default)
--with-readline=editline link against libeditline
--with-readline=no disable building the readline module
--without-readline (same)
The runtime detection of libedit vs. readline was already done in commit
7105319ada2e66365902 (2019-12-04, serge-sans-paille: "bpo-38634: Allow
non-apple build to cope with libedit (GH-16986)").
Fixes: GH-12076 ("bpo-13501 Build or disable readline with Editline")
Fixes: bpo-13501 ("Make libedit support more generic; port readline / libedit to FreeBSD")
Co-authored-by: Enji Cooper (ngie-eign)
Co-authored-by: Martin Panter (vadmium)
Co-authored-by: Robert Marshall (kellinm)
---
.../2021-01-10-22-25-23.bpo-13501.g4L-6R.rst | 2 +
Modules/readline.c | 10 +-
configure | 267 ++++++++++--------
configure.ac | 186 +++++++-----
pyconfig.h.in | 5 +-
setup.py | 13 +-
6 files changed, 276 insertions(+), 207 deletions(-)
create mode 100644 Misc/NEWS.d/next/Build/2021-01-10-22-25-23.bpo-13501.g4L-6R.rst
diff --git a/Misc/NEWS.d/next/Build/2021-01-10-22-25-23.bpo-13501.g4L-6R.rst b/Misc/NEWS.d/next/Build/2021-01-10-22-25-23.bpo-13501.g4L-6R.rst
new file mode 100644
index 00000000000000..8dc9442725e678
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2021-01-10-22-25-23.bpo-13501.g4L-6R.rst
@@ -0,0 +1,2 @@
+The configure script can now use *libedit* instead of *readline* with the
+command line option ``--with-readline=editline``.
diff --git a/Modules/readline.c b/Modules/readline.c
index 1e74f997b07112..ca51320a2f7eb4 100644
--- a/Modules/readline.c
+++ b/Modules/readline.c
@@ -26,10 +26,14 @@
# define RESTORE_LOCALE(sl)
#endif
+#ifdef WITH_EDITLINE
+# include <editline/readline.h>
+#else
/* GNU readline definitions */
-#undef HAVE_CONFIG_H /* Else readline/chardefs.h includes strings.h */
-#include <readline/readline.h>
-#include <readline/history.h>
+# undef HAVE_CONFIG_H /* Else readline/chardefs.h includes strings.h */
+# include <readline/readline.h>
+# include <readline/history.h>
+#endif
#ifdef HAVE_RL_COMPLETION_MATCHES
#define completion_matches(x, y) \
diff --git a/configure b/configure
index c7a7291feab9a8..836aa1644baec6 100755
--- a/configure
+++ b/configure
@@ -846,6 +846,8 @@
with_libm
with_libc
enable_big_digits
with_platlibdir
+with_wheel_pkg_dir
+with_readline
with_computed_gotos
with_ensurepip
with_openssl
@@ -1572,6 +1574,8 @@
Optional Packages:
system-dependent)
--with-platlibdir=DIRNAME
Python library directory name (default is "lib")
+ --with(out)-readline[=editline]
+ use Editline for backend or disable readline module
--with-computed-gotos enable computed gotos in evaluation loop (enabled by
default on supported compilers)
--with-ensurepip[=install|upgrade|no]
@@ -15524,24 +15528,49 @@
$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
fi
+
+# Check whether --with-readline was given.
+if test "${with_readline+set}" = set; then :
+ withval=$with_readline;
+else
+ with_readline=yes
+fi
+
+
# check where readline lives
+py_cv_lib_readline=no
# save the value of LIBS so we don't actually link Python with readline
LIBS_no_readline=$LIBS
-# On some systems we need to link readline to a termcap compatible
-# library. NOTE: Keep the precedence of listed libraries synchronised
-# with setup.py.
-py_cv_lib_readline=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
+if test "$with_readline" != no; then
+ case "$with_readline" in
+ editline|edit)
+ LIBREADLINE=edit
+
+$as_echo "#define WITH_EDITLINE 1" >>confdefs.h
+
+ ;;
+ yes|readline)
+ LIBREADLINE=readline
+ ;;
+ *)
+ as_fn_error $? "proper usage is --with(out)-readline[=editline]" "$LINENO" 5
+ ;;
+ esac
+
+ # On some systems we need to link readline to a termcap compatible
+ # library. NOTE: Keep the precedence of listed libraries synchronised
+ # with setup.py.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
$as_echo_n "checking how to link readline libs... " >&6; }
-for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
- if test -z "$py_libtermcap"; then
- READLINE_LIBS="-lreadline"
- else
- READLINE_LIBS="-lreadline -l$py_libtermcap"
- fi
- LIBS="$READLINE_LIBS $LIBS_no_readline"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
+ if test -z "$py_libtermcap"; then
+ READLINE_LIBS="-l$LIBREADLINE"
+ else
+ READLINE_LIBS="-l$LIBREADLINE -l$py_libtermcap"
+ fi
+ LIBS="$READLINE_LIBS $LIBS_no_readline"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -15564,73 +15593,67 @@
if ac_fn_c_try_link "$LINENO"; then :
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- if test $py_cv_lib_readline = yes; then
- break
- fi
-done
-# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
-#AC_SUBST([READLINE_LIBS])
-if test $py_cv_lib_readline = no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+ if test $py_cv_lib_readline = yes; then
+ break
+ fi
+ done
+
+ # Uncomment this line if you want to use READLINE_LIBS in Makefile or scripts
+ #AC_SUBST([READLINE_LIBS])
+ if test $py_cv_lib_readline = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
$as_echo "none" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
$as_echo "$READLINE_LIBS" >&6; }
$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
+ fi
fi
-# check for readline 2.2
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <readline/readline.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- have_readline=yes
-else
- have_readline=no
-
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-if test $have_readline = yes
-then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <readline/readline.h>
+if test "$py_cv_lib_readline" = yes; then
+ # check for readline 2.2
+ ac_fn_c_check_decl "$LINENO" "rl_completion_append_character" "ac_cv_have_decl_rl_completion_append_character" "
+#include <stdio.h> /* Must be first for Gnu Readline */
+#ifdef WITH_EDITLINE
+# include <editline/readline.h>
+#else
+# include <readline/readline.h>
+#endif
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
+"
+if test "x$ac_cv_have_decl_rl_completion_append_character" = xyes; then :
$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
fi
-rm -f conftest*
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <readline/readline.h>
+ ac_fn_c_check_decl "$LINENO" "rl_completion_suppress_append" "ac_cv_have_decl_rl_completion_suppress_append" "
+#include <stdio.h> /* Must be first for Gnu Readline */
+#ifdef WITH_EDITLINE
+# include <editline/readline.h>
+#else
+# include <readline/readline.h>
+#endif
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
+"
+if test "x$ac_cv_have_decl_rl_completion_suppress_append" = xyes; then :
$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
fi
-rm -f conftest*
-fi
-# check for readline 4.0
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
-$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
-if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
+ # check for readline 4.0
+ as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_pre_input_hook" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -l$LIBREADLINE" >&5
+$as_echo_n "checking for rl_pre_input_hook in -l$LIBREADLINE... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lreadline $READLINE_LIBS $LIBS"
+LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15650,31 +15673,33 @@
return rl_pre_input_hook ();
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_readline_rl_pre_input_hook=yes
+ eval "$as_ac_Lib=yes"
else
- ac_cv_lib_readline_rl_pre_input_hook=no
+ eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
-$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
-if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
+eval ac_res=\$$as_ac_Lib
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
fi
-# also in 4.0
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
-$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
-if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
+ # also in 4.0
+ as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_completion_display_matches_hook" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -l$LIBREADLINE" >&5
+$as_echo_n "checking for rl_completion_display_matches_hook in -l$LIBREADLINE... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lreadline $READLINE_LIBS $LIBS"
+LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15694,31 +15719,33 @@
return rl_completion_display_matches_hook ();
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_readline_rl_completion_display_matches_hook=yes
+ eval "$as_ac_Lib=yes"
else
- ac_cv_lib_readline_rl_completion_display_matches_hook=no
+ eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
-$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
-if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
+eval ac_res=\$$as_ac_Lib
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
fi
-# also in 4.0, but not in editline
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
-$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
-if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
+ # also in 4.0, but not in editline
+ as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_resize_terminal" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -l$LIBREADLINE" >&5
+$as_echo_n "checking for rl_resize_terminal in -l$LIBREADLINE... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lreadline $READLINE_LIBS $LIBS"
+LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15738,31 +15765,33 @@
return rl_resize_terminal ();
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_readline_rl_resize_terminal=yes
+ eval "$as_ac_Lib=yes"
else
- ac_cv_lib_readline_rl_resize_terminal=no
+ eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
-$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
-if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
+eval ac_res=\$$as_ac_Lib
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
fi
-# check for readline 4.2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
-$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
-if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
+ # check for readline 4.2
+ as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_completion_matches" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -l$LIBREADLINE" >&5
+$as_echo_n "checking for rl_completion_matches in -l$LIBREADLINE... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lreadline $READLINE_LIBS $LIBS"
+LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15782,59 +15811,49 @@
return rl_completion_matches ();
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_readline_rl_completion_matches=yes
+ eval "$as_ac_Lib=yes"
else
- ac_cv_lib_readline_rl_completion_matches=no
+ eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
-$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
-if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
+eval ac_res=\$$as_ac_Lib
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
fi
-# also in readline 4.2
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <readline/readline.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- have_readline=yes
-else
- have_readline=no
-
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-if test $have_readline = yes
-then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <readline/readline.h>
+ # also in readline 4.2
+ ac_fn_c_check_decl "$LINENO" "rl_catch_signals" "ac_cv_have_decl_rl_catch_signals" "
+#include <stdio.h> /* Must be first for Gnu Readline */
+#ifdef WITH_EDITLINE
+# include <editline/readline.h>
+#else
+# include <readline/readline.h>
+#endif
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
+"
+if test "x$ac_cv_have_decl_rl_catch_signals" = xyes; then :
$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
-$as_echo_n "checking for append_history in -lreadline... " >&6; }
-if ${ac_cv_lib_readline_append_history+:} false; then :
+ as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_append_history" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -l$LIBREADLINE" >&5
+$as_echo_n "checking for append_history in -l$LIBREADLINE... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lreadline $READLINE_LIBS $LIBS"
+LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15854,22 +15873,24 @@
return append_history ();
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_readline_append_history=yes
+ eval "$as_ac_Lib=yes"
else
- ac_cv_lib_readline_append_history=no
+ eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
-$as_echo "$ac_cv_lib_readline_append_history" >&6; }
-if test "x$ac_cv_lib_readline_append_history" = xyes; then :
+eval ac_res=\$$as_ac_Lib
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
fi
+fi
# End of readline checks: restore LIBS
LIBS=$LIBS_no_readline
diff --git a/configure.ac b/configure.ac
index 45e0af4493f05e..dbf9d453a02ddd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4879,92 +4879,124 @@
then
[Define this if you have flockfile(), getc_unlocked(), and funlockfile()])
fi
+AC_ARG_WITH([readline],
+ [AS_HELP_STRING([--with(out)-readline@<:@=editline@:>@],
+ [use Editline for backend or disable readline module])],
+ [],
+ [with_readline=yes])
+
# check where readline lives
+py_cv_lib_readline=no
# save the value of LIBS so we don't actually link Python with readline
LIBS_no_readline=$LIBS
-# On some systems we need to link readline to a termcap compatible
-# library. NOTE: Keep the precedence of listed libraries synchronised
-# with setup.py.
-py_cv_lib_readline=no
-AC_MSG_CHECKING([how to link readline libs])
-for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
- if test -z "$py_libtermcap"; then
- READLINE_LIBS="-lreadline"
+if test "$with_readline" != no; then
+ case "$with_readline" in
+ editline|edit)
+ LIBREADLINE=edit
+ AC_DEFINE(WITH_EDITLINE, 1,
+ [Define to build the readline module against Editline.])
+ ;;
+ yes|readline)
+ LIBREADLINE=readline
+ ;;
+ *)
+ AC_MSG_ERROR([proper usage is --with(out)-readline@<:@=editline@:>@])
+ ;;
+ esac
+
+ # On some systems we need to link readline to a termcap compatible
+ # library. NOTE: Keep the precedence of listed libraries synchronised
+ # with setup.py.
+ AC_MSG_CHECKING([how to link readline libs])
+ for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
+ if test -z "$py_libtermcap"; then
+ READLINE_LIBS="-l$LIBREADLINE"
+ else
+ READLINE_LIBS="-l$LIBREADLINE -l$py_libtermcap"
+ fi
+ LIBS="$READLINE_LIBS $LIBS_no_readline"
+ AC_LINK_IFELSE(
+ [AC_LANG_CALL([],[readline])],
+ [py_cv_lib_readline=yes])
+ if test $py_cv_lib_readline = yes; then
+ break
+ fi
+ done
+
+ # Uncomment this line if you want to use READLINE_LIBS in Makefile or scripts
+ #AC_SUBST([READLINE_LIBS])
+ if test $py_cv_lib_readline = no; then
+ AC_MSG_RESULT([none])
else
- READLINE_LIBS="-lreadline -l$py_libtermcap"
+ AC_MSG_RESULT([$READLINE_LIBS])
+ AC_DEFINE(HAVE_LIBREADLINE, 1,
+ [Define to build the readline module.])
fi
- LIBS="$READLINE_LIBS $LIBS_no_readline"
- AC_LINK_IFELSE(
- [AC_LANG_CALL([],[readline])],
- [py_cv_lib_readline=yes])
- if test $py_cv_lib_readline = yes; then
- break
- fi
-done
-# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
-#AC_SUBST([READLINE_LIBS])
-if test $py_cv_lib_readline = no; then
- AC_MSG_RESULT([none])
-else
- AC_MSG_RESULT([$READLINE_LIBS])
- AC_DEFINE(HAVE_LIBREADLINE, 1,
- [Define if you have the readline library (-lreadline).])
fi
-# check for readline 2.2
-AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <readline/readline.h>]])],
- [have_readline=yes],
- [have_readline=no]
-)
-if test $have_readline = yes
-then
- AC_EGREP_HEADER([extern int rl_completion_append_character;],
- [readline/readline.h],
- AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER, 1,
- [Define if you have readline 2.2]), )
- AC_EGREP_HEADER([extern int rl_completion_suppress_append;],
- [readline/readline.h],
- AC_DEFINE(HAVE_RL_COMPLETION_SUPPRESS_APPEND, 1,
- [Define if you have rl_completion_suppress_append]), )
-fi
-
-# check for readline 4.0
-AC_CHECK_LIB(readline, rl_pre_input_hook,
- AC_DEFINE(HAVE_RL_PRE_INPUT_HOOK, 1,
- [Define if you have readline 4.0]), ,$READLINE_LIBS)
-
-# also in 4.0
-AC_CHECK_LIB(readline, rl_completion_display_matches_hook,
- AC_DEFINE(HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK, 1,
- [Define if you have readline 4.0]), ,$READLINE_LIBS)
-
-# also in 4.0, but not in editline
-AC_CHECK_LIB(readline, rl_resize_terminal,
- AC_DEFINE(HAVE_RL_RESIZE_TERMINAL, 1,
- [Define if you have readline 4.0]), ,$READLINE_LIBS)
-
-# check for readline 4.2
-AC_CHECK_LIB(readline, rl_completion_matches,
- AC_DEFINE(HAVE_RL_COMPLETION_MATCHES, 1,
- [Define if you have readline 4.2]), ,$READLINE_LIBS)
-
-# also in readline 4.2
-AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <readline/readline.h>]])],
- [have_readline=yes],
- [have_readline=no]
-)
-if test $have_readline = yes
-then
- AC_EGREP_HEADER([extern int rl_catch_signals;],
- [readline/readline.h],
- AC_DEFINE(HAVE_RL_CATCH_SIGNAL, 1,
- [Define if you can turn off readline's signal handling.]), )
-fi
+if test "$py_cv_lib_readline" = yes; then
+ # check for readline 2.2
+ AC_CHECK_DECL(rl_completion_append_character,
+ AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER, 1,
+ [Define if you have readline 2.2]),,
+ [
+#include <stdio.h> /* Must be first for Gnu Readline */
+#ifdef WITH_EDITLINE
+# include <editline/readline.h>
+#else
+# include <readline/readline.h>
+#endif
+ ])
+ AC_CHECK_DECL(rl_completion_suppress_append,
+ AC_DEFINE(HAVE_RL_COMPLETION_SUPPRESS_APPEND, 1,
+ [Define if you have rl_completion_suppress_append]),,
+ [
+#include <stdio.h> /* Must be first for Gnu Readline */
+#ifdef WITH_EDITLINE
+# include <editline/readline.h>
+#else
+# include <readline/readline.h>
+#endif
+ ])
-AC_CHECK_LIB(readline, append_history,
- AC_DEFINE(HAVE_RL_APPEND_HISTORY, 1,
- [Define if readline supports append_history]), ,$READLINE_LIBS)
+ # check for readline 4.0
+ AC_CHECK_LIB($LIBREADLINE, rl_pre_input_hook,
+ AC_DEFINE(HAVE_RL_PRE_INPUT_HOOK, 1,
+ [Define if you have readline 4.0]),,$READLINE_LIBS)
+
+ # also in 4.0
+ AC_CHECK_LIB($LIBREADLINE, rl_completion_display_matches_hook,
+ AC_DEFINE(HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK, 1,
+ [Define if you have readline 4.0]),,$READLINE_LIBS)
+
+ # also in 4.0, but not in editline
+ AC_CHECK_LIB($LIBREADLINE, rl_resize_terminal,
+ AC_DEFINE(HAVE_RL_RESIZE_TERMINAL, 1,
+ [Define if you have readline 4.0]),,$READLINE_LIBS)
+
+ # check for readline 4.2
+ AC_CHECK_LIB($LIBREADLINE, rl_completion_matches,
+ AC_DEFINE(HAVE_RL_COMPLETION_MATCHES, 1,
+ [Define if you have readline 4.2]),,$READLINE_LIBS)
+
+ # also in readline 4.2
+ AC_CHECK_DECL(rl_catch_signals,
+ AC_DEFINE(HAVE_RL_CATCH_SIGNAL, 1,
+ [Define if you can turn off readline's signal handling.]),,
+ [
+#include <stdio.h> /* Must be first for Gnu Readline */
+#ifdef WITH_EDITLINE
+# include <editline/readline.h>
+#else
+# include <readline/readline.h>
+#endif
+ ])
+
+ AC_CHECK_LIB($LIBREADLINE, append_history,
+ AC_DEFINE(HAVE_RL_APPEND_HISTORY, 1,
+ [Define if readline supports append_history]),,$READLINE_LIBS)
+fi
# End of readline checks: restore LIBS
LIBS=$LIBS_no_readline
diff --git a/pyconfig.h.in b/pyconfig.h.in
index 8510c8778b5690..e1ee500f80279c 100644
--- a/pyconfig.h.in
+++ b/pyconfig.h.in
@@ -601,7 +601,7 @@
/* Define to 1 if you have the <libintl.h> header file. */
#undef HAVE_LIBINTL_H
-/* Define if you have the readline library (-lreadline). */
+/* Define to build the readline module. */
#undef HAVE_LIBREADLINE
/* Define to 1 if you have the `resolv' library (-lresolv). */
@@ -1539,6 +1539,9 @@
Dyld is necessary to support frameworks. */
#undef WITH_DYLD
+/* Define to build the readline module against Editline. */
+#undef WITH_EDITLINE
+
/* Define to 1 if libintl is needed for locale functions. */
#undef WITH_LIBINTL
diff --git a/setup.py b/setup.py
index d8941790b35d00..b26d6c92e09a45 100644
--- a/setup.py
+++ b/setup.py
@@ -963,7 +963,6 @@
def detect_test_extensions(self):
def detect_readline_curses(self):
# readline
- do_readline = self.compiler.find_library_file(self.lib_dirs, 'readline')
readline_termcap_library = ""
curses_library = ""
# Cannot use os.popen here in py3k.
@@ -971,7 +970,13 @@
def detect_readline_curses(self):
if not os.path.exists(self.build_temp):
os.makedirs(self.build_temp)
# Determine if readline is already linked against curses or tinfo.
- if do_readline:
+ if sysconfig.get_config_var('HAVE_LIBREADLINE'):
+ if sysconfig.get_config_var('WITH_EDITLINE'):
+ readline_lib = 'edit'
+ else:
+ readline_lib = 'readline'
+ do_readline = self.compiler.find_library_file(self.lib_dirs,
+ readline_lib)
if CROSS_COMPILING:
ret = run_command("%s -d %s | grep '(NEEDED)' > %s"
% (sysconfig.get_config_var('READELF'),
@@ -994,6 +999,8 @@
def detect_readline_curses(self):
break
if os.path.exists(tmpfile):
os.unlink(tmpfile)
+ else:
+ do_readline = False
# Issue 7384: If readline is already linked against curses,
# use the same library for the readline and curses modules.
if 'curses' in readline_termcap_library:
@@ -1033,7 +1040,7 @@
def detect_readline_curses(self):
else:
readline_extra_link_args = ()
- readline_libs = ['readline']
+ readline_libs = [readline_lib]
if readline_termcap_library:
pass # Issue 7384: Already linked against curses or tinfo.
elif curses_library:
config/patches/python3/skip-nis-build.patch
0 → 100644
View file @
edb06ab2
diff --git a/setup.py b/setup.py
index 4b3c3f3..caf1b7e 100644
--- a/setup.py
+++ b/setup.py
@@ -2444,6 +2444,11 @@
class PyBuildExt(build_ext):
))
def detect_nis(self):
+ # We do not want to include nis module as it links with system tirpc
+ # and thus fails healthcheck.
+ self.missing.append('nis')
+ return
+
if MS_WINDOWS or CYGWIN or HOST_PLATFORM == 'qnx6':
self.missing.append('nis')
return
config/patches/redis/jemalloc-extra-config-flags.patch
0 → 100644
View file @
edb06ab2
diff --git a/deps/Makefile b/deps/Makefile
index 8592e1766..08da5ce20 100644
--- a/deps/Makefile
+++ b/deps/Makefile
@@ -99,7 +99,7 @@
endif
jemalloc: .make-prerequisites
@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
- cd jemalloc && ./configure --with-version=5.2.1-0-g0 --with-lg-quantum=3 --with-jemalloc-prefix=je_ CFLAGS="$(JEMALLOC_CFLAGS)" LDFLAGS="$(JEMALLOC_LDFLAGS)" $(JEMALLOC_CONFIGURE_OPTS)
+ cd jemalloc && ./configure --with-version=5.2.1-0-g0 --with-lg-quantum=3 --with-jemalloc-prefix=je_ $(EXTRA_JEMALLOC_CONFIGURE_FLAGS) CFLAGS="$(JEMALLOC_CFLAGS)" LDFLAGS="$(JEMALLOC_LDFLAGS)" $(JEMALLOC_CONFIGURE_OPTS)
cd jemalloc && $(MAKE) CFLAGS="$(JEMALLOC_CFLAGS)" LDFLAGS="$(JEMALLOC_LDFLAGS)" lib/libjemalloc.a
.PHONY: jemalloc
config/patches/registry/license/2.6.2-with-patch/add-license-file.patch
0 → 100644
View file @
edb06ab2
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..e06d208
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,202 @@
+Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright {yyyy} {name of copyright owner}
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
config/patches/remote-syslog/license/1.6.15/add-license-file.patch
0 → 100644
View file @
edb06ab2
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..c2dbcdd
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2010 Seven Scale LLC
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOa AND
+NONINFRINGEMENT. IN NO EVENT SaALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\
No newline at end of file
config/patches/ruby-grpc/grpc-system-ssl-1.42.0.patch
0 → 100644
View file @
edb06ab2
diff --git a/src/ruby/ext/grpc/extconf.rb b/src/ruby/ext/grpc/extconf.rb
index 09748235ec..0089734718 100644
--- a/src/ruby/ext/grpc/extconf.rb
+++ b/src/ruby/ext/grpc/extconf.rb
@@ -45,7 +45,12 @@
if darwin && !cross_compiling
ENV['ARFLAGS'] = '-o'
end
-ENV['EMBED_OPENSSL'] = 'true'
+# By default, use the system OpenSSL instead of BoringSSL. This is
+# needed on systems that need to use a FIPS-approved OpenSSL or cannot
+# compile the embedded BoringSSL module (e.g. s390x).
+embed_ssl = ENV['EMBED_OPENSSL'] == 'true'
+ENV['EMBED_OPENSSL'] = embed_ssl ? 'true' : 'false'
+
ENV['EMBED_ZLIB'] = 'true'
ENV['EMBED_CARES'] = 'true'
@@ -94,6 +99,7 @@
end
$LDFLAGS << ' -Wl,-wrap,memcpy' if linux
$LDFLAGS << ' -static-libgcc -static-libstdc++' if linux
$LDFLAGS << ' -static' if windows
+$LDFLAGS << ' -lssl' unless embed_ssl
$CFLAGS << ' -std=c99 '
$CFLAGS << ' -Wall '
config/patches/ruby-grpc/grpc-system-ssl-1.48.0.patch
0 → 100644
View file @
edb06ab2
diff --git a/src/ruby/ext/grpc/extconf.rb b/src/ruby/ext/grpc/extconf.rb
index e0974c4420..ec51a18bf7 100644
--- a/src/ruby/ext/grpc/extconf.rb
+++ b/src/ruby/ext/grpc/extconf.rb
@@ -68,8 +68,12 @@
if apple_toolchain && !cross_compiling
ENV['ARFLAGS'] = '-o'
end
+# By default, use the system OpenSSL instead of BoringSSL. This is
+# needed on systems that need to use a FIPS-approved OpenSSL or cannot
+# compile the embedded BoringSSL module (e.g. s390x).
+embed_ssl = ENV['EMBED_OPENSSL'] == 'true'
# Don't embed on TruffleRuby (constant-time crypto is unsafe with Sulong, slow build times)
-ENV['EMBED_OPENSSL'] = (RUBY_ENGINE != 'truffleruby').to_s
+ENV['EMBED_OPENSSL'] = embed_ssl ? 'true' : 'false'
# Don't embed on TruffleRuby (the system zlib is already linked for the zlib C extension, slow build times)
ENV['EMBED_ZLIB'] = (RUBY_ENGINE != 'truffleruby').to_s
@@ -160,6 +164,7 @@
if linux && RUBY_ENGINE != 'truffleruby'
$LDFLAGS << ' -static-libgcc -static-libstdc++'
end
$LDFLAGS << ' -static' if windows
+$LDFLAGS << ' -lssl' unless embed_ssl
$CFLAGS << ' -std=c11 '
$CFLAGS << ' -Wall '
config/patches/ruby/fiddle-closure-3.1.patch
0 → 100644
View file @
edb06ab2
From 17aa5c633d13f3ef6dcbec7f08a01b20ed4fbc12 Mon Sep 17 00:00:00 2001
From: Sutou Kouhei <kou@clear-code.com>
Date: Thu, 15 Sep 2022 07:08:20 +0900
Subject: [PATCH] merge revision(s) a4ad6bd9aac564e93219284c912b26a72f9e82fc:
[ruby/fiddle] closure: free resources when an exception is raised in
Closure.new
GitHub: GH-102
https://github.com/ruby/fiddle/commit/81a8a56239
---
ext/fiddle/closure.c | 56 ++++++++++++++++++++++++++++++++++++++++------------
1 file changed, 43 insertions(+), 13 deletions(-)
---
ext/fiddle/closure.c | 56 ++++++++++++++++++++++++++++++++++----------
version.h | 6 ++---
2 files changed, 46 insertions(+), 16 deletions(-)
diff --git a/ext/fiddle/closure.c b/ext/fiddle/closure.c
index 27f448a24f0108..c08ec5940da84c 100644
--- a/ext/fiddle/closure.c
+++ b/ext/fiddle/closure.c
@@ -224,9 +224,16 @@
allocate(VALUE klass)
return i;
}
+typedef struct {
+ VALUE self;
+ int argc;
+ VALUE *argv;
+} initialize_data;
+
static VALUE
-initialize(int rbargc, VALUE argv[], VALUE self)
+initialize_body(VALUE user_data)
{
+ initialize_data *data = (initialize_data *)user_data;
VALUE ret;
VALUE args;
VALUE normalized_args;
@@ -237,14 +244,14 @@
initialize(int rbargc, VALUE argv[], VALUE self)
ffi_status result;
int i, argc;
- if (2 == rb_scan_args(rbargc, argv, "21", &ret, &args, &abi))
- abi = INT2NUM(FFI_DEFAULT_ABI);
+ if (2 == rb_scan_args(data->argc, data->argv, "21", &ret, &args, &abi))
+ abi = INT2NUM(FFI_DEFAULT_ABI);
Check_Type(args, T_ARRAY);
argc = RARRAY_LENINT(args);
- TypedData_Get_Struct(self, fiddle_closure, &closure_data_type, cl);
+ TypedData_Get_Struct(data->self, fiddle_closure, &closure_data_type, cl);
cl->argv = (ffi_type **)xcalloc(argc + 1, sizeof(ffi_type *));
@@ -257,8 +264,8 @@
initialize(int rbargc, VALUE argv[], VALUE self)
cl->argv[argc] = NULL;
ret = rb_fiddle_type_ensure(ret);
- rb_iv_set(self, "@ctype", ret);
- rb_iv_set(self, "@args", normalized_args);
+ rb_iv_set(data->self, "@ctype", ret);
+ rb_iv_set(data->self, "@args", normalized_args);
cif = &cl->cif;
pcl = cl->pcl;
@@ -269,25 +276,48 @@
initialize(int rbargc, VALUE argv[], VALUE self)
rb_fiddle_int_to_ffi_type(NUM2INT(ret)),
cl->argv);
- if (FFI_OK != result)
- rb_raise(rb_eRuntimeError, "error prepping CIF %d", result);
+ if (FFI_OK != result) {
+ rb_raise(rb_eRuntimeError, "error prepping CIF %d", result);
+ }
#if USE_FFI_CLOSURE_ALLOC
result = ffi_prep_closure_loc(pcl, cif, callback,
- (void *)self, cl->code);
+ (void *)(data->self), cl->code);
#else
result = ffi_prep_closure(pcl, cif, callback, (void *)(data->self));
cl->code = (void *)pcl;
i = mprotect(pcl, sizeof(*pcl), PROT_READ | PROT_EXEC);
if (i) {
- rb_sys_fail("mprotect");
+ rb_sys_fail("mprotect");
}
#endif
- if (FFI_OK != result)
- rb_raise(rb_eRuntimeError, "error prepping closure %d", result);
+ if (FFI_OK != result) {
+ rb_raise(rb_eRuntimeError, "error prepping closure %d", result);
+ }
+
+ return data->self;
+}
- return self;
+static VALUE
+initialize_rescue(VALUE user_data, VALUE exception)
+{
+ initialize_data *data = (initialize_data *)user_data;
+ dealloc(RTYPEDDATA_DATA(data->self));
+ RTYPEDDATA_DATA(data->self) = NULL;
+ rb_exc_raise(exception);
+ return data->self;
+}
+
+static VALUE
+initialize(int argc, VALUE *argv, VALUE self)
+{
+ initialize_data data;
+ data.self = self;
+ data.argc = argc;
+ data.argv = argv;
+ return rb_rescue(initialize_body, (VALUE)&data,
+ initialize_rescue, (VALUE)&data);
}
static VALUE
diff --git a/version.h b/version.h
index 7c8bc046b33c54..99b715563a17ba 100644
--- a/version.h
+++ b/version.h
@@ -11,11 +11,11 @@
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
#define RUBY_VERSION_TEENY 5
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
-#define RUBY_PATCHLEVEL 252
+#define RUBY_PATCHLEVEL 253
#define RUBY_RELEASE_YEAR 2024
-#define RUBY_RELEASE_MONTH 4
-#define RUBY_RELEASE_DAY 23
+#define RUBY_RELEASE_MONTH 5
+#define RUBY_RELEASE_DAY 2
#include "ruby/version.h"
config/patches/ruby/fix-ruby-xfree-for-libxml2-2.7.patch
0 → 100644
View file @
edb06ab2
diff --git a/gc.c b/gc.c
index 67a709ff79..98785901f4 100644
--- a/gc.c
+++ b/gc.c
@@ -10174,8 +10174,16 @@
ruby_xrealloc2_body(void *ptr, size_t n, size_t size)
void
ruby_sized_xfree(void *x, size_t size)
{
- if (x) {
- objspace_xfree(&rb_objspace, x, size);
+ if (LIKELY(x)) {
+ /* It's possible for a C extension's pthread destructor function set by pthread_key_create
+ * to be called after ruby_vm_destruct and attempt to free memory. Fall back to mimfree in
+ * that case. */
+ if (LIKELY(GET_VM())) {
+ objspace_xfree(&rb_objspace, x, size);
+ }
+ else {
+ ruby_mimfree(x);
+ }
}
}
config/patches/ruby/fix-ruby-xfree-for-libxml2-3.0.patch
0 → 100644
View file @
edb06ab2
diff --git a/gc.c b/gc.c
index 5d0c342206..2bfff21004 100644
--- a/gc.c
+++ b/gc.c
@@ -10905,8 +10905,16 @@
ruby_xrealloc2_body(void *ptr, size_t n, size_t size)
void
ruby_sized_xfree(void *x, size_t size)
{
- if (x) {
- objspace_xfree(&rb_objspace, x, size);
+ if (LIKELY(x)) {
+ /* It's possible for a C extension's pthread destructor function set by pthread_key_create
+ * to be called after ruby_vm_destruct and attempt to free memory. Fall back to mimfree in
+ * that case. */
+ if (LIKELY(GET_VM())) {
+ objspace_xfree(&rb_objspace, x, size);
+ }
+ else {
+ ruby_mimfree(x);
+ }
}
}
config/patches/ruby/fix-ruby-xfree-for-libxml2-3.1.patch
0 → 100644
View file @
edb06ab2
diff --git a/gc.c b/gc.c
index 030a4627bd..1c96f6401f 100644
--- a/gc.c
+++ b/gc.c
@@ -11763,8 +11763,16 @@
ruby_xrealloc2_body(void *ptr, size_t n, size_t size)
void
ruby_sized_xfree(void *x, size_t size)
{
- if (x) {
- objspace_xfree(&rb_objspace, x, size);
+ if (LIKELY(x)) {
+ /* It's possible for a C extension's pthread destructor function set by pthread_key_create
+ * to be called after ruby_vm_destruct and attempt to free memory. Fall back to mimfree in
+ * that case. */
+ if (LIKELY(GET_VM())) {
+ objspace_xfree(&rb_objspace, x, size);
+ }
+ else {
+ ruby_mimfree(x);
+ }
}
}
config/patches/ruby/patch-configure
0 → 100644
View file @
edb06ab2
$NetBSD:
patch-configure,v 1.4 2012/10/12 14:51:31 taca Exp $
* Adding Interix and MirBSD support.
*
Ignore doxygen.
--- configure.orig 2012-10-12 09:23:46.000000000 +0000
+++ configure
@@ -10654,6 +10654,9 @@
esac
superux*) :
ac_cv_func_setitimer=no
;; #(
+ interix*) LIBS="-lm $LIBS"
+ ac_cv_func_getpgrp_void=yes
+ ;; #(
*) :
LIBS="-lm $LIBS" ;;
esac
@@ -11980,6 +11983,9 @@
fi
ac_fn_c_check_type "$LINENO" "struct timespec" "ac_cv_type_struct_timespec" "#ifdef HAVE_TIME_H
#include <time.h>
#endif
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
"
if test "x$ac_cv_type_struct_timespec" = xyes; then :
@@ -15790,7 +15796,7 @@
done
MAINLIBS="-pthread $MAINLIBS" ;; #(
*) :
case "$target_os" in #(
- openbsd*) :
+ openbsd*|mirbsd*) :
LIBS="-pthread $LIBS" ;; #(
*) :
LIBS="-l$pthread_lib $LIBS" ;;
@@ -16239,8 +16245,12 @@
esac ;; #(
rb_cv_dlopen=yes ;; #(
interix*) :
: ${LDSHARED='$(CC) -shared'}
+ LDFLAGS="$LDFLAGS -Wl,-E"
XLDFLAGS="$XLDFLAGS -Wl,-E"
+ # use special random-slot linkage in 0x[56]XXXXXXX
LIBPATHFLAG=" -L%1\$-s"
+ DLDFLAGS="$DLDFLAGS "'-Wl,-h,$(.TARGET) -Wl,--image-base,$$(($$RANDOM %4096/2*262144+1342177280))'
+ RPATHFLAG=' -Wl,-R%1$-s'
rb_cv_dlopen=yes ;; #(
freebsd*|dragonfly*) :
@@ -16252,7 +16262,7 @@
esac ;; #(
test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED="ld -Bshareable"
fi
rb_cv_dlopen=yes ;; #(
- openbsd*) :
+ openbsd*|mirbsd*) :
: ${LDSHARED='$(CC) -shared ${CCDLFLAGS}'}
if test "$rb_cv_binary_elf" = yes; then
LDFLAGS="$LDFLAGS -Wl,-E"
@@ -16781,7 +16791,7 @@
_ACEOF
freebsd*|dragonfly*) :
SOLIBS='$(LIBS)'
- LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)'
+ LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)$(TEENY)'
if test "$rb_cv_binary_elf" != "yes" ; then
LIBRUBY_SO="$LIBRUBY_SO.\$(TEENY)"
LIBRUBY_ALIASES=''
@@ -16798,7 +16808,7 @@
_ACEOF
LIBRUBY_ALIASES=""
fi
;; #(
- openbsd*) :
+ openbsd*|mirbsd*) :
SOLIBS='$(LIBS)'
LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR).'`expr ${MINOR} \* 10 + ${TEENY}`
@@ -16859,7 +16869,12 @@
esac
;; #(
interix*) :
- LIBRUBYARG_SHARED='-L. -L${libdir} -l$(RUBY_SO_NAME)'
+ SOLIBS='$(LIBS)'
+ LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR).$(TEENY)'
+ # link explicitly to 0x48000000
+ LIBRUBY_DLDFLAGS='-Wl,-h,lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR) -Wl,--image-base,1207959552'
+ LIBRUBYARG_SHARED='-Wl,-R -Wl,${libdir} -L${libdir} -L. -l$(RUBY_SO_NAME)'
+ LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR) lib$(RUBY_SO_NAME).so'
;; #(
*) :
;;
@@ -16922,11 +16937,7 @@
if test "$install_doc" != no; then
else
RDOCTARGET="nodoc"
fi
- if test "$install_capi" != no -a -n "$DOXYGEN"; then
- CAPITARGET="capi"
- else
- CAPITARGET="nodoc"
- fi
+ CAPITARGET="nodoc"
else
RDOCTARGET="nodoc"
CAPITARGET="nodoc"
config/patches/ruby/ruby-disable-copy-file-range.patch
0 → 100644
View file @
edb06ab2
diff --git a/io.c b/io.c
index 868756ffc5..2e4166d664 100644
--- a/io.c
+++ b/io.c
@@ -10887,7 +10887,7 @@
nogvl_copy_stream_wait_write(struct copy_stream_struct *stp)
return 0;
}
-#if defined HAVE_COPY_FILE_RANGE || (defined __linux__ && defined __NR_copy_file_range)
+#if 0
# define USE_COPY_FILE_RANGE
#endif
config/patches/ruby/ruby-mkmf.patch
0 → 100644
View file @
edb06ab2
--- a/lib/mkmf.rb 2016-06-16 16:19:13.000000000 -0400
+++ b/lib/mkmf.rb 2016-06-16 16:23:08.000000000 -0400
@@ -365,6 +365,17 @@
end
def libpath_env
+ # Patch for aix
+ # Ideally applications should not need LIBPATH/LD_LIBRARY_PATH set
+ # and should rely on the embedded paths in binaries/shared objects
+ # For chef say on AIX we already build using -blibpath and
+ # LD_RUN_PATH, so the extensions built using chef embedded ruby
+ # (using rbconfig) should have correct paths set.
+ # Setting LIBPATH overrides the behaviour of programs invoked from
+ # chef built ruby, for example xlc ends up picking up libiconv built
+ # within chef embedded ruby libs instead of the one from /usr/lib
+ return {}
+
# used only if native compiling
if libpathenv = config_string("LIBPATHENV")
pathenv = ENV[libpathenv]
@@ -1799,7 +1810,7 @@
#
if !CROSS_COMPILING
case CONFIG['build_os']
- when 'mingw32'
+ when 'mingw32', 'mingw64'
def mkintpath(path)
# mingw uses make from msys and it needs special care
# converts from C:\some\path to /C/some/path
Prev
1
2
3
4
5
6
7
8
9
…
27
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment