shithub: sox

Download patch

ref: 707b36935a3758e531ffeb03beee06da24aedb2b
parent: c922d5b09bb8593ec79e8fdd607df51205c7f2f6
author: idigdoug <idigdoug>
date: Thu Feb 17 02:23:51 EST 2011

Updating msvc9 and msvc10 builds to work with newer versions of format
libraries, specifically updated libpng. Updated msvc9 build with fixes already
committed for msvc10 build.

--- a/msvc10/LibPng.vcxproj
+++ b/msvc10/LibPng.vcxproj
@@ -96,7 +96,6 @@
   <ItemGroup>
     <ClCompile Include="..\..\libpng\png.c" />
     <ClCompile Include="..\..\libpng\pngerror.c" />
-    <ClCompile Include="..\..\libpng\pnggccrd.c" />
     <ClCompile Include="..\..\libpng\pngget.c" />
     <ClCompile Include="..\..\libpng\pngmem.c" />
     <ClCompile Include="..\..\libpng\pngpread.c" />
@@ -106,7 +105,6 @@
     <ClCompile Include="..\..\libpng\pngrutil.c" />
     <ClCompile Include="..\..\libpng\pngset.c" />
     <ClCompile Include="..\..\libpng\pngtrans.c" />
-    <ClCompile Include="..\..\libpng\pngvcrd.c" />
     <ClCompile Include="..\..\libpng\pngwio.c" />
     <ClCompile Include="..\..\libpng\pngwrite.c" />
     <ClCompile Include="..\..\libpng\pngwtran.c" />
@@ -116,6 +114,7 @@
     <ClInclude Include="..\..\libpng\png.h" />
     <ClInclude Include="..\..\libpng\pngconf.h" />
     <ClInclude Include="Png\inttypes.h" />
+    <ClInclude Include="Png\pnglibconf.h" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
--- a/msvc10/LibPng.vcxproj.filters
+++ b/msvc10/LibPng.vcxproj.filters
@@ -20,9 +20,6 @@
     <ClCompile Include="..\..\libpng\pngerror.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\libpng\pnggccrd.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\libpng\pngget.c">
       <Filter>Source Files</Filter>
     </ClCompile>
@@ -50,9 +47,6 @@
     <ClCompile Include="..\..\libpng\pngtrans.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\libpng\pngvcrd.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\libpng\pngwio.c">
       <Filter>Source Files</Filter>
     </ClCompile>
@@ -74,6 +68,9 @@
       <Filter>Header Files</Filter>
     </ClInclude>
     <ClInclude Include="Png\inttypes.h">
+      <Filter>Config Files</Filter>
+    </ClInclude>
+    <ClInclude Include="Png\pnglibconf.h">
       <Filter>Config Files</Filter>
     </ClInclude>
   </ItemGroup>
--- a/msvc10/LibSoX.vcxproj
+++ b/msvc10/LibSoX.vcxproj
@@ -51,7 +51,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>SoX;../../ffmpeg;../../flac/include;../../lame/include;../../lame;../../libid3tag;../../libmad;../../libpng;../../libogg/include;sndfile;../../speex/include;../../libvorbis/include;../../wavpack/include;../../wavpack;../../zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>SoX;Png;../../ffmpeg;../../flac/include;../../lame/include;../../lame;../../libid3tag;../../libmad;../../libpng;../../libogg/include;sndfile;../../speex/include;../../libvorbis/include;../../wavpack/include;../../wavpack;../../zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <MinimalRebuild>true</MinimalRebuild>
@@ -75,7 +75,7 @@
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>SoX;../../ffmpeg;../../flac/include;../../lame/include;../../lame;../../libid3tag;../../libmad;../../libpng;../../libogg/include;sndfile;../../speex/include;../../libvorbis/include;../../wavpack/include;../../wavpack;../../zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>SoX;Png;../../ffmpeg;../../flac/include;../../lame/include;../../lame;../../libid3tag;../../libmad;../../libpng;../../libogg/include;sndfile;../../speex/include;../../libvorbis/include;../../wavpack/include;../../wavpack;../../zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <ExceptionHandling>
@@ -345,4 +345,4 @@
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
--- a/msvc10/Makefile.am
+++ b/msvc10/Makefile.am
@@ -39,6 +39,7 @@
 	Mad/LibMad.def \
 	Mp3Lame/config.h \
 	Png/inttypes.h \
