Date: Thu, 22 Dec 2022 08:43:38 GMT From: Yuri Victorovich <yuri@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 34dce7ec4dba - main - multimedia/lms: Add options STB, MAGICK for image library Message-ID: <202212220843.2BM8hcdk081664@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=34dce7ec4dba8810371c7862983eb3cfe19dd20b commit 34dce7ec4dba8810371c7862983eb3cfe19dd20b Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2022-12-22 08:28:21 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> 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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202212220843.2BM8hcdk081664>