diff --git a/audio/id3lib/Makefile b/audio/id3lib/Makefile index d3a872770bc8..6b0c5ea4270a 100644 --- a/audio/id3lib/Makefile +++ b/audio/id3lib/Makefile @@ -1,34 +1,27 @@ # Created by: Roman Shterenzon # $FreeBSD$ PORTNAME= id3lib PORTVERSION= 3.8.3 PORTREVISION= 10 CATEGORIES= audio MASTER_SITES= SF MAINTAINER= sunpoet@FreeBSD.org COMMENT= Library for manipulating ID3v1/v1.1 and ID3v2 tags LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING BROKEN_mips= fails to link: '_ZTSN12_GLOBAL__N_117ConstIteratorImplE' referenced in section '.data.rel.ro' of tag.lo: defined in discarded section BROKEN_mips64= fails to link: '_ZTSN12_GLOBAL__N_117ConstIteratorImplE' referenced in section '.data.rel.ro' of tag.lo: defined in discarded section USES= compiler:c11 iconv libtool localbase GNU_CONFIGURE= yes 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 |; n; n; n; }' \ - ${WRKSRC}/include/id3/id3lib_strings.h \ - ${WRKSRC}/include/id3/writers.h - .include diff --git a/audio/id3lib/files/patch-CVE-2007-4460 b/audio/id3lib/files/patch-CVE-2007-4460 index 839eec23b071..a2d6cb6ff269 100644 --- a/audio/id3lib/files/patch-CVE-2007-4460 +++ b/audio/id3lib/files/patch-CVE-2007-4460 @@ -1,49 +1,49 @@ --- 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()); -#if ((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP)) - // This section is for Windows folk && gcc 3.x folk +#if !defined(HAVE_MKSTEMP) + // This section is for Windows folk 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); } -#else //((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP)) +#else //!defined(HAVE_MKSTEMP) // 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"); } - ofstream tmpOut(fd); + ofstream tmpOut(sTempFile); 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) { - file.read(tmpBuffer, BUFSIZ); + file.read((char *)tmpBuffer, BUFSIZ); size_t nBytes = file.gcount(); - tmpOut.write(tmpBuffer, nBytes); + tmpOut.write((char *)tmpBuffer, nBytes); } close(fd); //closes the file -#endif ////((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP)) +#endif ////!defined(HAVE_MKSTEMP) tmpOut.close(); file.close(); diff --git a/audio/id3lib/files/patch-configure b/audio/id3lib/files/patch-configure index d769d997f792..d4e36fb70886 100644 --- a/audio/id3lib/files/patch-configure +++ b/audio/id3lib/files/patch-configure @@ -1,29 +1,38 @@ --- 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= + LIBS="-lz $LIBS" fi @@ -9730,14 +9731,13 @@ fi if test ! x$silent = xyes; then exec 6>&1 fi - #standalone library rules over libc - if test $iconv_in_iconv = 1 -o $libiconv_in_iconv = 1; then + if test $iconv_in_libc = 1; then + echo "$as_me:$LINENO: result: libc" >&5 +echo "${ECHO_T}libc" >&6 + elif test $iconv_in_iconv = 1 -o $libiconv_in_iconv = 1; then echo "$as_me:$LINENO: result: libiconv" >&5 echo "${ECHO_T}libiconv" >&6 ICONV_LIB=-liconv - elif test $iconv_in_libc = 1; then - echo "$as_me:$LINENO: result: libc" >&5 -echo "${ECHO_T}libc" >&6 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` diff --git a/audio/id3lib/files/patch-examples-demo_convert.cpp b/audio/id3lib/files/patch-examples-demo_convert.cpp new file mode 100644 index 000000000000..f0e3852703e3 --- /dev/null +++ b/audio/id3lib/files/patch-examples-demo_convert.cpp @@ -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; diff --git a/audio/id3lib/files/patch-examples-demo_copy.cpp b/audio/id3lib/files/patch-examples-demo_copy.cpp new file mode 100644 index 000000000000..1c28c399acad --- /dev/null +++ b/audio/id3lib/files/patch-examples-demo_copy.cpp @@ -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(); diff --git a/audio/id3lib/files/patch-examples-demo_info.cpp b/audio/id3lib/files/patch-examples-demo_info.cpp new file mode 100644 index 000000000000..37d36adb7bde --- /dev/null +++ b/audio/id3lib/files/patch-examples-demo_info.cpp @@ -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(); + diff --git a/audio/id3lib/files/patch-examples-demo_tag.cpp b/audio/id3lib/files/patch-examples-demo_tag.cpp new file mode 100644 index 000000000000..f5c82c3b4899 --- /dev/null +++ b/audio/id3lib/files/patch-examples-demo_tag.cpp @@ -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(); diff --git a/audio/id3lib/files/patch-include_id3_globals.h b/audio/id3lib/files/patch-include-id3-globals.h similarity index 100% rename from audio/id3lib/files/patch-include_id3_globals.h rename to audio/id3lib/files/patch-include-id3-globals.h diff --git a/audio/id3lib/files/patch-include-id3-id3lib_strings.h b/audio/id3lib/files/patch-include-id3-id3lib_strings.h new file mode 100644 index 000000000000..cc1961c418fe --- /dev/null +++ b/audio/id3lib/files/patch-include-id3-id3lib_strings.h @@ -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 ++#include + + #if (defined(__GNUC__) && (__GNUC__ >= 3) || (defined(_MSC_VER) && _MSC_VER > 1000)) + namespace std diff --git a/audio/id3lib/files/patch-include-id3-writers.h b/audio/id3lib/files/patch-include-id3-writers.h new file mode 100644 index 000000000000..2699cf391e19 --- /dev/null +++ b/audio/id3lib/files/patch-include-id3-writers.h @@ -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 + #include "id3/id3lib_streams.h" + //#include + diff --git a/audio/id3lib/files/patch-io_helpers.cpp b/audio/id3lib/files/patch-src-io_helpers.cpp similarity index 72% rename from audio/id3lib/files/patch-io_helpers.cpp rename to audio/id3lib/files/patch-src-io_helpers.cpp index e42abcb85525..50ab74c98889 100644 --- a/audio/id3lib/files/patch-io_helpers.cpp +++ b/audio/id3lib/files/patch-src-io_helpers.cpp @@ -1,14 +1,14 @@ ---- 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); + const unsigned char* pdata = (const unsigned char*)data.c_str(); for (size_t i = 0; i < size; i += 2) { - unicode_t ch = (data[i] << 8) | data[i+1]; + unicode_t ch = (pdata[i] << 8) | pdata[i+1]; writer.writeChars((const unsigned char*) &ch, 2); } } diff --git a/audio/id3lib/files/patch-src_mp3__parse.cpp b/audio/id3lib/files/patch-src-mp3_parse.cpp similarity index 100% rename from audio/id3lib/files/patch-src_mp3__parse.cpp rename to audio/id3lib/files/patch-src-mp3_parse.cpp