Ticket #6546: win32pkg.3.patch

File win32pkg.3.patch, 5.6 KB (added by Jeff Lu <jll544@…>, 16 years ago)

Add sanity check for old builds, and disable outdated strtod patch

  • win32-packager.pl

     
    335335[ file    => $mingw."bin/gcc.exe",
    336336  exec    => $installMinGW,
    337337  comment => 'unable to find a gcc.exe where expected, '.
    338              'rerunning MinGW installer!' ],
     338             'rerunning MinGW installer!' ];
    339339
     340# sanity check - building 0.21 with mingwrt != 3.14 is guaranteed FAIL
     341if ($version == '0.21') {
     342   push @{$expect},
     343     [grep    => ['runtime=mingw-runtime-3.14.tar.gz',$mingw.'installed.ini'],
     344      Died_Because_Wrong_MinGW_Version => 'Intentional script failure',
     345      comment => $version.' must be built with (old) MinGW runtime 3.14. '.
     346                 '"Current" MinGW releases will NOT work. If the script '.
     347                 'dies here, uninstall MinGW and next time, choose the '.
     348                 '"Previous" MinGW package in the Automated Installer.'];
     349}
     350
     351push @{$expect},
     352
    340353[ archive => $sources.'MSYS-1.0.10.exe',
    341354  'fetch' => 'http://'.$sourceforge.'/sourceforge/mingw/MSYS-1.0.10.exe',
    342355  comment => 'Get the MSYS and addons:' ] ,
     
    478491#     mysql-essential-5.1.30-win32.msi/from/http://mysql.mirrors.ilisys.com.au/
    479492# alternate: http://mysql.mirrors.ilisys.com.au/Downloads/MySQL-5.1/
    480493#     mysql-essential-5.1.30-win32.msi
    481 [ archive => $sources.'mysql-essential-5.1.31-win32.msi',
     494[ archive => $sources.'mysql-essential-5.1.34-win32.msi',
    482495  'fetch' => 'http://mysql.mirrors.ilisys.com.au/Downloads/'.
    483              'MySQL-5.1/mysql-essential-5.1.31-win32.msi',
     496             'MySQL-5.1/mysql-essential-5.1.34-win32.msi',
    484497  comment => 'fetch mysql binaries - this is a big download(35MB) '.
    485498             'so it might take a while' ],
    486499[ file    => "c:/Program Files/MySQL/MySQL Server 5.1/bin/libmySQL.dll",
    487   exec    => $dossources.'mysql-essential-5.1.31-win32.msi INSTALLLEVEL=2',
     500  exec    => $dossources.'mysql-essential-5.1.34-win32.msi INSTALLLEVEL=2',
    488501  comment => 'Install mysql - be sure to choose to do a "COMPLETE" install. '.
    489502             'You should also choose NOT to "configure the server now" ' ],
    490503
     
    574587
    575588#[ pause => 'check  patch.... press [enter] to continue !'],
    576589
    577 # apply stdlib.h patch
    578 [ file    => $mingw.'include/stdlib_h.patch',
    579   write   => [$mingw.'include/stdlib_h.patch',
    580 '--- include/stdlib.h.org       Thu Dec  4 11:11:40 2008
    581 +++ include/stdlib.h    Thu Dec  4 11:12:46 2008
    582 @@ -314,7 +314,7 @@
    583  #else
    584  static
    585  #endif /* Not __cplusplus */
    586 -inline double __cdecl __MINGW_NOTHROW strtod (const char* __restrict__ __nptr, char** __restrict__ __endptr)
    587 +__inline__ double __cdecl __MINGW_NOTHROW strtod (const char* __restrict__ __nptr, char** __restrict__ __endptr)
    588  { return __strtod(__nptr, __endptr); }
    589  float __cdecl __MINGW_NOTHROW strtof (const char * __restrict__, char ** __restrict__);
    590  long double __cdecl __MINGW_NOTHROW strtold (const char * __restrict__, char ** __restrict__);
    591 ' ],comment => 'write the patch for the the stdlib.h file'],
    592 # apply it!?
    593 [ grep    => ['__inline__ double __cdecl __MINGW_NOTHROW strtod ',$mingw.'include/stdlib.h'],
    594   shell   => ["cd /mingw/include","patch -p1 < stdlib_h.patch"],
    595   comment => 'Apply stdlib.h patch file, if not already applied....' ],
     590# apply stdlib.h patch - no longer needed as of MinGW runtime 3.15.2
     591#[ file    => $mingw.'include/stdlib_h.patch',
     592#  write   => [$mingw.'include/stdlib_h.patch',
     593#'--- include/stdlib.h.org      Thu Dec  4 11:11:40 2008
     594#+++ include/stdlib.h   Thu Dec  4 11:12:46 2008
     595#@@ -314,7 +314,7 @@
     596# #else
     597# static
     598# #endif /* Not __cplusplus */
     599#-inline double __cdecl __MINGW_NOTHROW strtod (const char* __restrict__ __nptr, char** __restrict__ __endptr)
     600#+__inline__ double __cdecl __MINGW_NOTHROW strtod (const char* __restrict__ __nptr, char** __restrict__ __endptr)
     601# { return __strtod(__nptr, __endptr); }
     602# float __cdecl __MINGW_NOTHROW strtof (const char * __restrict__, char ** __restrict__);
     603# long double __cdecl __MINGW_NOTHROW strtold (const char * __restrict__, char ** __restrict__);
     604#' ],comment => 'write the patch for the the stdlib.h file'],
     605## apply it!?
     606#[ grep    => ['__inline__ double __cdecl __MINGW_NOTHROW',$mingw.'include/stdlib.h'],
     607#  shell   => ["cd /mingw/include","patch -p1 < stdlib_h.patch"],
     608#  comment => 'Apply stdlib.h patch file, if not already applied....' ],
    596609
    597610#[ pause => 'check  patch.... press [enter] to continue !'],
    598611
     
    640653  write   => [$mingw.'include/sched_h.patch',
    641654"--- include/sched.h.org        Thu Dec  4 12:00:16 2008
    642655+++ include/sched.h     Wed Dec  3 13:42:54 2008
    643 @@ -124,8 +124,16 @@
     656@@ -124,8 +124,17 @@
    644657 typedef int pid_t;
    645658 #endif
    646659 
     
    650663+/* Define to `int' if <sys/types.h> does not define. */
    651664+/* GCC 4.x reportedly defines pid_t. */
    652665+#ifndef _PID_T_
     666+#define _PID_T_
    653667+#define pid_t int
    654668+#endif
    655669+#endif
     
    18361850mkdir '.$unixmythtv.'/build/bin/sqldrivers
    18371851echo Copying QT plugin required dlls....
    18381852cp '.$unixmsys.'qt-3.3.x-p8/plugins/sqldrivers/libqsqlmysql.dll '.$unixmythtv.'build/bin/sqldrivers
    1839 cp '.$unixmsys.'qt-win-opensource-src-4.4.3/plugins/sqldrivers/qsqlmysql4.dll '.$unixmythtv.'build/bin/sqldrivers
     1853cp '.$unixmsys.'qt-win-opensource-src-4.4.3/plugins/sqldrivers/*.dll '.$unixmythtv.'build/bin/sqldrivers
     1854cp '.$unixmsys.'qt-win-opensource-src-4.4.3/plugins/codecs/*.a '.$unixmythtv.'build/lib/
     1855cp '.$unixmsys.'qt-win-opensource-src-4.4.3/plugins/codecs/*.dll '.$unixmythtv.'build/bin/
    18401856echo Copying ming and msys dlls to build folder.....
    18411857# pthread dlls and mingwm10.dll are copied from here:
    18421858cp /mingw/bin/*.dll '.$unixmythtv.'build/bin