From nobody Thu Dec 22 08:43:38 2022 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 4Nd3kL6dgPz1GBQX; Thu, 22 Dec 2022 08:43:38 +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 4Nd3kL6777z3wP1; Thu, 22 Dec 2022 08:43:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671698618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zMrVxPDQGp5YoZ4uahdh8psrADXX2jnwrlfGuNbMOXM=; b=lpTSsqtFBL2Ce/JDzB+LciUd3Zm5zOCRO5QUlpyeovNQTHM/MQA25IAYqGTtNR8cx8CF4q rvj/NLKI6JroMzX7qrR4bXcjsVzwH4rt//6pZLjsuCrOnF1pFszk5JycrmQnxjUQ4UhuRk sCV1mJURBSzqXeIydxWGT3GT5lUkMgo16j/5y5Yd/y7Lvy/iRleUpUBOpQbmzdLIDOIHw/ 4SRbzFXESe1H9PjdWhTkpDcY//7xGQVQ+64pqxrayhKq8x5VAuUrBOyAZiVdFMAlanYf0f ehnV1fCznTrSmxZG5+XSr0WhMPScXz/ETTXtUCpjwEdrrKP5Ym/NEZ9iiKurow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671698618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zMrVxPDQGp5YoZ4uahdh8psrADXX2jnwrlfGuNbMOXM=; b=xltZNCFTuhzYrv5TMhkF8CmLkS3V6wNVQFAErtsexEmtafsFXgsD/4myLUJGfywcTiMDa4 UXAtZSyp8JKZ/wuTdQCzq3R72ZmpTDAGaG+AMt1CYFjAVXvP4VD+9HXFSFYKYD/V0ZwtJ0 wJBBQ2ZI0N1EmouNf16kUHcoxr2oypxSUwB+TIEjEEY4iQUnsNDEjIcHhP8fStNnxIfCkr ZOpVSDi7J7xjqNVy9xNH7fNR/xxgwxM7OyMIZKSm3//4LK/bLnNzd3brQpSVTnjj+doJDo 6VUyBhpKQrt4I1HNA4BHiTF+r17ZQGeK5z1UoZRZzcMEDmQISLL8TiN3JlwyEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1671698618; a=rsa-sha256; cv=none; b=oB6mfI8E6lQuJ/IzObTcGwtMI9PJ7i68wxNt3eCXw63UrHiwbA/STl6G9mtLHNO26sm2PG wYuCCx+LtRanzNDZMuG+6u2zFBvSAU2yAa17IjFhGTflNRDJ5/pi6RFyWNleTAGdHelEbq ELkkzhwiQhnkhngwaHp1MFJxAXdgGDKKcwjgx060zDMwsL3AqRSqQELM7vqiN9k2OFcgrx gPSaKqtf7N6rcGZHlhTK+OR11NFnBnta+MDIJJOK0jtl5VGCY82Gfajtzjy5e+KNgzuAFy JOUMBXZtdeYudwBNQapehcIAJNSaqVZFa3fftACOkSOOuuOoy+ugVDWPs8h8fw== 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 4Nd3kL5DNyznrF; Thu, 22 Dec 2022 08:43:38 +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 2BM8hcB3081665; Thu, 22 Dec 2022 08:43:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BM8hcdk081664; Thu, 22 Dec 2022 08:43:38 GMT (envelope-from git) Date: Thu, 22 Dec 2022 08:43:38 GMT Message-Id: <202212220843.2BM8hcdk081664@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: 34dce7ec4dba - main - multimedia/lms: Add options STB, MAGICK for image library 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: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 34dce7ec4dba8810371c7862983eb3cfe19dd20b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=34dce7ec4dba8810371c7862983eb3cfe19dd20b commit 34dce7ec4dba8810371c7862983eb3cfe19dd20b Author: Yuri Victorovich AuthorDate: 2022-12-22 08:28:21 +0000 Commit: Yuri Victorovich CommitDate: 2022-12-22 08:43:32 +0000 multimedia/lms: Add options STB, MAGICK for image library This fixes SEGV when transcoding is activated for subsonic API when using STB as image library. PR: 268487 --- multimedia/lms/Makefile | 18 +++++++++++++++--- multimedia/lms/files/patch-CMakeLists.txt | 19 +++++++++++++++++++ .../files/patch-src_libs_utils_impl_ChildProcess.cpp | 18 ------------------ 3 files changed, 34 insertions(+), 21 deletions(-) diff --git a/multimedia/lms/Makefile b/multimedia/lms/Makefile index 4f4809c008c2..43457912d086 100644 --- a/multimedia/lms/Makefile +++ b/multimedia/lms/Makefile @@ -1,6 +1,7 @@ PORTNAME= lms DISTVERSIONPREFIX= v DISTVERSION= 3.34.0 +PORTREVISION= 1 CATEGORIES= multimedia MAINTAINER= yuri@FreeBSD.org @@ -10,12 +11,10 @@ WWW= https://github.com/epoupon/lms LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/COPYING -BUILD_DEPENDS= googletest>0:devel/googletest \ - ${LOCALBASE}/include/stb/stb_image.h:devel/stb +BUILD_DEPENDS= googletest>0:devel/googletest LIB_DEPENDS= libavformat.so:multimedia/ffmpeg \ libboost_system.so:devel/boost-libs \ libconfig++.so:devel/libconfig \ - libGraphicsMagick.so:graphics/GraphicsMagick \ libtag.so:audio/taglib \ libwthttp.so:www/wt RUN_DEPENDS= ffmpeg:multimedia/ffmpeg @@ -32,6 +31,19 @@ USE_RC_SUBR= ${PORTNAME} PLIST_SUB= USER="${USER}" GROUP="${GROUP}" +OPTIONS_RADIO= IMAGE_LIB +OPTIONS_RADIO_IMAGE_LIB= STB MAGICK +OPTIONS_DEFAULT= MAGICK + +STB_DESC= Use STB as image library (uses less memory) +STB_BUILD_DEPENDS= ${LOCALBASE}/include/stb/stb_image.h:devel/stb +STB_CMAKE_BOOL= FREEBSD_USE_STB +STB_BROKEN= bug#268487 (crash when transcoding is activated for subsonic API when using STB as image library) + +MAGICK_DESC= Use GraphicsMagick++ as image library +MAGICK_LIB_DEPENDS= libGraphicsMagick.so:graphics/GraphicsMagick +MAGICK_CMAKE_BOOL= FREEBSD_USE_MAGICK + post-patch: @${REINPLACE_CMD} -e 's|"/etc/lms.conf"|"${PREFIX}/etc/lms.conf"|' \ ${WRKSRC}/src/lms/main.cpp \ diff --git a/multimedia/lms/files/patch-CMakeLists.txt b/multimedia/lms/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..afbc6bae0452 --- /dev/null +++ b/multimedia/lms/files/patch-CMakeLists.txt @@ -0,0 +1,19 @@ +--- CMakeLists.txt.orig 2022-12-22 07:55:50 UTC ++++ CMakeLists.txt +@@ -19,10 +19,14 @@ find_package(Boost REQUIRED COMPONENTS system program_ + find_package(Wt REQUIRED COMPONENTS Wt Dbo DboSqlite3 HTTP) + pkg_check_modules(Taglib REQUIRED IMPORTED_TARGET taglib) + pkg_check_modules(Config++ REQUIRED IMPORTED_TARGET libconfig++) +-pkg_check_modules(GraphicsMagick++ IMPORTED_TARGET GraphicsMagick++) ++if (FREEBSD_USE_MAGICK) ++ pkg_check_modules(GraphicsMagick++ IMPORTED_TARGET GraphicsMagick++) ++endif() + pkg_check_modules(LIBAV IMPORTED_TARGET libavcodec libavutil libavformat) + find_package(PAM) +-find_package(STB) ++if (FREEBSD_USE_STB) ++ find_package(STB) ++endif() + + # WT + if (NOT Wt_FOUND) diff --git a/multimedia/lms/files/patch-src_libs_utils_impl_ChildProcess.cpp b/multimedia/lms/files/patch-src_libs_utils_impl_ChildProcess.cpp deleted file mode 100644 index f273aee461d0..000000000000 --- a/multimedia/lms/files/patch-src_libs_utils_impl_ChildProcess.cpp +++ /dev/null @@ -1,18 +0,0 @@ ---- src/libs/utils/impl/ChildProcess.cpp.orig 2022-02-02 17:25:04 UTC -+++ src/libs/utils/impl/ChildProcess.cpp -@@ -68,6 +68,7 @@ ChildProcess::ChildProcess(boost::asio::io_context& io - if (res < 0) - throw SystemException {errno, "pipe2 failed!"}; - -+#if !defined(__FreeBSD__) // see https://github.com/epoupon/lms/issues/144 - { - #if defined(__linux__) && defined(F_SETPIPE_SZ) - // Just a hint here to prevent the writer from writing too many bytes ahead of the reader -@@ -79,6 +80,7 @@ ChildProcess::ChildProcess(boost::asio::io_context& io - throw SystemException {errno, "fcntl failed!"}; - #endif - } -+#endif - - res = fork(); - if (res == -1)