View | Details | Raw Unified | Return to bug 277537 | Differences between
and this patch

Collapse All | Expand All

(-)b/audio/opus/Makefile (-9 / +17 lines)
Lines 1-8 Link Here
1
PORTNAME=	opus
1
PORTNAME=	opus
2
DISTVERSION=	1.4
2
DISTVERSION=	1.5.1
3
CATEGORIES=	audio
3
CATEGORIES=	audio
4
MASTER_SITES=	https://downloads.xiph.org/releases/opus/ \
4
MASTER_SITES=	https://downloads.xiph.org/releases/${PORTNAME}/
5
		https://github.com/xiph/opus/releases/download/v${DISTVERSION}/
6
5
7
MAINTAINER=	naddy@FreeBSD.org
6
MAINTAINER=	naddy@FreeBSD.org
8
COMMENT=	IETF audio codec
7
COMMENT=	IETF audio codec
Lines 11-24 WWW= https://opus-codec.org/ Link Here
11
LICENSE=	BSD3CLAUSE
10
LICENSE=	BSD3CLAUSE
12
LICENSE_FILE=	${WRKSRC}/COPYING
11
LICENSE_FILE=	${WRKSRC}/COPYING
13
12
14
USES=		cpe gmake libtool pathfix
13
USES=		cpe meson python:env shebangfix
15
CPE_VENDOR=	opus-codec
14
CPE_VENDOR=	opus-codec
15
SHEBANG_FILES=	meson/*.py
16
USE_LDCONFIG=	yes
16
USE_LDCONFIG=	yes
17
17
18
GNU_CONFIGURE=	yes
18
MESON_ARGS=	-Ddefault_library=both \
19
CONFIGURE_ARGS=	--enable-custom-modes \
19
		-Dcustom-modes=true \
20
		--disable-doc   # requires doxygen
20
		-Ddocs=disabled
21
INSTALL_TARGET=	install-strip
21
22
TEST_TARGET=	check
22
.include <bsd.port.options.mk>
23
24
.if ${ARCH} != "aarch64" && ${ARCH} != "amd64" && ${ARCH} != "arm"
25
MESON_ARGS+=	-Drtc=disabled
26
.endif
27
28
.if ${ARCH} != "arm"
29
MESON_ARGS+=	-Dasm=disabled
30
.endif
23
31
24
.include <bsd.port.mk>
32
.include <bsd.port.mk>
(-)b/audio/opus/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1682429725
1
TIMESTAMP = 1709587372
2
SHA256 (opus-1.4.tar.gz) = c9b32b4253be5ae63d1ff16eea06b94b5f0f2951b7a02aceef58e3a3ce49c51f
2
SHA256 (opus-1.5.1.tar.gz) = b84610959b8d417b611aa12a22565e0a3732097c6389d19098d844543e340f85
3
SIZE (opus-1.4.tar.gz) = 1063408
3
SIZE (opus-1.5.1.tar.gz) = 7834540
(-)b/audio/opus/files/patch-celt_arm_armcpu.c (+57 lines)
Added Link Here
1
--- celt/arm/armcpu.c.orig	2024-03-06 18:21:25 UTC
2
+++ celt/arm/armcpu.c
3
@@ -191,6 +191,54 @@ opus_uint32 opus_cpu_capabilities(void)
4
   return flags;
5
 }
6
 
7
+#elif defined(__FreeBSD__)
8
+#include <sys/auxv.h>
9
+
10
+opus_uint32 opus_cpu_capabilities(void)
11
+{
12
+  long hwcap = 0;
13
+  opus_uint32 flags = 0;
14
+
15
+# if defined(OPUS_ARM_MAY_HAVE_MEDIA) \
16
+ || defined(OPUS_ARM_MAY_HAVE_NEON) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR)
17
+  /* FreeBSD required armv6+, always supported media instructions */
18
+  flags |= OPUS_CPU_ARM_MEDIA_FLAG;
19
+# endif
20
+
21
+  elf_aux_info(AT_HWCAP, &hwcap, sizeof hwcap);
22
+
23
+# if defined(OPUS_ARM_MAY_HAVE_EDSP) || defined(OPUS_ARM_MAY_HAVE_MEDIA) \
24
+ || defined(OPUS_ARM_MAY_HAVE_NEON) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR)
25
+#  ifdef HWCAP_EDSP
26
+  if (hwcap & HWCAP_EDSP)
27
+    flags |= OPUS_CPU_ARM_EDSP_FLAG;
28
+#  endif
29
+
30
+#  if defined(OPUS_ARM_MAY_HAVE_NEON) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR)
31
+#   ifdef HWCAP_NEON
32
+  if (hwcap & HWCAP_NEON)
33
+    flags |= OPUS_CPU_ARM_NEON_FLAG;
34
+#   elif defined(HWCAP_ASIMD)
35
+  if (hwcap & HWCAP_ASIMD)
36
+    flags |= OPUS_CPU_ARM_NEON_FLAG | OPUS_CPU_ARM_MEDIA_FLAG | OPUS_CPU_ARM_EDSP_FLAG;
37
+#   endif
38
+#  endif
39
+#  if defined(OPUS_ARM_MAY_HAVE_DOTPROD) && defined(HWCAP_ASIMDDP)
40
+  if (hwcap & HWCAP_ASIMDDP)
41
+    flags |= OPUS_CPU_ARM_DOTPROD_FLAG;
42
+#  endif
43
+# endif
44
+
45
+#if defined(OPUS_ARM_PRESUME_AARCH64_NEON_INTR)
46
+    flags |= OPUS_CPU_ARM_EDSP_FLAG | OPUS_CPU_ARM_MEDIA_FLAG | OPUS_CPU_ARM_NEON_FLAG;
47
+# if defined(OPUS_ARM_PRESUME_DOTPROD)
48
+    flags |= OPUS_CPU_ARM_DOTPROD_FLAG;
49
+# endif
50
+#endif
51
+
52
+  return (flags);
53
+}
54
+
55
 #else
