aboutsummaryrefslogtreecommitdiff
path: root/multimedia/gopchop
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2004-09-30 18:34:10 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2004-09-30 18:34:10 +0000
commit493ec5f9a1e09b939dbfe30e5bd524ea1b235030 (patch)
tree266a997f5f422553092b66714aad515a277a26ca /multimedia/gopchop
parentd3dae2133e692f6a7bb8592c5f6f2587de228d60 (diff)
downloadports-493ec5f9a1e09b939dbfe30e5bd524ea1b235030.tar.gz
ports-493ec5f9a1e09b939dbfe30e5bd524ea1b235030.zip
Unbreak the build with recent GCC.
Reported by: kris Approved by: portmgr (krion), fjoe (mentor, implicit)
Notes
Notes: svn path=/head/; revision=118513
Diffstat (limited to 'multimedia/gopchop')
-rw-r--r--multimedia/gopchop/Makefile8
-rw-r--r--multimedia/gopchop/files/patch-src::MPEG2Parser.cpp146
-rw-r--r--multimedia/gopchop/files/patch-src::Main.cpp27
3 files changed, 174 insertions, 7 deletions
diff --git a/multimedia/gopchop/Makefile b/multimedia/gopchop/Makefile
index 86705ad55692..2662fefe1a31 100644
--- a/multimedia/gopchop/Makefile
+++ b/multimedia/gopchop/Makefile
@@ -38,16 +38,10 @@ USE_GETTEXT= yes
PLIST_SUB+= NLS=""
.endif
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 502126
-BROKEN= "Does not compile on FreeBSD >= 5.x"
-.endif
-
post-patch:
@${REINPLACE_CMD} -e 's| -mcpu=.*"|"|g' ${WRKSRC}/configure
@${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${REINPLACE_CMD} -e \
's|pixmaps/\$$(PACKAGE)|\$$(PACKAGE)/pixmaps|g ; \
s|-lglib||g'
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/multimedia/gopchop/files/patch-src::MPEG2Parser.cpp b/multimedia/gopchop/files/patch-src::MPEG2Parser.cpp
new file mode 100644
index 000000000000..03bf94a3a914
--- /dev/null
+++ b/multimedia/gopchop/files/patch-src::MPEG2Parser.cpp
@@ -0,0 +1,146 @@
+--- src/MPEG2Parser.cpp.orig Thu Sep 30 17:15:58 2004
++++ src/MPEG2Parser.cpp Thu Sep 30 17:22:57 2004
+@@ -194,7 +194,7 @@
+ off_t pes_loc;
+
+ pes_loc = location;
+- if (!((void *) header = attach(sizeof(*header))))
++ if (!(header = (PES_packet_header_t *) attach(sizeof(*header))))
+ {
+ ATTACH_FAILED(_("header"), sizeof(*header));
+ return;
+@@ -225,7 +225,7 @@
+ SKIP_BYTES(length);
+ break;
+
+- if (!((void *) data = attach(length)))
++ if (!(data = (uint8_t *) attach(length)))
+ {
+ ATTACH_FAILED(_("stream data"), length);
+ return;
+@@ -242,7 +242,7 @@
+ SKIP_BYTES(length);
+ break;
+
+- if (!((void *) data = attach(length)))
++ if (!(data = (uint8_t *) attach(length)))
+ {
+ ATTACH_FAILED(_("padding data"), length);
+ return;
+@@ -297,7 +297,7 @@
+ break;
+ }
+
+- if (!((void *) internals_area = attach(sizeof(internals))))
++ if (!(internals_area = (PES_packet_internals_t *) attach(sizeof(internals))))
+ {
+ ATTACH_FAILED(_("flag data"), sizeof(internals));
+ return;
+@@ -317,7 +317,7 @@
+
+ if (CheckMaskValue(internals.bits[1], 0xC0, 0x80))
+ {
+- if (!((void *) PTS_data = attach(5)))
++ if (!(PTS_data = (uint8_t *) attach(5)))
+ {
+ ATTACH_FAILED(_("PTS data"), 5);
+ return;
+@@ -329,7 +329,7 @@
+ }
+ if (CheckMaskValue(internals.bits[1], 0xC0, 0xC0))
+ {
+- if (!((void *) PTS_data = attach(5)))
++ if (!(PTS_data = (uint8_t *) attach(5)))
+ {
+ ATTACH_FAILED(_("PTS data"), 5);
+ return;
+@@ -338,7 +338,7 @@
+ /*
+ if (debug) Report("has PTS");
+ */
+- if (!((void *) DTS_data = attach(5)))
++ if (!(DTS_data = (uint8_t *) attach(5)))
+ {
+ ATTACH_FAILED(_("DTS data"), 5);
+ return;
+@@ -366,7 +366,7 @@
+ if (CheckMaskValue(internals.bits[1], 0x4, 0x4))
+ {
+ if (!
+- ((void *) additional_copy_info =
++ (additional_copy_info = (PES_packet_additional_copy_info_t *)
+ attach(sizeof(*additional_copy_info))))
+ {
+ ATTACH_FAILED(_("additional copy info"),
+@@ -390,7 +390,7 @@
+ {
+ PES_packet_extension_t *extension;
+
+- if (!((void *) extension = attach(sizeof(*extension))))
++ if (!(extension = (PES_packet_extension_t *) attach(sizeof(*extension))))
+ {
+ ATTACH_FAILED(_("extension data"), sizeof(*extension));
+ return;
+@@ -398,7 +398,7 @@
+
+ if (PPE_PES_private_data_flag(extension->bits[0]))
+ {
+- if (!((void *) PES_private_data = attach(16)))
++ if (!(PES_private_data = (uint8_t *) attach(16)))
+ {
+ ATTACH_FAILED(_("PES private data"), 16);
+ return;
+@@ -407,7 +407,7 @@
+ if (PPE_pack_header_field_flag(extension->bits[0]))
+ {
+ uint8_t *pack_field_length;
+- if (!((void *) pack_field_length = attach(1)))
++ if (!(pack_field_length = (uint8_t *) attach(1)))
+ {
+ ATTACH_FAILED(_("PES extension pack field length"),
+ 1);
+@@ -480,7 +480,7 @@
+ length -= (internals.PES_header_data_length + 3);
+
+ data_loc = location;
+- if (!((void *) data = attach(length)))
++ if (!(data = (uint8_t *) attach(length)))
+ {
+ ATTACH_FAILED(_("ES data"), length);
+ return;
+@@ -519,7 +519,7 @@
+ fprintf(stderr, "System @ %llu?\n", location);
+ #endif
+
+- if (!((void *) header = attach(sizeof(*header))))
++ if (!(header = (system_header_t *) attach(sizeof(*header))))
+ {
+ ATTACH_FAILED(_("header"), sizeof(*header));
+ return;
+@@ -547,7 +547,7 @@
+
+ while (forwardBitMatch(1, 0x1))
+ {
+- if (!((void *) stream = attach(sizeof(*stream))))
++ if (!(stream = (stream_id_t *) attach(sizeof(*stream))))
+ {
+ ATTACH_FAILED(_("stream header"), sizeof(*stream));
+ return;
+@@ -574,7 +574,7 @@
+
+ pack_start = location;
+
+- if (!((void *) header = attach(sizeof(*header))))
++ if (!(header = (pack_header_t *) attach(sizeof(*header))))
+ {
+ ATTACH_FAILED(_("header"), sizeof(*header));
+ return;
+@@ -749,7 +749,7 @@
+
+ while (tosearch > 0)
+ {
+- if (((void *) ptr = memchr(buf, 0x00, tosearch)))
++ if ((ptr = (uint8_t *) memchr(buf, 0x00, tosearch)))
+ {
+ if (verify(ptr, 4, code))
+ {
diff --git a/multimedia/gopchop/files/patch-src::Main.cpp b/multimedia/gopchop/files/patch-src::Main.cpp
index abeefe7b5d73..e23efc2deabd 100644
--- a/multimedia/gopchop/files/patch-src::Main.cpp
+++ b/multimedia/gopchop/files/patch-src::Main.cpp
@@ -1,5 +1,14 @@
--- src/Main.cpp.orig Thu Apr 15 12:08:27 2004
+++ src/Main.cpp Thu Apr 15 12:08:40 2004
+@@ -305,7 +305,7 @@
+ static gchar *str = NULL;
+
+ // text needs a static area, I think... ?
+- (void *) str = g_realloc(str, strlen(text) + 1);
++ str = (gchar *) g_realloc(str, strlen(text) + 1);
+ strcpy(str, text);
+
+ gtk_text_freeze(GTK_TEXT(error_text_why));
@@ -998,7 +998,6 @@
else if (accel & MPEG2_ACCEL_SPARC_VIS2)
printf("%s", _("Using Sparc VIS2 acceleration\n"));
@@ -8,3 +17,21 @@
printf("%s", _("Using no special acceleration\n"));
if (!(mpeg2dec = mpeg2_init()))
+@@ -1382,7 +1381,7 @@
+ }
+
+ len = ves->getLen();
+- (void *)loc = mpeg2parser->bytesAvail(ves->getStart(), len);
++ loc = (uint8_t *) mpeg2parser->bytesAvail(ves->getStart(), len);
+
+ /*
+ fprintf(stderr,_("\t\tVES: %d @ %llu (%d): 0x%08x\n"),
+@@ -1399,7 +1398,7 @@
+ // send entire packet to pipe
+
+ len = packet->getLen();
+- (void *)loc = mpeg2parser->bytesAvail(packet->getStart(), len);
++ loc = (uint8_t *) mpeg2parser->bytesAvail(packet->getStart(), len);
+ if (loc && client_pipe)
+ {
+ int written;