git: 44114a581fba - stable/15 - libsamplerate: Define as PRIVATELIB

From: Christos Margiolis <christos_at_FreeBSD.org>
Date: Wed, 08 Oct 2025 12:55:11 UTC
The branch stable/15 has been updated by christos:

URL: https://cgit.FreeBSD.org/src/commit/?id=44114a581fba9ffc551328e89c1db3d2588cc9fe

commit 44114a581fba9ffc551328e89c1db3d2588cc9fe
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2025-09-15 13:09:38 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2025-10-08 12:54:56 +0000

    libsamplerate: Define as PRIVATELIB
    
    Fixes the following warnings:
    
    ld: error: relocation R_X86_64_32S cannot be used against local symbol; recompile with -fPIC
    
    >>> defined in /usr/obj/usr/src/amd64.amd64/lib/libsamplerate/libsamplerate.a(samplerate.o)
    >>> referenced by samplerate.c:498 (/usr/src/contrib/libsamplerate/samplerate.c:498)
    >>>
    >>>   samplerate.o:(src_new) in archive /usr/obj/usr/src/amd64.amd64/lib/libsamplerate/libsamplerate.a
    
    Related discussion: https://reviews.freebsd.org/D52306
    
    Sponsored by:   The FreeBSD Foundation
    Reviewed by:    fuz
    Differential Revision:  https://reviews.freebsd.org/D52307
    
    (cherry picked from commit dafd960a3d65cdaccb1f8b9395fad14092ec9eb2)
---
 etc/mtree/BSD.usr.dist     | 2 ++
 lib/libsamplerate/Makefile | 2 +-
 share/mk/src.libnames.mk   | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist
index 7f54ccbcb4cb..1945c26ebc5f 100644
--- a/etc/mtree/BSD.usr.dist
+++ b/etc/mtree/BSD.usr.dist
@@ -26,6 +26,8 @@
                     ..
                 ..
             ..
+            samplerate
+            ..
             sqlite3
             ..
             ucl
diff --git a/lib/libsamplerate/Makefile b/lib/libsamplerate/Makefile
index c094cbb791d2..4c55d5c2cb82 100644
--- a/lib/libsamplerate/Makefile
+++ b/lib/libsamplerate/Makefile
@@ -3,7 +3,7 @@
 PACKAGE=	sound
 
 LIB=		samplerate
-INTERNALLIB=
+PRIVATELIB=
 
 SRCS=		samplerate.c \
 		src_linear.c \
diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk
index 6e1796f4397a..1fccb0c53ad0 100644
--- a/share/mk/src.libnames.mk
+++ b/share/mk/src.libnames.mk
@@ -29,6 +29,7 @@ _PRIVATELIBS=	\
 		heimipcs \
 		kldelf \
 		ldns \
+		samplerate \
 		sqlite3 \
 		ssh \
 		ucl \
@@ -72,7 +73,6 @@ _INTERNALLIBS=	\
 		pfctl \
 		pkgecc \
 		pmcstat \
-		samplerate \
 		sl \
 		sm \
 		smdb \