56
 /* The feature registers which can tell us what the processor supports are
57
  * accessible in priveleged modes only, so we can't have a general user-space
(-)a/audio/opus/files/patch-configure (-11 lines)
Removed Link Here
1
--- configure.orig	2016-01-12 18:17:49 UTC
2
+++ configure
3
@@ -13251,7 +13251,7 @@ $as_echo "$as_me: WARNING: Compiler does
4
 
5
 fi
6
     ;; #(
7
-  i?86|x86_64) :
8
+  i?86|x86_64|amd64) :
9
 
10
 
11
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports SSE intrinsics" >&5
(-)b/audio/opus/files/patch-dnn_vec__neon.h (+11 lines)
Added Link Here
1
--- dnn/vec_neon.h.orig	2024-03-06 18:49:19 UTC
2
+++ dnn/vec_neon.h
3
@@ -34,7 +34,7 @@
4
 #include <arm_neon.h>
5
 #include "os_support.h"
6
 
7
-#if defined(__arm__) && !defined(__aarch64__)
8
+#if __ARM_ARCH < 8
9
 /* Emulate vcvtnq_s32_f32() for ARMv7 Neon. */
10
 static OPUS_INLINE int32x4_t vcvtnq_s32_f32(float32x4_t x) {
11
   return vrshrq_n_s32(vcvtq_n_s32_f32(x, 8), 8);
(-)b/audio/opus/files/patch-meson.build (+37 lines)
Added Link Here
1
--- meson.build.orig	2024-02-29 20:57:13 UTC
2
+++ meson.build
3
@@ -650,29 +650,11 @@ endif
4
   subdir('tests')
5
 endif
6
 
7
-# pkg-config files (not using pkg module so we can use the existing .pc.in file)
8
-pkgconf = configuration_data()
9
-
10
-pkgconf.set('prefix', join_paths(get_option('prefix')))
11
-pkgconf.set('exec_prefix', '${prefix}')
12
-pkgconf.set('libdir', '${prefix}/@0@'.format(get_option('libdir')))
13
-pkgconf.set('includedir', '${prefix}/@0@'.format(get_option('includedir')))
14
-pkgconf.set('VERSION', opus_version)
15
-pkgconf.set('PC_BUILD', pc_build)
16
-pkgconf.set('LIBM', libm.found() ? '-lm' : '')
17
-
18
-pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir'))
19
-
20
-configure_file(input : 'opus.pc.in',
21
-  output : 'opus.pc',
22
-  configuration : pkgconf,
23
-  install_dir : pkg_install_dir)
24
-
25
-# The uninstalled one has hardcoded libtool + static lib stuff, skip it for now
26
-#configure_file(input : 'opus-uninstalled.pc.in',
27
-#  output : 'opus-uninstalled.pc',
28
-#  configuration : pkgconf,
29
-#  install : false)
30
+pkg = import('pkgconfig')
31
+pkg.generate(opus_lib,
32
+  description: 'Opus IETF audio codec',
33
+  subdirs: 'opus',
34
+)
35
 
36
 doxygen = find_program('doxygen', required: get_option('docs'))
37
 if doxygen.found()
(-)b/audio/opus/pkg-plist (-2 / +1 lines)
Lines 7-12 include/opus/opus_types.h Link Here
7
lib/libopus.a
7
lib/libopus.a
8
lib/libopus.so
8
lib/libopus.so
9
lib/libopus.so.0
9
lib/libopus.so.0
10
lib/libopus.so.0.9.0
10
lib/libopus.so.0.10.0
11
libdata/pkgconfig/opus.pc
11
libdata/pkgconfig/opus.pc
12
share/aclocal/opus.m4

Return to bug 277537