svn commit: r556187 - in head/audio/id3lib: . files

Sunpoet Po-Chuan Hsieh sunpoet at FreeBSD.org
Tue Nov 24 20:48:27 UTC 2020


Author: sunpoet
Date: Tue Nov 24 20:48:24 2020
New Revision: 556187
URL: https://svnweb.freebsd.org/changeset/ports/556187

Log:
  Convert REINPLACE_CMD to patch files
  
  - Update patch files

Added:
  head/audio/id3lib/files/patch-examples-demo_convert.cpp   (contents, props changed)
  head/audio/id3lib/files/patch-examples-demo_copy.cpp   (contents, props changed)
  head/audio/id3lib/files/patch-examples-demo_info.cpp   (contents, props changed)
  head/audio/id3lib/files/patch-examples-demo_tag.cpp   (contents, props changed)
  head/audio/id3lib/files/patch-include-id3-globals.h
     - copied unchanged from r556186, head/audio/id3lib/files/patch-include_id3_globals.h
  head/audio/id3lib/files/patch-include-id3-id3lib_strings.h   (contents, props changed)
  head/audio/id3lib/files/patch-include-id3-writers.h   (contents, props changed)
  head/audio/id3lib/files/patch-src-io_helpers.cpp
     - copied, changed from r556186, head/audio/id3lib/files/patch-io_helpers.cpp
  head/audio/id3lib/files/patch-src-mp3_parse.cpp
     - copied unchanged from r556186, head/audio/id3lib/files/patch-src_mp3__parse.cpp
Deleted:
  head/audio/id3lib/files/patch-include_id3_globals.h
  head/audio/id3lib/files/patch-io_helpers.cpp
  head/audio/id3lib/files/patch-src_mp3__parse.cpp
Modified:
  head/audio/id3lib/Makefile
  head/audio/id3lib/files/patch-CVE-2007-4460
  head/audio/id3lib/files/patch-configure

Modified: head/audio/id3lib/Makefile
==============================================================================
--- head/audio/id3lib/Makefile	Tue Nov 24 20:47:25 2020	(r556186)
+++ head/audio/id3lib/Makefile	Tue Nov 24 20:48:24 2020	(r556187)
@@ -24,11 +24,4 @@ USE_LDCONFIG=	yes
 post-extract:
 	@${RM} -r ${WRKSRC}/zlib
 
-post-patch:
-	@${REINPLACE_CMD} '/main/ s|unsigned int|int|' ${WRKSRC}/examples/demo_*.cpp
-	@${REINPLACE_CMD} 's|\(iomanip\)\.h|\1|' ${WRKSRC}/configure
-	@${REINPLACE_CMD} '/include.*/ { p; s||include <cstring>|; n; n; n; }' \
-		${WRKSRC}/include/id3/id3lib_strings.h \
-		${WRKSRC}/include/id3/writers.h
-
 .include <bsd.port.mk>

Modified: head/audio/id3lib/files/patch-CVE-2007-4460
==============================================================================
--- head/audio/id3lib/files/patch-CVE-2007-4460	Tue Nov 24 20:47:25 2020	(r556186)
+++ head/audio/id3lib/files/patch-CVE-2007-4460	Tue Nov 24 20:48:24 2020	(r556187)
@@ -1,6 +1,6 @@
 --- src/tag_file.cpp.orig	2003-03-02 00:23:00 UTC
 +++ src/tag_file.cpp
