Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Mar 2019 03:40:34 +0000 (UTC)
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r494873 - in head/audio/csound: . files
Message-ID:  <201903070340.x273eYiS003205@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yuri
Date: Thu Mar  7 03:40:34 2019
New Revision: 494873
URL: https://svnweb.freebsd.org/changeset/ports/494873

Log:
  audio/csound: fix build on powerpc*
  
  PR:		236315
  Submitted by:	Piotr Kubaj <pkubaj@anongoth.pl>

Added:
  head/audio/csound/files/patch-OOps_pffft.c   (contents, props changed)
Modified:
  head/audio/csound/Makefile
  head/audio/csound/files/patch-CMakeLists.txt

Modified: head/audio/csound/Makefile
==============================================================================
--- head/audio/csound/Makefile	Thu Mar  7 03:38:30 2019	(r494872)
+++ head/audio/csound/Makefile	Thu Mar  7 03:40:34 2019	(r494873)
@@ -23,6 +23,9 @@ USES=		alias bison cmake compiler:c++11-lib eigen:3 lo
 USE_GITHUB=	yes
 USE_LDCONFIG=	yes
 
+CFLAGS_powerpc=	-maltivec
+CFLAGS_powerpcspe=	-DPFFFT_SIMD_DISABLE
+CFLAGS_powerpc64=	-maltivec
 CMAKE_ARGS=	-DBUILD_CSOUNDVST:BOOL=OFF \
 		-DBUILD_PD_CLASS:BOOL=OFF \
 		-DPYTHON_MODULE_INSTALL_DIR:PATH="${PYTHONPREFIX_SITELIBDIR}" \

Modified: head/audio/csound/files/patch-CMakeLists.txt
==============================================================================
--- head/audio/csound/files/patch-CMakeLists.txt	Thu Mar  7 03:38:30 2019	(r494872)
+++ head/audio/csound/files/patch-CMakeLists.txt	Thu Mar  7 03:40:34 2019	(r494873)
@@ -20,13 +20,7 @@
  
  set(JAVA_MODULE_INSTALL_DIR ${LIBRARY_INSTALL_DIR} CACHE PATH "Java module install dir")
  set(LUA_MODULE_INSTALL_DIR ${LIBRARY_INSTALL_DIR} CACHE PATH "Lua module install dir")
-@@ -373,12 +373,12 @@ endif()
- 
- endif(WIN32)
- 
--if(APPLE)
-+if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "${OPSYS}")
- set(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -stdlib=libc++")
+@@ -378,7 +378,7 @@ set(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -stdlib=libc+
  set_target_properties(${CSOUNDLIB} PROPERTIES CXX_COMPILE_FLAGS  "-std=c++11")
  endif()
  

Added: head/audio/csound/files/patch-OOps_pffft.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/csound/files/patch-OOps_pffft.c	Thu Mar  7 03:40:34 2019	(r494873)
@@ -0,0 +1,32 @@
+--- OOps/pffft.c.orig	2019-03-05 17:24:02 UTC
++++ OOps/pffft.c
+@@ -63,6 +63,9 @@
+ #include <stdio.h>
+ #include <assert.h>
+ #include <stdint.h>
++#if !defined(PFFFT_SIMD_DISABLE) && (defined(__ppc__) || defined(__ppc64__))
++#include <altivec.h>
++#endif
+ 
+ /* detect compiler flavour */
+ #if defined(_MSC_VER)
+@@ -114,8 +117,8 @@ inline v4sf ld_ps1(const float *p) { v4sf v=vec_lde(0,
+ #  define LD_PS1(p) ld_ps1(&p)
+ #  define INTERLEAVE2(in1, in2, out1, out2) { v4sf tmp__ = vec_mergeh(in1, in2); out2 = vec_mergel(in1, in2); out1 = tmp__; }
+ #  define UNINTERLEAVE2(in1, in2, out1, out2) {                           \
+-    vector unsigned char vperm1 =  (vector unsigned char)(0,1,2,3,8,9,10,11,16,17,18,19,24,25,26,27); \
+-    vector unsigned char vperm2 =  (vector unsigned char)(4,5,6,7,12,13,14,15,20,21,22,23,28,29,30,31); \
++    vector unsigned char vperm1 =  (vector unsigned char){0,1,2,3,8,9,10,11,16,17,18,19,24,25,26,27}; \
++    vector unsigned char vperm2 =  (vector unsigned char){4,5,6,7,12,13,14,15,20,21,22,23,28,29,30,31}; \
+     v4sf tmp__ = vec_perm(in1, in2, vperm1); out2 = vec_perm(in1, in2, vperm2); out1 = tmp__; \
+   }
+ #  define VTRANSPOSE4(x0,x1,x2,x3) {              \
+@@ -128,7 +131,7 @@ inline v4sf ld_ps1(const float *p) { v4sf v=vec_lde(0,
+     x2 = vec_mergeh(y1, y3);                    \
+     x3 = vec_mergel(y1, y3);                    \
+   }
+-#  define VSWAPHL(a,b) vec_perm(a,b, (vector unsigned char)(16,17,18,19,20,21,22,23,8,9,10,11,12,13,14,15))
++#  define VSWAPHL(a,b) vec_perm(a,b, (vector unsigned char){16,17,18,19,20,21,22,23,8,9,10,11,12,13,14,15})
+ #  define VALIGNED(ptr) ((((uintptr_t)(ptr)) & 0xF) == 0)
+ 
+ /*



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