View | Details | Raw Unified | Return to bug 277040 | Differences between
and this patch

Collapse All | Expand All

(-)b/audio/quimup/Makefile (-23 / +19 lines)
Lines 1-42 Link Here
1
PORTNAME=	quimup
1
PORTNAME=	quimup
2
PORTVERSION=	1.4.4
2
PORTVERSION=	2.0.1
3
PORTREVISION=	2
4
CATEGORIES=	audio
3
CATEGORIES=	audio
5
MASTER_SITES=	SF/${PORTNAME}
4
MASTER_SITES=	SF/${PORTNAME}/Quimup%20${PORTVERSION:R}
6
DISTNAME=	Quimup_${PORTVERSION}_source
5
DISTNAME=	Quimup-${PORTVERSION}.source
7
6
8
MAINTAINER=	cmangin@arobas.net
7
MAINTAINER=	cmangin@arobas.net
9
COMMENT=	Qt5 client for MPD (the Music Player Daemon)
8
COMMENT=	Qt client for MPD (Music Player Daemon)
10
WWW=		https://coonsden.com/?cat=4
9
WWW=		https://sourceforge.net/projects/quimup/
11
10
12
LICENSE=	GPLv2+
11
LICENSE=	GPLv3+
13
LICENSE_FILE=	${WRKSRC}/COPYING
12
LICENSE_FILE=	${WRKSRC}/COPYING
14
13
15
LIB_DEPENDS=	libmpdclient.so:audio/libmpdclient \
14
LIB_DEPENDS=	libmpdclient.so:audio/libmpdclient
16
		libtag.so:audio/taglib
17
15
18
USES=		compiler:c++11-lang gl pkgconfig qmake qt:5
16
USES=		compiler:c++17-lang gl pkgconfig qmake qt:6
19
USE_QT=		core gui network widgets buildtools:build
17
USE_GL=		opengl
20
USE_GL=		gl
18
USE_QT=		base
21
19
22
WRKSRC=		${WRKDIR}/Quimup_${PORTVERSION}_source
20
CXXFLAGS+=	-std=c++17
23
24
CXXFLAGS+=	-std=c++11
25
26
PLIST_FILES=	bin/quimup \
27
		share/pixmaps/quimup.png
28
21
29
DESKTOP_ENTRIES="Quimup" "MPD client" "quimup" "quimup" \
22
DESKTOP_ENTRIES="Quimup" "MPD client" "quimup" "quimup" \
30
		"Audio;AudioVideo;Qt;" true
23
		"Audio;AudioVideo;Qt;" true
31
24
25
WRKSRC=		${WRKDIR}/Quimup
26
27
PLIST_FILES=	bin/quimup \
28
		share/pixmaps/quimup.svg
29
32
post-patch:
30
post-patch:
33
	@${REINPLACE_CMD} -e \
