commit:     e0ff291bd618823857b0a424291efad88d565669
Author:     David Roman <davidroman96 <AT> gmail <DOT> com>
AuthorDate: Fri Apr  5 22:01:18 2024 +0000
Commit:     Julien Roy <julien <AT> jroy <DOT> ca>
CommitDate: Fri Apr  5 22:01:18 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=e0ff291b

media-sound/lms: fix run time issue due to unmet USE flags requirements

Signed-off-by: David Roman <davidroman96 <AT> gmail.com>

 media-sound/lms/lms-3.51.1-r1.ebuild | 72 ++++++++++++++++++++++++++++++++++++
 1 file changed, 72 insertions(+)

diff --git a/media-sound/lms/lms-3.51.1-r1.ebuild 
b/media-sound/lms/lms-3.51.1-r1.ebuild
new file mode 100644
index 0000000000..2b015ca02d
--- /dev/null
+++ b/media-sound/lms/lms-3.51.1-r1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake flag-o-matic pam systemd
+
+DESCRIPTION="Lightweight Music Server."
+HOMEPAGE="http://lms-demo.poupon.dev/ https://github.com/epoupon/lms";
+SRC_URI="https://github.com/epoupon/lms/archive/refs/tags/v${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test stb"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       acct-user/lms
+       dev-cpp/wt
+       dev-libs/boost
+       dev-libs/libconfig[cxx]
+       media-libs/taglib
+       media-video/ffmpeg[mp3,opus]
+
+       !stb? ( media-gfx/graphicsmagick )
+
+"
+
+DEPEND="
+       ${RDEPEND}
+
+       stb? ( dev-libs/stb )
+"
+
+BDEPEND="
+       test? ( dev-cpp/gtest )
+"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-respect-ldflags.patch"
+)
+
+src_configure() {
+       append-flags -I/usr/include/stb/deprecated
+
+       local mycmakeargs=(
+               -DIMAGE_LIBRARY=$(usex stb STB GraphicsMagick++)
+               -DENABLE_TESTS=$(usex test)
+       )
+
+       cmake_src_configure
+}
+
+src_install() {
+       cmake_src_install
+
+       systemd_newunit conf/systemd/default.service lms.service
+       newinitd "${FILESDIR}/lms.init" lms
+       dopamd conf/pam/lms
+       mv "${ED}/usr/share/lms/lms.conf" "${ED}/etc/lms.conf" || die
+
+       # Already installed in the proper directory
+       rm "${ED}/usr/share/lms/default.service" || die
+       rm "${ED}/usr/share/lms/lms" || die
+
+       keepdir /var/log/lms
+       fowners -R lms:lms /var/log/lms
+
+       keepdir /var/lms
+       fowners lms:lms /var/lms
+}

Reply via email to