+	Png/pnglibconf.h \
 	SndFile/config.h \
 	SndFile/inttypes.h \
 	SndFile/sndfile.h \
--- /dev/null
+++ b/msvc10/Png/pnglibconf.h
@@ -1,0 +1,18 @@
+/* libSoX libpng config for MSVC9: (c) 2009 SoX contributors
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or (at
+ * your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include "../../../libpng/scripts/pnglibconf.h.prebuilt"
\ No newline at end of file
--- a/msvc10/Readme.txt
+++ b/msvc10/Readme.txt
@@ -29,12 +29,13 @@
 
    Extract the source code for the other libraries next to the sox
    directory. Remove the version numbers from the directory names.
+   The following versions were tested and successfully built:
    -- flac-1.2.1.tar.gz extracted into directory flac
    -- lame-398.4.tar.gz extracted into directory lame
    -- libid3tag-0.15.1b.tar.gz extracted into directory libid3tag
    -- libmad-0.15.1b.tar.gz extracted into directory libmad
    -- libogg-1.2.2.tar.gz extracted into directory libogg
-   -- libpng-1.2.44-no-config.tar.gz extracted into directory libpng
+   -- libpng-1.5.1.tar.gz extracted into directory libpng
    -- libsndfile-1.0.23.tar.gz extracted into directory libsndfile
    -- libvorbis-1.3.2.tar.gz extracted into directory libvorbis
    -- speex-1.2rc1.tar.gz extracted into directory speex
--- a/msvc10/SndFile/config.h
+++ b/msvc10/SndFile/config.h
@@ -272,6 +272,9 @@
 /* The size of `void*', as computed by sizeof. */
 #define SIZEOF_VOIDP (4)
 
+/* The size of `wchar_t', as computed by sizeof. */
+#define SIZEOF_WCHAR_T (2)
+
 /* Define to 1 if you have the ANSI C header files. */
 #define STDC_HEADERS 1
 
--- a/msvc9/LibPng.vcproj
+++ b/msvc9/LibPng.vcproj
@@ -174,10 +174,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\libpng\pnggccrd.c"
-				>
-			</File>
-			<File
 				RelativePath="..\..\libpng\pngget.c"
 				>
 			</File>
@@ -214,10 +210,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\libpng\pngvcrd.c"
-				>
-			</File>
-			<File
 				RelativePath="..\..\libpng\pngwio.c"
 				>
 			</File>
@@ -253,6 +245,10 @@
 			>
 			<File
 				RelativePath=".\Png\inttypes.h"
+				>
+			</File>
+			<File
+				RelativePath=".\Png\pnglibconf.h"
 				>
 			</File>
 			<File
--- a/msvc9/LibSndFile.vcproj
+++ b/msvc9/LibSndFile.vcproj
@@ -216,6 +216,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\libsndfile\src\chanmap.c"
+				>
+			</File>
+			<File
 				RelativePath="..\..\libsndfile\src\chunk.c"
 				>
 			</File>
@@ -268,6 +272,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\libsndfile\src\id3.c"
+				>
+			</File>
+			<File
 				RelativePath="..\..\libsndfile\src\ima_adpcm.c"
 				>
 			</File>
@@ -385,6 +393,10 @@
 			</File>
 			<File
 				RelativePath="..\..\libsndfile\src\wav_w64.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\libsndfile\src\windows.c"
 				>
 			</File>
 			<File
