[88985] trunk/dports/audio/pianobar

ryandesign at macports.org ryandesign at macports.org
Sun Jan 15 23:54:30 PST 2012


Revision: 88985
          http://trac.macports.org/changeset/88985
Author:   ryandesign at macports.org
Date:     2012-01-15 23:54:27 -0800 (Sun, 15 Jan 2012)
Log Message:
-----------
pianobar: add libpiano subport; see #32896

Modified Paths:
--------------
    trunk/dports/audio/pianobar/Portfile

Added Paths:
-----------
    trunk/dports/audio/pianobar/files/
    trunk/dports/audio/pianobar/files/patch-Makefile.diff

Modified: trunk/dports/audio/pianobar/Portfile
===================================================================
--- trunk/dports/audio/pianobar/Portfile	2012-01-16 07:23:15 UTC (rev 88984)
+++ trunk/dports/audio/pianobar/Portfile	2012-01-16 07:54:27 UTC (rev 88985)
@@ -22,22 +22,17 @@
                             configure keybindings, last.fm scrobbling, \
                             proxy support for listening outside of USA.
 
-depends_lib                 port:libao \
-                            port:faad2 \
-                            port:libmad \
-                            port:gnutls
-
 checksums                   sha256  6d19e5abde542bcdf8b9cfa50448fbe95c1e113f59e54065c9f4e0fbf78690f9 \
                             rmd160  60573b71376d3494b4b46421c5ba24369136f025
 
+depends_lib                 port:gnutls
+
 configure.cflags-append     -std=c99
 
 use_configure               no
 
 variant universal {}
 
-build.target                ${name}
-
 build.args                  CC="${configure.cc} [get_canonical_archflags]" \
                             PREFIX=${prefix} \
                             CFLAGS="${configure.cflags} ${configure.cppflags}" \
@@ -45,5 +40,23 @@
 
 destroot.args               PREFIX=${prefix}
 
+subport pianobar {
+    depends_lib-append      port:faad2 \
+                            port:libao \
+                            port:libmad
+}
+
+subport libpiano {
+    build.target            libpiano.so.0
+    destroot.target         install-libpiano
+    platform darwin {
+        build.target        libpiano.0.dylib
+    }
+}
+
+platform darwin {
+    patchfiles-append       patch-Makefile.diff
+}
+
 livecheck.type              regex
 livecheck.regex             ${name}-(\[0-9.\]+)${extract.suffix}

Added: trunk/dports/audio/pianobar/files/patch-Makefile.diff
===================================================================
--- trunk/dports/audio/pianobar/files/patch-Makefile.diff	                        (rev 0)
+++ trunk/dports/audio/pianobar/files/patch-Makefile.diff	2012-01-16 07:54:27 UTC (rev 88985)
@@ -0,0 +1,54 @@
+--- Makefile.orig	2012-01-10 15:54:49.000000000 -0600
++++ Makefile	2012-01-15 17:40:40.000000000 -0600
+@@ -90,7 +90,7 @@
+ 
+ # build pianobar
+ ifeq (${DYNLINK},1)
+-pianobar: ${PIANOBAR_OBJ} ${PIANOBAR_HDR} libpiano.so.0
++pianobar: ${PIANOBAR_OBJ} ${PIANOBAR_HDR} libpiano.0.dylib
+ 	@echo "  LINK  $@"
+ 	@${CC} -o $@ ${PIANOBAR_OBJ} ${LDFLAGS} -lao -lpthread -lm -L. -lpiano \
+ 			${LIBFAAD_LDFLAGS} ${LIBMAD_LDFLAGS} ${LIBGNUTLS_LDFLAGS}
+@@ -104,15 +104,15 @@
+ endif
+ 
+ # build shared and static libpiano
+-libpiano.so.0: ${LIBPIANO_RELOBJ} ${LIBPIANO_HDR} ${LIBWAITRESS_RELOBJ} \
++libpiano.0.dylib: ${LIBPIANO_RELOBJ} ${LIBPIANO_HDR} ${LIBWAITRESS_RELOBJ} \
+ 		${LIBWAITRESS_HDR} ${LIBEZXML_RELOBJ} ${LIBEZXML_HDR} \
+ 		${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ} ${LIBEZXML_OBJ}
+ 	@echo "  LINK  $@"
+-	@${CC} -shared -Wl,-soname,libpiano.so.0 ${CFLAGS} ${LDFLAGS} ${LIBGNUTLS_LDFLAGS} \
+-			-o libpiano.so.0.0.0 ${LIBPIANO_RELOBJ} \
++	@${CC} -dynamiclib -Wl,-install_name,${LIBDIR}/libpiano.0.dylib ${CFLAGS} ${LDFLAGS} ${LIBGNUTLS_LDFLAGS} \
++			-o libpiano.0.0.0.dylib ${LIBPIANO_RELOBJ} \
+ 			${LIBWAITRESS_RELOBJ} ${LIBEZXML_RELOBJ}
+-	@ln -s libpiano.so.0.0.0 libpiano.so.0
+-	@ln -s libpiano.so.0 libpiano.so
++	@ln -s libpiano.0.0.0.dylib libpiano.0.dylib
++	@ln -s libpiano.0.dylib libpiano.dylib
+ 	@echo "    AR  libpiano.a"
+ 	@${AR} rcs libpiano.a ${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ} ${LIBEZXML_OBJ}
+ 
+@@ -132,7 +132,7 @@
+ 	@echo " CLEAN"
+ 	@${RM} ${PIANOBAR_OBJ} ${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ} ${LIBWAITRESS_OBJ}/test.o \
+ 			${LIBEZXML_OBJ} ${LIBPIANO_RELOBJ} ${LIBWAITRESS_RELOBJ} \
+-			${LIBEZXML_RELOBJ} pianobar libpiano.so* libpiano.a waitress-test
++			${LIBEZXML_RELOBJ} pianobar libpiano*.dylib libpiano.a waitress-test
+ 
+ all: pianobar
+ 
+@@ -183,9 +183,9 @@
+ 
+ install-libpiano:
+ 	install -d ${DESTDIR}/${LIBDIR}/
+-	install -m644 libpiano.so.0.0.0 ${DESTDIR}/${LIBDIR}/
+-	ln -s libpiano.so.0.0.0 ${DESTDIR}/${LIBDIR}/libpiano.so.0
+-	ln -s libpiano.so.0 ${DESTDIR}/${LIBDIR}/libpiano.so
++	install -m644 libpiano.0.0.0.dylib ${DESTDIR}/${LIBDIR}/
++	ln -s libpiano.0.0.0.dylib ${DESTDIR}/${LIBDIR}/libpiano.0.dylib
++	ln -s libpiano.0.dylib ${DESTDIR}/${LIBDIR}/libpiano.dylib
+ 	install -m644 libpiano.a ${DESTDIR}/${LIBDIR}/
+ 	install -d ${DESTDIR}/${INCDIR}/
+ 	install -m644 src/libpiano/piano.h ${DESTDIR}/${INCDIR}/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120115/e7274d40/attachment.html>


More information about the macports-changes mailing list