31
	@${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/source/qm_mpdcom.cpp
34
		'/^#define get_time/d' ${WRKSRC}/src/qm_playlistview.h
35
	@${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/src/qm_mpdcom.cpp
36
32
37
do-install:
33
do-install:
38
	${INSTALL_PROGRAM} ${WRKSRC}/quimup ${STAGEDIR}${PREFIX}/bin
34
	${INSTALL_PROGRAM} ${WRKSRC}/quimup ${STAGEDIR}${PREFIX}/bin
39
	${INSTALL_DATA} ${WRKSRC}/src/resources/mn_icon.png \
35
	${INSTALL_DATA} ${WRKSRC}/source/resources/qm_main_icon.svg \
40
		${STAGEDIR}${PREFIX}/share/pixmaps/quimup.png
36
		${STAGEDIR}${PREFIX}/share/pixmaps/quimup.svg
41
37
42
.include <bsd.port.mk>
38
.include <bsd.port.mk>
(-)b/audio/quimup/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1552177932
1
TIMESTAMP = 1707801437
2
SHA256 (Quimup_1.4.4_source.tar.gz) = d87ec8c57a78587bfc4d6230d55f713f7fb5bc2e642676b94dbd31e157dc83fc
2
SHA256 (Quimup-2.0.1.source.tar.gz) = 7b7833fa2f68992003357686b901274dc673137e8078728d8bab6ec2c4d6f1aa
3
SIZE (Quimup_1.4.4_source.tar.gz) = 240902
3
SIZE (Quimup-2.0.1.source.tar.gz) = 692275
(-)b/audio/quimup/files/patch-source_qm__config.cpp (+14 lines)
Added Link Here
1
--- source/qm_config.cpp.orig	2024-01-31 18:06:04 UTC
2
+++ source/qm_config.cpp
3
@@ -191,9 +191,9 @@ void qm_Config::load_config()
4
 
5
  // server related values
6
  onquit_quitmpd = sts.value("onquit_quitmpd", false ).toBool();
7
- onquit_mpd_command = sts.value("onquit_mpd_command", "systemctl --user stop mpd").toString();
8
+ onquit_mpd_command = sts.value("onquit_mpd_command", "musicpd --kill" ).toString();
9
  onstart_startmpd = sts.value("onstart_startmpd", false ).toBool();
10
- onstart_mpd_command = sts.value("onstart_mpd_command", "systemctl --user start mpd" ).toString();
11
+ onstart_mpd_command = sts.value("onstart_mpd_command", "musicpd" ).toString();
12
  auto_connect = sts.value("auto_connect", true ).toBool();
13
  auto_re_connect = sts.value("auto_re_connect", true ).toBool();
14
  mpd_timeout = sts.value("mpd_timeout", 12 ).toInt();
(-)b/audio/quimup/files/patch-source_qm__itemlist.h (+11 lines)
Added Link Here
1
--- source/qm_itemlist.h.orig	2024-01-30 12:25:50 UTC
2
+++ source/qm_itemlist.h
3
@@ -49,7 +49,7 @@ class qm_listItemInfo (public)
4
     QString sorter;
5
 
6
     // Override the < operator for alist.sort();
7
-    bool operator < (const qm_listItemInfo& litem)
8
+    bool operator < (const qm_listItemInfo& litem) const
9
     {
10
         return sorter < litem.sorter;
11
     }
(-)b/audio/quimup/files/patch-source_qm__mpdcom.cpp (+107 lines)
Added Link Here
1
--- source/qm_mpdcom.cpp.orig	2024-02-02 09:26:32 UTC
2
+++ source/qm_mpdcom.cpp
3
@@ -17,7 +17,7 @@ qm_mpdCommand::qm_mpdCommand(qm_Config * cfg)
4
         setObjectName("mpdCom");
5
 
6
     config           = cfg;
7
-    config->mpd_is_installed = is_mpd_installed(config->cout_extensive);
8
+    config->mpd_is_installed = true;
9
 
10
     p_conn           = nullptr;
11
     connect_Thread   = nullptr;
12
@@ -377,24 +377,24 @@ QString qm_mpdCommand::get_mpdconf_path()
13
     return confpath;
14
 }
15
 
16
-// Get mpd.conf from  /etc/default/mpd
17
+// Get mpd.conf from  %%PREFIX%%/etc/musicpd.conf
18
 QString qm_mpdCommand::get_etc_default_mpd()
19
 {
20
     QFile file;
21
     QString line = "";
22
 
23
-    file.setFileName("/etc/default/mpd");
24
+    file.setFileName("%%PREFIX%%/etc/musicpd.conf");
25
     if ( !file.exists() )
26
     {
27
         if (config->cout_extensive)
28
-            printf ("MPD's config: Tried /etc/default/mpd but it does not exist\n");
29
+            printf ("MPD's config: Tried %%PREFIX%%/etc/musicpd.conf but it does not exist\n");
30
         return line;
31
     }
32
 
33
     if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
34
     {
35
         if (config->cout_extensive)
36
-            printf ("MPD's config: Tried /etc/default/mpd but it is not readable\n");
37
+            printf ("MPD's config: Tried %%PREFIX%%/etc/musicpd.conf but it is not readable\n");
38
         return line;
39
     }
40
     else
41
@@ -418,19 +418,19 @@ QString qm_mpdCommand::get_etc_default_mpd()
42
         if (!file.exists())
43
         {
44
             if (config->cout_extensive)
45
-                printf ("MPD's config in /etc/default/mpd does not exist\n");
46
+                printf ("MPD's config in %%PREFIX%%/etc/musicpd.conf does not exist\n");
47
             line = "";
48
         }
49
     }
50
     else
51
     {
52
         if (config->cout_extensive)
53
-            printf ("MPD's config: Tried /etc/default/mpd but MPDCONF is not set\n");
54
+            printf ("MPD's config: Tried %%PREFIX%%/etc/musicpd.conf but MPDCONF is not set\n");
55
     }
56
 
57
     if (!line.isEmpty() && config->cout_extensive)
58
     {
59
-        printf ("MPD's config from /etc/default/mpd: %s\n", line.toUtf8().constData());
60
+        printf ("MPD's config from %%PREFIX%%/etc/musicpd.conf: %s\n", line.toUtf8().constData());
61
     }
62
 
63
     return line;
64
@@ -2996,7 +2996,7 @@ QString qm_mpdCommand::find_config_files(bool show_dia
65
 
66
 QString qm_mpdCommand::find_config_files(bool show_dialog)
67
 {
68
-/*  If not specified on the command-line or in /etc/default/mpd
69
+/*  If not specified on the command-line or in %%PREFIX%%/etc/musicpd.conf
70
     MPD searches
71
     1st at    ~/.config/mpd/mpd.conf
72
     2nd at     ~/.mpdconf
73
@@ -3062,20 +3062,20 @@ QString qm_mpdCommand::find_config_files(bool show_dia
74
         }
75
     }
76
 
77
-    thispath = "/etc/mpd.conf";
78
+    thispath = "%%PREFIX%%/etc/musicpd.conf";
79
     file.setFileName(thispath);
80
     if ( file.exists() )
81
     {
82
         if (file.open(QIODevice::ReadOnly))
83
         {
84
             file.close();
85
-            printf ("located: /etc/mpd.conf\n");
86
+            printf ("located: %%PREFIX%%/etc/musicpd.conf\n");
87
             return thispath;
88
         }
89
         else
90
         {
91
             if (config->cout_extensive)
92
-                printf ("/etc/mpd.conf, but it is not readable\n");
93
+                printf ("%%PREFIX%%/etc/musicpd.conf, but it is not readable\n");
94
         }
95
     }
96
 
97
@@ -3227,8 +3227,8 @@ bool qm_mpdCommand::is_mpd_running(bool showmsg)
98
     config->mpd_process_owner = ""; // empty equals not running
99
 
100
     QProcess proc;
101
-    proc.setProgram("pidof");
102
-    proc.setArguments({"mpd"});
103
+    proc.setProgram("pgrep");
104
+    proc.setArguments({"musicpd"});
105
     proc.start();
106
     if (!proc.waitForFinished())
107
         return false;
(-)a/audio/quimup/files/patch-src_qm__config.cpp (-14 lines)
Removed Link Here
1
--- src/qm_config.cpp.orig	2018-11-28 18:19:33 UTC
2
+++ src/qm_config.cpp
3
@@ -172,9 +172,9 @@ void qm_config::load_config()
4
     version       	    = sts.value("version",			    "0.0" ).toString();  
5
     // server related values
6
     quitMPD_onquit    	= sts.value("quitMPD_onquit",		false ).toBool();
7
-    onquit_mpd_command  = sts.value("onquit_mpd_command",	"mpd --kill").toString();
8
+    onquit_mpd_command  = sts.value("onquit_mpd_command",	"musicpd --kill").toString();
9
     startMPD_onstart    = sts.value("startMPD_onstart",		false  ).toBool();
10
-    onstart_mpd_command = sts.value("onstart_mpd_command",	"mpd"  ).toString();
11
+    onstart_mpd_command = sts.value("onstart_mpd_command",	"musicpd"  ).toString();
12
     auto_connect     	= sts.value("auto_connect",			true   ).toBool();
13
     start_minimized     = sts.value("start_minimized",		false   ).toBool();
14
     
(-)a/audio/quimup/files/patch-src_qm__itemlist.h (-11 lines)
Removed Link Here
1
--- src/qm_itemlist.h.orig	2018-12-09 18:43:06 UTC
2
+++ src/qm_itemlist.h
3
@@ -63,7 +63,7 @@ class qm_listitemInfo (public)
4
     QString sorter;
5
 
6
     // Override the < operator for alist.sort();
7
-    bool operator < (const qm_listitemInfo& litem)
8
+    bool operator < (const qm_listitemInfo& litem) const
9
     {
10
         return sorter < litem.sorter;
11
     }
(-)a/audio/quimup/files/patch-src_qm__mpdcom.cpp (-56 lines)
Removed Link Here
1
--- src/qm_mpdcom.cpp.orig	2018-12-11 21:49:38 UTC
2
+++ src/qm_mpdcom.cpp
3
@@ -367,16 +367,16 @@ QString qm_mpdCom::get_from_etcdefaultmpd()
4
     QFile file;
5
     QString line = "";
6
 
7
-    file.setFileName("/etc/default/mpd");
8
+    file.setFileName("%%PREFIX%%/etc/musicpd.conf");
9
     if ( !file.exists() )
10
     {
11
-        printf ("MPD's config : Tried /etc/default/mpd but it does not exist\n");
12
+        printf ("MPD's config : Tried %%PREFIX%%/etc/musicpd.conf but it does not exist\n");
13
         return line;
14
     }
15
 
16
     if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
17
     {
18
-        printf ("MPD's config : Tried /etc/default/mpd but it is not readable\n");
19
+        printf ("MPD's config : Tried %%PREFIX%%/etc/musicpd.conf but it is not readable\n");
20
         return line;
21
     }
22
 
23
@@ -393,10 +393,10 @@ QString qm_mpdCom::get_from_etcdefaultmpd()
24
     file.close();
25
 
26
     if (line.isEmpty())
27
-        printf ("MPD's config : Tried /etc/default/mpd but MPDCONF is not set\n");
28
+        printf ("MPD's config : Tried %%PREFIX%%/etc/musicpd.conf but MPDCONF is not set\n");
29
     else
30
     {
31
-        QString msg  = "MPD's config found in /etc/default/mpd : " + line + "\n";
32
+        QString msg  = "MPD's config found in %%PREFIX%%/etc/musicpd.conf : " + line + "\n";
33
         printf ("%s", msg.toUtf8().constData());
34
     }
35
 
36
@@ -2710,17 +2710,10 @@ bool qm_mpdCom::is_mpd_running()
37
     struct stat sts;
38
     bool b_isrunning = false;
39
 
40
-    // try pidof
41
-    if (stat("/bin/pidof", &sts) == 0)
42
-    {
43
-        if( system("pidof mpd > /dev/null") == 0)
44
-        b_isrunning = true;
45
-    }
46
-    else
47
     // try pgrep
48
-    if (stat("/usr/bin/pgrep", &sts) == 0)
49
+    if (stat("/bin/pgrep", &sts) == 0)
50
     {
51
-        if( system("pgrep mpd > /dev/null") == 0)
52
+        if( system("pgrep musicpd > /dev/null") == 0)
53
             b_isrunning = true;
54
     }
55
 
56
- 

Return to bug 277040