audio/quimup: Update to 2.0.1

Update WWW and LICENSE (GPLv3+) according to upstream.

Switch build to Qt6 as upstream has dropped support of Qt5.

Pet portclippy(1).

PR:		277040
Approved by:	Chris Mangin <cmangin@arobas.net> (maintainer)
main
Jason E. Hale 2024-02-13 18:06:41 -05:00
parent 26bc7a808a
commit b52b8d1282
8 changed files with 175 additions and 106 deletions

View File

@ -1,42 +1,38 @@
PORTNAME= quimup
PORTVERSION= 1.4.4
PORTREVISION= 2
PORTVERSION= 2.0.1
CATEGORIES= audio
MASTER_SITES= SF/${PORTNAME}
DISTNAME= Quimup_${PORTVERSION}_source
MASTER_SITES= SF/${PORTNAME}/Quimup%20${PORTVERSION:R}
DISTNAME= Quimup-${PORTVERSION}.source
MAINTAINER= cmangin@arobas.net
COMMENT= Qt5 client for MPD (the Music Player Daemon)
WWW= https://coonsden.com/?cat=4
COMMENT= Qt client for MPD (Music Player Daemon)
WWW= https://sourceforge.net/projects/quimup/
LICENSE= GPLv2+
LICENSE= GPLv3+
LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libmpdclient.so:audio/libmpdclient \
libtag.so:audio/taglib
LIB_DEPENDS= libmpdclient.so:audio/libmpdclient
USES= compiler:c++11-lang gl pkgconfig qmake qt:5
USE_QT= core gui network widgets buildtools:build
USE_GL= gl
USES= compiler:c++17-lang gl pkgconfig qmake qt:6
USE_GL= opengl
USE_QT= base svg:run
WRKSRC= ${WRKDIR}/Quimup_${PORTVERSION}_source
CXXFLAGS+= -std=c++11
PLIST_FILES= bin/quimup \
share/pixmaps/quimup.png
CXXFLAGS+= -std=c++17
DESKTOP_ENTRIES="Quimup" "MPD client" "quimup" "quimup" \
"Audio;AudioVideo;Qt;" true
WRKSRC= ${WRKDIR}/Quimup
PLIST_FILES= bin/quimup \
share/pixmaps/quimup.svg
post-patch:
@${REINPLACE_CMD} -e \
'/^#define get_time/d' ${WRKSRC}/src/qm_playlistview.h
@${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/src/qm_mpdcom.cpp
@${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/source/qm_mpdcom.cpp
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/quimup ${STAGEDIR}${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/src/resources/mn_icon.png \
${STAGEDIR}${PREFIX}/share/pixmaps/quimup.png
${INSTALL_DATA} ${WRKSRC}/source/resources/qm_main_icon.svg \
${STAGEDIR}${PREFIX}/share/pixmaps/quimup.svg
.include <bsd.port.mk>

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1552177932
SHA256 (Quimup_1.4.4_source.tar.gz) = d87ec8c57a78587bfc4d6230d55f713f7fb5bc2e642676b94dbd31e157dc83fc
SIZE (Quimup_1.4.4_source.tar.gz) = 240902
TIMESTAMP = 1707801437
SHA256 (Quimup-2.0.1.source.tar.gz) = 7b7833fa2f68992003357686b901274dc673137e8078728d8bab6ec2c4d6f1aa
SIZE (Quimup-2.0.1.source.tar.gz) = 692275

View File

@ -0,0 +1,14 @@
--- source/qm_config.cpp.orig 2024-01-31 18:06:04 UTC
+++ source/qm_config.cpp
@@ -191,9 +191,9 @@ void qm_Config::load_config()
// server related values
onquit_quitmpd = sts.value("onquit_quitmpd", false ).toBool();
- onquit_mpd_command = sts.value("onquit_mpd_command", "systemctl --user stop mpd").toString();
+ onquit_mpd_command = sts.value("onquit_mpd_command", "musicpd --kill" ).toString();
onstart_startmpd = sts.value("onstart_startmpd", false ).toBool();
- onstart_mpd_command = sts.value("onstart_mpd_command", "systemctl --user start mpd" ).toString();
+ onstart_mpd_command = sts.value("onstart_mpd_command", "musicpd" ).toString();
auto_connect = sts.value("auto_connect", true ).toBool();
auto_re_connect = sts.value("auto_re_connect", true ).toBool();
mpd_timeout = sts.value("mpd_timeout", 12 ).toInt();

View File

@ -0,0 +1,11 @@
--- source/qm_itemlist.h.orig 2024-01-30 12:25:50 UTC
+++ source/qm_itemlist.h
@@ -49,7 +49,7 @@ class qm_listItemInfo (public)
QString sorter;
// Override the < operator for alist.sort();
- bool operator < (const qm_listItemInfo& litem)
+ bool operator < (const qm_listItemInfo& litem) const
{
return sorter < litem.sorter;
}

View File

@ -0,0 +1,128 @@
--- source/qm_mpdcom.cpp.orig 2024-02-02 09:26:32 UTC
+++ source/qm_mpdcom.cpp
@@ -369,32 +369,35 @@ QString qm_mpdCommand::get_mpdconf_path()
mpdconf_path = find_config_files(false);
}
- if (confpath.isEmpty())
+ if (confpath.isEmpty() && mpdconf_path.isEmpty())
b_mpdconf_found = false;
else
b_mpdconf_found = true;
+ if (!mpdconf_path.isEmpty())
+ return mpdconf_path;
+
return confpath;
}
-// Get mpd.conf from /etc/default/mpd
+// Get mpd.conf from %%PREFIX%%/etc/musicpd.conf
QString qm_mpdCommand::get_etc_default_mpd()
{
QFile file;
QString line = "";
- file.setFileName("/etc/default/mpd");
+ file.setFileName("%%PREFIX%%/etc/musicpd.conf");
if ( !file.exists() )
{
if (config->cout_extensive)
- printf ("MPD's config: Tried /etc/default/mpd but it does not exist\n");
+ printf ("MPD's config: Tried %%PREFIX%%/etc/musicpd.conf but it does not exist\n");
return line;
}
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
{
if (config->cout_extensive)
- printf ("MPD's config: Tried /etc/default/mpd but it is not readable\n");
+ printf ("MPD's config: Tried %%PREFIX%%/etc/musicpd.conf but it is not readable\n");
return line;
}
else
@@ -418,19 +421,19 @@ QString qm_mpdCommand::get_etc_default_mpd()
if (!file.exists())
{
if (config->cout_extensive)
- printf ("MPD's config in /etc/default/mpd does not exist\n");
+ printf ("MPD's config in %%PREFIX%%/etc/musicpd.conf does not exist\n");
line = "";
}
}
else
{
if (config->cout_extensive)
- printf ("MPD's config: Tried /etc/default/mpd but MPDCONF is not set\n");
+ printf ("MPD's config: Tried %%PREFIX%%/etc/musicpd.conf but MPDCONF is not set\n");
}
if (!line.isEmpty() && config->cout_extensive)
{
- printf ("MPD's config from /etc/default/mpd: %s\n", line.toUtf8().constData());
+ printf ("MPD's config from %%PREFIX%%/etc/musicpd.conf: %s\n", line.toUtf8().constData());
}
return line;
@@ -2996,7 +2999,7 @@ QString qm_mpdCommand::find_config_files(bool show_dia
QString qm_mpdCommand::find_config_files(bool show_dialog)
{
-/* If not specified on the command-line or in /etc/default/mpd
+/* If not specified on the command-line or in %%PREFIX%%/etc/musicpd.conf
MPD searches
1st at ~/.config/mpd/mpd.conf
2nd at ~/.mpdconf
@@ -3062,20 +3065,20 @@ QString qm_mpdCommand::find_config_files(bool show_dia
}
}
- thispath = "/etc/mpd.conf";
+ thispath = "%%PREFIX%%/etc/musicpd.conf";
file.setFileName(thispath);
if ( file.exists() )
{
if (file.open(QIODevice::ReadOnly))
{
file.close();
- printf ("located: /etc/mpd.conf\n");
+ printf ("located: %%PREFIX%%/etc/musicpd.conf\n");
return thispath;
}
else
{
if (config->cout_extensive)
- printf ("/etc/mpd.conf, but it is not readable\n");
+ printf ("%%PREFIX%%/etc/musicpd.conf, but it is not readable\n");
}
}
@@ -3196,7 +3199,7 @@ bool qm_mpdCommand::is_mpd_installed(bool showmsg)
{
QProcess proc;
proc.setProgram("which");
- proc.setArguments({"mpd"});
+ proc.setArguments({"musicpd"});
proc.start();
if (!proc.waitForFinished())
{
@@ -3207,7 +3210,7 @@ bool qm_mpdCommand::is_mpd_installed(bool showmsg)
QString output = proc.readAllStandardOutput();
output = output.trimmed();
- if (output.contains("/usr/bin/mpd") || output.contains("/usr/local/bin/mpd") || output.contains("/usr/sbin/mpd"))
+ if (output.contains("%%PREFIX%%/bin/musicpd"))
{
if (showmsg)
printf ("MPD is installed on this system\n");
@@ -3227,8 +3230,8 @@ bool qm_mpdCommand::is_mpd_running(bool showmsg)
config->mpd_process_owner = ""; // empty equals not running
QProcess proc;
- proc.setProgram("pidof");
- proc.setArguments({"mpd"});
+ proc.setProgram("pgrep");
+ proc.setArguments({"musicpd"});
proc.start();
if (!proc.waitForFinished())
return false;

View File

@ -1,14 +0,0 @@
--- src/qm_config.cpp.orig 2018-11-28 18:19:33 UTC
+++ src/qm_config.cpp
@@ -172,9 +172,9 @@ void qm_config::load_config()
version = sts.value("version", "0.0" ).toString();
// server related values
quitMPD_onquit = sts.value("quitMPD_onquit", false ).toBool();
- onquit_mpd_command = sts.value("onquit_mpd_command", "mpd --kill").toString();
+ onquit_mpd_command = sts.value("onquit_mpd_command", "musicpd --kill").toString();
startMPD_onstart = sts.value("startMPD_onstart", false ).toBool();
- onstart_mpd_command = sts.value("onstart_mpd_command", "mpd" ).toString();
+ onstart_mpd_command = sts.value("onstart_mpd_command", "musicpd" ).toString();
auto_connect = sts.value("auto_connect", true ).toBool();
start_minimized = sts.value("start_minimized", false ).toBool();

View File

@ -1,11 +0,0 @@
--- src/qm_itemlist.h.orig 2018-12-09 18:43:06 UTC
+++ src/qm_itemlist.h
@@ -63,7 +63,7 @@ class qm_listitemInfo (public)
QString sorter;
// Override the < operator for alist.sort();
- bool operator < (const qm_listitemInfo& litem)
+ bool operator < (const qm_listitemInfo& litem) const
{
return sorter < litem.sorter;
}

View File

@ -1,55 +0,0 @@
--- src/qm_mpdcom.cpp.orig 2018-12-11 21:49:38 UTC
+++ src/qm_mpdcom.cpp
@@ -367,16 +367,16 @@ QString qm_mpdCom::get_from_etcdefaultmpd()
QFile file;
QString line = "";
- file.setFileName("/etc/default/mpd");
+ file.setFileName("%%PREFIX%%/etc/musicpd.conf");
if ( !file.exists() )
{
- printf ("MPD's config : Tried /etc/default/mpd but it does not exist\n");
+ printf ("MPD's config : Tried %%PREFIX%%/etc/musicpd.conf but it does not exist\n");
return line;
}
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
{
- printf ("MPD's config : Tried /etc/default/mpd but it is not readable\n");
+ printf ("MPD's config : Tried %%PREFIX%%/etc/musicpd.conf but it is not readable\n");
return line;
}
@@ -393,10 +393,10 @@ QString qm_mpdCom::get_from_etcdefaultmpd()
file.close();
if (line.isEmpty())
- printf ("MPD's config : Tried /etc/default/mpd but MPDCONF is not set\n");
+ printf ("MPD's config : Tried %%PREFIX%%/etc/musicpd.conf but MPDCONF is not set\n");
else
{
- QString msg = "MPD's config found in /etc/default/mpd : " + line + "\n";
+ QString msg = "MPD's config found in %%PREFIX%%/etc/musicpd.conf : " + line + "\n";
printf ("%s", msg.toUtf8().constData());
}
@@ -2710,17 +2710,10 @@ bool qm_mpdCom::is_mpd_running()
struct stat sts;
bool b_isrunning = false;
- // try pidof
- if (stat("/bin/pidof", &sts) == 0)
- {
- if( system("pidof mpd > /dev/null") == 0)
- b_isrunning = true;
- }
- else
// try pgrep
- if (stat("/usr/bin/pgrep", &sts) == 0)
+ if (stat("/bin/pgrep", &sts) == 0)
{
- if( system("pgrep mpd > /dev/null") == 0)
+ if( system("pgrep musicpd > /dev/null") == 0)
b_isrunning = true;
}