--- a/msvc9/LibSoX.vcproj
+++ b/msvc9/LibSoX.vcproj
@@ -41,7 +41,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="SoX;../../ffmpeg;../../flac/include;../../lame/include;../../lame;../../libid3tag;../../libmad;../../libpng;../../libogg/include;sndfile;../../speex/include;../../libvorbis/include;../../wavpack/include;../../wavpack;../../zlib"
+				AdditionalIncludeDirectories="SoX;Png;../../ffmpeg;../../flac/include;../../lame/include;../../lame;../../libid3tag;../../libmad;../../libpng;../../libogg/include;sndfile;../../speex/include;../../libvorbis/include;../../wavpack/include;../../wavpack;../../zlib"
 				PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
 				StringPooling="true"
 				MinimalRebuild="true"
@@ -114,7 +114,7 @@
 				Name="VCCLCompilerTool"
 				Optimization="2"
 				EnableIntrinsicFunctions="true"
-				AdditionalIncludeDirectories="SoX;../../ffmpeg;../../flac/include;../../lame/include;../../lame;../../libid3tag;../../libmad;../../libpng;../../libogg/include;sndfile;../../speex/include;../../libvorbis/include;../../wavpack/include;../../wavpack;../../zlib"
+				AdditionalIncludeDirectories="SoX;Png;../../ffmpeg;../../flac/include;../../lame/include;../../lame;../../libid3tag;../../libmad;../../libpng;../../libogg/include;sndfile;../../speex/include;../../libvorbis/include;../../wavpack/include;../../wavpack;../../zlib"
 				PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
 				StringPooling="true"
 				ExceptionHandling="0"
--- a/msvc9/LibVorbis.vcproj
+++ b/msvc9/LibVorbis.vcproj
@@ -55,7 +55,7 @@
 				WarningLevel="3"
 				WarnAsError="true"
 				DebugInformationFormat="3"
-				DisableSpecificWarnings="4244"
+				DisableSpecificWarnings="4244;4554"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -124,7 +124,7 @@
 				WarningLevel="3"
 				WarnAsError="true"
 				DebugInformationFormat="3"
-				DisableSpecificWarnings="4244"
+				DisableSpecificWarnings="4244;4554"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
--- a/msvc9/LibWavPack.vcproj
+++ b/msvc9/LibWavPack.vcproj
@@ -188,6 +188,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\wavpack\src\tags.c"
+				>
+			</File>
+			<File
 				RelativePath="..\..\wavpack\src\unpack.c"
 				>
 			</File>
--- a/msvc9/LibZLib.vcproj
+++ b/msvc9/LibZLib.vcproj
@@ -180,10 +180,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\zlib\gzio.c"
-				>
-			</File>
-			<File
 				RelativePath="..\..\zlib\infback.c"
 				>
 			</File>
