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 svg:run
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 (+128 lines)
Added Link Here
1
--- source/qm_mpdcom.cpp.orig	2024-02-02 09:26:32 UTC
2
+++ source/qm_mpdcom.cpp
3
@@ -369,32 +369,35 @@ QString qm_mpdCommand::get_mpdconf_path()
4
             mpdconf_path = find_config_files(false);
5
     }
6
 
7
-    if (confpath.isEmpty())
8
+    if (confpath.isEmpty() && mpdconf_path.isEmpty())
9
         b_mpdconf_found = false;
10
     else
11
         b_mpdconf_found = true;
12
 
13
+    if (!mpdconf_path.isEmpty())
14
+        return mpdconf_path;
15
+
16
     return confpath;
17
 }
18
 
19
-// Get mpd.conf from  /etc/default/mpd
20
+// Get mpd.conf from  %%PREFIX%%/etc/musicpd.conf
21
 QString qm_mpdCommand::get_etc_default_mpd()
22
 {
23
     QFile file;
24
     QString line = "";
25
 
26
-    file.setFileName("/etc/default/mpd");
27
+    file.setFileName("%%PREFIX%%/etc/musicpd.conf");
28
     if ( !file.exists() )
29
     {
30
         if (config->cout_extensive)
31
-            printf ("MPD's config: Tried /etc/default/mpd but it does not exist\n");
32
+            printf ("MPD's config: Tried %%PREFIX%%/etc/musicpd.conf but it does not exist\n");
33
         return line;
34
     }
35
 
36
     if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
37
     {
38
         if (config->cout_extensive)
39
-            printf ("MPD's config: Tried /etc/default/mpd but it is not readable\n");
40
+            printf ("MPD's config: Tried %%PREFIX%%/etc/musicpd.conf but it is not readable\n");
41
         return line;
42
     }
43
     else
44
@@ -418,19 +421,19 @@ QString qm_mpdCommand::get_etc_default_mpd()
45
         if (!file.exists())
46
         {
47
             if (config->cout_extensive)
48
-                printf ("MPD's config in /etc/default/mpd does not exist\n");
49
+                printf ("MPD's config in %%PREFIX%%/etc/musicpd.conf does not exist\n");
50
             line = "";
51
         }
52
     }
53
     else
54
     {
55
         if (config->cout_extensive)
56
-            printf ("MPD's config: Tried /etc/default/mpd but MPDCONF is not set\n");
57
+            printf ("MPD's config: Tried %%PREFIX%%/etc/musicpd.conf but MPDCONF is not set\n");
58
     }
59
 
60
     if (!line.isEmpty() && config->cout_extensive)
61
     {
62
-        printf ("MPD's config from /etc/default/mpd: %s\n", line.toUtf8().constData());
63
+        printf ("MPD's config from %%PREFIX%%/etc/musicpd.conf: %s\n", line.toUtf8().constData());
64
     }
65
 
66
     return line;
67
@@ -2996,7 +2999,7 @@ QString qm_mpdCommand::find_config_files(bool show_dia
68
 
69
 QString qm_mpdCommand::find_config_files(bool show_dialog)
70
 {
71
-/*  If not specified on the command-line or in /etc/default/mpd
72
+/*  If not specified on the command-line or in %%PREFIX%%/etc/musicpd.conf
73
     MPD searches
74
     1st at    ~/.config/mpd/mpd.conf
75
     2nd at     ~/.mpdconf
76
@@ -3062,20 +3065,20 @@ QString qm_mpdCommand::find_config_files(bool show_dia
77
         }
78
     }
79
 
80
-    thispath = "/etc/mpd.conf";
81
+    thispath = "%%PREFIX%%/etc/musicpd.conf";
82
     file.setFileName(thispath);
83
     if ( file.exists() )
84
     {
85
         if (file.open(QIODevice::ReadOnly))
86
         {
87
             file.close();
88
-            printf ("located: /etc/mpd.conf\n");
89
+            printf ("located: %%PREFIX%%/etc/musicpd.conf\n");
90
             return thispath;
91
         }
92
         else
93
         {
94
             if (config->cout_extensive)
95
-                printf ("/etc/mpd.conf, but it is not readable\n");
96
+                printf ("%%PREFIX%%/etc/musicpd.conf, but it is not readable\n");
97
         }
98
     }
99
 
100
@@ -3196,7 +3199,7 @@ bool qm_mpdCommand::is_mpd_installed(bool showmsg)
101
 {
102
     QProcess proc;
103
     proc.setProgram("which");
104
-    proc.setArguments({"mpd"});
105
+    proc.setArguments({"musicpd"});
106
     proc.start();
107
     if (!proc.waitForFinished())
108
     {
109
@@ -3207,7 +3210,7 @@ bool qm_mpdCommand::is_mpd_installed(bool showmsg)
110
 
111
     QString output = proc.readAllStandardOutput();
112
     output = output.trimmed();
113
-    if (output.contains("/usr/bin/mpd") || output.contains("/usr/local/bin/mpd") || output.contains("/usr/sbin/mpd"))
114
+    if (output.contains("%%PREFIX%%/bin/musicpd"))
115
     {
116
         if (showmsg)
117
             printf ("MPD is installed on this system\n");
118
@@ -3227,8 +3230,8 @@ bool qm_mpdCommand::is_mpd_running(bool showmsg)
119
     config->mpd_process_owner = ""; // empty equals not running
120
 
121
     QProcess proc;
122
-    proc.setProgram("pidof");
123
-    proc.setArguments({"mpd"});
124
+    proc.setProgram("pgrep");
125
+    proc.setArguments({"musicpd"});
126
     proc.start();
127
     if (!proc.waitForFinished())
128
         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