diff options
author | miwi <miwi@FreeBSD.org> | 2014-01-19 16:57:40 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2014-01-19 16:57:40 +0800 |
commit | 3764f2897709cab614b6ca803161e00085e86f9e (patch) | |
tree | 3aa37e6f7b049a69e99940958d37c64b9f7e0dda /audio | |
parent | afd6d20d55826a9ed2544f97d48e5ffa008f5f58 (diff) | |
download | freebsd-ports-gnome-3764f2897709cab614b6ca803161e00085e86f9e.tar.gz freebsd-ports-gnome-3764f2897709cab614b6ca803161e00085e86f9e.tar.zst freebsd-ports-gnome-3764f2897709cab614b6ca803161e00085e86f9e.zip |
- Fix build with clang
PR: 185340
Submitted by: ports fury
Diffstat (limited to 'audio')
-rw-r--r-- | audio/xmms-wma/Makefile | 56 |
1 files changed, 36 insertions, 20 deletions
diff --git a/audio/xmms-wma/Makefile b/audio/xmms-wma/Makefile index 2a8069c11c83..7172b85dfc21 100644 --- a/audio/xmms-wma/Makefile +++ b/audio/xmms-wma/Makefile @@ -3,7 +3,7 @@ PORTNAME= xmms-wma PORTVERSION= 1.0.5 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= audio MASTER_SITES= http://mcmcc.bat.ru/xmms-wma/ @@ -12,38 +12,54 @@ COMMENT= WMA plugin for xmms LIB_DEPENDS= libxmms.so:${PORTSDIR}/multimedia/xmms -USES= gmake -NO_STAGE= yes -USE_BZIP2= yes -CFLAGS+= -fPIC -DPIC +OPTIONS_DEFINE= ICONV +OPTIONS_DEFAULT=ICONV + ONLY_FOR_ARCHS= i386 amd64 sparc64 + +USE_BZIP2= yes +USES= compiler gmake USE_XORG= xi xext x11 +USE_CSTD= gnu89 +USE_LDCONFIG= yes + +CFLAGS+= -fPIC -DPIC PLIST_FILES= lib/xmms/Input/libwma.so -USE_LDCONFIG= yes -.if defined(WITH_ICONV) +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MICONV} +USES+= iconv CFLAGS+= -DUSE_ICONV -USES= iconv .endif .include <bsd.port.pre.mk> -pre-everything:: -.if !defined(WITH_ICONV) - @${ECHO_MSG} "You may specify the following on the command line:" - @${ECHO_MSG} " " - @${ECHO_MSG} "WITH_ICONV=yes Enable tag recoding support using iconv" - @${ECHO_MSG} " " +.if ${CHOSEN_COMPILER_TYPE} == "clang" +CFLAGS+= -D__inline__= .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 - @${REINPLACE_CMD} -e 's|CFLAGS :=|CFLAGS := ${CFLAGS}|g' ${WRKSRC}/Makefile.inc -.if ${ARCH}=="sparc64" - @${REINPLACE_CMD} -e 's|X86|SPARC64|' ${WRKSRC}/ffmpeg-strip-wma/config.mak - @${REINPLACE_CMD} -e 's|#define ARCH_X86 1|#define ARCH_SPARC64 1|' ${WRKSRC}/ffmpeg-strip-wma/config.h + @${REINPLACE_CMD} -e \ + 's|^CC :=|CC ?=| ; \ + s|^CFLAGS :=|CFLAGS += | ; \ + s|-O[0-9]||' ${WRKSRC}/Makefile.inc + @${REINPLACE_CMD} -e \ + 's|^MAKE=|MAKE?=| ; \ + s|^CC=|CC?=| ; \ + s|-O[0-9]||' ${WRKSRC}/ffmpeg-strip-wma/config.mak +.if ${ARCH} == "sparc64" + @${REINPLACE_CMD} -e \ + s|X86|SPARC64|' ${WRKSRC}/ffmpeg-strip-wma/config.mak + @${REINPLACE_CMD} -e \ + 's|#define ARCH_X86 1|#define ARCH_SPARC64 1|' \ + ${WRKSRC}/ffmpeg-strip-wma/config.h .endif +do-install: + @${MKDIR} ${STAGEDIR}${PREFIX}/lib/xmms/Input + (cd ${WRKSRC} && ${INSTALL_LIB} libwma.so \ + ${STAGEDIR}${PREFIX}/lib/xmms/Input) + .include <bsd.port.post.mk> |