--- a/msvc9/Makefile.am
+++ b/msvc9/Makefile.am
@@ -1,11 +1,31 @@
-EXTRA_DIST=LibFlac.vcproj LibGsm.vcproj LibId3Tag.vcproj LibLpc10.vcproj \
-	   LibMad.vcproj LibMp3Lame.vcproj LibOgg.vcproj LibPng.vcproj \
-	   LibSndFileG72x.vcproj LibSndFileGSM610.vcproj LibSndFile.vcproj \
-	   LibSoX.vcproj LibSpeex.vcproj LibVorbis.vcproj LibWavPack.vcproj \
-	   LibZLib.vcproj \
-	   Readme.txt Sox.sln SoX.vcproj \
-	   Mad/config.h Mad/LibMad.def \
-	   Mp3Lame/config.h \
-	   Png/inttypes.h Png/stdint.h \
-	   SndFile/config.h SndFile/sndfile.h SndFile/sys/time.h\
-	   Sox/soxconfig.h Sox/soxstdint.h
+EXTRA_DIST= \
+    LibFlac.vcproj \
+	LibGsm.vcproj \
+	LibId3Tag.vcproj \
+	LibLpc10.vcproj \
+	LibMad.vcproj \
+	LibMp3Lame.vcproj \
+	LibOgg.vcproj \
+	LibPng.vcproj \
+	LibSndFileG72x.vcproj \
+   	LibSndFileGSM610.vcproj \
+	LibSndFile.vcproj \
+	LibSoX.vcproj \
+	LibSpeex.vcproj \
+	LibVorbis.vcproj \
+	LibWavPack.vcproj \
+	LibZLib.vcproj \
+	Readme.txt \
+	Sox.sln \
+	SoX.vcproj \
+	Mad/config.h \
+	Mad/LibMad.def \
+	Mp3Lame/config.h \
+	Png/inttypes.h \
+	Png/pnglibconf.h \
+	SndFile/config.h \
+	SndFile/inttypes.h \
+	SndFile/sndfile.h \
+	SndFile/sys/time.h \
+	Sox/soxconfig.h \
+	Sox/soxstdint.h
--- /dev/null
+++ b/msvc9/Png/pnglibconf.h
@@ -1,0 +1,18 @@
+/* libSoX libpng config for MSVC9: (c) 2009 SoX contributors
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or (at
+ * your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include "../../../libpng/scripts/pnglibconf.h.prebuilt"
\ No newline at end of file
--- a/msvc9/Png/stdint.h
+++ /dev/null
@@ -1,18 +1,0 @@
-/* libSoX libpng stub file for MSVC9: (c) 2009 SoX contributors
- *
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2.1 of the License, or (at
- * your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
- * General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-/* Nothing here. */
--- a/msvc9/Readme.txt
+++ b/msvc9/Readme.txt
@@ -12,17 +12,18 @@
 
 2. Extract the source code for the other libraries next to the sox
    directory. Remove the version numbers from the directory names.
+   The following versions were tested and successfully built:
    -- flac-1.2.1.tar.gz extracted into directory flac
-   -- lame-398-2.tar.gz extracted into directory lame
+   -- lame-398.4.tar.gz extracted into directory lame
    -- libid3tag-0.15.1b.tar.gz extracted into directory libid3tag
-   -- libmad-0.15.0b.tar.gz extracted into directory libmad
-   -- libogg-1.1.4.tar.gz extracted into directory libogg
-   -- libpng-1.2.39-no-config.tar.gz extracted into directory libpng
-   -- libsndfile-1.0.20.tar.gz extracted into directory libsndfile
-   -- libvorbis-1.2.3.tar.gz extracted into directory libvorbis
+   -- libmad-0.15.1b.tar.gz extracted into directory libmad
+   -- libogg-1.2.2.tar.gz extracted into directory libogg
+   -- libpng-1.5.1.tar.gz extracted into directory libpng
+   -- libsndfile-1.0.23.tar.gz extracted into directory libsndfile
+   -- libvorbis-1.3.2.tar.gz extracted into directory libvorbis
    -- speex-1.2rc1.tar.gz extracted into directory speex
-   -- wavpack-4.50.1.tar.gz extracted into directory wavpack
-   -- zlib-1.2.3.tar.gz extracted into directory zlib
+   -- wavpack-4.60.1.tar.bz2 extracted into directory wavpack
+   -- zlib-1.2.5.tar.gz extracted into directory zlib
 
 3. Open the sox\msvc9\SoX.sln solution.
 
--- a/msvc9/SndFile/config.h
+++ b/msvc9/SndFile/config.h
@@ -272,6 +272,9 @@
 /* The size of `void*', as computed by sizeof. */
 #define SIZEOF_VOIDP (4)
 
+/* The size of `wchar_t', as computed by sizeof. */
+#define SIZEOF_WCHAR_T (2)
+
 /* Define to 1 if you have the ANSI C header files. */
 #define STDC_HEADERS 1
 
--- /dev/null
+++ b/msvc9/SndFile/inttypes.h
@@ -1,0 +1,18 @@
+/* libSoX libpng stub file for MSVC9: (c) 2009 SoX contributors
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or (at
+ * your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#define PRId64 "lld"