From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Nov 2 18:40:01 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 02B4E825 for ; Sat, 2 Nov 2013 18:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D4DF422A7 for ; Sat, 2 Nov 2013 18:40:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id rA2Ie0cp067564 for ; Sat, 2 Nov 2013 18:40:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id rA2Ie0te067562; Sat, 2 Nov 2013 18:40:00 GMT (envelope-from gnats) Resent-Date: Sat, 2 Nov 2013 18:40:00 GMT Resent-Message-Id: <201311021840.rA2Ie0te067562@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Vladimir Kondratiev Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A88F75E6 for ; Sat, 2 Nov 2013 18:29:57 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9486D221B for ; Sat, 2 Nov 2013 18:29:57 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id rA2ITv5A070860 for ; Sat, 2 Nov 2013 18:29:57 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id rA2ITu8r070856; Sat, 2 Nov 2013 18:29:56 GMT (envelope-from nobody) Message-Id: <201311021829.rA2ITu8r070856@oldred.freebsd.org> Date: Sat, 2 Nov 2013 18:29:56 GMT From: Vladimir Kondratiev To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/183599: [patch] audio/openal fix build with clang; support staging X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Nov 2013 18:40:01 -0000 >Number: 183599 >Category: ports >Synopsis: [patch] audio/openal fix build with clang; support staging >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: Sat Nov 02 18:40:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Vladimir Kondratiev >Release: >Organization: >Environment: >Description: 1. Fix build with clang and modern gcc 2. Support staging 3. Add support for ALSA sound >How-To-Repeat: >Fix: Patch attached with submission follows: Index: openal/Makefile =================================================================== --- openal/Makefile (revision 332455) +++ openal/Makefile (working copy) @@ -5,16 +5,17 @@ PORTVERSION= 20060211 PORTREVISION= 12 CATEGORIES= audio -MASTER_SITES= http://openal.org/openal_webstf/downloads/ +MASTER_SITES= GENTOO/distfiles DISTVERSION= 0.0.8 MAINTAINER= erik@bz.bzflag.bz COMMENT= A 3D positional spatialized sound library +LICENSE= GPLv2 + CONFLICTS= openal-soft-[0-9]* USE_AUTOTOOLS= libtool -NO_STAGE= yes GNU_CONFIGURE= yes CPPFLAGS+= -I${LOCALBASE}/include CFLAGS+= -Wno-return-type @@ -22,57 +23,30 @@ CONFIGURE_ARGS= --enable-capture \ --disable-arts USES= pathfix pkgconfig gmake -WANT_SDL= yes USE_LDCONFIG= yes -OPTIONS_DEFINE= ESOUND SDL VORBIS SMPEG +OPTIONS_DEFINE= ESOUND SDL VORBIS SMPEG ALSA OPTIONS_DEFINE_i386= ASM OPTIONS_DEFAULT_i386= ASM SMPEG_DESC= smpeg support -.include +ESOUND_USE= GNOME=esound +ESOUND_CONFIGURE_ENABLE=esd +SDL_USE= SDL=sdl +SDL_CONFIGURE_ENABLE= sdl +VORBIS_LIB_DEPENDS= libvorbisfile.so:${PORTSDIR}/audio/libvorbis +VORBIS_CONFIGURE_ENABLE=vorbis +SMPEG_LIB_DEPENDS= libsmpeg.so:${PORTSDIR}/multimedia/smpeg +SMPEG_CONFIGURE_ENABLE= mp3 +ALSA_LIB_DEPENDS= libasound.so:${PORTSDIR}/audio/alsa-lib +ALSA_CONFIGURE_ENABLE= alsa +ASM_BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm -.if ${PORT_OPTIONS:MSMPEG} -WITH_SDL= yes # smpeg requires SDL -.endif - -.if ${PORT_OPTIONS:MESD} -USE_GNOME+= esound -CONFIGURE_ARGS+=--enable-esd -.else -CONFIGURE_ARGS+=--disable-esd -.endif - -.if ${PORT_OPTIONS:MSDL} -USE_SDL+= sdl -CONFIGURE_ENV+= HAVESDL="${SDL_CONFIG}" -CONFIGURE_ARGS+=--enable-sdl -.else -CONFIGURE_ARGS+=--disable-sdl -.endif - -.if ${PORT_OPTIONS:MVORBIS} -LIB_DEPENDS+= vorbisfile.6:${PORTSDIR}/audio/libvorbis -CONFIGURE_ARGS+=--enable-vorbis -.else -CONFIGURE_ARGS+=--disable-vorbis -.endif - -.if ${PORT_OPTIONS:MSMPEG} -LIB_DEPENDS+= smpeg.1:${PORTSDIR}/multimedia/smpeg -CONFIGURE_ARGS+=--enable-smpeg -.else -CONFIGURE_ARGS+=--disable-smpeg -.endif - -.if ${PORT_OPTIONS:MASM} -BUILD_DEPENDS+= nasm:${PORTSDIR}/devel/nasm -.endif - - NOT_FOR_ARCHS= ia64 NOT_FOR_ARCHS_REASON_ia64= does not compile +.include + post-patch: @${REINPLACE_CMD} -e 's/-pthread/${PTHREAD_LIBS}/; \ s/x86_64\*/amd64\* | \*ia64\*/g; \ @@ -89,7 +63,4 @@ @${REINPLACE_CMD} -e '/^NASM=/ s|=.*|=no|' ${WRKSRC}/configure .endif -post-install: - @${CAT} ${PKGMESSAGE} - .include Index: openal/files/patch-src-arch-i386-x86_floatmul.c =================================================================== --- openal/files/patch-src-arch-i386-x86_floatmul.c (revision 332455) +++ openal/files/patch-src-arch-i386-x86_floatmul.c (working copy) @@ -9,3 +9,31 @@ samples_pre /= sizeof(ALshort); samples_main = len - samples_pre; samples_post = samples_main % 8; +@@ -82,11 +82,27 @@ void _alFloatMul(ALshort *bpt, ALfloat s + v_sa.s[3] = v_sa.s[0]; + + while (samples_main--) { ++ union { ++ short s[4]; ++ v4hi v; ++ } ALIGN16(v_one); ++ v_one.s[0] = 1; ++ v_one.s[1] = 0; ++ v_one.s[2] = 0; ++ v_one.s[3] = 0; + temp = __builtin_ia32_pmulhw(*(v4hi*)bpt, v_sa.v); ++#if defined(__GNUC__) && defined(__GNUC_MINOR__) && (__GNUC__ <= 3 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 2)) && !defined(__clang__) + *(v4hi*)bpt = __builtin_ia32_psllw(temp, 1LL); ++#else ++ *(v4hi*)bpt = __builtin_ia32_psllw(temp, v_one.v); ++#endif + bpt += 4; + temp = __builtin_ia32_pmulhw(*(v4hi*)bpt, v_sa.v); ++#if defined(__GNUC__) && defined(__GNUC_MINOR__) && (__GNUC__ <= 3 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 2)) && !defined(__clang__) + *(v4hi*)bpt = __builtin_ia32_psllw(temp, 1LL); ++#else ++ *(v4hi*)bpt = __builtin_ia32_psllw(temp, v_one.v); ++#endif + bpt += 4; + } + } >Release-Note: >Audit-Trail: >Unformatted: