aboutsummaryrefslogtreecommitdiff
path: root/audio/audacious-mac
diff options
context:
space:
mode:
authorYing-Chieh Liao <ijliao@FreeBSD.org>2007-06-24 02:23:10 +0000
committerYing-Chieh Liao <ijliao@FreeBSD.org>2007-06-24 02:23:10 +0000
commit206a1a4f0d16d131ea8184a102e2eaa9da7f4253 (patch)
tree2e146597ca59e5952eb35944898cbd8090c55db9 /audio/audacious-mac
parent2a06fd38c1a4cac46dd1cf76fe4f07eedeae4e43 (diff)
downloadports-206a1a4f0d16d131ea8184a102e2eaa9da7f4253.tar.gz
ports-206a1a4f0d16d131ea8184a102e2eaa9da7f4253.zip
Notes
Diffstat (limited to 'audio/audacious-mac')
-rw-r--r--audio/audacious-mac/Makefile28
-rw-r--r--audio/audacious-mac/distinfo3
-rw-r--r--audio/audacious-mac/files/patch-src-common.h8
-rw-r--r--audio/audacious-mac/files/patch-src-fileinfo.cpp11
-rw-r--r--audio/audacious-mac/files/patch-src-mac.cpp19
-rw-r--r--audio/audacious-mac/files/url2filename.cpp57
-rw-r--r--audio/audacious-mac/pkg-descr3
-rw-r--r--audio/audacious-mac/pkg-plist3
8 files changed, 132 insertions, 0 deletions
diff --git a/audio/audacious-mac/Makefile b/audio/audacious-mac/Makefile
new file mode 100644
index 000000000000..060cf285e238
--- /dev/null
+++ b/audio/audacious-mac/Makefile
@@ -0,0 +1,28 @@
+# New ports collection makefile for: audacious-audacious
+# Date created: 23 June 2007
+# Whom: buganini@gmail.com
+#
+# $FreeBSD$
+#
+
+PORTNAME= audacious-mac
+PORTVERSION= 0.2.0
+CATEGORIES= audio
+MASTER_SITES= http://www.netswarm.net/misc/
+
+MAINTAINER= buganini@gmail.com
+COMMENT= Audacious plugin that support the Monkey's Audio lossless formats
+
+LIB_DEPENDS= audacious:${PORTSDIR}/multimedia/audacious \
+ mac.2:${PORTSDIR}/audio/mac
+
+USE_GMAKE= yes
+GNU_CONFIGURE= yes
+CONFIGURE_ENV= CFLAGS="${CFLAGS} -I${LOCALBASE}/include/"
+USE_LDCONFIG= yes
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|CXXFLAGS = @CXXFLAGS@|CXXFLAGS = @CXXFLAGS@ -lmac|' ${WRKSRC}/src/Makefile.in
+ ${CP} ${PATCHDIR}/url2filename.cpp ${WRKSRC}/src/
+
+.include <bsd.port.mk>
diff --git a/audio/audacious-mac/distinfo b/audio/audacious-mac/distinfo
new file mode 100644
index 000000000000..d958f8ee49bd
--- /dev/null
+++ b/audio/audacious-mac/distinfo
@@ -0,0 +1,3 @@
+MD5 (audacious-mac-0.2.0.tar.gz) = ec997e0a3721717bf4b78d80e38dcb77
+SHA256 (audacious-mac-0.2.0.tar.gz) = e85f33bc50671d9e6a64563dbf4ec36b164a3d3db2130ad75b99195f67d5af84
+SIZE (audacious-mac-0.2.0.tar.gz) = 319835
diff --git a/audio/audacious-mac/files/patch-src-common.h b/audio/audacious-mac/files/patch-src-common.h
new file mode 100644
index 000000000000..62fac9317716
--- /dev/null
+++ b/audio/audacious-mac/files/patch-src-common.h
@@ -0,0 +1,8 @@
+--- src/common.h Sat Apr 9 20:06:20 2005
++++ src/common.h Sun Jun 24 06:03:13 2007
+@@ -3,3 +3,5 @@
+ #include <libintl.h>
+
+ #define _(String) gettext (String)
++
++#include "url2filename.cpp"
diff --git a/audio/audacious-mac/files/patch-src-fileinfo.cpp b/audio/audacious-mac/files/patch-src-fileinfo.cpp
new file mode 100644
index 000000000000..a7849c28f477
--- /dev/null
+++ b/audio/audacious-mac/files/patch-src-fileinfo.cpp
@@ -0,0 +1,11 @@
+--- src/fileinfo.cpp Fri Apr 15 16:56:44 2005
++++ src/fileinfo.cpp Sun Jun 24 06:02:55 2007
+@@ -778,7 +778,7 @@
+ void mac_file_info_box(char *filename)
+ {
+ char *title;
+-
++ url2filename(filename);
+ int nRetVal;
+ wchar_t *pUTF16Name;
+
diff --git a/audio/audacious-mac/files/patch-src-mac.cpp b/audio/audacious-mac/files/patch-src-mac.cpp
new file mode 100644
index 000000000000..aa86059c575e
--- /dev/null
+++ b/audio/audacious-mac/files/patch-src-mac.cpp
@@ -0,0 +1,19 @@
+--- src/mac.cpp Thu Feb 1 02:46:26 2007
++++ src/mac.cpp Sun Jun 24 06:02:16 2007
+@@ -146,7 +146,7 @@
+
+ static int decompress_init(InputPlayback *playback)
+ {
+- char *filename = playback->filename;
++ char *filename = url2filename(playback->filename);
+
+ int nRetVal;
+
+@@ -386,6 +386,7 @@
+
+ void mac_get_song_info(char *filename, char **title, int *length)
+ {
++ url2filename(filename);
+ int nRetVal = 0;
+
+ if (filename == NULL)
diff --git a/audio/audacious-mac/files/url2filename.cpp b/audio/audacious-mac/files/url2filename.cpp
new file mode 100644
index 000000000000..060987481306
--- /dev/null
+++ b/audio/audacious-mac/files/url2filename.cpp
@@ -0,0 +1,57 @@
+/*
+Under Gnome, drag file into the playlist will pass a URL as filename (like file:///tmp/url%20encoded.ape)
+The plugin cannot cope with URL originally, and this is the patch.
+
+-buganini@gmail.com
+*/
+
+#include "string.h"
+
+static char *url2filename(char *url){
+ unsigned char *rpt,*wpt;
+ char flag=0;
+ unsigned char table[128]={0};
+
+ if(strncmp(url,"file://",7)!=0){
+ return url;
+ }
+ table[(unsigned char)'0']=0;
+ table[(unsigned char)'1']=1;
+ table[(unsigned char)'2']=2;
+ table[(unsigned char)'3']=3;
+ table[(unsigned char)'4']=4;
+ table[(unsigned char)'5']=5;
+ table[(unsigned char)'6']=6;
+ table[(unsigned char)'7']=7;
+ table[(unsigned char)'8']=8;
+ table[(unsigned char)'9']=9;
+ table[(unsigned char)'a']=table[(unsigned char)'A']=10;
+ table[(unsigned char)'b']=table[(unsigned char)'B']=11;
+ table[(unsigned char)'c']=table[(unsigned char)'C']=12;
+ table[(unsigned char)'d']=table[(unsigned char)'D']=13;
+ table[(unsigned char)'e']=table[(unsigned char)'E']=14;
+ table[(unsigned char)'f']=table[(unsigned char)'F']=15;
+
+ rpt=wpt=(unsigned char*)url;
+ rpt+=7;
+ while(*rpt!=0){
+ if(flag==0){
+ if(*rpt=='%'){
+ flag=1;
+ }else{
+ *wpt=*rpt;
+ ++wpt;
+ }
+ }else if(flag==1){
+ *wpt=table[*rpt]<<4;
+ flag=2;
+ }else if(flag==2){
+ *wpt|=table[*rpt];
+ ++wpt;
+ flag=0;
+ }
+ ++rpt;
+ }
+ *wpt=0;
+ return url;
+}
diff --git a/audio/audacious-mac/pkg-descr b/audio/audacious-mac/pkg-descr
new file mode 100644
index 000000000000..81eeb3a5543c
--- /dev/null
+++ b/audio/audacious-mac/pkg-descr
@@ -0,0 +1,3 @@
+Audacious Input Plugin that supports the Monkey's Audio lossless format.
+
+WWW: http://www.netswarm.net
diff --git a/audio/audacious-mac/pkg-plist b/audio/audacious-mac/pkg-plist
new file mode 100644
index 000000000000..178ec0343af6
--- /dev/null
+++ b/audio/audacious-mac/pkg-plist
@@ -0,0 +1,3 @@
+lib/audacious/Input/libaudacious-mac.so
+@dirrmtry lib/audacious/Input
+@dirrmtry lib/audacious