ol operator < (const qm_listItemInfo& litem) ++ bool operator < (const qm_listItemInfo& litem) const + { + return sorter < litem.sorter; + } diff --git a/audio/quimup/files/patch-source_qm__mpdcom.cpp b/audio/quimup/files/patch-source_qm__mpdcom.cpp new file mode 100644 index 000000000000..85ebbc6a12a9 --- /dev/null +++ b/audio/quimup/files/patch-source_qm__mpdcom.cpp @@ -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; diff --git a/audio/quimup/files/patch-src_qm__config.cpp b/audio/quimup/files/patch-src_qm__config.cpp deleted file mode 100644 index c6ac51d40dc8..000000000000 --- a/audio/quimup/files/patch-src_qm__config.cpp +++ /dev/null @@ -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(); - diff --git a/audio/quimup/files/patch-src_qm__itemlist.h b/audio/quimup/files/patch-src_qm__itemlist.h deleted file mode 100644 index dd286324fdf1..000000000000 --- a/audio/quimup/files/patch-src_qm__itemlist.h +++ /dev/null @@ -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; - } diff --git a/audio/quimup/files/patch-src_qm__mpdcom.cpp b/audio/quimup/files/patch-src_qm__mpdcom.cpp deleted file mode 100644 index c3cf55809370..000000000000 --- a/audio/quimup/files/patch-src_qm__mpdcom.cpp +++ /dev/null @@ -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; - } -