From e4d3fabab0126a23b2796482c3036a97dbb5e0f4 Mon Sep 17 00:00:00 2001 From: Pawel Pekala Date: Fri, 20 Dec 2013 16:21:19 +0000 Subject: [PATCH] - Fix build with clang - Update MASTER_SITES - Support staging PR: ports/184863 Submitted by: KATO Tsuguru --- audio/mp3stat/Makefile | 32 ++++++++++--------- audio/mp3stat/files/patch-base.cpp | 9 ++++++ .../files/patch-input__vorbis__oggstat.cpp | 7 ++++ .../mp3stat/files/patch-ui__console__cli.cpp | 9 ++++++ 4 files changed, 42 insertions(+), 15 deletions(-) create mode 100644 audio/mp3stat/files/patch-base.cpp create mode 100644 audio/mp3stat/files/patch-input__vorbis__oggstat.cpp create mode 100644 audio/mp3stat/files/patch-ui__console__cli.cpp diff --git a/audio/mp3stat/Makefile b/audio/mp3stat/Makefile index 8ec17b87a11d..87402405e548 100644 --- a/audio/mp3stat/Makefile +++ b/audio/mp3stat/Makefile @@ -19,12 +19,12 @@ OPTIONS_DEFAULT= VORBIS WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} -USES= gmake pkgconfig -NO_STAGE= yes +USES= dos2unix gmake pkgconfig +DOS2UNIX_FILES= ui/console/cli.cpp USE_GNOME= gtk20 -CXX+= -I${LOCALBASE}/include -L${LOCALBASE}/lib \ - -Wl,--rpath,${LOCALBASE}/lib +CXXFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib -Wl,--rpath,${LOCALBASE}/lib PORTDOCS= README PLIST_FILES= bin/mp3stat \ @@ -46,23 +46,25 @@ post-patch: @${FIND} ${WRKSRC} -name "Makefile*" | ${XARGS} ${REINPLACE_CMD} -e \ 's|@$${CXX}|$${CXX}|g ; \ s|-ldl|-lz|g ; \ - s|-lc||g ; \ + s|-lc|$${LDFLAGS}|g ; \ s|-Wl,-soname,.*\.so\.1||g ; \ s|-fpic|-fPIC|g ; \ s|^CXX|#CXX|g' do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/mp3stat ${PREFIX}/bin - @${MKDIR} ${PREFIX}/lib/mp3stat - ${INSTALL_DATA} ${WRKSRC}/ui/gtk/ui_gtk2.so ${PREFIX}/lib/mp3stat - ${INSTALL_DATA} ${WRKSRC}/ui/console/ui_console.so ${PREFIX}/lib/mp3stat - ${INSTALL_DATA} ${WRKSRC}/input/mp3/input_mp3.so ${PREFIX}/lib/mp3stat + (cd ${WRKSRC} && ${INSTALL_PROGRAM} mp3stat ${STAGEDIR}${PREFIX}/bin) + @${MKDIR} ${STAGEDIR}${PREFIX}/lib/mp3stat + (cd ${WRKSRC}/ui/gtk && ${INSTALL_DATA} ui_gtk2.so \ + ${STAGEDIR}${PREFIX}/lib/mp3stat) + (cd ${WRKSRC}/ui/console && ${INSTALL_DATA} ui_console.so \ + ${STAGEDIR}${PREFIX}/lib/mp3stat) + (cd ${WRKSRC}/input/mp3 && ${INSTALL_DATA} input_mp3.so \ + ${STAGEDIR}${PREFIX}/lib/mp3stat) .if ${PORT_OPTIONS:MVORBIS} - ${INSTALL_DATA} ${WRKSRC}/input/vorbis/input_vorb.so ${PREFIX}/lib/mp3stat -.endif -.if ${PORT_OPTIONS:MDOCS} - @${MKDIR} ${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} + (cd ${WRKSRC}/input/vorbis && ${INSTALL_DATA} input_vorb.so \ + ${STAGEDIR}${PREFIX}/lib/mp3stat) .endif + @${MKDIR} ${STAGEDIR}${DOCSDIR} + (cd ${WRKSRC} && ${INSTALL_DATA} README ${STAGEDIR}${DOCSDIR}) .include diff --git a/audio/mp3stat/files/patch-base.cpp b/audio/mp3stat/files/patch-base.cpp new file mode 100644 index 000000000000..dbb26395a441 --- /dev/null +++ b/audio/mp3stat/files/patch-base.cpp @@ -0,0 +1,9 @@ +--- base.cpp.orig ++++ base.cpp +@@ -1,4 +1,5 @@ +-#include ++#include ++#include + #include + #include + diff --git a/audio/mp3stat/files/patch-input__vorbis__oggstat.cpp b/audio/mp3stat/files/patch-input__vorbis__oggstat.cpp new file mode 100644 index 000000000000..0871455a927c --- /dev/null +++ b/audio/mp3stat/files/patch-input__vorbis__oggstat.cpp @@ -0,0 +1,7 @@ +--- input/vorbis/oggstat.cpp.orig ++++ input/vorbis/oggstat.cpp +@@ -1,3 +1,4 @@ ++#include + #include "oggstat.h" + + using namespace std; diff --git a/audio/mp3stat/files/patch-ui__console__cli.cpp b/audio/mp3stat/files/patch-ui__console__cli.cpp new file mode 100644 index 000000000000..04d31adc1d19 --- /dev/null +++ b/audio/mp3stat/files/patch-ui__console__cli.cpp @@ -0,0 +1,9 @@ +--- ui/console/cli.cpp.orig ++++ ui/console/cli.cpp +@@ -1,4 +1,5 @@ +-#include ++#include ++#include + #include "cli.h" + + using namespace std;