aboutsummaryrefslogtreecommitdiffstats
path: root/packages/modphp/files/pear.patch
blob: fc9ed05af094a817cdebdeecc80a6145fb2f04a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#
# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
#

--- php-4.3.6/configure.in~pear.patch	2004-06-04 19:03:26.595419000 -0400
+++ php-4.3.6/configure.in	2004-06-04 19:10:32.984552663 -0400
@@ -850,15 +850,38 @@
 [  --with-pear=DIR         Install PEAR in DIR (default PREFIX/lib/php)
   --without-pear          Do not install PEAR], DEFAULT, yes)
 
+AC_ARG_WITH([pear-php-cli],
+[  --with-pear-php-cli=CLI ],
+[
+  PEAR_PHP_CLI="$withval"
+],[
+  PEAR_PHP_CLI=""
+])
+
 if test "$PHP_PEAR" != "no"; then
 
   dnl
   dnl PEAR dependancies
   dnl
-  if test "$PHP_SAPI_CLI" = "no"; then
-    pear_error_msg="$pear_error_msg 
-                    PEAR requires CLI to be enabled.     Add --enable-cli to the configure line. (or --disable-pear)"
+
+  dnl PEAR requires a native PHP CLI.
+  if test "x$PEAR_PHP_CLI" == "x"; then
+    if test "x$cross_compiling" = "xyes"; then
+      pear_error_msg="$pear_error_msg
+                      PEAR requires a native architecture PHP CLI when crosscompiling.
+                      Add --with-pear-php-cli=PATH to the configure line. (or --disable-pear)"
+    else
+      if test "x$PHP_SAPI_CLI" != "xno"; then
+        PEAR_PHP_CLI="$PHP_SAPI_CLI"
+      else
+        pear_error_msg="$pear_error_msg 
+                        PEAR requires CLI to be enabled.     Add --enable-cli to the configure line. (or --disable-pear)"
+      fi
+    fi
   fi
+      
+  AC_SUBST([PEAR_PHP_CLI])
+    
   if test "$PHP_PCRE_REGEX" = "no"; then
     pear_error_msg="$pear_error_msg 
                     PEAR requires PCRE to be enabled.    Add --with-pcre-regex to the configure line. (or --disable-pear)"
@@ -1233,6 +1256,7 @@
 PHP_ADD_BUILD_DIR(Zend)
 
 PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/scripts/Makefile.frag,$abs_srcdir/scripts,scripts)
+AC_OUTPUT([pear/Makefile.frag])
 PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/pear/Makefile.frag,$abs_srcdir/pear,pear)
 PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/Makefile.frag,$abs_srcdir/Zend,Zend)
 
--- /dev/null	2004-02-23 16:04:30.000000000 -0500
+++ php-4.3.6/pear/Makefile.frag.in	2004-06-04 19:10:53.643569437 -0400
@@ -0,0 +1,23 @@
+# -*- makefile -*-
+
+peardir=$(PEAR_INSTALLDIR)
+
+# Skip all php.ini files altogether
+PEAR_INSTALL_FLAGS = -n -dshort_open_tag=0 -dsafe_mode=0
+PEAR_PHP_CLI = @PEAR_PHP_CLI@
+
+install-pear-installer: $(PEAR_PHP_CLI)
+	@$(PEAR_PHP_CLI) $(PEAR_INSTALL_FLAGS) $(srcdir)/install-pear.php -d "$(peardir)" -b "$(bindir)" $(srcdir)/package-*.xml
+
+install-pear-packages: $(PEAR_PHP_CLI)
+	@$(PEAR_PHP_CLI) $(PEAR_INSTALL_FLAGS) $(srcdir)/install-pear.php -d "$(peardir)" -b "$(bindir)" $(srcdir)/packages/*.tar
+
+install-pear:
+	@echo "Installing PEAR environment:      $(INSTALL_ROOT)$(peardir)/"
+	@if $(mkinstalldirs) $(INSTALL_ROOT)$(peardir); then \
+		$(MAKE) -s install-pear-installer install-pear-packages; \
+	else \
+		cat $(srcdir)/install-pear.txt; \
+		exit 5; \
+	fi
+