Ticket #8668: win32-packager.pl-flac.patch

File win32-packager.pl-flac.patch, 2.7 KB (added by Jonathan Martens <jonathan@…>, 14 years ago)

Patch to build get flac to compile from the win32 build script

  • packaging/Win32/build/win32-packager.pl

     
    825824             "make install"],
    826825  comment => 'building and installing: msys fftw' ],
    827826
     827[ always => [],
     828  write => [$sources.'flac-SIZE_T_MAX.patch',
     829'--- include/share/alloc.h      2008-06-29 21:43:05.000000000 +1000
     830+++ include/share/alloc.h       2008-08-13 14:38:33.000000000 +1000
     831@@ -28,7 +28,7 @@
     832  */
     833 
     834 #include <limits.h> /* for SIZE_MAX */
     835-#if !defined _MSC_VER && !defined __MINGW32__ && !defined __EMX__
     836+#if HAVE_STDINT_H
     837 #include <stdint.h> /* for SIZE_MAX in case limits.h didn\'t get it */
     838 #endif
     839 #include <stdlib.h> /* for size_t, malloc(), etc */'],
     840 comment => 'Write a patch to fix SIZE_T_MAX errors' ],
     841
     842[ always => [],
     843  write => [$sources.'flac-memcmp.patch',
     844'--- examples/cpp/encode/file/main.cpp.orig     2007-09-13 09:58:03.000000000 -0600
     845+++ examples/cpp/encode/file/main.cpp   2007-11-18 12:59:45.000000000 -0600
     846@@ -30,6 +30,7 @@
     847 
     848 #include <stdio.h>
     849 #include <stdlib.h>
     850+#include <cstring>
     851 #include "FLAC++/metadata.h"
     852 #include "FLAC++/encoder.h"
     853 
     854--- examples/cpp/decode/file/main.cpp.orig      2008-09-14 20:37:05.000000000 +0200
     855+++ examples/cpp/decode/file/main.cpp   2008-09-14 20:37:19.000000000 +0200
     856@@ -31,6 +31,7 @@
     857 
     858 #include <stdio.h>
     859 #include <stdlib.h>
     860+#include <cstring>
     861 #include "FLAC++/decoder.h"
     862 
     863 static FLAC__uint64 total_samples = 0;'],
     864 comment => 'Write a patch to fix memcmp related errors' ],
     865
     866[ archive => $sources.'flac-1.2.1.tar.gz', 
     867  fetch   => 'http://downloads.sourceforge.net/project/flac/flac-src/flac-1.2.1-src/flac-1.2.1.tar.gz'],
     868[ dir     => $sources.'flac-1.2.1',
     869  extract => $sources.'flac-1.2.1.tar' ],
     870
     871[ grep  => ['#if HAVE_STDINT_H',
     872            "$sources/flac-1.2.1/include/share/alloc.h"],
     873  shell => ["cd $sources/flac-1.2.1/",
     874            'patch -p0 < '.$sources.'/flac-SIZE_T_MAX.patch'],
     875 comment => 'Apply SIZE_T_MAX patch to flac source' ],
     876
     877[ grep  => ['#include <cstring>',
     878            "$sources/flac-1.2.1/examples/cpp/decode/file/main.cpp"],
     879  shell => ["cd $unixsources/flac-1.2.1/",
     880            'patch -p0 < '.$sources.'/flac-memcmp.patch'],
     881 comment => 'Apply memcmp patch to flac source' ],
     882
     883[ file    => '/lib/libFLAC++.a',
     884  shell  => ["cd $unixsources/flac-1.2.1",
     885             "./configure --prefix=/usr",
     886             "make",
     887             "make install"],
     888  comment => 'building and installing: msys flac' ],
     889
    828890# typical template:
    829891#[ archive => $sources.'xxx.tar.gz',  fetch => ''],
    830892#[ dir => $sources.'xxx', extract => $sources.'xxx.tar' ],