public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: media-sound/TauonMusicBox/files/, media-sound/TauonMusicBox/
  2024-02-23  1:36 [gentoo-commits] repo/proj/guru:master " David Roman
@ 2024-02-23  1:14 ` David Roman
  0 siblings, 0 replies; 3+ messages in thread
From: David Roman @ 2024-02-23  1:14 UTC (permalink / raw
  To: gentoo-commits

commit:     dd358e90547f1809674369e2d55abb737b4c7c65
Author:     David Roman <davidroman96 <AT> gmail <DOT> com>
AuthorDate: Fri Feb 23 01:13:04 2024 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Fri Feb 23 01:13:22 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=dd358e90

media-sound/TauonMusicBox: new package, add 7.7.1, 9999

Signed-off-by: David Roman <davidroman96 <AT> gmail.com>
Closes: https://github.com/gentoo/guru/pull/132

 media-sound/TauonMusicBox/Manifest                 |   1 +
 .../TauonMusicBox/TauonMusicBox-7.7.1.ebuild       | 102 ++++++++++++++
 .../TauonMusicBox/TauonMusicBox-9999.ebuild        | 102 ++++++++++++++
 .../files/TauonMusicBox-fix-build-system.patch     | 156 +++++++++++++++++++++
 media-sound/TauonMusicBox/metadata.xml             |  11 ++
 5 files changed, 372 insertions(+)

diff --git a/media-sound/TauonMusicBox/Manifest b/media-sound/TauonMusicBox/Manifest
new file mode 100644
index 0000000000..c93e2ad79d
--- /dev/null
+++ b/media-sound/TauonMusicBox/Manifest
@@ -0,0 +1 @@
+DIST TauonMusicBox-7.7.1.tar.gz 1049204 BLAKE2B 0d1c4fbf7264bedbdb33fba00de141edffbd2290f3b39faf6e9b82a64f6a75ad30233f6e6071fa351bb9fba935e1d5323e550b25cc8fb4a9a35df34e38531774 SHA512 671d626f14358b6db96da24169ef428911a9e50501b2cc61e1bbc43f8fa7f6b76682e438f86fb94d1e4772085150d602a6a87d3e8bd74a5f77aba11efcda397f

diff --git a/media-sound/TauonMusicBox/TauonMusicBox-7.7.1.ebuild b/media-sound/TauonMusicBox/TauonMusicBox-7.7.1.ebuild
new file mode 100644
index 0000000000..4a820a6fb5
--- /dev/null
+++ b/media-sound/TauonMusicBox/TauonMusicBox-7.7.1.ebuild
@@ -0,0 +1,102 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PLOCALES="cs de es fr_FR hu id it ja_JP nb_NO pl pt pt_BR pt_PT ru sv tr zh_CN"
+
+PYTHON_COMPAT=( python3_{10..12} )
+DISTUTILS_USE_PEP517=setuptools
+
+inherit cmake desktop distutils-r1 plocale
+
+DESCRIPTION="The desktop music player of today!"
+HOMEPAGE="https://tauonmusicbox.rocks/"
+
+if [[ ${PV} == *9999 ]]; then
+	EGIT_SUBMODULES=()
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/Taiko2k/${PN}"
+else
+	SRC_URI="https://github.com/Taiko2k/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+	KEYWORDS="~amd64"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+
+PHAZOR_DEPS="
+	dev-libs/miniaudio
+	media-libs/flac
+	media-libs/libopenmpt
+	media-sound/mpg123
+	media-libs/opus
+	media-libs/opusfile
+	media-sound/wavpack
+	media-libs/libsamplerate
+	sci-libs/kissfft[-cpu_flags_x86_sse]
+"
+
+DEPEND="
+	dev-python/musicbrainzngs[${PYTHON_USEDEP}]
+	dev-python/pillow[${PYTHON_USEDEP}]
+	dev-python/PySDL2[${PYTHON_USEDEP}]
+	media-libs/mutagen[${PYTHON_USEDEP}]
+
+	${PHAZOR_DEPS}
+"
+
+RDEPEND="${DEPEND}"
+
+BDEPEND="sys-devel/gettext"
+
+src_prepare() {
+	# Workaround. If PATCHES is used it would be applied to times and fail
+	eapply "${FILESDIR}/${PN}-fix-build-system.patch"
+
+	distutils-r1_src_prepare
+	cmake_src_prepare
+}
+
+src_configure() {
+	distutils-r1_src_configure
+	cmake_src_configure
+}
+
+src_compile() {
+	distutils-r1_src_compile
+	cmake_src_compile
+
+	build_locale() {
+		msgfmt -o "locale/${1}/LC_MESSAGES/tauon.mo" "locale/${1}/LC_MESSAGES/tauon.po" || die
+	}
+
+	plocale_for_each_locale build_locale
+}
+
+src_test() {
+	distutils-r1_src_test
+	cmake_src_test
+}
+
+python_install() {
+	dobin tauon.py
+	dolib.so  "${WORKDIR}/${P}_build/libphazor.so"
+
+	install_locale() {
+		insinto "/usr/share/locale/${1}/LC_MESSAGES"
+		doins "locale/${1}/LC_MESSAGES/tauon.mo"
+	}
+
+	plocale_for_each_locale install_locale
+
+	insinto "/usr/share/${PN}"
+	doins -r assets theme templates
+	doins input.txt
+	dosym "/usr/$(get_libdir)/libphazor.so" "/usr/share/${PN}/lib/libphazor.so"
+
+	sed -i 's/\/opt\/tauon-music-box\/tauonmb.sh/tauon.py/g' extra/tauonmb.desktop || die
+	domenu extra/tauonmb.desktop
+	doicon -s scalable extra/tauonmb.svg
+
+	distutils-r1_python_install
+}

diff --git a/media-sound/TauonMusicBox/TauonMusicBox-9999.ebuild b/media-sound/TauonMusicBox/TauonMusicBox-9999.ebuild
new file mode 100644
index 0000000000..4a820a6fb5
--- /dev/null
+++ b/media-sound/TauonMusicBox/TauonMusicBox-9999.ebuild
@@ -0,0 +1,102 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PLOCALES="cs de es fr_FR hu id it ja_JP nb_NO pl pt pt_BR pt_PT ru sv tr zh_CN"
+
+PYTHON_COMPAT=( python3_{10..12} )
+DISTUTILS_USE_PEP517=setuptools
+
+inherit cmake desktop distutils-r1 plocale
+
+DESCRIPTION="The desktop music player of today!"
+HOMEPAGE="https://tauonmusicbox.rocks/"
+
+if [[ ${PV} == *9999 ]]; then
+	EGIT_SUBMODULES=()
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/Taiko2k/${PN}"
+else
+	SRC_URI="https://github.com/Taiko2k/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+	KEYWORDS="~amd64"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+
+PHAZOR_DEPS="
+	dev-libs/miniaudio
+	media-libs/flac
+	media-libs/libopenmpt
+	media-sound/mpg123
+	media-libs/opus
+	media-libs/opusfile
+	media-sound/wavpack
+	media-libs/libsamplerate
+	sci-libs/kissfft[-cpu_flags_x86_sse]
+"
+
+DEPEND="
+	dev-python/musicbrainzngs[${PYTHON_USEDEP}]
+	dev-python/pillow[${PYTHON_USEDEP}]
+	dev-python/PySDL2[${PYTHON_USEDEP}]
+	media-libs/mutagen[${PYTHON_USEDEP}]
+
+	${PHAZOR_DEPS}
+"
+
+RDEPEND="${DEPEND}"
+
+BDEPEND="sys-devel/gettext"
+
+src_prepare() {
+	# Workaround. If PATCHES is used it would be applied to times and fail
+	eapply "${FILESDIR}/${PN}-fix-build-system.patch"
+
+	distutils-r1_src_prepare
+	cmake_src_prepare
+}
+
+src_configure() {
+	distutils-r1_src_configure
+	cmake_src_configure
+}
+
+src_compile() {
+	distutils-r1_src_compile
+	cmake_src_compile
+
+	build_locale() {
+		msgfmt -o "locale/${1}/LC_MESSAGES/tauon.mo" "locale/${1}/LC_MESSAGES/tauon.po" || die
+	}
+
+	plocale_for_each_locale build_locale
+}
+
+src_test() {
+	distutils-r1_src_test
+	cmake_src_test
+}
+
+python_install() {
+	dobin tauon.py
+	dolib.so  "${WORKDIR}/${P}_build/libphazor.so"
+
+	install_locale() {
+		insinto "/usr/share/locale/${1}/LC_MESSAGES"
+		doins "locale/${1}/LC_MESSAGES/tauon.mo"
+	}
+
+	plocale_for_each_locale install_locale
+
+	insinto "/usr/share/${PN}"
+	doins -r assets theme templates
+	doins input.txt
+	dosym "/usr/$(get_libdir)/libphazor.so" "/usr/share/${PN}/lib/libphazor.so"
+
+	sed -i 's/\/opt\/tauon-music-box\/tauonmb.sh/tauon.py/g' extra/tauonmb.desktop || die
+	domenu extra/tauonmb.desktop
+	doicon -s scalable extra/tauonmb.svg
+
+	distutils-r1_python_install
+}

diff --git a/media-sound/TauonMusicBox/files/TauonMusicBox-fix-build-system.patch b/media-sound/TauonMusicBox/files/TauonMusicBox-fix-build-system.patch
new file mode 100644
index 0000000000..dad565e16c
--- /dev/null
+++ b/media-sound/TauonMusicBox/files/TauonMusicBox-fix-build-system.patch
@@ -0,0 +1,156 @@
+From fea857478425a10ee285818e1c987d1efdbb6a5c Mon Sep 17 00:00:00 2001
+From: David Roman <davidroman96@gmail.com>
+Date: Tue, 30 Jan 2024 23:34:48 +0100
+Subject: [PATCH 1/3] Add CmakeLists.txt file to compile phrazor
+
+Closes: #828
+---
+ CMakeLists.txt | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+ create mode 100644 CMakeLists.txt
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+new file mode 100644
+index 000000000..cf79faf5b
+--- /dev/null
++++ b/CMakeLists.txt
+@@ -0,0 +1,19 @@
++cmake_minimum_required(VERSION 3.10)
++project(phazor)
++
++add_library(phazor SHARED src/phazor/phazor.c)
++
++find_package(PkgConfig REQUIRED)
++
++pkg_check_modules(phazor REQUIRED flac libopenmpt libmpg123 opus opusfile wavpack samplerate)
++
++find_package(kissfft CONFIG COMPONENTS float)
++if(NOT kissfft_FOUND)
++	add_subdirectory(src/phazor/kissfft)
++endif()
++
++target_include_directories(phazor PRIVATE ${phazor_INCLUDE_DIRS})
++target_link_libraries(phazor kissfft::kissfft ${phazor_LIBRARIES})
++
++
++install(TARGETS phazor DESTINATION ${CMAKE_SOURCE_DIR}/lib)
+
+From 44785f42480b7e53fda707b839153c3665ae4df0 Mon Sep 17 00:00:00 2001
+From: David Roman <davidroman96@gmail.com>
+Date: Thu, 1 Feb 2024 19:35:58 +0100
+Subject: [PATCH 2/3] Add setup.py and fix install_directory for Linux installs
+
+---
+ setup.py            | 16 ++++++++++++++++
+ t_modules/t_main.py |  4 ++++
+ tauon.py            | 15 +++++++++------
+ 3 files changed, 29 insertions(+), 6 deletions(-)
+ create mode 100644 setup.py
+
+diff --git a/setup.py b/setup.py
+new file mode 100644
+index 000000000..dbfa6257a
+--- /dev/null
++++ b/setup.py
+@@ -0,0 +1,16 @@
++from setuptools import setup, find_packages, Extension
++
++with open('requirements.txt') as f:
++    required = f.read().splitlines()
++
++setup(
++    name = 'Tauon Music Box',
++    packages = find_packages(),
++    version = '7.7.2',
++    url = 'https://tauonmusicbox.rocks/',
++    license = 'GPL-3',
++    install_requires=required,
++	classifiers=[
++		'Programming Language :: Python :: 3'
++	],
++)
+diff --git a/t_modules/t_main.py b/t_modules/t_main.py
+index ebbd325b8..7cbb9782c 100644
+--- a/t_modules/t_main.py
++++ b/t_modules/t_main.py
+@@ -141,6 +141,10 @@
+ # if system == "windows" or msys:
+ #     os.environ["PYSDL2_DLL_PATH"] = install_directory + "\\lib"
+ 
++# Assume that it's a classic Linux install, use standard paths
++if install_directory.startswith("/usr/"):
++    install_directory = "/usr/share/TauonMusicBox"
++
+ # Set data folders (portable mode)
+ user_directory = install_directory
+ config_directory = user_directory
+diff --git a/tauon.py b/tauon.py
+index 6dec8f340..8c502a1a3 100755
+--- a/tauon.py
++++ b/tauon.py
+@@ -78,11 +78,6 @@ def transfer_args_and_exit():
+      os.environ["PATH"] += ":" + sys._MEIPASS
+      os.environ['SSL_CERT_FILE'] = os.path.join(install_directory, "certifi", "cacert.pem")
+ 
+-user_directory = os.path.join(install_directory, "user-data")
+-config_directory = user_directory
+-
+-asset_directory = os.path.join(install_directory, "assets")
+-
+ # If we're installed, use home data locations
+ install_mode = False
+ if install_directory.startswith("/opt/")\
+@@ -91,6 +86,14 @@ def transfer_args_and_exit():
+         or install_directory.startswith("/snap/") or sys.platform == "darwin" or sys.platform == 'win32':
+     install_mode = True
+ 
++# Assume that it's a classic Linux install, use standard paths
++if install_directory.startswith("/usr/"):
++    install_directory = "/usr/share/TauonMusicBox"
++
++user_directory = os.path.join(install_directory, "user-data")
++config_directory = user_directory
++asset_directory = os.path.join(install_directory, "assets")
++
+ if install_directory.startswith("/app/"):
+     # Its Flatpak
+     t_id = "com.github.taiko2k.tauonmb"
+@@ -345,7 +348,7 @@ def transfer_args_and_exit():
+ del flags
+ del img_path
+ 
+-if pyinstaller_mode or sys.platform == "darwin":
++if pyinstaller_mode or sys.platform == "darwin" or install_mode:
+     from t_modules import t_main
+ else:
+     # Using the above import method breaks previous pickles. Could be fixed
+
+From e5f16cfa1176421f4a3b7990a8d30158c9141ae6 Mon Sep 17 00:00:00 2001
+From: David Roman <davidroman96@gmail.com>
+Date: Fri, 2 Feb 2024 15:56:37 +0100
+Subject: [PATCH 3/3] Search phazor.so from standard LD_LIBRARY_PATH
+
+By removing the hardcoded path we allow LoadLibrary to search the
+library from LD_LIBRARY_PATH directories
+---
+ t_modules/t_phazor.py | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/t_modules/t_phazor.py b/t_modules/t_phazor.py
+index 2ec5724c9..0c629f62c 100644
+--- a/t_modules/t_phazor.py
++++ b/t_modules/t_phazor.py
+@@ -55,7 +55,12 @@ def player4(tauon):
+     loaded_track = None
+     fade_time = 400
+ 
+-    aud = ctypes.cdll.LoadLibrary(pctl.install_directory + "/lib/libphazor.so")
++    if os.path.isfile(pctl.install_directory + "/lib/libphazor.so"):
++        # XXX: May be unnecesary. It's only to ensure compatibility with WWindows
++        aud = ctypes.cdll.LoadLibrary(pctl.install_directory + "/lib/libphazor.so")
++    else:
++        aud = ctypes.cdll.LoadLibrary("libphazor.so")
++
+     aud.init()
+ 
+     aud.get_device.restype = ctypes.c_char_p

diff --git a/media-sound/TauonMusicBox/metadata.xml b/media-sound/TauonMusicBox/metadata.xml
new file mode 100644
index 0000000000..d30548692a
--- /dev/null
+++ b/media-sound/TauonMusicBox/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>davidroman96@gmail.com</email>
+		<name>David Roman</name>
+	</maintainer>
+	<upstream>
+		<remote-id type="github">Taiko2k/TauronMusicBox</remote-id> 
+	</upstream>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: media-sound/TauonMusicBox/files/, media-sound/TauonMusicBox/
@ 2024-04-26 11:35 David Roman
  0 siblings, 0 replies; 3+ messages in thread
From: David Roman @ 2024-04-26 11:35 UTC (permalink / raw
  To: gentoo-commits

commit:     f9d64c8bf08adb2097a68d67155e9cb4b849d678
Author:     David Roman <davidroman96 <AT> gmail <DOT> com>
AuthorDate: Fri Apr 26 11:35:07 2024 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Fri Apr 26 11:35:07 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f9d64c8b

media-sound/TauonMusicBox: update live ebuild

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

 .../TauonMusicBox/TauonMusicBox-9999.ebuild        |  19 ++-
 .../files/TauonMusicBox-fix-build-system.patch     | 156 ---------------------
 2 files changed, 17 insertions(+), 158 deletions(-)

diff --git a/media-sound/TauonMusicBox/TauonMusicBox-9999.ebuild b/media-sound/TauonMusicBox/TauonMusicBox-9999.ebuild
index a38abd496d..ae30a05d6b 100644
--- a/media-sound/TauonMusicBox/TauonMusicBox-9999.ebuild
+++ b/media-sound/TauonMusicBox/TauonMusicBox-9999.ebuild
@@ -7,7 +7,7 @@ PLOCALES="cs de es fr_FR hu id it ja_JP nb_NO pl pt pt_BR pt_PT ru sv tr zh_CN"
 PYTHON_COMPAT=( python3_{10..12} )
 DISTUTILS_USE_PEP517=setuptools
 
-inherit cmake desktop distutils-r1 plocale
+inherit cmake desktop distutils-r1 optfeature plocale xdg
 
 DESCRIPTION="The desktop music player of today!"
 HOMEPAGE="https://tauonmusicbox.rocks/"
@@ -38,10 +38,17 @@ PHAZOR_DEPS="
 "
 
 DEPEND="
+	dev-python/beautifulsoup4[${PYTHON_USEDEP}]
 	dev-python/musicbrainzngs[${PYTHON_USEDEP}]
+	dev-python/natsort[${PYTHON_USEDEP}]
 	dev-python/pillow[${PYTHON_USEDEP}]
 	dev-python/PySDL2[${PYTHON_USEDEP}]
+	dev-python/requests[${PYTHON_USEDEP}]
+	dev-python/setproctitle[${PYTHON_USEDEP}]
+	dev-python/send2trash[${PYTHON_USEDEP}]
+	media-video/ffmpeg
 	media-libs/mutagen[${PYTHON_USEDEP}]
+	media-libs/sdl2-image
 
 	${PHAZOR_DEPS}
 "
@@ -50,13 +57,14 @@ RDEPEND="
 	${DEPEND}
 
 	dev-libs/libappindicator
+	x11-libs/libnotify
 "
 
 BDEPEND="sys-devel/gettext"
 
 src_prepare() {
 	# Workaround. If PATCHES is used it would be applied to times and fail
-	eapply "${FILESDIR}/${PN}-fix-build-system.patch"
+	eapply "${FILESDIR}/${PN}-fix-desktop.patch"
 
 	distutils-r1_src_prepare
 	cmake_src_prepare
@@ -105,3 +113,10 @@ python_install() {
 
 	distutils-r1_python_install
 }
+
+pkg_postinst() {
+	optfeature "last fm support" dev-python/pylast
+	optfeature "PLEX support" dev-python/plexapi
+
+	xdg_pkg_postinst
+}

diff --git a/media-sound/TauonMusicBox/files/TauonMusicBox-fix-build-system.patch b/media-sound/TauonMusicBox/files/TauonMusicBox-fix-build-system.patch
deleted file mode 100644
index dad565e16c..0000000000
--- a/media-sound/TauonMusicBox/files/TauonMusicBox-fix-build-system.patch
+++ /dev/null
@@ -1,156 +0,0 @@
-From fea857478425a10ee285818e1c987d1efdbb6a5c Mon Sep 17 00:00:00 2001
-From: David Roman <davidroman96@gmail.com>
-Date: Tue, 30 Jan 2024 23:34:48 +0100
-Subject: [PATCH 1/3] Add CmakeLists.txt file to compile phrazor
-
-Closes: #828
----
- CMakeLists.txt | 19 +++++++++++++++++++
- 1 file changed, 19 insertions(+)
- create mode 100644 CMakeLists.txt
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-new file mode 100644
-index 000000000..cf79faf5b
---- /dev/null
-+++ b/CMakeLists.txt
-@@ -0,0 +1,19 @@
-+cmake_minimum_required(VERSION 3.10)
-+project(phazor)
-+
-+add_library(phazor SHARED src/phazor/phazor.c)
-+
-+find_package(PkgConfig REQUIRED)
-+
-+pkg_check_modules(phazor REQUIRED flac libopenmpt libmpg123 opus opusfile wavpack samplerate)
-+
-+find_package(kissfft CONFIG COMPONENTS float)
-+if(NOT kissfft_FOUND)
-+	add_subdirectory(src/phazor/kissfft)
-+endif()
-+
-+target_include_directories(phazor PRIVATE ${phazor_INCLUDE_DIRS})
-+target_link_libraries(phazor kissfft::kissfft ${phazor_LIBRARIES})
-+
-+
-+install(TARGETS phazor DESTINATION ${CMAKE_SOURCE_DIR}/lib)
-
-From 44785f42480b7e53fda707b839153c3665ae4df0 Mon Sep 17 00:00:00 2001
-From: David Roman <davidroman96@gmail.com>
-Date: Thu, 1 Feb 2024 19:35:58 +0100
-Subject: [PATCH 2/3] Add setup.py and fix install_directory for Linux installs
-
----
- setup.py            | 16 ++++++++++++++++
- t_modules/t_main.py |  4 ++++
- tauon.py            | 15 +++++++++------
- 3 files changed, 29 insertions(+), 6 deletions(-)
- create mode 100644 setup.py
-
-diff --git a/setup.py b/setup.py
-new file mode 100644
-index 000000000..dbfa6257a
---- /dev/null
-+++ b/setup.py
-@@ -0,0 +1,16 @@
-+from setuptools import setup, find_packages, Extension
-+
-+with open('requirements.txt') as f:
-+    required = f.read().splitlines()
-+
-+setup(
-+    name = 'Tauon Music Box',
-+    packages = find_packages(),
-+    version = '7.7.2',
-+    url = 'https://tauonmusicbox.rocks/',
-+    license = 'GPL-3',
-+    install_requires=required,
-+	classifiers=[
-+		'Programming Language :: Python :: 3'
-+	],
-+)
-diff --git a/t_modules/t_main.py b/t_modules/t_main.py
-index ebbd325b8..7cbb9782c 100644
---- a/t_modules/t_main.py
-+++ b/t_modules/t_main.py
-@@ -141,6 +141,10 @@
- # if system == "windows" or msys:
- #     os.environ["PYSDL2_DLL_PATH"] = install_directory + "\\lib"
- 
-+# Assume that it's a classic Linux install, use standard paths
-+if install_directory.startswith("/usr/"):
-+    install_directory = "/usr/share/TauonMusicBox"
-+
- # Set data folders (portable mode)
- user_directory = install_directory
- config_directory = user_directory
-diff --git a/tauon.py b/tauon.py
-index 6dec8f340..8c502a1a3 100755
---- a/tauon.py
-+++ b/tauon.py
-@@ -78,11 +78,6 @@ def transfer_args_and_exit():
-      os.environ["PATH"] += ":" + sys._MEIPASS
-      os.environ['SSL_CERT_FILE'] = os.path.join(install_directory, "certifi", "cacert.pem")
- 
--user_directory = os.path.join(install_directory, "user-data")
--config_directory = user_directory
--
--asset_directory = os.path.join(install_directory, "assets")
--
- # If we're installed, use home data locations
- install_mode = False
- if install_directory.startswith("/opt/")\
-@@ -91,6 +86,14 @@ def transfer_args_and_exit():
-         or install_directory.startswith("/snap/") or sys.platform == "darwin" or sys.platform == 'win32':
-     install_mode = True
- 
-+# Assume that it's a classic Linux install, use standard paths
-+if install_directory.startswith("/usr/"):
-+    install_directory = "/usr/share/TauonMusicBox"
-+
-+user_directory = os.path.join(install_directory, "user-data")
-+config_directory = user_directory
-+asset_directory = os.path.join(install_directory, "assets")
-+
- if install_directory.startswith("/app/"):
-     # Its Flatpak
-     t_id = "com.github.taiko2k.tauonmb"
-@@ -345,7 +348,7 @@ def transfer_args_and_exit():
- del flags
- del img_path
- 
--if pyinstaller_mode or sys.platform == "darwin":
-+if pyinstaller_mode or sys.platform == "darwin" or install_mode:
-     from t_modules import t_main
- else:
-     # Using the above import method breaks previous pickles. Could be fixed
-
-From e5f16cfa1176421f4a3b7990a8d30158c9141ae6 Mon Sep 17 00:00:00 2001
-From: David Roman <davidroman96@gmail.com>
-Date: Fri, 2 Feb 2024 15:56:37 +0100
-Subject: [PATCH 3/3] Search phazor.so from standard LD_LIBRARY_PATH
-
-By removing the hardcoded path we allow LoadLibrary to search the
-library from LD_LIBRARY_PATH directories
----
- t_modules/t_phazor.py | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/t_modules/t_phazor.py b/t_modules/t_phazor.py
-index 2ec5724c9..0c629f62c 100644
---- a/t_modules/t_phazor.py
-+++ b/t_modules/t_phazor.py
-@@ -55,7 +55,12 @@ def player4(tauon):
-     loaded_track = None
-     fade_time = 400
- 
--    aud = ctypes.cdll.LoadLibrary(pctl.install_directory + "/lib/libphazor.so")
-+    if os.path.isfile(pctl.install_directory + "/lib/libphazor.so"):
-+        # XXX: May be unnecesary. It's only to ensure compatibility with WWindows
-+        aud = ctypes.cdll.LoadLibrary(pctl.install_directory + "/lib/libphazor.so")
-+    else:
-+        aud = ctypes.cdll.LoadLibrary("libphazor.so")
-+
-     aud.init()
- 
-     aud.get_device.restype = ctypes.c_char_p


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: media-sound/TauonMusicBox/files/, media-sound/TauonMusicBox/
@ 2025-02-24  9:49 David Roman
  0 siblings, 0 replies; 3+ messages in thread
From: David Roman @ 2025-02-24  9:49 UTC (permalink / raw
  To: gentoo-commits

commit:     b206077917e58f017c577e7cb1cdbfa938a7f899
Author:     David Roman <davidroman96 <AT> gmail <DOT> com>
AuthorDate: Mon Feb 24 09:44:22 2025 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Mon Feb 24 09:47:42 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b2060779

media-sound/TauonMusicBox: add 7.9.0

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

 media-sound/TauonMusicBox/Manifest                 |   1 +
 .../TauonMusicBox/TauonMusicBox-7.9.0.ebuild       | 104 +++++++++++++++++++++
 .../files/TauonMusicBox-7.9.0-phazor-build.patch   |  17 ++++
 3 files changed, 122 insertions(+)

diff --git a/media-sound/TauonMusicBox/Manifest b/media-sound/TauonMusicBox/Manifest
index 4cdb6d070..29994b0f8 100644
--- a/media-sound/TauonMusicBox/Manifest
+++ b/media-sound/TauonMusicBox/Manifest
@@ -1,2 +1,3 @@
 DIST TauonMusicBox-7.8.0.tar.gz 1080654 BLAKE2B 6c671efc10f0e7340bb2db0ebcc59f25784a665a9a2e85ab5132a10362d9d0f7041affedc763ed5acde19c529c742e127eb1493578f9f79ca7f3b1dfd4439784 SHA512 0896e185314037e23d76776ce96b227ede8a96651958df7ca0acc0d37c431169aeb72395116d8887d37c1360c15f436f7488c751866e60fa5ba3a5082b9acef8
 DIST TauonMusicBox-7.8.3.tar.gz 1085686 BLAKE2B 92014544bc45c92ca8170ae88c56eb2a767b0dff2dcd1086cb73d22a4287b6a82be7b3134a41329940ccc6080377d82b71c2d9ef891975d62756068c8a97f867 SHA512 f1679326a49c1d341ea773b5f402fa4ad00ac2c79549fc04b2959bdf2dfad045e6e88add5b9075e660016a4d94d15e43e5d5c93e6f413e727d30f5aaa8fbdc1d
+DIST TauonMusicBox-7.9.0.tar.gz 1354787 BLAKE2B 2116c84ec687ec337e712aefa5da54b08e572b917c3a41d94687a95bfefd8d7a3276422b4e68cda8ed5f27f92a32bf491d41f1f4476e193f19ce927d6f6d02b4 SHA512 17b26b296385f3c2b6006a6a33453e5a277c8bc901f717bac3751bddc1691116e0bf116db9457e425d61d300200b5ca487f5b4949ca2be2993657be4fa9d87cf

diff --git a/media-sound/TauonMusicBox/TauonMusicBox-7.9.0.ebuild b/media-sound/TauonMusicBox/TauonMusicBox-7.9.0.ebuild
new file mode 100644
index 000000000..1860129a0
--- /dev/null
+++ b/media-sound/TauonMusicBox/TauonMusicBox-7.9.0.ebuild
@@ -0,0 +1,104 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PLOCALES="cs de es fr_FR hu id it ja_JP nb_NO pl pt pt_BR pt_PT ru sv tr zh_CN"
+
+PYTHON_COMPAT=( python3_{10..12} )
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+
+inherit desktop distutils-r1 optfeature plocale xdg
+
+DESCRIPTION="The desktop music player of today!"
+HOMEPAGE="https://tauonmusicbox.rocks/"
+
+if [[ ${PV} == *9999 ]]; then
+	EGIT_SUBMODULES=()
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/Taiko2k/${PN}"
+else
+	SRC_URI="https://github.com/Taiko2k/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+	KEYWORDS="~amd64"
+fi
+
+S="${WORKDIR}/Tauon-${PV}"
+
+LICENSE="GPL-3"
+SLOT="0"
+
+PHAZOR_DEPS="
+	dev-libs/miniaudio
+	media-libs/flac
+	media-libs/game-music-emu
+	media-libs/libopenmpt
+	media-libs/opus
+	media-libs/opusfile
+	media-libs/libsamplerate
+	media-libs/libvorbis
+	media-sound/mpg123
+	media-sound/wavpack
+	sci-libs/kissfft[-cpu_flags_x86_sse]
+"
+
+DEPEND="
+	dev-python/beautifulsoup4[${PYTHON_USEDEP}]
+	dev-python/musicbrainzngs[${PYTHON_USEDEP}]
+	dev-python/natsort[${PYTHON_USEDEP}]
+	dev-python/pillow[${PYTHON_USEDEP}]
+	dev-python/pysdl2[${PYTHON_USEDEP}]
+	dev-python/requests[${PYTHON_USEDEP}]
+	dev-python/setproctitle[${PYTHON_USEDEP}]
+	dev-python/send2trash[${PYTHON_USEDEP}]
+	dev-python/unidecode[${PYTHON_USEDEP}]
+	media-video/ffmpeg
+	media-libs/mutagen[${PYTHON_USEDEP}]
+	media-libs/sdl2-image
+
+	${PHAZOR_DEPS}
+"
+
+RDEPEND="
+	${DEPEND}
+
+	dev-libs/libayatana-appindicator
+	media-sound/mpg123-base
+	x11-libs/libnotify
+"
+
+BDEPEND="sys-devel/gettext"
+
+PATCHES=( "${FILESDIR}/${PN}-7.9.0-phazor-build.patch" )
+
+src_compile() {
+	distutils-r1_src_compile
+
+	build_locale() {
+		msgfmt -o "locale/${1}/LC_MESSAGES/tauon.mo" "locale/${1}/LC_MESSAGES/tauon.po" || die
+	}
+
+	plocale_for_each_locale build_locale
+}
+
+python_install() {
+	distutils-r1_python_install
+
+	install_locale() {
+		insinto "/usr/share/locale/${1}/LC_MESSAGES"
+		doins "locale/${1}/LC_MESSAGES/tauon.mo"
+	}
+
+	plocale_for_each_locale install_locale
+
+	sed -i 's/\/opt\/tauon-music-box\/tauonmb.sh/tauon/g' extra/tauonmb.desktop || die
+	domenu extra/tauonmb.desktop
+	doicon -s scalable extra/tauonmb.svg
+
+}
+
+pkg_postinst() {
+	optfeature "last fm support" dev-python/pylast
+	optfeature "PLEX support" dev-python/plexapi
+
+	xdg_pkg_postinst
+}

diff --git a/media-sound/TauonMusicBox/files/TauonMusicBox-7.9.0-phazor-build.patch b/media-sound/TauonMusicBox/files/TauonMusicBox-7.9.0-phazor-build.patch
new file mode 100644
index 000000000..33d6f966b
--- /dev/null
+++ b/media-sound/TauonMusicBox/files/TauonMusicBox-7.9.0-phazor-build.patch
@@ -0,0 +1,17 @@
+diff --git a/pyproject.toml b/pyproject.toml
+index 8c85dc69..2d42d31f 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -86,10 +86,10 @@
+ 
+ 	# Linux + macOS + Windows (MINGW64)
+ 	ext-modules = [
+-		{name = "phazor", sources = ["src/phazor/kissfft/kiss_fftr.c", "src/phazor/kissfft/kiss_fft.c", "src/phazor/phazor.c"], include-dirs = ["/usr/include/opus", "/opt/homebrew/include/opus", "/opt/homebrew/include", "C:/msys64/mingw64/include/opus"], libraries = ["samplerate", "wavpack", "opusfile", "vorbisfile", "mpg123", "FLAC", "openmpt", "gme"], library-dirs = ["/opt/homebrew/lib"] },
++		{name = "phazor", sources = ["src/phazor/phazor.c"], include-dirs = ["/usr/include/opus", "/opt/homebrew/include/opus", "/opt/homebrew/include", "C:/msys64/mingw64/include/opus"], libraries = ["kissfft-float-openmp", "samplerate", "wavpack", "opusfile", "vorbisfile", "mpg123", "FLAC", "openmpt", "gme"], library-dirs = ["/opt/homebrew/lib"] },
+ 		# Set as optional to allow soft-failure, it's expected not to build on Windows/macOS, but we don't want to fail the entire build on it
+ 		# I have not found a better way to solve this, ideally we would somehow tag this as Linux-exclusive
+-		{name = "phazor-pw", sources = ["src/phazor/kissfft/kiss_fftr.c", "src/phazor/kissfft/kiss_fft.c", "src/phazor/phazor.c"], include-dirs = ["/usr/include/opus"], libraries = ["samplerate", "wavpack", "opusfile", "vorbisfile", "mpg123", "FLAC", "openmpt", "gme", "pipewire-0.3"], optional = true },
++		{name = "phazor-pw", sources = ["src/phazor/phazor.c"], include-dirs = ["/usr/include/opus"], libraries = ["kissfft-float-openmp", "samplerate", "wavpack", "opusfile", "vorbisfile", "mpg123", "FLAC", "openmpt", "gme", "pipewire-0.3"], optional = true },
+ 	]
+ 
+ 	package-dir = {"" = "src"}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-02-24  9:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-26 11:35 [gentoo-commits] repo/proj/guru:dev commit in: media-sound/TauonMusicBox/files/, media-sound/TauonMusicBox/ David Roman
  -- strict thread matches above, loose matches on Subject: below --
2025-02-24  9:49 David Roman
2024-02-23  1:36 [gentoo-commits] repo/proj/guru:master " David Roman
2024-02-23  1:14 ` [gentoo-commits] repo/proj/guru:dev " David Roman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox