freebsd-ports/audio/nas/Makefile
Mark Linimon a8693b8dee Force numerous ports that fail to build with clang over to instead always
rely on gcc.  The patch uses the new USE_GCC=any code in Mk/bsd.gcc.mk to
accomplish this.

The ports chosen were ports that blocked 2 or more ports from building with
clang.  (There are several hundred other ports that still fail to build with
clang, even with this patch.  This is merely one step along the way.)

Those interested in fixing these ports with clang, and have clang as their
default compiler, can simply set FORCE_BASE_CC_FOR_TESTING=yes.

For those who have gcc as their default compiler, this change is believed
to cause no change.

Hat:		portmgr
Tested with:	multiple runs on amd64-8-exp-bcm and 9-exp-clang, with various
		combinations of patch/no-patch and flag settings.
2012-10-09 22:12:13 +00:00

51 lines
1.2 KiB
Makefile

# New ports collection makefile for: nas (formerly netaudio)
# Date created: 03 Nov 1994
# Whom: jkh
#
# $FreeBSD$
#
PORTNAME= nas
PORTVERSION= 1.9.3
CATEGORIES= audio
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}.${PORTVERSION}%20%28stable%29
EXTRACT_SUFX= .src.tar.gz
MAINTAINER= multimedia@FreeBSD.org
COMMENT= Network Audio System
USE_GCC= any
USE_IMAKE= yes
USE_XORG= x11 xext xt xau sm ice xp xpm xmu xaw
USE_LDCONFIG= yes
MAKE_ENV+= COMPRESS_CMD="${COMPRESS_CMD:S/c//}"
MAKE_ARGS= CC="${CC}" CXX="${CXX}"
MAKE_JOBS_UNSAFE= yes
PKGMESSAGE= ${WRKDIR}/pkg-message
SUB_FILES= pkg-message
.include "Makefile.man"
.include <bsd.port.pre.mk>
post-patch:
@${FIND} ${WRKSRC} -name '*.c' | ${XARGS} ${GREP} -lF malloc.h \
| ${XARGS} ${REINPLACE_CMD} -n -e "s|<malloc.h>||" -e t -e p
post-configure:
# Work around shortcomings of the Image.rules et. al:
${REINPLACE_CMD} -e 's:-fPIC:${FPIC} -DPIC:g' \
-e 's,-c \$$(CCOPTIONS),-c $$(CFLAGS),' \
-e 's,\(\$$(AR) \$$@ \$$\)(OBJS),\1(OBJS:S|^|unshared/|),' \
${WRKSRC}/lib/audio/Makefile
post-install:
@${CAT} ${PKGMESSAGE}
.if ${ARCH} == "sparc64"
FPIC= -fPIC
.else
FPIC= -fpic
.endif
.include <bsd.port.post.mk>