From nobody Sat Nov 20 16:50:28 2021 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0E2EB1893DC9; Sat, 20 Nov 2021 16:50:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HxKKJ71HHz3LM1; Sat, 20 Nov 2021 16:50:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D05911F657; Sat, 20 Nov 2021 16:50:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AKGoSdb038239; Sat, 20 Nov 2021 16:50:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AKGoSsO038238; Sat, 20 Nov 2021 16:50:28 GMT (envelope-from git) Date: Sat, 20 Nov 2021 16:50:28 GMT Message-Id: <202111201650.1AKGoSsO038238@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Gleb Popov Subject: git: 8691df3a5142 - main - multimedia/pipewire: Add a patch to fix ambguous function name issue. List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arrowd X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8691df3a5142ab9381d6f1c9af2377dd4696e084 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by arrowd: URL: https://cgit.FreeBSD.org/ports/commit/?id=8691df3a5142ab9381d6f1c9af2377dd4696e084 commit 8691df3a5142ab9381d6f1c9af2377dd4696e084 Author: Gleb Popov AuthorDate: 2021-11-20 16:47:48 +0000 Commit: Gleb Popov CommitDate: 2021-11-20 16:49:30 +0000 multimedia/pipewire: Add a patch to fix ambguous function name issue. PR: 259621 --- multimedia/pipewire/Makefile | 1 + .../files/patch-src_pipewire_pipewire_init | 67 ++++++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/multimedia/pipewire/Makefile b/multimedia/pipewire/Makefile index bcfd2e6556bf..e0b9dd101729 100644 --- a/multimedia/pipewire/Makefile +++ b/multimedia/pipewire/Makefile @@ -1,5 +1,6 @@ PORTNAME= pipewire DISTVERSION= 0.3.40 +PORTREVISION= 1 CATEGORIES= multimedia MASTER_SITES= https://gitlab.freedesktop.org/pipewire/media-session/-/archive/${MEDIA_SESSION_VERSION}/:media_session DISTFILES= media-session-${MEDIA_SESSION_VERSION}${EXTRACT_SUFX}:media_session diff --git a/multimedia/pipewire/files/patch-src_pipewire_pipewire_init b/multimedia/pipewire/files/patch-src_pipewire_pipewire_init new file mode 100644 index 000000000000..3f94963d19c0 --- /dev/null +++ b/multimedia/pipewire/files/patch-src_pipewire_pipewire_init @@ -0,0 +1,67 @@ +PipeWire exports a function named "pw_init". FreeBSD also has the libutil.so +library, which exports a function with the same name. To workaround the +conflict, rename the PipeWire init function into "pipewire_init". + +Upstream issue: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1819 + +--- src/pipewire/pipewire.c.orig 2021-11-11 12:21:29 UTC ++++ src/pipewire/pipewire.c +@@ -583,7 +583,7 @@ out: + * + */ + SPA_EXPORT +-void pw_init(int *argc, char **argv[]) ++void pipewire_init(int *argc, char **argv[]) + { + const char *str; + struct spa_dict_item items[6]; +@@ -672,8 +672,9 @@ done: + pthread_mutex_unlock(&init_lock); + } + ++ + SPA_EXPORT +-void pw_deinit(void) ++void pipewire_deinit(void) + { + struct support *support = &global_support; + struct registry *registry = &support->registry; +@@ -696,6 +697,21 @@ void pw_deinit(void) + pthread_mutex_unlock(&init_lock); + + } ++ ++#if !defined(__FreeBSD__) ++#undef pw_init ++SPA_EXPORT ++void pw_init(int *argc, char **argv[]) ++{ ++ pipewire_init(argc, argv); ++} ++#undef pw_deinit ++SPA_EXPORT ++void pw_deinit(void) ++{ ++ pipewire_deinit(); ++} ++#endif + + /** Check if a debug category is enabled + * +--- src/pipewire/pipewire.h.orig 2021-11-11 12:21:29 UTC ++++ src/pipewire/pipewire.h +@@ -69,9 +69,12 @@ extern "C" { + * \{ + */ + void +-pw_init(int *argc, char **argv[]); ++pipewire_init(int *argc, char **argv[]); ++void pipewire_deinit(void); + +-void pw_deinit(void); ++/* BSD has pw_init already */ ++#define pw_init pipewire_init ++#define pw_deinit pipewire_deinit + + bool + pw_debug_is_category_enabled(const char *name);