audio/soundtouch: Update to 2.3.1
Switch to CMake Enable OpenMP on aarch64 and amd64 by default Enable OPTIMIZED_CFLAGS by default PR: 258730 Approved by: port maintainer, arrowd (mentor) Differential Revision: https://reviews.freebsd.org/D32288
This commit is contained in:
@@ -1,48 +1,36 @@
|
||||
# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
|
||||
|
||||
PORTNAME= soundtouch
|
||||
DISTVERSION= 2.2
|
||||
PORTREVISION= 1
|
||||
DISTVERSION= 2.3.1
|
||||
CATEGORIES= audio
|
||||
|
||||
MAINTAINER= crees@FreeBSD.org
|
||||
COMMENT= Open-source audio processing library
|
||||
|
||||
LICENSE= LGPL21
|
||||
LICENSE_FILE= ${WRKSRC}/COPYING.TXT
|
||||
|
||||
USES= cmake
|
||||
USE_GITLAB= yes
|
||||
GL_COMMIT= 762f56024b7ade81f6565903161dffec0ad4741e
|
||||
GNU_CONFIGURE= yes
|
||||
GL_COMMIT= e1f315f5358d9db5cee35a7a2886425489fcefe8
|
||||
USE_LDCONFIG= yes
|
||||
|
||||
USES= autoreconf libtool pathfix
|
||||
CMAKE_ON= BUILD_SHARED_LIBS
|
||||
|
||||
OPTIONS_DEFINE= INTEGER_SAMPLES DOCS OPENMP
|
||||
OPTIONS_DEFINE= INTEGER_SAMPLES OPTIMIZED_CFLAGS
|
||||
OPTIONS_DEFINE_aarch64= NEON OPENMP
|
||||
OPTIONS_DEFINE_amd64= OPENMP
|
||||
OPTIONS_DEFINE_armv7= NEON
|
||||
OPTIONS_DEFAULT= ${MACHINE_CPU:Msoftfp:C/.+/INTEGER_SAMPLES/}
|
||||
OPTIONS_DEFINE_amd64= SSE
|
||||
OPTIONS_DEFINE_i386= SSE
|
||||
OPTIONS_DEFAULT_amd64= SSE
|
||||
OPTIONS_DEFAULT_i386= ${MACHINE_CPU:tu:MSSE}
|
||||
OPTIONS_DEFAULT_aarch64=NEON OPENMP OPTIMIZED_CFLAGS
|
||||
OPTIONS_DEFAULT_amd64= OPENMP OPTIMIZED_CFLAGS
|
||||
|
||||
INTEGER_SAMPLES_DESC= Use integer sample format
|
||||
INTEGER_SAMPLES_CONFIGURE_ENABLE= integer-samples
|
||||
OPENMP_CONFIGURE_ENABLE=openmp
|
||||
SSE_CONFIGURE_ENABLE= x86-optimizations
|
||||
SSE_USES= compiler:c++11-lang
|
||||
NEON_DESC= Use NEON instructions
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e \
|
||||
'/^dist_doc_DATA/s|COPYING.TXT||' \
|
||||
${WRKSRC}/Makefile.am
|
||||
@${REINPLACE_CMD} -e \
|
||||
's|^INCLUDES|AM_CPPFLAGS| ; \
|
||||
s|$$(prefix)/doc|$$(datadir)/doc|' \
|
||||
${WRKSRC}/config/am_include.mk
|
||||
@${REINPLACE_CMD} -e \
|
||||
's|-O[0-9]||;s|-fcheck-new||' \
|
||||
${WRKSRC}/source/SoundTouch/Makefile.am
|
||||
|
||||
post-install:
|
||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libSoundTouch.so.1.0.0
|
||||
INTEGER_SAMPLES_CMAKE_BOOL= INTEGER_SAMPLES
|
||||
NEON_CMAKE_BOOL= NEON
|
||||
OPENMP_CMAKE_BOOL= OPENMP
|
||||
OPTIMIZED_CFLAGS_CFLAGS= -Ofast
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1617884272
|
||||
SHA256 (soundtouch-soundtouch-762f56024b7ade81f6565903161dffec0ad4741e_GL0.tar.gz) = b2515ce4a1b8b69e401ca9d442d1913b23b7447157a76939b2f8791118941bd1
|
||||
SIZE (soundtouch-soundtouch-762f56024b7ade81f6565903161dffec0ad4741e_GL0.tar.gz) = 523946
|
||||
TIMESTAMP = 1631831988
|
||||
SHA256 (soundtouch-soundtouch-e1f315f5358d9db5cee35a7a2886425489fcefe8_GL0.tar.gz) = 633ea27250f465533a5ada4ac0ff276a4be01f43e975e42b8507c50dfbbfd7f9
|
||||
SIZE (soundtouch-soundtouch-e1f315f5358d9db5cee35a7a2886425489fcefe8_GL0.tar.gz) = 524738
|
||||
|
||||
46
audio/soundtouch/files/patch-CMakeLists.txt
Normal file
46
audio/soundtouch/files/patch-CMakeLists.txt
Normal file
@@ -0,0 +1,46 @@
|
||||
--- CMakeLists.txt.orig 2021-09-07 15:26:53 UTC
|
||||
+++ CMakeLists.txt
|
||||
@@ -6,8 +6,6 @@ include(GNUInstallDirs)
|
||||
if(MSVC)
|
||||
set(COMPILE_DEFINITIONS /O2 /fp:fast)
|
||||
set(COMPILE_OPTIONS )
|
||||
-else()
|
||||
- set(COMPILE_OPTIONS -Ofast)
|
||||
endif()
|
||||
|
||||
#####################
|
||||
@@ -59,7 +57,7 @@ else()
|
||||
target_compile_definitions(SoundTouch PRIVATE SOUNDTOUCH_FLOAT_SAMPLES)
|
||||
endif()
|
||||
|
||||
-if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv7.*|armv8.*)$")
|
||||
+if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv7.*|armv8.*|aarch64.*)$")
|
||||
set(NEON_CPU ON)
|
||||
else()
|
||||
set(NEON_CPU OFF)
|
||||
@@ -68,9 +66,14 @@ endif()
|
||||
option(NEON "Use ARM Neon SIMD instructions if in ARM CPU" ON)
|
||||
if(${NEON} AND ${NEON_CPU})
|
||||
target_compile_definitions(SoundTouch PRIVATE SOUNDTOUCH_USE_NEON)
|
||||
- target_compile_options(SoundTouch PRIVATE -mfpu=neon)
|
||||
endif()
|
||||
|
||||
+find_package(OpenMP)
|
||||
+option(OPENMP "Use parallel multicore calculation through OpenMP" ON)
|
||||
+if(OPENMP AND OPENMP_FOUND)
|
||||
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
|
||||
+endif()
|
||||
+
|
||||
install(
|
||||
FILES
|
||||
include/BPMDetect.h
|
||||
@@ -105,6 +108,9 @@ if(SOUNDSTRETCH)
|
||||
target_compile_definitions(soundstretch PRIVATE ${COMPILE_DEFINITIONS})
|
||||
target_compile_options(soundstretch PRIVATE ${COMPILE_OPTIONS})
|
||||
target_link_libraries(soundstretch PRIVATE SoundTouch)
|
||||
+ if(INTEGER_SAMPLES)
|
||||
+ target_compile_definitions(soundstretch PRIVATE SOUNDTOUCH_INTEGER_SAMPLES)
|
||||
+ endif()
|
||||
|
||||
install(TARGETS soundstretch
|
||||
DESTINATION bin
|
||||
@@ -5,9 +5,11 @@ include/soundtouch/FIFOSamplePipe.h
|
||||
include/soundtouch/STTypes.h
|
||||
include/soundtouch/SoundTouch.h
|
||||
include/soundtouch/soundtouch_config.h
|
||||
lib/cmake/SoundTouch/SoundTouchConfig.cmake
|
||||
lib/cmake/SoundTouch/SoundTouchConfigVersion.cmake
|
||||
lib/cmake/SoundTouch/SoundTouchTargets-%%CMAKE_BUILD_TYPE%%.cmake
|
||||
lib/cmake/SoundTouch/SoundTouchTargets.cmake
|
||||
lib/libSoundTouch.so
|
||||
lib/libSoundTouch.so.1
|
||||
lib/libSoundTouch.so.1.0.0
|
||||
lib/libSoundTouch.so.2
|
||||
lib/libSoundTouch.so.2.3.1
|
||||
libdata/pkgconfig/soundtouch.pc
|
||||
share/aclocal/soundtouch.m4
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README.html
|
||||
|
||||
Reference in New Issue
Block a user