-@@ -242,8 +242,8 @@ size_t RenderV2ToFile(const ID3_TagImpl&
+@@ -242,8 +242,8 @@ size_t RenderV2ToFile(const ID3_TagImpl& tag, fstream&
      strcpy(sTempFile, filename.c_str());
      strcat(sTempFile, sTmpSuffix.c_str());
  
@@ -11,7 +11,7 @@
      fstream tmpOut;
      createFile(sTempFile, tmpOut);
  
-@@ -257,7 +257,7 @@ size_t RenderV2ToFile(const ID3_TagImpl&
+@@ -257,7 +257,7 @@ size_t RenderV2ToFile(const ID3_TagImpl& tag, fstream&
        tmpOut.write((char *)tmpBuffer, nBytes);
      }
  
@@ -20,7 +20,7 @@
  
      // else we gotta make a temp file, copy the tag into it, copy the
      // rest of the old file after the tag, delete the old file, rename
-@@ -270,7 +270,7 @@ size_t RenderV2ToFile(const ID3_TagImpl&
+@@ -270,7 +270,7 @@ size_t RenderV2ToFile(const ID3_TagImpl& tag, fstream&
        //ID3_THROW_DESC(ID3E_NoFile, "couldn't open temp file");
      }
  
@@ -29,7 +29,7 @@
      if (!tmpOut)
      {
        tmpOut.close();
-@@ -285,14 +285,14 @@ size_t RenderV2ToFile(const ID3_TagImpl&
+@@ -285,14 +285,14 @@ size_t RenderV2ToFile(const ID3_TagImpl& tag, fstream&
      uchar tmpBuffer[BUFSIZ];
      while (file)
      {

Modified: head/audio/id3lib/files/patch-configure
==============================================================================
--- head/audio/id3lib/files/patch-configure	Tue Nov 24 20:47:25 2020	(r556186)
+++ head/audio/id3lib/files/patch-configure	Tue Nov 24 20:48:24 2020	(r556187)
@@ -1,6 +1,6 @@
 --- configure.orig	2003-03-02 00:23:00 UTC
 +++ configure
-@@ -9134,6 +9134,7 @@ if test x$ac_cv_lib_z_uncompress = xno; 
+@@ -9134,6 +9134,7 @@ if test x$ac_cv_lib_z_uncompress = xno; then
  else
    ID3_NEEDZLIB_TRUE='#'
    ID3_NEEDZLIB_FALSE=
@@ -27,3 +27,12 @@
    else
      echo "$as_me:$LINENO: result: not found (panic)" >&5
  echo "${ECHO_T}not found (panic)" >&6
+@@ -10296,7 +10296,7 @@ done
+ 
+ for ac_header in \
+   string                        \
+-  iomanip.h                     \
++  iomanip                     \
+ 
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`

Added: head/audio/id3lib/files/patch-examples-demo_convert.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/id3lib/files/patch-examples-demo_convert.cpp	Tue Nov 24 20:48:24 2020	(r556187)
@@ -0,0 +1,11 @@
+--- examples/demo_convert.cpp.orig	2003-03-02 00:23:00 UTC
++++ examples/demo_convert.cpp
+@@ -84,7 +84,7 @@ void DisplayTags(ostream &os, luint nTags)
+   }
+ }
+ 
+-int main( unsigned int argc, char * const argv[])
++int main( int argc, char * const argv[])
+ {
+   flags_t ulFlag = ID3TT_ALL;
+   gengetopt_args_info args;

Added: head/audio/id3lib/files/patch-examples-demo_copy.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/id3lib/files/patch-examples-demo_copy.cpp	Tue Nov 24 20:48:24 2020	(r556187)
@@ -0,0 +1,11 @@
+--- examples/demo_copy.cpp.orig	2003-03-02 00:23:00 UTC
++++ examples/demo_copy.cpp
+@@ -81,7 +81,7 @@ void DisplayTags(ostream &os, luint nTags)
+   }
+ }
+ 
+-int main( unsigned int argc, char * const argv[])
++int main( int argc, char * const argv[])
+ {
+   int ulFlag = ID3TT_ID3;
+   ID3D_INIT_DOUT();

Added: head/audio/id3lib/files/patch-examples-demo_info.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/id3lib/files/patch-examples-demo_info.cpp	Tue Nov 24 20:48:24 2020	(r556187)
@@ -0,0 +1,11 @@
+--- examples/demo_info.cpp.orig	2003-03-02 00:23:00 UTC
++++ examples/demo_info.cpp
+@@ -309,7 +309,7 @@ void PrintInformation(const ID3_Tag &myTag)
+ 
+ #define DEBUG
+ 
+-int main( unsigned int argc, char * const argv[])
++int main( int argc, char * const argv[])
+ {
+   ID3D_INIT_DOUT();
+ 

Added: head/audio/id3lib/files/patch-examples-demo_tag.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/id3lib/files/patch-examples-demo_tag.cpp	Tue Nov 24 20:48:24 2020	(r556187)
@@ -0,0 +1,11 @@
+--- examples/demo_tag.cpp.orig	2003-03-02 00:23:00 UTC
++++ examples/demo_tag.cpp
+@@ -46,7 +46,7 @@ void DisplayTags(ostream &os, luint nTags)
+     os << "v2";
+ }
+ 
+-int main( unsigned int argc, char * const argv[])
++int main( int argc, char * const argv[])
+ {
+   int ulFlag = ID3TT_ID3;
+   ID3D_INIT_DOUT();

Copied: head/audio/id3lib/files/patch-include-id3-globals.h (from r556186, head/audio/id3lib/files/patch-include_id3_globals.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/id3lib/files/patch-include-id3-globals.h	Tue Nov 24 20:48:24 2020	(r556187, copy of r556186, head/audio/id3lib/files/patch-include_id3_globals.h)
@@ -0,0 +1,11 @@
+--- include/id3/globals.h.orig	2003-03-02 00:23:00 UTC
++++ include/id3/globals.h
+@@ -480,7 +480,7 @@ ID3_ENUM(Mp3_Frequencies)
+   MP3FREQUENCIES_24000HZ = 24000,
+   MP3FREQUENCIES_32000HZ = 32000,
+   MP3FREQUENCIES_48000HZ = 48000,
+-  MP3FREQUENCIES_44100HZ = 44100,
++  MP3FREQUENCIES_44100HZ = 44100
+ };
+ 
+ ID3_ENUM(Mp3_ChannelMode)

Added: head/audio/id3lib/files/patch-include-id3-id3lib_strings.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/id3lib/files/patch-include-id3-id3lib_strings.h	Tue Nov 24 20:48:24 2020	(r556187)
@@ -0,0 +1,10 @@
+--- include/id3/id3lib_strings.h.orig	2003-03-02 00:23:00 UTC
++++ include/id3/id3lib_strings.h
+@@ -30,6 +30,7 @@
+ #define _ID3LIB_STRINGS_H_
+ 
+ #include <string>
++#include <cstring>
+ 
+ #if (defined(__GNUC__) && (__GNUC__ >= 3) || (defined(_MSC_VER) && _MSC_VER > 1000))
+ namespace std

Added: head/audio/id3lib/files/patch-include-id3-writers.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/id3lib/files/patch-include-id3-writers.h	Tue Nov 24 20:48:24 2020	(r556187)
@@ -0,0 +1,10 @@
+--- include/id3/writers.h.orig	2003-03-02 00:23:00 UTC
++++ include/id3/writers.h
+@@ -29,6 +29,7 @@
+ #define _ID3LIB_WRITERS_H_
+ 
+ #include "id3/writer.h"
++#include <cstring>
+ #include "id3/id3lib_streams.h"
+ //#include <string.h>
+ 

Copied and modified: head/audio/id3lib/files/patch-src-io_helpers.cpp (from r556186, head/audio/id3lib/files/patch-io_helpers.cpp)
==============================================================================
--- head/audio/id3lib/files/patch-io_helpers.cpp	Tue Nov 24 20:47:25 2020	(r556186, copy source)
+++ head/audio/id3lib/files/patch-src-io_helpers.cpp	Tue Nov 24 20:48:24 2020	(r556187)
@@ -1,6 +1,6 @@
---- src/io_helpers.cpp.orig	Sun Mar  2 07:23:00 2003
-+++ src/io_helpers.cpp	Mon May 29 01:23:33 2006
-@@ -363,9 +363,10 @@
+--- src/io_helpers.cpp.orig	2003-03-02 00:23:00 UTC
++++ src/io_helpers.cpp
+@@ -363,9 +363,10 @@ size_t io::writeUnicodeText(ID3_Writer& writer, String
      // Write the BOM: 0xFEFF
      unicode_t BOM = 0xFEFF;
      writer.writeChars((const unsigned char*) &BOM, 2);

Copied: head/audio/id3lib/files/patch-src-mp3_parse.cpp (from r556186, head/audio/id3lib/files/patch-src_mp3__parse.cpp)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/id3lib/files/patch-src-mp3_parse.cpp	Tue Nov 24 20:48:24 2020	(r556187, copy of r556186, head/audio/id3lib/files/patch-src_mp3__parse.cpp)
@@ -0,0 +1,11 @@
+--- src/mp3_parse.cpp.orig	2003-03-02 00:23:00 UTC
++++ src/mp3_parse.cpp
+@@ -465,7 +465,7 @@ bool Mp3Info::Parse(ID3_Reader& reader, 
+   // from http://www.xingtech.com/developer/mp3/
+ 
+   const size_t VBR_HEADER_MIN_SIZE = 8;     // "xing" + flags are fixed
+-  const size_t VBR_HEADER_MAX_SIZE = 116;   // frames, bytes, toc and scale are optional
++  const size_t VBR_HEADER_MAX_SIZE = 120;   // frames, bytes, toc and scale are optional
+ 
+   if (mp3size >= vbr_header_offest + VBR_HEADER_MIN_SIZE) 
+   {


More information about the svn-ports-all mailing list