Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Dec 2013 05:46:44 +0900
From:      KATO Tsuguru <tkato432@yahoo.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/185340: audio/xmms-wma: Fix build with clang
Message-ID:  <20131231054644.b409f578a8464e317c3fe95c@yahoo.com>
Resent-Message-ID: <201312302110.rBULA9Ow098874@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         185340
>Category:       ports
>Synopsis:       audio/xmms-wma: Fix build with clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 30 21:10:09 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 8.4-RELEASE-p4 i386
>Organization:
>Environment:
>Description:
- Fix build with clang

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/audio/xmms-wma/Makefile audio/xmms-wma/Makefile
--- /usr/ports/audio/xmms-wma/Makefile	2013-12-12 02:42:17.000000000 +0900
+++ audio/xmms-wma/Makefile	2013-12-31 00:00:00.000000000 +0900
@@ -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 @@
 
 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>
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131231054644.b409f578a8464e317c3fe95c>