public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/php] private-php86: use libedit instead of readline to avoid licensing issues
@ 2026-11-27  7:24 Tom Callaway
  0 siblings, 0 replies; only message in thread
From: Tom Callaway @ 2026-11-27  7:24 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/php
Branch : private-php86
Commit : 0c27299bfb54786958019fec561b8d29b22e8f80
Author : Tom Callaway <spot@fedoraproject.org>
Date   : 2009-11-17T22:19:17+00:00
Stats  : +68/-3 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/php/c/0c27299bfb54786958019fec561b8d29b22e8f80?branch=private-php86

Log:
use libedit instead of readline to avoid licensing issues

---
diff --git a/php-5.3.0-libedit.patch b/php-5.3.0-libedit.patch
new file mode 100644
index 0000000..e70cdc4
--- /dev/null
+++ b/php-5.3.0-libedit.patch
@@ -0,0 +1,58 @@
+diff -up php-5.3.0/ext/readline/config.m4.BAD php-5.3.0/ext/readline/config.m4
+--- php-5.3.0/ext/readline/config.m4.BAD	2009-11-17 16:14:45.289616920 -0500
++++ php-5.3.0/ext/readline/config.m4	2009-11-17 16:14:59.588616924 -0500
+@@ -55,7 +55,7 @@ if test "$PHP_READLINE" && test "$PHP_RE
+ elif test "$PHP_LIBEDIT" != "no"; then
+ 
+   for i in $PHP_LIBEDIT /usr/local /usr; do
+-    test -f $i/include/readline/readline.h && LIBEDIT_DIR=$i && break
++    test -f $i/include/editline/readline.h && LIBEDIT_DIR=$i && break
+   done
+ 
+   if test -z "$LIBEDIT_DIR"; then
+diff -up php-5.3.0/ext/readline/readline.c.BAD php-5.3.0/ext/readline/readline.c
+--- php-5.3.0/ext/readline/readline.c.BAD	2009-11-17 16:15:30.151716204 -0500
++++ php-5.3.0/ext/readline/readline.c	2009-11-17 16:16:27.902715621 -0500
+@@ -33,8 +33,10 @@
+ #define rl_completion_matches completion_matches
+ #endif
+ 
++#ifdef HAVE_LIBEDIT
++#include <editline/readline.h>
++#else
+ #include <readline/readline.h>
+-#ifndef HAVE_LIBEDIT
+ #include <readline/history.h>
+ #endif
+ 
+diff -up php-5.3.0/sapi/cli/php_cli.c.BAD php-5.3.0/sapi/cli/php_cli.c
+--- php-5.3.0/sapi/cli/php_cli.c.BAD	2009-11-17 16:16:51.421617342 -0500
++++ php-5.3.0/sapi/cli/php_cli.c	2009-11-17 16:17:35.026715984 -0500
+@@ -76,8 +76,11 @@
+ #endif
+ 
+ #if (HAVE_LIBREADLINE || HAVE_LIBEDIT) && !defined(COMPILE_DL_READLINE)
++
++#if HAVE_LIBEDIT
++#include <editline/readline.h>
++#else
+ #include <readline/readline.h>
+-#if !HAVE_LIBEDIT
+ #include <readline/history.h>
+ #endif
+ #include "php_cli_readline.h"
+diff -up php-5.3.0/sapi/cli/php_cli_readline.c.BAD php-5.3.0/sapi/cli/php_cli_readline.c
+--- php-5.3.0/sapi/cli/php_cli_readline.c.BAD	2009-11-17 16:17:51.398715697 -0500
++++ php-5.3.0/sapi/cli/php_cli_readline.c	2009-11-17 16:18:19.241715654 -0500
+@@ -49,8 +49,10 @@
+ #include <unixlib/local.h>
+ #endif
+ 
++#if HAVE_LIBEDIT
++#include <editline/readline.h>
++#else
+ #include <readline/readline.h>
+-#if !HAVE_LIBEDIT
+ #include <readline/history.h>
+ #endif
+ 

diff --git a/php.spec b/php.spec
index 5919bf2..2acbc39 100644
--- a/php.spec
+++ b/php.spec
@@ -13,7 +13,7 @@
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
 Version: 5.3.0
-Release: 6%{?dist}
+Release: 7%{?dist}
 License: PHP
 Group: Development/Languages
 URL: http://www.php.net/
@@ -32,6 +32,8 @@ Patch5: php-5.2.0-includedir.patch
 Patch6: php-5.2.4-embed.patch
 Patch7: php-5.3.0-recode.patch
 Patch8: php-5.3.0-openssl.patch
+# Filed upstream: http://bugs.php.net/50209
+Patch9: php-5.3.0-libedit.patch
 
 # Fixes for extension modules
 Patch20: php-4.3.11-shutdown.patch
@@ -50,7 +52,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: bzip2-devel, curl-devel >= 7.9, db4-devel, gmp-devel
 BuildRequires: httpd-devel >= 2.0.46-1, pam-devel
 BuildRequires: libstdc++-devel, openssl-devel, sqlite-devel >= 3.6.0
-BuildRequires: zlib-devel, pcre-devel >= 6.6, smtpdaemon, readline-devel
+BuildRequires: zlib-devel, pcre-devel >= 6.6, smtpdaemon, libedit-devel
 BuildRequires: bzip2, perl, libtool >= 1.4.3, gcc-c++
 Obsoletes: php-dbg, php3, phpfi, stronghold-php
 Requires: httpd-mmn = %{httpd_mmn}
@@ -427,6 +429,7 @@ support for using the enchant library to PHP.
 %patch6 -p1 -b .embed
 %patch7 -p1 -b .recode
 %patch8 -p1 -b .openssl
+%patch9 -p1 -b .libedit
 
 %patch20 -p1 -b .shutdown
 %patch21 -p1 -b .macropen
@@ -608,7 +611,8 @@ build --enable-force-cgi-redirect \
       --with-sqlite3=shared,%{_prefix} \
       --enable-json=shared \
       --enable-zip=shared \
-      --with-readline \
+      --without-readline \
+      --with-libedit \
       --with-pspell=shared \
       --enable-phar=shared \
       --with-mcrypt=shared,%{_prefix} \
@@ -845,6 +849,9 @@ rm files.* macros.php
 %files enchant -f files.enchant
 
 %changelog
+* Tue Nov 17 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 5.3.0-7
+- use libedit instead of readline to resolve licensing issues
+
 * Tue Aug 25 2009 Tomas Mraz <tmraz@redhat.com> - 5.3.0-6
 - rebuilt with new openssl
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-27  7:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-27  7:24 [rpms/php] private-php86: use libedit instead of readline to avoid licensing issues Tom Callaway

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox