aboutsummaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authornaddy <naddy@FreeBSD.org>2002-07-22 04:11:00 +0800
committernaddy <naddy@FreeBSD.org>2002-07-22 04:11:00 +0800
commit322124394a1d0c597ffa43ab083799d2a7b68e45 (patch)
tree8a77836c0f413abdd42b3eb0fb9f94ea85e873f0 /audio
parentb1ad2dbf32b79535ed4887ed07cffc003f30f6bb (diff)
downloadfreebsd-ports-graphics-322124394a1d0c597ffa43ab083799d2a7b68e45.tar.gz
freebsd-ports-graphics-322124394a1d0c597ffa43ab083799d2a7b68e45.tar.zst
freebsd-ports-graphics-322124394a1d0c597ffa43ab083799d2a7b68e45.zip
Fix build with gcc3.1 (-CURRENT).
PR: 40830 Submitted by: Jan Stocker <Jan.Stocker@t-online.de> Minor cleanup while we're here. Approved by: maintainer
Diffstat (limited to 'audio')
-rw-r--r--audio/id3lib/Makefile2
-rw-r--r--audio/id3lib/files/patch-Makefile.am14
-rw-r--r--audio/id3lib/files/patch-aa22
-rw-r--r--audio/id3lib/files/patch-configure.in14
-rw-r--r--audio/id3lib/files/patch-src_tag__file.cpp72
-rw-r--r--audio/id3lib/files/patch-src_tag__parse.cpp23
-rw-r--r--audio/id3lib/files/patch-src_tag__parse__lyrics3.cpp23
-rw-r--r--audio/id3lib/files/patch-src_tag__parse__musicmatch.cpp53
-rw-r--r--audio/id3lib/files/patch-src_tag__parse__v1.cpp14
-rw-r--r--audio/id3lib/files/patch-src_utils.cpp41
10 files changed, 255 insertions, 23 deletions
diff --git a/audio/id3lib/Makefile b/audio/id3lib/Makefile
index 6f2028c3ce2..2b1e1dbb34a 100644
--- a/audio/id3lib/Makefile
+++ b/audio/id3lib/Makefile
@@ -21,7 +21,7 @@ USE_LIBTOOL= yes
USE_AUTOMAKE= yes
USE_GMAKE= yes
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
- LIBS="-L${LOCALBASE}/lib"
+ LDFLAGS="-L${LOCALBASE}/lib"
post-extract:
.for i in zlib popt
diff --git a/audio/id3lib/files/patch-Makefile.am b/audio/id3lib/files/patch-Makefile.am
new file mode 100644
index 00000000000..837430a55f2
--- /dev/null
+++ b/audio/id3lib/files/patch-Makefile.am
@@ -0,0 +1,14 @@
+
+$FreeBSD$
+
+--- Makefile.am.orig Fri Sep 15 02:13:51 2000
++++ Makefile.am Sun Jul 21 15:13:19 2002
+@@ -32,7 +32,7 @@
+ popt_subdir =
+ endif
+
+-SUBDIRS = . m4 $(popt_subdir) $(zlib_subdir) doc include src examples
++SUBDIRS = . m4 doc include src examples
+ DIST_SUBDIRS = . m4 popt zlib doc include src examples
+
+ INCLUDES = @ID3LIB_DEBUG_FLAGS@
diff --git a/audio/id3lib/files/patch-aa b/audio/id3lib/files/patch-aa
deleted file mode 100644
index fa6124e4ae5..00000000000
--- a/audio/id3lib/files/patch-aa
+++ /dev/null
@@ -1,22 +0,0 @@
---- configure.in.orig Fri Nov 3 19:29:51 2000
-+++ configure.in Fri Nov 3 19:29:28 2000
-@@ -143,7 +143,7 @@
- )
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
--AC_CHECK_HEADER(iostream.h iomanip.h)
-+AC_CHECK_HEADERS(iostream.h iomanip.h)
-
- dnl Check for functions.
- AC_FUNC_MEMCMP
---- Makefile.am.orig Fri Nov 3 19:29:40 2000
-+++ Makefile.am Fri Nov 3 19:30:12 2000
-@@ -32,7 +32,7 @@
- popt_subdir =
- endif
-
--SUBDIRS = . m4 $(popt_subdir) $(zlib_subdir) doc include src examples
-+SUBDIRS = . m4 doc include src examples
- DIST_SUBDIRS = . m4 popt zlib doc include src examples
-
- INCLUDES = @ID3LIB_DEBUG_FLAGS@
diff --git a/audio/id3lib/files/patch-configure.in b/audio/id3lib/files/patch-configure.in
new file mode 100644
index 00000000000..c9b7b12866f
--- /dev/null
+++ b/audio/id3lib/files/patch-configure.in
@@ -0,0 +1,14 @@
+
+$FreeBSD$
+
+--- configure.in.orig Fri Sep 15 02:03:02 2000
++++ configure.in Sun Jul 21 15:13:19 2002
+@@ -143,7 +143,7 @@
+ )
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+-AC_CHECK_HEADER(iostream.h iomanip.h)
++AC_CHECK_HEADERS(iostream.h iomanip.h)
+
+ dnl Check for functions.
+ AC_FUNC_MEMCMP
diff --git a/audio/id3lib/files/patch-src_tag__file.cpp b/audio/id3lib/files/patch-src_tag__file.cpp
new file mode 100644
index 00000000000..3fed50e74ff
--- /dev/null
+++ b/audio/id3lib/files/patch-src_tag__file.cpp
@@ -0,0 +1,72 @@
+
+$FreeBSD$
+
+--- src/tag_file.cpp.orig Mon Sep 11 09:46:32 2000
++++ src/tag_file.cpp Sun Jul 21 15:13:19 2002
+@@ -184,7 +184,7 @@
+ }
+ }
+
+- file.write(sTag, tag_size);
++ file.write((const char*) sTag, tag_size);
+
+ return tag_size;
+ }
+@@ -221,7 +221,7 @@
+ file.seekp(0, ios::beg);
+ if (buffer)
+ {
+- file.write(buffer, tag_size);
++ file.write((const char*) buffer, tag_size);
+ }
+ }
+ else
+@@ -282,8 +282,9 @@
+ remove(sTempFile);
+ ID3_THROW_DESC(ID3E_NoFile, "couldn't open temp file");
+ }
+-
+- ofstream tmpOut(fd);
++
++ close(fd);
++ ofstream tmpOut(sTempFile);
+ if (!tmpOut)
+ {
+ tmpOut.close();
+@@ -292,15 +293,15 @@
+ }
+ if (buffer)
+ {
+- tmpOut.write(buffer, tag_size);
++ tmpOut.write((const char*) buffer, tag_size);
+ }
+ file.seekg(tag.GetPrependedBytes(), ios::beg);
+ uchar buffer2[BUFSIZ];
+ while (file)
+ {
+- file.read(buffer2, BUFSIZ);
++ file.read((char*) buffer2, BUFSIZ);
+ size_t nBytes = file.gcount();
+- tmpOut.write(buffer2, nBytes);
++ tmpOut.write((const char*) buffer2, nBytes);
+ }
+
+ tmpOut.close();
+@@ -431,7 +432,7 @@
+ while (!file.eof())
+ {
+ size_t nBytesToRead = MIN(nBytesRemaining - nBytesCopied, BUFSIZ);
+- file.read(aucBuffer, nBytesToRead);
++ file.read((char*) aucBuffer, nBytesToRead);
+ size_t nBytesRead = file.gcount();
+
+ if (nBytesRead != nBytesToRead)
+@@ -444,7 +445,7 @@
+ {
+ long offset = nBytesRead + this->GetPrependedBytes();
+ file.seekp(-offset, ios::cur);
+- file.write(aucBuffer, nBytesRead);
++ file.write((const char*) aucBuffer, nBytesRead);
+ file.seekg(this->GetPrependedBytes(), ios::cur);
+ nBytesCopied += nBytesRead;
+ }
diff --git a/audio/id3lib/files/patch-src_tag__parse.cpp b/audio/id3lib/files/patch-src_tag__parse.cpp
new file mode 100644
index 00000000000..b685a735379
--- /dev/null
+++ b/audio/id3lib/files/patch-src_tag__parse.cpp
@@ -0,0 +1,23 @@
+
+$FreeBSD$
+
+--- src/tag_parse.cpp.orig Fri Sep 15 01:54:08 2000
++++ src/tag_parse.cpp Sun Jul 21 15:13:19 2002
+@@ -178,7 +178,7 @@
+ return 0;
+ }
+ uchar header[ID3_TAGHEADERSIZE];
+- file.read(header, ID3_TAGHEADERSIZE);
++ file.read((char*) header, ID3_TAGHEADERSIZE);
+ if (file.gcount() != ID3_TAGHEADERSIZE)
+ {
+ return 0;
+@@ -188,7 +188,7 @@
+ if (tagSize > 0)
+ {
+ uchar* bin = new uchar[tagSize];
+- file.read(bin, tagSize - ID3_TagHeader::SIZE);
++ file.read((char*) bin, tagSize - ID3_TagHeader::SIZE);
+ if (tagSize != (size_t)file.gcount())
+ {
+ // log this...
diff --git a/audio/id3lib/files/patch-src_tag__parse__lyrics3.cpp b/audio/id3lib/files/patch-src_tag__parse__lyrics3.cpp
new file mode 100644
index 00000000000..17ee04f6349
--- /dev/null
+++ b/audio/id3lib/files/patch-src_tag__parse__lyrics3.cpp
@@ -0,0 +1,23 @@
+
+$FreeBSD$
+
+--- src/tag_parse_lyrics3.cpp.orig Mon Sep 11 08:34:06 2000
++++ src/tag_parse_lyrics3.cpp Sun Jul 21 15:13:19 2002
+@@ -200,7 +200,7 @@
+ // reserve enough space for lyrics3 + id3v1 tag
+ const size_t max_lyr_size = 11 + 5100 + 9 + 128;
+
+- size_t lyr_buffer_size = MIN(max_lyr_size, file.tellg());
++ size_t lyr_buffer_size = MIN(max_lyr_size, (size_t) file.tellg());
+
+ file.seekg(- static_cast<long>(lyr_buffer_size), ios::cur);
+ if (!file)
+@@ -274,7 +274,7 @@
+
+ // Using binary minus rather than unary minus to avoid compiler warning
+
+- file.seekg(- MIN(file.tellg(),
++ file.seekg(- MIN((size_t) file.tellg(),
+ (static_cast<long>(lyr_size) + 6 + 9 + 3)), ios::cur);
+ if (!file)
+ {
diff --git a/audio/id3lib/files/patch-src_tag__parse__musicmatch.cpp b/audio/id3lib/files/patch-src_tag__parse__musicmatch.cpp
new file mode 100644
index 00000000000..efc5c262909
--- /dev/null
+++ b/audio/id3lib/files/patch-src_tag__parse__musicmatch.cpp
@@ -0,0 +1,53 @@
+
+$FreeBSD$
+
+--- src/tag_parse_musicmatch.cpp.orig Mon Sep 11 09:46:32 2000
++++ src/tag_parse_musicmatch.cpp Sun Jul 21 15:13:19 2002
+@@ -221,7 +221,7 @@
+ return 0;
+ }
+
+- file.seekg(tag_end - tag_size);
++ file.seekg((size_t) tag_end - tag_size);
+ tag_beg = file.tellg();
+
+ // Now calculate the actual offsets
+@@ -229,17 +229,17 @@
+ offsets[0] = tag_beg;
+ for (size_t i = 0; i < 4; ++i)
+ {
+- offsets[i+1] = offsets[i] + section_sizes[i];
++ offsets[i+1] = offsets[i] + (streampos) section_sizes[i];
+ }
+
+ // now check for a tag header and adjust the tag_beg pointer appropriately
+ if (tag_beg >= 256)
+ {
+- file.seekg(tag_beg - 256);
++ file.seekg((size_t) tag_beg - 256);
+ file.read(sig, 8);
+ if (memcmp(sig, "18273645", 8) == 0)
+ {
+- file.seekg(tag_beg - 256);
++ file.seekg((size_t) tag_beg - 256);
+ tag_beg = file.tellg();
+ file.ignore(256);
+ }
+@@ -267,7 +267,7 @@
+ {
+ // no image binary. don't do anything.
+ }
+- else if (offsets[0] + 4 + nImgSize > static_cast<size_t>(offsets[2]))
++ else if ((size_t) offsets[0] + 4 + nImgSize > static_cast<size_t>(offsets[2]))
+ {
+ // Ack! The image size given extends beyond the next offset! This is
+ // not good... log?
+@@ -275,7 +275,7 @@
+ else
+ {
+ uchar* img_data = new uchar[nImgSize];
+- file.read(img_data, nImgSize);
++ file.read((char*) img_data, nImgSize);
+ ID3_Frame* frame = new ID3_Frame(ID3FID_PICTURE);
+ if (frame)
+ {
diff --git a/audio/id3lib/files/patch-src_tag__parse__v1.cpp b/audio/id3lib/files/patch-src_tag__parse__v1.cpp
new file mode 100644
index 00000000000..0fa75dbffe5
--- /dev/null
+++ b/audio/id3lib/files/patch-src_tag__parse__v1.cpp
@@ -0,0 +1,14 @@
+
+$FreeBSD$
+
+--- src/tag_parse_v1.cpp.orig Mon Sep 11 08:34:06 2000
++++ src/tag_parse_v1.cpp Sun Jul 21 15:13:19 2002
+@@ -67,7 +67,7 @@
+ {
+ const size_t data_size = ID3_V1_LEN - ID3_V1_LEN_ID;
+ uchar tag_bytes[data_size];
+- file.read(tag_bytes, data_size);
++ file.read((char*) tag_bytes, data_size);
+ if (file.gcount() != data_size)
+ {
+ return num_bytes;
diff --git a/audio/id3lib/files/patch-src_utils.cpp b/audio/id3lib/files/patch-src_utils.cpp
new file mode 100644
index 00000000000..582967c2665
--- /dev/null
+++ b/audio/id3lib/files/patch-src_utils.cpp
@@ -0,0 +1,41 @@
+
+$FreeBSD$
+
+--- src/utils.cpp.orig Mon Sep 11 09:46:32 2000
++++ src/utils.cpp Sun Jul 21 15:13:19 2002
+@@ -231,7 +231,7 @@
+
+ bool exists(const char *name)
+ {
+- ifstream file(name, ios::nocreate);
++ ifstream file(name/*, ios::nocreate*/);
+ return file.is_open() != 0;
+ }
+
+@@ -256,7 +256,7 @@
+ size_t size = 0;
+ if (file.is_open())
+ {
+- streamoff curpos = file.tellp();
++ streampos curpos = file.tellp();
+ file.seekp(0, ios::end);
+ size = file.tellp();
+ file.seekp(curpos);
+@@ -275,7 +275,7 @@
+ {
+ file.close();
+ }
+- file.open(name, ios::in | ios::out | ios::binary | ios::nocreate);
++ file.open(name, ios::in | ios::out | ios::binary /*| ios::nocreate*/);
+ if (!file)
+ {
+ return ID3E_ReadOnly;
+@@ -290,7 +290,7 @@
+ {
+ file.close();
+ }
+- file.open(name, ios::in | ios::binary | ios::nocreate);
++ file.open(name, ios::in | ios::binary /*| ios::nocreate*/);
+ if (!file)
+ {
+ return ID3E_NoFile;