diff options
author | edwin <edwin@FreeBSD.org> | 2004-12-12 22:04:19 +0000 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2004-12-12 22:04:19 +0000 |
commit | 7b7d8f2125e4349816ec08fcf332ccdffb3159ca (patch) | |
tree | c68105f5122b56b928a51b0b3d7363bd695ece0a | |
parent | fb5a897560e80006b2ca06aa2b810f4a012fc145 (diff) | |
download | FreeBSD-ports-7b7d8f2125e4349816ec08fcf332ccdffb3159ca.zip FreeBSD-ports-7b7d8f2125e4349816ec08fcf332ccdffb3159ca.tar.gz |
[ maintainer ] audio/xmms-wma: turn on iconv support again
Recently I had a chance to speak with xmms-wma author on
some internet forum and figured out that he thinks of
disabling iconv as my sin. So, I've enabled it again, but
it is optional now.
PR: ports/74959
Submitted by: Roman Bogorodskiy <bogorodskiy@inbox.ru>
-rw-r--r-- | audio/xmms-wma/Makefile | 6 | ||||
-rw-r--r-- | audio/xmms-wma/files/patch-ffmpeg-strip-wma::asf.c | 45 |
2 files changed, 32 insertions, 19 deletions
diff --git a/audio/xmms-wma/Makefile b/audio/xmms-wma/Makefile index f04e072..91e4160 100644 --- a/audio/xmms-wma/Makefile +++ b/audio/xmms-wma/Makefile @@ -7,6 +7,7 @@ PORTNAME= xmms-wma PORTVERSION= 1.0.4 +PORTREVISION= 1 CATEGORIES= audio MASTER_SITES= http://mcmcc.bat.ru/xmms-wma/ @@ -24,6 +25,11 @@ ONLY_FOR_ARCHS= i386 PLIST_FILES= lib/xmms/Input/libwma.so +.if defined(ICONV) +CFLAGS+= -DICONV +USE_ICONV= yes +.endif + post-extract: @${REINPLACE_CMD} -e 's|gcc|${CC}|g' ${WRKSRC}/Makefile.inc @${REINPLACE_CMD} -e 's|gcc|${CC}|g' ${WRKSRC}/ffmpeg-strip-wma/config.mak diff --git a/audio/xmms-wma/files/patch-ffmpeg-strip-wma::asf.c b/audio/xmms-wma/files/patch-ffmpeg-strip-wma::asf.c index bd02acd..c4f81a1 100644 --- a/audio/xmms-wma/files/patch-ffmpeg-strip-wma::asf.c +++ b/audio/xmms-wma/files/patch-ffmpeg-strip-wma::asf.c @@ -1,7 +1,14 @@ ---- ffmpeg-strip-wma/asf.c.orig Sun Jul 11 06:51:15 2004 -+++ ffmpeg-strip-wma/asf.c Sun Jul 11 06:53:34 2004 -@@ -18,8 +18,6 @@ +--- ffmpeg-strip-wma/asf.c.orig Wed May 26 19:16:39 2004 ++++ ffmpeg-strip-wma/asf.c Sat Dec 11 21:32:58 2004 +@@ -16,10 +16,13 @@ + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ ++ ++#ifdef USE_ICONV ++#include <iconv.h> ++#endif ++ #include "avformat.h" #include "avi.h" -//#include "mpegaudio.h" @@ -9,42 +16,42 @@ #undef NDEBUG #include <assert.h> -@@ -830,6 +828,7 @@ +@@ -830,6 +833,7 @@ return str; } -+/* ++#ifdef USE_ICONV static void tag_recode(char *before, int len) { int result; -@@ -859,21 +858,22 @@ +@@ -859,6 +863,7 @@ return; return; } -+*/ ++#endif static void get_str16_nolen(ByteIOContext *pb, int len, char *buf, int buf_size) { -- int c, lenz; -+ int c; - char *q; - +@@ -868,12 +873,17 @@ q = buf; -- lenz = len; + lenz = len; while (len > 0) { - c = get_byte(pb); - if ((q - buf) < buf_size-1) - *q++ = c; - len--; -- } -- tag_recode(buf, lenz); -+ c = get_le16(pb); ++ c = get_byte(pb); + if ((q - buf) < buf_size - 1) + *q++ = c; -+ len-=2; -+ } -+ -+ *q = '\0'; ++ len--; + } +- tag_recode(buf, lenz); ++ ++#ifdef USE_ICONV ++ tag_recode(buf, lenz); ++#else ++ *q = '\0'; ++#endif } static int asf_probe(AVProbeData *pd) |