From: Marcin Krol Date: Tue, 30 Jul 2013 11:49:49 +0000 (+0000) Subject: - patch fileinfo and sqlite3 to meet version requirements X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=fe35d12623fae92e952ca7bddf2b2431d2f45a16;p=packages%2Fphp.git - patch fileinfo and sqlite3 to meet version requirements --- diff --git a/php-fileinfo.patch b/php-fileinfo.patch new file mode 100644 index 0000000..cc4dbe8 --- /dev/null +++ b/php-fileinfo.patch @@ -0,0 +1,47 @@ +diff -urNp php-5.4.17.orig/ext/fileinfo/libmagic/print.c php-5.4.17/ext/fileinfo/libmagic/print.c +--- php-5.4.17.orig/ext/fileinfo/libmagic/print.c 2013-07-03 06:10:53.000000000 +0000 ++++ php-5.4.17/ext/fileinfo/libmagic/print.c 2013-07-18 14:37:33.000000000 +0000 +@@ -28,7 +28,6 @@ + /* + * print.c - debugging printout routines + */ +- + #define _GNU_SOURCE + #include "php.h" + +diff -urNp php-5.4.17.orig/ext/fileinfo/libmagic/softmagic.c php-5.4.17/ext/fileinfo/libmagic/softmagic.c +--- php-5.4.17.orig/ext/fileinfo/libmagic/softmagic.c 2013-07-03 06:10:53.000000000 +0000 ++++ php-5.4.17/ext/fileinfo/libmagic/softmagic.c 2013-07-18 14:37:33.000000000 +0000 +@@ -1630,7 +1630,7 @@ mget(struct magic_set *ms, const unsigne + /* Verify we have enough data to match magic type */ + switch (m->type) { + case FILE_BYTE: +- if (nbytes < (offset + 1)) /* should alway be true */ ++ if (nbytes < (offset + 1)) /* should always be true */ + return 0; + break; + +diff -urNp php-5.4.17.orig/ext/fileinfo/php_fileinfo.h php-5.4.17/ext/fileinfo/php_fileinfo.h +--- php-5.4.17.orig/ext/fileinfo/php_fileinfo.h 2013-07-03 06:10:53.000000000 +0000 ++++ php-5.4.17/ext/fileinfo/php_fileinfo.h 2013-07-18 14:37:33.000000000 +0000 +@@ -24,7 +24,7 @@ + extern zend_module_entry fileinfo_module_entry; + #define phpext_fileinfo_ptr &fileinfo_module_entry + +-#define PHP_FILEINFO_VERSION "1.0.5" ++#define PHP_FILEINFO_VERSION "1.0.5-dev" + + #ifdef PHP_WIN32 + #define PHP_FILEINFO_API __declspec(dllexport) +diff -urNp php-5.4.17.orig/ext/fileinfo/tests/magic php-5.4.17/ext/fileinfo/tests/magic +--- php-5.4.17.orig/ext/fileinfo/tests/magic 2013-07-03 06:10:53.000000000 +0000 ++++ php-5.4.17/ext/fileinfo/tests/magic 2013-07-18 14:37:33.000000000 +0000 +@@ -3303,7 +3303,7 @@ + >>>0x44 string =GLOB \b. + >>>>0x60 beshort x \b%.4d + +-# Scripts that run in the embeded Python interpreter ++# Scripts that run in the embedded Python interpreter + 0 string #!BPY Blender3D BPython script + + #------------------------------------------------------------------------------ diff --git a/php-sqlite3.patch b/php-sqlite3.patch new file mode 100644 index 0000000..88752ed --- /dev/null +++ b/php-sqlite3.patch @@ -0,0 +1,179 @@ +diff -urNp php-5.4.17.orig/ext/sqlite3/libsqlite/sqlite3.c php-5.4.17/ext/sqlite3/libsqlite/sqlite3.c +--- php-5.4.17.orig/ext/sqlite3/libsqlite/sqlite3.c 2013-07-03 06:10:53.000000000 +0000 ++++ php-5.4.17/ext/sqlite3/libsqlite/sqlite3.c 2013-07-18 14:37:33.000000000 +0000 +@@ -11864,7 +11864,7 @@ SQLITE_PRIVATE int sqlite3MemdebugNoTy + ** + ************************************************************************* + ** +-** This file contains definitions of global variables and contants. ++** This file contains definitions of global variables and constants. + */ + + /* An array to map all upper-case characters into their corresponding +@@ -16130,7 +16130,7 @@ SQLITE_PRIVATE const sqlite3_mem_methods + ** 1. All memory allocations sizes are rounded up to a power of 2. + ** + ** 2. If two adjacent free blocks are the halves of a larger block, +-** then the two blocks are coalesed into the single larger block. ++** then the two blocks are coalesced into the single larger block. + ** + ** 3. New memory is allocated from the first available free block. + ** +@@ -18139,7 +18139,7 @@ SQLITE_API sqlite3_int64 sqlite3_soft_he + sqlite3_int64 priorLimit; + sqlite3_int64 excess; + #ifndef SQLITE_OMIT_AUTOINIT +- sqlite3_initialize(); ++ if( sqlite3_initialize() ) return 0; + #endif + sqlite3_mutex_enter(mem0.mutex); + priorLimit = mem0.alarmThreshold; +@@ -20926,7 +20926,7 @@ do_atof_calc: + /* store the result */ + *pResult = result; + +- /* return true if number and no extra non-whitespace chracters after */ ++ /* return true if number and no extra non-whitespace characters after */ + return z>=zEnd && nDigits>0 && eValid; + #else + return !sqlite3Atoi64(z, pResult, length, enc); +@@ -30074,7 +30074,7 @@ static int unixGetLastError(sqlite3_vfs + ** setting the environment variable SQLITE_FORCE_PROXY_LOCKING to 1 will + ** force proxy locking to be used for every database file opened, and 0 + ** will force automatic proxy locking to be disabled for all database +-** files (explicity calling the SQLITE_SET_LOCKPROXYFILE pragma or ++** files (explicitly calling the SQLITE_SET_LOCKPROXYFILE pragma or + ** sqlite_file_control API is not affected by SQLITE_FORCE_PROXY_LOCKING). + */ + +@@ -69899,7 +69899,7 @@ SQLITE_PRIVATE int sqlite3MemJournalSize + + /* + ** Walk an expression tree. Invoke the callback once for each node +-** of the expression, while decending. (In other words, the callback ++** of the expression, while descending. (In other words, the callback + ** is invoked before visiting children.) + ** + ** The return value from the callback should be one of the WRC_* +@@ -70936,7 +70936,7 @@ static int resolveOrderGroupBy( + } + + /* +-** Resolve names in the SELECT statement p and all of its descendents. ++** Resolve names in the SELECT statement p and all of its descendants. + */ + static int resolveSelectStep(Walker *pWalker, Select *p){ + NameContext *pOuterNC; /* Context that contains this SELECT */ +@@ -71244,7 +71244,7 @@ SQLITE_PRIVATE void sqlite3ResolveSelect + ** affinity of that column is returned. Otherwise, 0x00 is returned, + ** indicating no affinity for the expression. + ** +-** i.e. the WHERE clause expresssions in the following statements all ++** i.e. the WHERE clause expressions in the following statements all + ** have an affinity: + ** + ** CREATE TABLE t1(a); +@@ -74260,13 +74260,13 @@ static int evalConstExpr(Walker *pWalker + + /* + ** Preevaluate constant subexpressions within pExpr and store the +-** results in registers. Modify pExpr so that the constant subexpresions ++** results in registers. Modify pExpr so that the constant subexpressions + ** are TK_REGISTER opcodes that refer to the precomputed values. + ** + ** This routine is a no-op if the jump to the cookie-check code has + ** already occur. Since the cookie-check jump is generated prior to + ** any other serious processing, this check ensures that there is no +-** way to accidently bypass the constant initializations. ++** way to accidentally bypass the constant initializations. + ** + ** This routine is also a no-op if the SQLITE_FactorOutConst optimization + ** is disabled via the sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS) +@@ -75132,7 +75132,7 @@ static void renameParentFunc( + ** ALTER TABLE command. The first argument is the text of a CREATE TRIGGER + ** statement. The second is a table name. The table name in the CREATE + ** TRIGGER statement is replaced with the third argument and the result +-** returned. This is analagous to renameTableFunc() above, except for CREATE ++** returned. This is analogous to renameTableFunc() above, except for CREATE + ** TRIGGER, not CREATE INDEX and CREATE TABLE. + */ + static void renameTriggerFunc( +@@ -86752,7 +86752,7 @@ static int xferOptimization( + } + #endif + #ifndef SQLITE_OMIT_FOREIGN_KEY +- /* Disallow the transfer optimization if the destination table constains ++ /* Disallow the transfer optimization if the destination table constrains + ** any foreign key constraints. This is more restrictive than necessary. + ** But the main beneficiary of the transfer optimization is the VACUUM + ** command, and the VACUUM command disables foreign key constraints. So +@@ -93175,7 +93175,7 @@ static int flattenSubquery( + pSubSrc = pSub->pSrc; + assert( pSubSrc ); + /* Prior to version 3.1.2, when LIMIT and OFFSET had to be simple constants, +- ** not arbitrary expresssions, we allowed some combining of LIMIT and OFFSET ++ ** not arbitrary expressions, we allowed some combining of LIMIT and OFFSET + ** because they could be computed at compile-time. But when LIMIT and OFFSET + ** became arbitrary expressions, we were forced to add restrictions (13) + ** and (14). */ +@@ -94472,7 +94472,7 @@ SQLITE_PRIVATE int sqlite3Select( + */ + if( pGroupBy ){ + KeyInfo *pKeyInfo; /* Keying information for the group by clause */ +- int j1; /* A-vs-B comparision jump */ ++ int j1; /* A-vs-B comparison jump */ + int addrOutputRow; /* Start of subroutine that outputs a result row */ + int regOutputRow; /* Return address register for output subroutine */ + int addrSetAbort; /* Set the abort flag and return */ +@@ -118508,7 +118508,7 @@ static int star_oh(const char *z){ + + /* + ** If the word ends with zFrom and xCond() is true for the stem +-** of the word that preceds the zFrom ending, then change the ++** of the word that precede the zFrom ending, then change the + ** ending to zTo. + ** + ** The input word *pz and zFrom are both in reverse order. zTo +@@ -127688,7 +127688,7 @@ SQLITE_API int sqlite3_extension_init( + ** * Implementations of the SQL scalar upper() and lower() functions + ** for case mapping. + ** +-** * Integration of ICU and SQLite collation seqences. ++** * Integration of ICU and SQLite collation sequences. + ** + ** * An implementation of the LIKE operator that uses ICU to + ** provide case-independent matching. +diff -urNp php-5.4.17.orig/ext/sqlite3/php_sqlite3.h php-5.4.17/ext/sqlite3/php_sqlite3.h +--- php-5.4.17.orig/ext/sqlite3/php_sqlite3.h 2013-07-03 06:10:53.000000000 +0000 ++++ php-5.4.17/ext/sqlite3/php_sqlite3.h 2013-07-18 14:37:33.000000000 +0000 +@@ -21,7 +21,7 @@ + #ifndef PHP_SQLITE3_H + #define PHP_SQLITE3_H + +-#define PHP_SQLITE3_VERSION "0.7" ++#define PHP_SQLITE3_VERSION "0.7-dev" + + extern zend_module_entry sqlite3_module_entry; + #define phpext_sqlite3_ptr &sqlite3_module_entry +diff -urNp php-5.4.17.orig/ext/sqlite3/php_sqlite3_structs.h php-5.4.17/ext/sqlite3/php_sqlite3_structs.h +--- php-5.4.17.orig/ext/sqlite3/php_sqlite3_structs.h 2013-07-03 06:10:53.000000000 +0000 ++++ php-5.4.17/ext/sqlite3/php_sqlite3_structs.h 2013-07-18 14:37:33.000000000 +0000 +@@ -23,7 +23,7 @@ + + #include + +-/* for backwards compatability reasons */ ++/* for backwards compatibility reasons */ + #ifndef SQLITE_OPEN_READONLY + #define SQLITE_OPEN_READONLY 0x00000001 + #endif +diff -urNp php-5.4.17.orig/ext/sqlite3/tests/bug53463.phpt php-5.4.17/ext/sqlite3/tests/bug53463.phpt +--- php-5.4.17.orig/ext/sqlite3/tests/bug53463.phpt 2013-07-03 06:10:53.000000000 +0000 ++++ php-5.4.17/ext/sqlite3/tests/bug53463.phpt 2013-07-18 14:37:33.000000000 +0000 +@@ -27,4 +27,4 @@ echo "Done\n"; + --EXPECT-- + string(8) "whatever" + bool(false) +-Done ++Done +\ No newline at end of file diff --git a/php.spec b/php.spec index 510d11f..422944f 100644 --- a/php.spec +++ b/php.spec @@ -213,6 +213,8 @@ Patch63: %{orgname}-mysql-nowarning.patch #Patch64: %{orgname}-m4.patch # not needed on 5.4 branch Patch65: system-libzip.patch Patch66: php-db.patch +Patch67: php-fileinfo.patch +Patch68: php-sqlite3.patch URL: http://www.php.net/ %{?with_interbase:%{!?with_interbase_inst:BuildRequires: Firebird-devel >= 1.0.2.908-2}} %{?with_pspell:BuildRequires: aspell-devel >= 2:0.50.0} @@ -1905,6 +1907,8 @@ cp -p php.ini-production php.ini %patch63 -p1 %{?with_system_libzip:%patch65 -p1} %patch66 -p1 +%patch67 -p1 +%patch68 -p1 sed -i -e '/PHP_ADD_LIBRARY_WITH_PATH/s#xmlrpc,#xmlrpc-epi,#' ext/xmlrpc/config.m4