1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-20 20:09:11 +00:00

[ 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>
This commit is contained in:
Edwin Groothuis 2004-12-12 22:04:19 +00:00
parent d0fa00ffa7
commit 68e6c5f9dc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=123841
2 changed files with 32 additions and 19 deletions

View File

@ -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

View File

@ -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)