File: 053-extension_api.patch

package info (click to toggle)
php5 5.2.0%2Bdfsg-8%2Betch16
  • links: PTS
  • area: main
  • in suites: etch
  • size: 58,940 kB
  • ctags: 45,388
  • sloc: ansic: 533,605; sh: 17,835; php: 11,336; cpp: 4,289; xml: 3,809; yacc: 2,446; lex: 2,174; makefile: 1,150; tcl: 1,128; awk: 693; perl: 71; sql: 22; pascal: 15
file content (53 lines) | stat: -rw-r--r-- 2,005 bytes parent folder | download | duplicates (2)
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
diff -ur php-5.0.4/configure.in php5-5.0.4/configure.in
--- php-5.0.4/configure.in	2005-03-31 07:43:12.000000000 +1000
+++ php5-5.0.4/configure.in	2005-07-31 02:35:46.000000000 +1000
@@ -1039,8 +1039,13 @@
 
 ZEND_MODULE_API_NO=`$EGREP '#define ZEND_MODULE_API_NO ' $srcdir/Zend/zend_modules.h|$SED 's/#define ZEND_MODULE_API_NO //'`
 
+DEBIAN_PHP_API=`egrep -h '^#define ZEND_EXTENSION_API_NO|^#define ZEND_MODULE_API_NO|#define PHP_API_VERSION' $srcdir/Zend/zend_extensions.h $srcdir/Zend/zend_modules.h $srcdir/main/php.h | awk '{print $3}' | sed -e 's/^2200/200/' | sort -n | tail -n 1`
+if echo "$CPPFLAGS $CFLAGS" | grep -q -- -D_FILE_OFFSET_BITS=64; then
+  DEBIAN_PHP_API="${DEBIAN_PHP_API}+lfs"
+fi
+
 if test -z "$EXTENSION_DIR"; then
-  extbasedir=$ZEND_MODULE_API_NO
+  extbasedir=$DEBIAN_PHP_API
   if test "$oldstyleextdir" = "yes"; then
     if test "$PHP_DEBUG" = "1"; then
       part1=debug
@@ -1169,6 +1171,7 @@
 PHP_SUBST(CXXFLAGS)
 PHP_SUBST(CXXFLAGS_CLEAN)
 PHP_SUBST_OLD(DEBUG_CFLAGS)
+PHP_SUBST_OLD(DEBIAN_PHP_API)
 PHP_SUBST_OLD(EXTENSION_DIR)
 PHP_SUBST_OLD(EXTRA_LDFLAGS)
 PHP_SUBST_OLD(EXTRA_LDFLAGS_PROGRAM)
diff -ur php-5.0.4/scripts/php-config.in php5-5.0.4/scripts/php-config.in
--- php-5.0.4/scripts/php-config.in	2005-03-16 17:36:54.000000000 +1100
+++ php5-5.0.4/scripts/php-config.in	2005-07-31 02:34:52.000000000 +1000
@@ -12,6 +12,7 @@
 program_suffix="@program_suffix@"
 exe_extension="@EXEEXT@"
 php_binary="@bindir@/${program_prefix}php${program_suffix}${exe_extension}"
+phpapi="@DEBIAN_PHP_API@"
 
 case "$1" in
 --prefix)
@@ -28,12 +29,14 @@
 	echo $includedir;;
 --php-binary)
 	echo $php_binary;;
+--phpapi)
+	echo $phpapi;;
 --version)
 	echo $version;;
 --vernum)
 	echo $version_id;;
 *)
-	echo "Usage: $0 [--prefix|--includes|--ldflags|--libs|--extension-dir|--include-dir|--php-binary|--version|--vernum]"
+	echo "Usage: $0 [--prefix|--includes|--ldflags|--libs|--extension-dir|--include-dir|--php-binary|--phpapi|--version|--vernum]"
 	exit 1;;
 esac