[ports-gcc] Unbreak audio/qsynth

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[ports-gcc] Unbreak audio/qsynth

Charlene Wendling
Hi Sebastian, ports,

> http://build-failures.rhaalovely.net/powerpc/last/audio/qsynth.log
(Qt5 doesn't build on sparc64)

What happens behind the scenes (may it be clang or gcc):

- Cmake search for math libs [1], and can't find them, setting
  CONFIG_ROUND not defined
- Later, lroundf() is declared as a bundled, static function [2]

The problem (to me) is that it seems that Qt headers pull <cmath>, so
there is a clash when using gcc. That doesn't occur with clang.

There are several way to fix it, but in any case, <math.h> would cause
an out of scope error with ports-gcc, similarily to what you can find in
math/{veusz,kst} in powerpc build failures.

So i'm explicitly including <cmath> when not using clang on OpenBSD,
to point the problem out (but alternatives are welcome).

It then builds fine on macppc [3] and amd64 [4].

Charlène.


[1] https://github.com/rncbc/qsynth/blob/master/CMakeLists.txt#L58
[2]
https://github.com/rncbc/qsynth/blob/master/src/qsynthMainForm.cpp#L103
[3] http://0x0.st/z8qH.txt
[4] http://0x0.st/z8qX.txt


Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/qsynth/Makefile,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 Makefile
--- Makefile 8 Mar 2019 20:00:40 -0000 1.6
+++ Makefile 17 Mar 2019 13:45:26 -0000
@@ -3,7 +3,7 @@
 COMMENT = Qt GUI Interface for FluidSynth
 
 DISTNAME = qsynth-0.5.4
-REVISION = 0
+REVISION = 1
 
 CATEGORIES = audio
 
Index: patches/patch-src_qsynthMainForm_cpp
===================================================================
RCS file: patches/patch-src_qsynthMainForm_cpp
diff -N patches/patch-src_qsynthMainForm_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_qsynthMainForm_cpp 17 Mar 2019 13:45:26 -0000
@@ -0,0 +1,20 @@
+$OpenBSD$
+
+ports-gcc fix. lroundf() is not detected during configuration, so CONFIG_ROUND
+is undefined. But <cmath> is pulled by Qt headers already, creating a conflict
+between <cmath>'s lroundf() and the bundled lroundf().
+
+Using <math.h> would cause an out of scope error.
+
+Index: src/qsynthMainForm.cpp
+--- src/qsynthMainForm.cpp.orig
++++ src/qsynthMainForm.cpp
+@@ -103,6 +103,8 @@ static int g_fdStdout[2] = { QSYNTH_FDNIL, QSYNTH_FDNI
+ // Needed for lroundf()
+ #ifdef CONFIG_ROUND
+ #include <math.h>
++#elif defined(__OpenBSD__) && !defined(__clang__)
++#include <cmath>
+ #else
+ static inline long lroundf ( float x )
+ {

Reply | Threaded
Open this post in threaded view
|

Re: [ports-gcc] Unbreak audio/qsynth

Sebastian Reitenbach
Hi,

I was just testin to updat to 0.5.5, and failed miserably. I contacted upstream and was told to use configure, make, make install instead of cmake.

Let me try that, and I’ll send you the update, to test it on sparc64, maybe that will fix the problem

Sebastian

Sent from my iPhone

> On 17. Mar 2019, at 14:58, Charlene Wendling <[hidden email]> wrote:
>
> Hi Sebastian, ports,
>
>> http://build-failures.rhaalovely.net/powerpc/last/audio/qsynth.log
> (Qt5 doesn't build on sparc64)
>
> What happens behind the scenes (may it be clang or gcc):
>
> - Cmake search for math libs [1], and can't find them, setting
>  CONFIG_ROUND not defined
> - Later, lroundf() is declared as a bundled, static function [2]
>
> The problem (to me) is that it seems that Qt headers pull <cmath>, so
> there is a clash when using gcc. That doesn't occur with clang.
>
> There are several way to fix it, but in any case, <math.h> would cause
> an out of scope error with ports-gcc, similarily to what you can find in
> math/{veusz,kst} in powerpc build failures.
>
> So i'm explicitly including <cmath> when not using clang on OpenBSD,
> to point the problem out (but alternatives are welcome).
>
> It then builds fine on macppc [3] and amd64 [4].
>
> Charlène.
>
>
> [1] https://github.com/rncbc/qsynth/blob/master/CMakeLists.txt#L58
> [2]
> https://github.com/rncbc/qsynth/blob/master/src/qsynthMainForm.cpp#L103
> [3] http://0x0.st/z8qH.txt
> [4] http://0x0.st/z8qX.txt
>
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/audio/qsynth/Makefile,v
> retrieving revision 1.6
> diff -u -p -u -p -r1.6 Makefile
> --- Makefile    8 Mar 2019 20:00:40 -0000    1.6
> +++ Makefile    17 Mar 2019 13:45:26 -0000
> @@ -3,7 +3,7 @@
> COMMENT =        Qt GUI Interface for FluidSynth
>
> DISTNAME =        qsynth-0.5.4
> -REVISION =        0
> +REVISION =        1
>
> CATEGORIES =        audio
>
> Index: patches/patch-src_qsynthMainForm_cpp
> ===================================================================
> RCS file: patches/patch-src_qsynthMainForm_cpp
> diff -N patches/patch-src_qsynthMainForm_cpp
> --- /dev/null    1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_qsynthMainForm_cpp    17 Mar 2019 13:45:26 -0000
> @@ -0,0 +1,20 @@
> +$OpenBSD$
> +
> +ports-gcc fix. lroundf() is not detected during configuration, so CONFIG_ROUND
> +is undefined. But <cmath> is pulled by Qt headers already, creating a conflict
> +between <cmath>'s lroundf() and the bundled lroundf().
> +
> +Using <math.h> would cause an out of scope error.
> +
> +Index: src/qsynthMainForm.cpp
> +--- src/qsynthMainForm.cpp.orig
> ++++ src/qsynthMainForm.cpp
> +@@ -103,6 +103,8 @@ static int g_fdStdout[2] = { QSYNTH_FDNIL, QSYNTH_FDNI
> + // Needed for lroundf()
> + #ifdef CONFIG_ROUND
> + #include <math.h>
> ++#elif defined(__OpenBSD__) && !defined(__clang__)
> ++#include <cmath>
> + #else
> + static inline long lroundf ( float x )
> + {

Reply | Threaded
Open this post in threaded view
|

Re: [ports-gcc] Unbreak audio/qsynth

Sebastian Reitenbach
Hi,

Am Montag, März 18, 2019 17:36 CET, Sebastian Reitenbach <[hidden email]> schrieb:

> Hi,
>
> I was just testin to updat to 0.5.5, and failed miserably. I contacted upstream and was told to use configure, make, make install instead of cmake.
>
> Let me try that, and I’ll send you the update, to test it on sparc64, maybe that will fix the problem
>
> Sebastian
>
> Sent from my iPhone
>
> > On 17. Mar 2019, at 14:58, Charlene Wendling <[hidden email]> wrote:>
> > Hi Sebastian, ports,
> >
> >> http://build-failures.rhaalovely.net/powerpc/last/audio/qsynth.log
> > (Qt5 doesn't build on sparc64)
> >
> > What happens behind the scenes (may it be clang or gcc):
> >
> > - Cmake search for math libs [1], and can't find them, setting
> >  CONFIG_ROUND not defined
> > - Later, lroundf() is declared as a bundled, static function [2]
> >
> > The problem (to me) is that it seems that Qt headers pull <cmath>, so
> > there is a clash when using gcc. That doesn't occur with clang.
> >
> > There are several way to fix it, but in any case, <math.h> would cause
> > an out of scope error with ports-gcc, similarily to what you can find in
> > math/{veusz,kst} in powerpc build failures.
> >
> > So i'm explicitly including <cmath> when not using clang on OpenBSD,
> > to point the problem out (but alternatives are welcome).
> >
> > It then builds fine on macppc [3] and amd64 [4].
> >
> > Charlène.
> >
> >

as promised, here's the update to 0.5.5, which as upstream recommended to
me switched from cmake to gnu style configure/make/make install.
As they told me, the cmake stuff is more an example, and not kept up
to date with the gnu style of building, therefore it should not really
be used. Guess it was pure luck it worked with the older releases ;)
Additionally a bit of cleanup in the Makefile, let me know if it fixes the
math thingie bingie on gcc archs.

cheers,
Sebastian



Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/qsynth/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- Makefile 8 Mar 2019 20:00:40 -0000 1.6
+++ Makefile 18 Mar 2019 21:50:21 -0000
@@ -2,8 +2,7 @@

 COMMENT = Qt GUI Interface for FluidSynth

-DISTNAME = qsynth-0.5.4
-REVISION = 0
+DISTNAME = qsynth-0.5.5

 CATEGORIES = audio

@@ -16,22 +15,21 @@

 MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=qsynth/}

-WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Gui Qt5Widgets X11 c
-WANTLIB += m fluidsynth Qt5X11Extras
+WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Gui Qt5Widgets c
+WANTLIB += m fluidsynth GL Qt5Network curses readline

-MODULES = devel/cmake \
- x11/qt5
+MODULES = x11/qt5

-LIB_DEPENDS += audio/fluidsynth \
- x11/qt5/qtx11extras
+LIB_DEPENDS += audio/fluidsynth

-RUN_DEPENDS += devel/desktop-file-utils \
+RUN_DEPENDS += devel/desktop-file-utils

+USE_GMAKE = Yes
 NO_TEST = Yes

-BUILD_DEPENDS = audio/fluidsynth
+CONFIGURE_STYLE = gnu

-post-build:
- cp ${WRKSRC}/src/qsynth.desktop ${WRKBUILD}/src/
+CONFIGURE_ENV += CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
+ LDDFLAGS="${LDDFLAGS} -L${LOCALBASE}/lib"

 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/audio/qsynth/distinfo,v
retrieving revision 1.4
diff -u -r1.4 distinfo
--- distinfo 2 Jan 2019 21:56:15 -0000 1.4
+++ distinfo 18 Mar 2019 21:50:21 -0000
@@ -1,2 +1,2 @@
-SHA256 (qsynth-0.5.4.tar.gz) = LWvvtAI/imTzXYApkdDUE+EdAwfodIVCjJablLsr+E4=
-SIZE (qsynth-0.5.4.tar.gz) = 268106
+SHA256 (qsynth-0.5.5.tar.gz) = hY9SuVZCol9XA0LVz3+v0qKt24nVZ8W2ijVFvrb9pyM=
+SIZE (qsynth-0.5.5.tar.gz) = 269061
Index: patches/patch-src_qsynthChannelsForm_cpp
===================================================================
RCS file: patches/patch-src_qsynthChannelsForm_cpp
diff -N patches/patch-src_qsynthChannelsForm_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_qsynthChannelsForm_cpp 18 Mar 2019 21:50:21 -0000
@@ -0,0 +1,33 @@
+$OpenBSD$
+
+Index: src/qsynthChannelsForm.cpp
+--- src/qsynthChannelsForm.cpp.orig
++++ src/qsynthChannelsForm.cpp
+@@ -256,11 +256,11 @@ void qsynthChannelsForm::updateChannel ( int iChan )
+ #ifdef CONFIG_FLUID_BANK_OFFSET
+ int iSFID = 0;
+ QString sSFName;
+- #ifdef CONFIG_FLUID_PRESET_GET_SFONT
++ #ifdef CONFIG_FLUID_PRESET_GET_SFONT
+ fluid_sfont_t *pSoundFont = ::fluid_preset_get_sfont(pPreset);
+- #else
++ #else
+ fluid_sfont_t *pSoundFont = pPreset->sfont;
+- #endif
++ #endif
+ if (pSoundFont) {
+ #ifdef CONFIG_FLUID_SFONT_GET_ID
+ iSFID = ::fluid_sfont_get_id(pSoundFont);
+@@ -290,10 +290,12 @@ void qsynthChannelsForm::updateChannel ( int iChan )
+ pItem->setText(QSYNTH_CHANNELS_PROG,
+ QString::number(iProg));
+ pItem->setText(QSYNTH_CHANNELS_NAME, sName);
++ #ifdef CONFIG_FLUID_BANK_OFFSET
+ pItem->setText(QSYNTH_CHANNELS_SFID,
+ QString::number(iSFID));
+ pItem->setText(QSYNTH_CHANNELS_SFNAME,
+ QFileInfo(sSFName).baseName());
++ #endif
+ // Make this a dirty-operation.
+ m_iDirtyCount++;
+ }
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/audio/qsynth/pkg/PLIST,v
retrieving revision 1.3
diff -u -r1.3 PLIST
--- pkg/PLIST 26 Jul 2018 12:16:34 -0000 1.3
+++ pkg/PLIST 18 Mar 2019 21:50:21 -0000
@@ -1,14 +1,15 @@
 @comment $OpenBSD: PLIST,v 1.3 2018/07/26 12:16:34 sebastia Exp $
 @bin bin/qsynth
 share/applications/qsynth.desktop
-share/pixmaps/
-share/pixmaps/qsynth.png
+share/icons/hicolor/32x32/apps/qsynth.png
+share/metainfo/
+share/metainfo/qsynth.appdata.xml
 share/qsynth/
 share/qsynth/translations/
 share/qsynth/translations/qsynth_cs.qm
 share/qsynth/translations/qsynth_de.qm
-share/qsynth/translations/qsynth_es.qm
 share/qsynth/translations/qsynth_fr.qm
 share/qsynth/translations/qsynth_ru.qm
 share/qsynth/translations/qsynth_sr.qm
 @tag update-desktop-database
+@tag gtk-update-icon-cache %D/share/icons/hicolor

Reply | Threaded
Open this post in threaded view
|

Re: [ports-gcc] Unbreak audio/qsynth

Charlene Wendling
Hi,

On Mon, 18 Mar 2019 22:56:35 +0100
"Sebastian Reitenbach" <[hidden email]> wrote:

> Hi,
>
> Am Montag, März 18, 2019 17:36 CET, Sebastian Reitenbach
> <[hidden email]> schrieb:
>
> > Hi,
> >
> > I was just testin to updat to 0.5.5, and failed miserably. I
> > contacted upstream and was told to use configure, make, make
> > install instead of cmake.
> >
> > Let me try that, and I’ll send you the update, to test it on
> > sparc64, maybe that will fix the problem
> >
> > Sebastian
> >
> > Sent from my iPhone
> >
> > > On 17. Mar 2019, at 14:58, Charlene Wendling
> > > <[hidden email]> wrote:> Hi Sebastian, ports,
> > >
> > >> http://build-failures.rhaalovely.net/powerpc/last/audio/qsynth.log
> > > (Qt5 doesn't build on sparc64)
> > >
> > > What happens behind the scenes (may it be clang or gcc):
> > >
> > > - Cmake search for math libs [1], and can't find them, setting
> > >  CONFIG_ROUND not defined
> > > - Later, lroundf() is declared as a bundled, static function [2]
> > >
> > > The problem (to me) is that it seems that Qt headers pull
> > > <cmath>, so there is a clash when using gcc. That doesn't occur
> > > with clang.
> > >
> > > There are several way to fix it, but in any case, <math.h> would
> > > cause an out of scope error with ports-gcc, similarily to what
> > > you can find in math/{veusz,kst} in powerpc build failures.
> > >
> > > So i'm explicitly including <cmath> when not using clang on
> > > OpenBSD, to point the problem out (but alternatives are welcome).
> > >
> > > It then builds fine on macppc [3] and amd64 [4].
> > >
> > > Charlène.
> > >
> > >
>
> as promised, here's the update to 0.5.5, which as upstream
> recommended to me switched from cmake to gnu style
> configure/make/make install. As they told me, the cmake stuff is more
> an example, and not kept up to date with the gnu style of building,
> therefore it should not really be used. Guess it was pure luck it
> worked with the older releases ;) Additionally a bit of cleanup in
> the Makefile, let me know if it fixes the math thingie bingie on gcc
> archs.
>
> cheers,
> Sebastian
>

It builds fine on macppc [1], after some modifications to your diff:

- It wants atomic as WANTLIB (macppc specific, will be dropped once
  macppc has base-clang)
- I had to bring the lroundf() fix again :(
- portcheck says it needs x11/gtk+3,-guic (not sure if it's a false
  positive though)

It yells that it wants c+11, i feared that i had to use the infamous
block that enables it like in other ports, but it's not needed as
upstream adds -std=gnu++11 during the effective build. And anyway this
warning will disappear once we move to ports-gcc-8 "soonish" (to quote
espie@).

Ah, and well, it runs [2], i can't really test as i've not
the hardware needed ;)

Charlène.

[1] http://0x0.st/z829.txt
[2] http://0x0.st/z821.jpg


Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/qsynth/Makefile,v
retrieving revision 1.6
diff -u -p -r1.6 Makefile
--- Makefile 8 Mar 2019 20:00:40 -0000 1.6
+++ Makefile 18 Mar 2019 22:58:05 -0000
@@ -2,8 +2,7 @@
 
 COMMENT = Qt GUI Interface for FluidSynth
 
-DISTNAME = qsynth-0.5.4
-REVISION = 0
+DISTNAME = qsynth-0.5.5
 
 CATEGORIES = audio
 
@@ -16,22 +15,26 @@ PERMIT_PACKAGE_CDROM = Yes
 
 MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=qsynth/}
 
-WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Gui Qt5Widgets X11 c
-WANTLIB += m fluidsynth Qt5X11Extras
+WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Gui Qt5Widgets c
+WANTLIB += m fluidsynth GL Qt5Network curses readline
 
-MODULES = devel/cmake \
- x11/qt5
+.if ${MACHINE_ARCH} == "powerpc"
+WANTLIB += atomic
+.endif
 
-LIB_DEPENDS += audio/fluidsynth \
- x11/qt5/qtx11extras
+MODULES = x11/qt5
+
+LIB_DEPENDS += audio/fluidsynth
 
 RUN_DEPENDS += devel/desktop-file-utils \
+ x11/gtk+3,-guic
 
+USE_GMAKE = Yes
 NO_TEST = Yes
 
-BUILD_DEPENDS = audio/fluidsynth
+CONFIGURE_STYLE = gnu
 
-post-build:
- cp ${WRKSRC}/src/qsynth.desktop ${WRKBUILD}/src/
+CONFIGURE_ENV += CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
+ LDDFLAGS="${LDDFLAGS} -L${LOCALBASE}/lib"
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/audio/qsynth/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- distinfo 2 Jan 2019 21:56:15 -0000 1.4
+++ distinfo 18 Mar 2019 22:58:05 -0000
@@ -1,2 +1,2 @@
-SHA256 (qsynth-0.5.4.tar.gz) = LWvvtAI/imTzXYApkdDUE+EdAwfodIVCjJablLsr+E4=
-SIZE (qsynth-0.5.4.tar.gz) = 268106
+SHA256 (qsynth-0.5.5.tar.gz) = hY9SuVZCol9XA0LVz3+v0qKt24nVZ8W2ijVFvrb9pyM=
+SIZE (qsynth-0.5.5.tar.gz) = 269061
Index: patches/patch-src_qsynthChannelsForm_cpp
===================================================================
RCS file: patches/patch-src_qsynthChannelsForm_cpp
diff -N patches/patch-src_qsynthChannelsForm_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_qsynthChannelsForm_cpp 18 Mar 2019 22:58:05 -0000
@@ -0,0 +1,33 @@
+$OpenBSD$
+
+Index: src/qsynthChannelsForm.cpp
+--- src/qsynthChannelsForm.cpp.orig
++++ src/qsynthChannelsForm.cpp
+@@ -256,11 +256,11 @@ void qsynthChannelsForm::updateChannel ( int iChan )
+ #ifdef CONFIG_FLUID_BANK_OFFSET
+ int iSFID = 0;
+ QString sSFName;
+- #ifdef CONFIG_FLUID_PRESET_GET_SFONT
++ #ifdef CONFIG_FLUID_PRESET_GET_SFONT
+ fluid_sfont_t *pSoundFont = ::fluid_preset_get_sfont(pPreset);
+- #else
++ #else
+ fluid_sfont_t *pSoundFont = pPreset->sfont;
+- #endif
++ #endif
+ if (pSoundFont) {
+ #ifdef CONFIG_FLUID_SFONT_GET_ID
+ iSFID = ::fluid_sfont_get_id(pSoundFont);
+@@ -290,10 +290,12 @@ void qsynthChannelsForm::updateChannel ( int iChan )
+ pItem->setText(QSYNTH_CHANNELS_PROG,
+ QString::number(iProg));
+ pItem->setText(QSYNTH_CHANNELS_NAME, sName);
++ #ifdef CONFIG_FLUID_BANK_OFFSET
+ pItem->setText(QSYNTH_CHANNELS_SFID,
+ QString::number(iSFID));
+ pItem->setText(QSYNTH_CHANNELS_SFNAME,
+ QFileInfo(sSFName).baseName());
++ #endif
+ // Make this a dirty-operation.
+ m_iDirtyCount++;
+ }
Index: patches/patch-src_qsynthMainForm_cpp
===================================================================
RCS file: patches/patch-src_qsynthMainForm_cpp
diff -N patches/patch-src_qsynthMainForm_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_qsynthMainForm_cpp 18 Mar 2019 22:58:05 -0000
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+ports-gcc fix. lroundf() is not detected during configuration, so CONFIG_ROUND
+is undefined. But <cmath> is pulled by Qt headers already, creating a conflict
+between <cmath>'s lroundf() and the bundled lroundf().
+
+Index: src/qsynthMainForm.cpp
+--- src/qsynthMainForm.cpp.orig
++++ src/qsynthMainForm.cpp
+@@ -103,6 +103,8 @@ static int g_fdStdout[2] = { QSYNTH_FDNIL, QSYNTH_FDNI
+ // Needed for lroundf()
+ #ifdef CONFIG_ROUND
+ #include <math.h>
++#elif defined(__OpenBSD__) && !defined(__clang__)
++#include <cmath>
+ #else
+ static inline long lroundf ( float x )
+ {
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/audio/qsynth/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST
--- pkg/PLIST 26 Jul 2018 12:16:34 -0000 1.3
+++ pkg/PLIST 18 Mar 2019 22:58:05 -0000
@@ -1,14 +1,15 @@
 @comment $OpenBSD: PLIST,v 1.3 2018/07/26 12:16:34 sebastia Exp $
 @bin bin/qsynth
 share/applications/qsynth.desktop
-share/pixmaps/
-share/pixmaps/qsynth.png
+share/icons/hicolor/32x32/apps/qsynth.png
+share/metainfo/
+share/metainfo/qsynth.appdata.xml
 share/qsynth/
 share/qsynth/translations/
 share/qsynth/translations/qsynth_cs.qm
 share/qsynth/translations/qsynth_de.qm
-share/qsynth/translations/qsynth_es.qm
 share/qsynth/translations/qsynth_fr.qm
 share/qsynth/translations/qsynth_ru.qm
 share/qsynth/translations/qsynth_sr.qm
 @tag update-desktop-database
+@tag gtk-update-icon-cache %D/share/icons/hicolor

Reply | Threaded
Open this post in threaded view
|

Re: [ports-gcc] Unbreak audio/qsynth

Sebastian Reitenbach
Am Dienstag, März 19, 2019 00:20 CET, Charlene Wendling <[hidden email]> schrieb:

> Hi,
>
> On Mon, 18 Mar 2019 22:56:35 +0100
> "Sebastian Reitenbach" <[hidden email]> wrote:
>
> > Hi,
> >
> > Am Montag, März 18, 2019 17:36 CET, Sebastian Reitenbach
> > <[hidden email]> schrieb:
> >
> > > Hi,
> > >
> > > I was just testin to updat to 0.5.5, and failed miserably. I
> > > contacted upstream and was told to use configure, make, make
> > > install instead of cmake.
> > >
> > > Let me try that, and I’ll send you the update, to test it on
> > > sparc64, maybe that will fix the problem
> > >
> > > Sebastian
> > >
> > > Sent from my iPhone
> > >
> > > > On 17. Mar 2019, at 14:58, Charlene Wendling
> > > > <[hidden email]> wrote:> Hi Sebastian, ports,
> > > >
> > > >> http://build-failures.rhaalovely.net/powerpc/last/audio/qsynth.log
> > > > (Qt5 doesn't build on sparc64)
> > > >
> > > > What happens behind the scenes (may it be clang or gcc):
> > > >
> > > > - Cmake search for math libs [1], and can't find them, setting
> > > >  CONFIG_ROUND not defined
> > > > - Later, lroundf() is declared as a bundled, static function [2]
> > > >
> > > > The problem (to me) is that it seems that Qt headers pull
> > > > <cmath>, so there is a clash when using gcc. That doesn't occur
> > > > with clang.
> > > >
> > > > There are several way to fix it, but in any case, <math.h> would
> > > > cause an out of scope error with ports-gcc, similarily to what
> > > > you can find in math/{veusz,kst} in powerpc build failures.
> > > >
> > > > So i'm explicitly including <cmath> when not using clang on
> > > > OpenBSD, to point the problem out (but alternatives are welcome).
> > > >
> > > > It then builds fine on macppc [3] and amd64 [4].
> > > >
> > > > Charlène.
> > > >
> > > >
> >
> > as promised, here's the update to 0.5.5, which as upstream
> > recommended to me switched from cmake to gnu style
> > configure/make/make install. As they told me, the cmake stuff is more
> > an example, and not kept up to date with the gnu style of building,
> > therefore it should not really be used. Guess it was pure luck it
> > worked with the older releases ;) Additionally a bit of cleanup in
> > the Makefile, let me know if it fixes the math thingie bingie on gcc
> > archs.
> >
> > cheers,
> > Sebastian
> >
>
> It builds fine on macppc [1], after some modifications to your diff:
>
> - It wants atomic as WANTLIB (macppc specific, will be dropped once
>   macppc has base-clang)
> - I had to bring the lroundf() fix again :(
> - portcheck says it needs x11/gtk+3,-guic (not sure if it's a false
>   positive though)

thanks for looking into it. I don't know if I have x11/gtk+3,-guic installed on
my machine, but I'll verify/test later Today.

cheers,
Sebastian

>
> It yells that it wants c+11, i feared that i had to use the infamous
> block that enables it like in other ports, but it's not needed as
> upstream adds -std=gnu++11 during the effective build. And anyway this
> warning will disappear once we move to ports-gcc-8 "soonish" (to quote
> espie@).
>
> Ah, and well, it runs [2], i can't really test as i've not
> the hardware needed ;)
>
> Charlène.
>
> [1] http://0x0.st/z829.txt
> [2] http://0x0.st/z821.jpg
>
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/audio/qsynth/Makefile,v
> retrieving revision 1.6
> diff -u -p -r1.6 Makefile
> --- Makefile 8 Mar 2019 20:00:40 -0000 1.6
> +++ Makefile 18 Mar 2019 22:58:05 -0000
> @@ -2,8 +2,7 @@
>
>  COMMENT = Qt GUI Interface for FluidSynth
>
> -DISTNAME = qsynth-0.5.4
> -REVISION = 0
> +DISTNAME = qsynth-0.5.5
>
>  CATEGORIES = audio
>
> @@ -16,22 +15,26 @@ PERMIT_PACKAGE_CDROM = Yes
>
>  MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=qsynth/}
>
> -WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Gui Qt5Widgets X11 c
> -WANTLIB += m fluidsynth Qt5X11Extras
> +WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Gui Qt5Widgets c
> +WANTLIB += m fluidsynth GL Qt5Network curses readline
>
> -MODULES = devel/cmake \
> - x11/qt5
> +.if ${MACHINE_ARCH} == "powerpc"
> +WANTLIB += atomic
> +.endif
>
> -LIB_DEPENDS += audio/fluidsynth \
> - x11/qt5/qtx11extras
> +MODULES = x11/qt5
> +
> +LIB_DEPENDS += audio/fluidsynth
>
>  RUN_DEPENDS += devel/desktop-file-utils \
> + x11/gtk+3,-guic
>
> +USE_GMAKE = Yes
>  NO_TEST = Yes
>
> -BUILD_DEPENDS = audio/fluidsynth
> +CONFIGURE_STYLE = gnu
>
> -post-build:
> - cp ${WRKSRC}/src/qsynth.desktop ${WRKBUILD}/src/
> +CONFIGURE_ENV += CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
> + LDDFLAGS="${LDDFLAGS} -L${LOCALBASE}/lib"
>
>  .include <bsd.port.mk>
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/audio/qsynth/distinfo,v
> retrieving revision 1.4
> diff -u -p -r1.4 distinfo
> --- distinfo 2 Jan 2019 21:56:15 -0000 1.4
> +++ distinfo 18 Mar 2019 22:58:05 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (qsynth-0.5.4.tar.gz) = LWvvtAI/imTzXYApkdDUE+EdAwfodIVCjJablLsr+E4=
> -SIZE (qsynth-0.5.4.tar.gz) = 268106
> +SHA256 (qsynth-0.5.5.tar.gz) = hY9SuVZCol9XA0LVz3+v0qKt24nVZ8W2ijVFvrb9pyM=
> +SIZE (qsynth-0.5.5.tar.gz) = 269061
> Index: patches/patch-src_qsynthChannelsForm_cpp
> ===================================================================
> RCS file: patches/patch-src_qsynthChannelsForm_cpp
> diff -N patches/patch-src_qsynthChannelsForm_cpp
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_qsynthChannelsForm_cpp 18 Mar 2019 22:58:05 -0000
> @@ -0,0 +1,33 @@
> +$OpenBSD$
> +
> +Index: src/qsynthChannelsForm.cpp
> +--- src/qsynthChannelsForm.cpp.orig
> ++++ src/qsynthChannelsForm.cpp
> +@@ -256,11 +256,11 @@ void qsynthChannelsForm::updateChannel ( int iChan )
> + #ifdef CONFIG_FLUID_BANK_OFFSET
> + int iSFID = 0;
> + QString sSFName;
> +- #ifdef CONFIG_FLUID_PRESET_GET_SFONT
> ++ #ifdef CONFIG_FLUID_PRESET_GET_SFONT
> + fluid_sfont_t *pSoundFont = ::fluid_preset_get_sfont(pPreset);
> +- #else
> ++ #else
> + fluid_sfont_t *pSoundFont = pPreset->sfont;
> +- #endif
> ++ #endif
> + if (pSoundFont) {
> + #ifdef CONFIG_FLUID_SFONT_GET_ID
> + iSFID = ::fluid_sfont_get_id(pSoundFont);
> +@@ -290,10 +290,12 @@ void qsynthChannelsForm::updateChannel ( int iChan )
> + pItem->setText(QSYNTH_CHANNELS_PROG,
> + QString::number(iProg));
> + pItem->setText(QSYNTH_CHANNELS_NAME, sName);
> ++ #ifdef CONFIG_FLUID_BANK_OFFSET
> + pItem->setText(QSYNTH_CHANNELS_SFID,
> + QString::number(iSFID));
> + pItem->setText(QSYNTH_CHANNELS_SFNAME,
> + QFileInfo(sSFName).baseName());
> ++ #endif
> + // Make this a dirty-operation.
> + m_iDirtyCount++;
> + }
> Index: patches/patch-src_qsynthMainForm_cpp
> ===================================================================
> RCS file: patches/patch-src_qsynthMainForm_cpp
> diff -N patches/patch-src_qsynthMainForm_cpp
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_qsynthMainForm_cpp 18 Mar 2019 22:58:05 -0000
> @@ -0,0 +1,18 @@
> +$OpenBSD$
> +
> +ports-gcc fix. lroundf() is not detected during configuration, so CONFIG_ROUND
> +is undefined. But <cmath> is pulled by Qt headers already, creating a conflict
> +between <cmath>'s lroundf() and the bundled lroundf().
> +
> +Index: src/qsynthMainForm.cpp
> +--- src/qsynthMainForm.cpp.orig
> ++++ src/qsynthMainForm.cpp
> +@@ -103,6 +103,8 @@ static int g_fdStdout[2] = { QSYNTH_FDNIL, QSYNTH_FDNI
> + // Needed for lroundf()
> + #ifdef CONFIG_ROUND
> + #include <math.h>
> ++#elif defined(__OpenBSD__) && !defined(__clang__)
> ++#include <cmath>
> + #else
> + static inline long lroundf ( float x )
> + {
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/audio/qsynth/pkg/PLIST,v
> retrieving revision 1.3
> diff -u -p -r1.3 PLIST
> --- pkg/PLIST 26 Jul 2018 12:16:34 -0000 1.3
> +++ pkg/PLIST 18 Mar 2019 22:58:05 -0000
> @@ -1,14 +1,15 @@
>  @comment $OpenBSD: PLIST,v 1.3 2018/07/26 12:16:34 sebastia Exp $
>  @bin bin/qsynth
>  share/applications/qsynth.desktop
> -share/pixmaps/
> -share/pixmaps/qsynth.png
> +share/icons/hicolor/32x32/apps/qsynth.png
> +share/metainfo/
> +share/metainfo/qsynth.appdata.xml
>  share/qsynth/
>  share/qsynth/translations/
>  share/qsynth/translations/qsynth_cs.qm
>  share/qsynth/translations/qsynth_de.qm
> -share/qsynth/translations/qsynth_es.qm
>  share/qsynth/translations/qsynth_fr.qm
>  share/qsynth/translations/qsynth_ru.qm
>  share/qsynth/translations/qsynth_sr.qm
>  @tag update-desktop-database
> +@tag gtk-update-icon-cache %D/share/icons/hicolor

Reply | Threaded
Open this post in threaded view
|

Re: [ports-gcc] Unbreak audio/qsynth

Jeremie Courreges-Anglas-2
In reply to this post by Charlene Wendling
On Tue, Mar 19 2019, Charlene Wendling <[hidden email]> wrote:

> Hi,
>
> On Mon, 18 Mar 2019 22:56:35 +0100
> "Sebastian Reitenbach" <[hidden email]> wrote:
>
>> Hi,
>>
>> Am Montag, März 18, 2019 17:36 CET, Sebastian Reitenbach
>> <[hidden email]> schrieb:
>>
>> > Hi,
>> >
>> > I was just testin to updat to 0.5.5, and failed miserably. I
>> > contacted upstream and was told to use configure, make, make
>> > install instead of cmake.
>> >
>> > Let me try that, and I’ll send you the update, to test it on
>> > sparc64, maybe that will fix the problem
>> >
>> > Sebastian
>> >
>> > Sent from my iPhone
>> >
>> > > On 17. Mar 2019, at 14:58, Charlene Wendling
>> > > <[hidden email]> wrote:> Hi Sebastian, ports,
>> > >
>> > >> http://build-failures.rhaalovely.net/powerpc/last/audio/qsynth.log
>> > > (Qt5 doesn't build on sparc64)
>> > >
>> > > What happens behind the scenes (may it be clang or gcc):
>> > >
>> > > - Cmake search for math libs [1], and can't find them, setting
>> > >  CONFIG_ROUND not defined
>> > > - Later, lroundf() is declared as a bundled, static function [2]
>> > >
>> > > The problem (to me) is that it seems that Qt headers pull
>> > > <cmath>, so there is a clash when using gcc. That doesn't occur
>> > > with clang.
>> > >
>> > > There are several way to fix it, but in any case, <math.h> would
>> > > cause an out of scope error with ports-gcc, similarily to what
>> > > you can find in math/{veusz,kst} in powerpc build failures.
>> > >
>> > > So i'm explicitly including <cmath> when not using clang on
>> > > OpenBSD, to point the problem out (but alternatives are welcome).
>> > >
>> > > It then builds fine on macppc [3] and amd64 [4].
>> > >
>> > > Charlène.
>> > >
>> > >
>>
>> as promised, here's the update to 0.5.5, which as upstream
>> recommended to me switched from cmake to gnu style
>> configure/make/make install. As they told me, the cmake stuff is more
>> an example, and not kept up to date with the gnu style of building,
>> therefore it should not really be used. Guess it was pure luck it
>> worked with the older releases ;) Additionally a bit of cleanup in
>> the Makefile, let me know if it fixes the math thingie bingie on gcc
>> archs.
>>
>> cheers,
>> Sebastian
>>
>
> It builds fine on macppc [1], after some modifications to your diff:
>
> - It wants atomic as WANTLIB (macppc specific, will be dropped once
>   macppc has base-clang)
> - I had to bring the lroundf() fix again :(
> - portcheck says it needs x11/gtk+3,-guic (not sure if it's a false
>   positive though)

That's what the documentation says for @tag:

     @tag name [parameter]
             Reference a tag of given name.  The corresponding @define-tag
             definition must be accessible through the dependency tree.

This port could have a manpage if the "install" target in Makefile.in
didn't use install -v (fails) and gzip.

See other my comments inline,

> It yells that it wants c+11, i feared that i had to use the infamous
> block that enables it like in other ports, but it's not needed as
> upstream adds -std=gnu++11 during the effective build. And anyway this
> warning will disappear once we move to ports-gcc-8 "soonish" (to quote
> espie@).
>
> Ah, and well, it runs [2], i can't really test as i've not
> the hardware needed ;)
>
> Charlène.
>
> [1] http://0x0.st/z829.txt
> [2] http://0x0.st/z821.jpg

> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/audio/qsynth/Makefile,v
> retrieving revision 1.6
> diff -u -p -r1.6 Makefile
> --- Makefile 8 Mar 2019 20:00:40 -0000 1.6
> +++ Makefile 18 Mar 2019 22:58:05 -0000
> @@ -2,8 +2,7 @@
>  
>  COMMENT = Qt GUI Interface for FluidSynth
>  
> -DISTNAME = qsynth-0.5.4
> -REVISION = 0
> +DISTNAME = qsynth-0.5.5
>  
>  CATEGORIES = audio
>  
> @@ -16,22 +15,26 @@ PERMIT_PACKAGE_CDROM = Yes
>  
>  MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=qsynth/}
>  
> -WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Gui Qt5Widgets X11 c
> -WANTLIB += m fluidsynth Qt5X11Extras
> +WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Gui Qt5Widgets c
> +WANTLIB += m fluidsynth GL Qt5Network curses readline
>  
> -MODULES = devel/cmake \
> - x11/qt5
> +.if ${MACHINE_ARCH} == "powerpc"
> +WANTLIB += atomic
> +.endif
>  
> -LIB_DEPENDS += audio/fluidsynth \
> - x11/qt5/qtx11extras
> +MODULES = x11/qt5
> +
> +LIB_DEPENDS += audio/fluidsynth
>  
>  RUN_DEPENDS += devel/desktop-file-utils \
> + x11/gtk+3,-guic
>  
> +USE_GMAKE = Yes
>  NO_TEST = Yes
>  
> -BUILD_DEPENDS = audio/fluidsynth
> +CONFIGURE_STYLE = gnu
>  
> -post-build:
> - cp ${WRKSRC}/src/qsynth.desktop ${WRKBUILD}/src/
> +CONFIGURE_ENV += CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \

Maybe use CPPFLAGS here, which usually works for both C and C++ compilers.

> + LDDFLAGS="${LDDFLAGS} -L${LOCALBASE}/lib"

s/LDDFLAGS/LDFLAGS/

Please also add -L${X11BASE}/lib to LDFLAGS else some configure tests
will fail on ld.lld platforms:

--8<--
  Qsynth 0.5.5

  Build target . . . . . . . . . . . . . . . . . . .: release

  FluidSynth library support . . . . . . . . . . . .: yes
  FluidSynth server support  . . . . . . . . . . . .: no
  FluidSynth system reset support  . . . . . . . . .: no
  FluidSynth bank offset support . . . . . . . . . .: no
  FluidSynth channel info support (DEPRECATED) . . .: no
  FluidSynth MIDI router support  (DEPRECATED) . . .: no
  FluidSynth unset program support . . . . . . . . .: no
  FluidSynth version string support  . . . . . . . .: no

  System tray icon support . . . . . . . . . . . . .: yes

  Unique/Single instance support . . . . . . . . . .: yes
  Gradient eye-candy . . . . . . . . . . . . . . . .: yes
  Debugger stack-trace (gdb) . . . . . . . . . . . .: no

  Install prefix . . . . . . . . . . . . . . . . . .: /usr/local
-->8--

vs

--8<--
  Qsynth 0.5.5

  Build target . . . . . . . . . . . . . . . . . . .: release

  FluidSynth library support . . . . . . . . . . . .: yes
  FluidSynth server support  . . . . . . . . . . . .: yes
  FluidSynth system reset support  . . . . . . . . .: yes
  FluidSynth bank offset support . . . . . . . . . .: yes
  FluidSynth channel info support (DEPRECATED) . . .: no
  FluidSynth MIDI router support  (DEPRECATED) . . .: no
  FluidSynth unset program support . . . . . . . . .: yes
  FluidSynth version string support  . . . . . . . .: yes

  System tray icon support . . . . . . . . . . . . .: yes

  Unique/Single instance support . . . . . . . . . .: yes
  Gradient eye-candy . . . . . . . . . . . . . . . .: yes
  Debugger stack-trace (gdb) . . . . . . . . . . . .: no

  Install prefix . . . . . . . . . . . . . . . . . .: /usr/local
-->8--


>  .include <bsd.port.mk>
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/audio/qsynth/distinfo,v
> retrieving revision 1.4
> diff -u -p -r1.4 distinfo
> --- distinfo 2 Jan 2019 21:56:15 -0000 1.4
> +++ distinfo 18 Mar 2019 22:58:05 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (qsynth-0.5.4.tar.gz) = LWvvtAI/imTzXYApkdDUE+EdAwfodIVCjJablLsr+E4=
> -SIZE (qsynth-0.5.4.tar.gz) = 268106
> +SHA256 (qsynth-0.5.5.tar.gz) = hY9SuVZCol9XA0LVz3+v0qKt24nVZ8W2ijVFvrb9pyM=
> +SIZE (qsynth-0.5.5.tar.gz) = 269061
> Index: patches/patch-src_qsynthChannelsForm_cpp
> ===================================================================
> RCS file: patches/patch-src_qsynthChannelsForm_cpp
> diff -N patches/patch-src_qsynthChannelsForm_cpp
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_qsynthChannelsForm_cpp 18 Mar 2019 22:58:05 -0000
> @@ -0,0 +1,33 @@
> +$OpenBSD$
> +
> +Index: src/qsynthChannelsForm.cpp
> +--- src/qsynthChannelsForm.cpp.orig
> ++++ src/qsynthChannelsForm.cpp
> +@@ -256,11 +256,11 @@ void qsynthChannelsForm::updateChannel ( int iChan )
> + #ifdef CONFIG_FLUID_BANK_OFFSET
> + int iSFID = 0;
> + QString sSFName;
> +- #ifdef CONFIG_FLUID_PRESET_GET_SFONT
> ++ #ifdef CONFIG_FLUID_PRESET_GET_SFONT
> + fluid_sfont_t *pSoundFont = ::fluid_preset_get_sfont(pPreset);
> +- #else
> ++ #else
> + fluid_sfont_t *pSoundFont = pPreset->sfont;
> +- #endif
> ++ #endif
> + if (pSoundFont) {
> + #ifdef CONFIG_FLUID_SFONT_GET_ID
> + iSFID = ::fluid_sfont_get_id(pSoundFont);

Is that hunk really needed?

> +@@ -290,10 +290,12 @@ void qsynthChannelsForm::updateChannel ( int iChan )
> + pItem->setText(QSYNTH_CHANNELS_PROG,
> + QString::number(iProg));
> + pItem->setText(QSYNTH_CHANNELS_NAME, sName);
> ++ #ifdef CONFIG_FLUID_BANK_OFFSET
> + pItem->setText(QSYNTH_CHANNELS_SFID,
> + QString::number(iSFID));
> + pItem->setText(QSYNTH_CHANNELS_SFNAME,
> + QFileInfo(sSFName).baseName());
> ++ #endif
> + // Make this a dirty-operation.
> + m_iDirtyCount++;
> + }
> Index: patches/patch-src_qsynthMainForm_cpp
> ===================================================================
> RCS file: patches/patch-src_qsynthMainForm_cpp
> diff -N patches/patch-src_qsynthMainForm_cpp
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_qsynthMainForm_cpp 18 Mar 2019 22:58:05 -0000
> @@ -0,0 +1,18 @@
> +$OpenBSD$
> +
> +ports-gcc fix. lroundf() is not detected during configuration, so CONFIG_ROUND
> +is undefined.

cwen:

Could you please check why lroundf isn't detected?

> But <cmath> is pulled by Qt headers already, creating a conflict
> +between <cmath>'s lroundf() and the bundled lroundf().

If this source file falls back on the bundled lroundf, then maybe the
fallback path doesn't need to include math.h/cmath at all?  ofc I would
prefer qsynth to just use "our" lroundf.

> +Index: src/qsynthMainForm.cpp
> +--- src/qsynthMainForm.cpp.orig
> ++++ src/qsynthMainForm.cpp
> +@@ -103,6 +103,8 @@ static int g_fdStdout[2] = { QSYNTH_FDNIL, QSYNTH_FDNI
> + // Needed for lroundf()
> + #ifdef CONFIG_ROUND
> + #include <math.h>
> ++#elif defined(__OpenBSD__) && !defined(__clang__)
> ++#include <cmath>
> + #else
> + static inline long lroundf ( float x )
> + {
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/audio/qsynth/pkg/PLIST,v
> retrieving revision 1.3
> diff -u -p -r1.3 PLIST
> --- pkg/PLIST 26 Jul 2018 12:16:34 -0000 1.3
> +++ pkg/PLIST 18 Mar 2019 22:58:05 -0000
> @@ -1,14 +1,15 @@
>  @comment $OpenBSD: PLIST,v 1.3 2018/07/26 12:16:34 sebastia Exp $
>  @bin bin/qsynth
>  share/applications/qsynth.desktop
> -share/pixmaps/
> -share/pixmaps/qsynth.png
> +share/icons/hicolor/32x32/apps/qsynth.png
> +share/metainfo/
> +share/metainfo/qsynth.appdata.xml
>  share/qsynth/
>  share/qsynth/translations/
>  share/qsynth/translations/qsynth_cs.qm
>  share/qsynth/translations/qsynth_de.qm
> -share/qsynth/translations/qsynth_es.qm
>  share/qsynth/translations/qsynth_fr.qm
>  share/qsynth/translations/qsynth_ru.qm
>  share/qsynth/translations/qsynth_sr.qm
>  @tag update-desktop-database
> +@tag gtk-update-icon-cache %D/share/icons/hicolor
>

--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply | Threaded
Open this post in threaded view
|

Re: [ports-gcc] Unbreak audio/qsynth

Charlene Wendling
(i've snipped many things)

On Tue, 19 Mar 2019 10:39:13 +0100
Jeremie Courreges-Anglas <[hidden email]> wrote:

> On Tue, Mar 19 2019, Charlene Wendling <[hidden email]> wrote:
> > Hi,
> >
> > On Mon, 18 Mar 2019 22:56:35 +0100
> > "Sebastian Reitenbach" <[hidden email]> wrote:
> >
> >> Hi,
> >>
> >> Am Montag, März 18, 2019 17:36 CET, Sebastian Reitenbach
> >> <[hidden email]> schrieb:
> >>

> >
> > It builds fine on macppc [1], after some modifications to your
> > diff:
> >
> > - It wants atomic as WANTLIB (macppc specific, will be dropped once
> >   macppc has base-clang)
> > - I had to bring the lroundf() fix again :(
> > - portcheck says it needs x11/gtk+3,-guic (not sure if it's a false
> >   positive though)
>
> That's what the documentation says for @tag:
>
>      @tag name [parameter]
>              Reference a tag of given name.  The corresponding
> @define-tag definition must be accessible through the dependency tree.
>
> This port could have a manpage if the "install" target in Makefile.in
> didn't use install -v (fails) and gzip.

I've done it, putting the French manpage at its proper place, for
consistency sake i have also modifed the uninstall target.
 
> See other my comments inline,

>
> > Index: Makefile
> > ===================================================================
> > RCS file: /cvs/ports/audio/qsynth/Makefile,v
> > retrieving revision 1.6
> > diff -u -p -r1.6 Makefile
> > --- Makefile 8 Mar 2019 20:00:40 -0000 1.6
> > +++ Makefile 18 Mar 2019 22:58:05 -0000
> > @@ -2,8 +2,7 @@
> >  
> >  COMMENT = Qt GUI Interface for FluidSynth
> >  
> > -DISTNAME = qsynth-0.5.4
> > -REVISION = 0
> > +DISTNAME = qsynth-0.5.5
> >  
> >  CATEGORIES = audio
> >  
> > @@ -16,22 +15,26 @@ PERMIT_PACKAGE_CDROM = Yes
> >  
> >  MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=qsynth/}
> >  
> > -WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Gui Qt5Widgets X11 c
> > -WANTLIB += m fluidsynth Qt5X11Extras
> > +WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Gui Qt5Widgets c
> > +WANTLIB += m fluidsynth GL Qt5Network curses readline
> >  
> > -MODULES = devel/cmake \
> > - x11/qt5
> > +.if ${MACHINE_ARCH} == "powerpc"
> > +WANTLIB += atomic
> > +.endif
> >  
> > -LIB_DEPENDS += audio/fluidsynth \
> > - x11/qt5/qtx11extras
> > +MODULES = x11/qt5
> > +
> > +LIB_DEPENDS += audio/fluidsynth
> >  
> >  RUN_DEPENDS += devel/desktop-file-utils \
> > + x11/gtk+3,-guic
> >  
> > +USE_GMAKE = Yes
> >  NO_TEST = Yes
> >  
> > -BUILD_DEPENDS = audio/fluidsynth
> > +CONFIGURE_STYLE = gnu
> >  
> > -post-build:
> > - cp ${WRKSRC}/src/qsynth.desktop ${WRKBUILD}/src/
> > +CONFIGURE_ENV += CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
>
> Maybe use CPPFLAGS here, which usually works for both C and C++
> compilers.
>
> > + LDDFLAGS="${LDDFLAGS} -L${LOCALBASE}/lib"
>
> s/LDDFLAGS/LDFLAGS/
>
> Please also add -L${X11BASE}/lib to LDFLAGS else some configure tests
> will fail on ld.lld platforms:
>

I've made the proper modifications.


> > patches/patch-src_qsynthChannelsForm_cpp
> > ===================================================================
> > RCS file: patches/patch-src_qsynthChannelsForm_cpp diff -N
> > patches/patch-src_qsynthChannelsForm_cpp
> > --- /dev/null 1 Jan 1970 00:00:00 -0000
> > +++ patches/patch-src_qsynthChannelsForm_cpp 18 Mar 2019
> > 22:58:05 -0000 @@ -0,0 +1,33 @@
> > +$OpenBSD$
> > +
> > +Index: src/qsynthChannelsForm.cpp
> > +--- src/qsynthChannelsForm.cpp.orig
> > ++++ src/qsynthChannelsForm.cpp
> > +@@ -256,11 +256,11 @@ void qsynthChannelsForm::updateChannel ( int
> > iChan )
> > + #ifdef CONFIG_FLUID_BANK_OFFSET
> > + int iSFID = 0;
> > + QString sSFName;
> > +- #ifdef CONFIG_FLUID_PRESET_GET_SFONT
> > ++ #ifdef CONFIG_FLUID_PRESET_GET_SFONT
> > + fluid_sfont_t *pSoundFont
> > = ::fluid_preset_get_sfont(pPreset); +- #else
> > ++ #else
> > + fluid_sfont_t *pSoundFont = pPreset->sfont;
> > +- #endif
> > ++ #endif
> > + if (pSoundFont) {
> > + #ifdef CONFIG_FLUID_SFONT_GET_ID
> > + iSFID = ::fluid_sfont_get_id(pSoundFont);
>
> Is that hunk really needed?

This is the only thing my diff doesn't address.
 

> > +@@ -290,10 +290,12 @@ void qsynthChannelsForm::updateChannel ( int
> > iChan )
> > + pItem->setText(QSYNTH_CHANNELS_PROG,
> > + QString::number(iProg));
> > + pItem->setText(QSYNTH_CHANNELS_NAME, sName);
> > ++ #ifdef CONFIG_FLUID_BANK_OFFSET
> > + pItem->setText(QSYNTH_CHANNELS_SFID,
> > + QString::number(iSFID));
> > + pItem->setText(QSYNTH_CHANNELS_SFNAME,
> > + QFileInfo(sSFName).baseName());
> > ++ #endif
> > + // Make this a dirty-operation.
> > + m_iDirtyCount++;
> > + }
> > Index: patches/patch-src_qsynthMainForm_cpp
> > ===================================================================
> > RCS file: patches/patch-src_qsynthMainForm_cpp
> > diff -N patches/patch-src_qsynthMainForm_cpp
> > --- /dev/null 1 Jan 1970 00:00:00 -0000
> > +++ patches/patch-src_qsynthMainForm_cpp 18 Mar 2019
> > 22:58:05 -0000 @@ -0,0 +1,18 @@
> > +$OpenBSD$
> > +
> > +ports-gcc fix. lroundf() is not detected during configuration, so
> > CONFIG_ROUND +is undefined.
>
> cwen:
>
> Could you please check why lroundf isn't detected?
>
> > But <cmath> is pulled by Qt headers already, creating a conflict
> > +between <cmath>'s lroundf() and the bundled lroundf().
>
> If this source file falls back on the bundled lroundf, then maybe the
> fallback path doesn't need to include math.h/cmath at all?  ofc I
> would prefer qsynth to just use "our" lroundf.
>

Once s/LDDFLAGS/LDFLAGS has been made, that patch wasn't necessary
anymore, lroundf() is detected.

Here are the build logs for macppc [1] and amd64 [2].

Charlène.

[1] http://0x0.st/z8pF.txt
[2] http://0x0.st/z8pC.txt


> --
> jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE
> 1524 E7EE
>


Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/qsynth/Makefile,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 Makefile
--- Makefile 8 Mar 2019 20:00:40 -0000 1.6
+++ Makefile 19 Mar 2019 12:34:24 -0000
@@ -2,8 +2,7 @@
 
 COMMENT = Qt GUI Interface for FluidSynth
 
-DISTNAME = qsynth-0.5.4
-REVISION = 0
+DISTNAME = qsynth-0.5.5
 
 CATEGORIES = audio
 
@@ -16,22 +15,26 @@ PERMIT_PACKAGE_CDROM = Yes
 
 MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=qsynth/}
 
-WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Gui Qt5Widgets X11 c
-WANTLIB += m fluidsynth Qt5X11Extras
+WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Gui Qt5Widgets c
+WANTLIB += m fluidsynth GL Qt5Network curses readline
 
-MODULES = devel/cmake \
- x11/qt5
+.if ${MACHINE_ARCH} == "powerpc"
+WANTLIB += atomic
+.endif
 
-LIB_DEPENDS += audio/fluidsynth \
- x11/qt5/qtx11extras
+MODULES = x11/qt5
+
+LIB_DEPENDS += audio/fluidsynth
 
 RUN_DEPENDS += devel/desktop-file-utils \
+ x11/gtk+3,-guic
 
+USE_GMAKE = Yes
 NO_TEST = Yes
 
-BUILD_DEPENDS = audio/fluidsynth
+CONFIGURE_STYLE = gnu
 
-post-build:
- cp ${WRKSRC}/src/qsynth.desktop ${WRKBUILD}/src/
+CONFIGURE_ENV += CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
+ LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib -L${X11BASE}/lib"
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/audio/qsynth/distinfo,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 distinfo
--- distinfo 2 Jan 2019 21:56:15 -0000 1.4
+++ distinfo 19 Mar 2019 12:34:24 -0000
@@ -1,2 +1,2 @@
-SHA256 (qsynth-0.5.4.tar.gz) = LWvvtAI/imTzXYApkdDUE+EdAwfodIVCjJablLsr+E4=
-SIZE (qsynth-0.5.4.tar.gz) = 268106
+SHA256 (qsynth-0.5.5.tar.gz) = hY9SuVZCol9XA0LVz3+v0qKt24nVZ8W2ijVFvrb9pyM=
+SIZE (qsynth-0.5.5.tar.gz) = 269061
Index: patches/patch-Makefile_in
===================================================================
RCS file: patches/patch-Makefile_in
diff -N patches/patch-Makefile_in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-Makefile_in 19 Mar 2019 12:34:24 -0000
@@ -0,0 +1,32 @@
+$OpenBSD$
+
+Don't compress manpages, also install(1) has no -v option
+
+Index: Makefile.in
+--- Makefile.in.orig
++++ Makefile.in
+@@ -104,16 +104,18 @@ translations_lrelease: translations_lupdate $(translat
+
+ install: $(target) translations_lrelease $(name).1
+ @$(MAKE) INSTALL_ROOT=$(DESTDIR) -f $(name).mak install
+- @install -d -v -m 0755 $(DESTDIR)$(translations_dir)
+- @install -d -v -m 0755 $(DESTDIR)$(mandir)/man1
+- @install -v -m 0644 $(translations_targets) $(DESTDIR)$(translations_dir)
+- @install -v -m 0644 $(name)*.1 $(DESTDIR)$(mandir)/man1
+- @gzip -vf $(DESTDIR)$(mandir)/man1/$(name)*.1
++ @install -d -m 0755 $(DESTDIR)$(translations_dir)
++ @install -d -m 0755 $(DESTDIR)$(mandir)/man1
++ @install -d -m 0755 $(DESTDIR)$(mandir)/fr/man1
++ @install -m 0644 $(translations_targets) $(DESTDIR)$(translations_dir)
++ @install -m 0644 $(name).1 $(DESTDIR)$(mandir)/man1
++ @install -m 0644 $(name).fr.1 $(DESTDIR)$(mandir)/fr/man1/$(name).1
+
+ uninstall: $(DESTDIR)$(prefix)/bin/$(name)
+ @$(MAKE) INSTALL_ROOT=$(DESTDIR) -f $(name).mak uninstall
+ @rm -rvf $(DESTDIR)$(translations_dir)
+- @rm -vf $(DESTDIR)$(mandir)/man1/$(name)*.1.gz
++ @rm -vf $(DESTDIR)$(mandir)/man1/$(name).1
++ @rm -vf $(DESTDIR)$(mandir)/fr/man1/$(name).1
+
+
+ clean: $(name).mak
Index: patches/patch-src_qsynthChannelsForm_cpp
===================================================================
RCS file: patches/patch-src_qsynthChannelsForm_cpp
diff -N patches/patch-src_qsynthChannelsForm_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_qsynthChannelsForm_cpp 19 Mar 2019 12:34:24 -0000
@@ -0,0 +1,33 @@
+$OpenBSD$
+
+Index: src/qsynthChannelsForm.cpp
+--- src/qsynthChannelsForm.cpp.orig
++++ src/qsynthChannelsForm.cpp
+@@ -256,11 +256,11 @@ void qsynthChannelsForm::updateChannel ( int iChan )
+ #ifdef CONFIG_FLUID_BANK_OFFSET
+ int iSFID = 0;
+ QString sSFName;
+- #ifdef CONFIG_FLUID_PRESET_GET_SFONT
++ #ifdef CONFIG_FLUID_PRESET_GET_SFONT
+ fluid_sfont_t *pSoundFont = ::fluid_preset_get_sfont(pPreset);
+- #else
++ #else
+ fluid_sfont_t *pSoundFont = pPreset->sfont;
+- #endif
++ #endif
+ if (pSoundFont) {
+ #ifdef CONFIG_FLUID_SFONT_GET_ID
+ iSFID = ::fluid_sfont_get_id(pSoundFont);
+@@ -290,10 +290,12 @@ void qsynthChannelsForm::updateChannel ( int iChan )
+ pItem->setText(QSYNTH_CHANNELS_PROG,
+ QString::number(iProg));
+ pItem->setText(QSYNTH_CHANNELS_NAME, sName);
++ #ifdef CONFIG_FLUID_BANK_OFFSET
+ pItem->setText(QSYNTH_CHANNELS_SFID,
+ QString::number(iSFID));
+ pItem->setText(QSYNTH_CHANNELS_SFNAME,
+ QFileInfo(sSFName).baseName());
++ #endif
+ // Make this a dirty-operation.
+ m_iDirtyCount++;
+ }
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/audio/qsynth/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 PLIST
--- pkg/PLIST 26 Jul 2018 12:16:34 -0000 1.3
+++ pkg/PLIST 19 Mar 2019 12:34:24 -0000
@@ -1,14 +1,19 @@
 @comment $OpenBSD: PLIST,v 1.3 2018/07/26 12:16:34 sebastia Exp $
 @bin bin/qsynth
+man/fr/
+man/fr/man1/
+@man man/fr/man1/qsynth.1
+@man man/man1/qsynth.1
 share/applications/qsynth.desktop
-share/pixmaps/
-share/pixmaps/qsynth.png
+share/icons/hicolor/32x32/apps/qsynth.png
+share/metainfo/
+share/metainfo/qsynth.appdata.xml
 share/qsynth/
 share/qsynth/translations/
 share/qsynth/translations/qsynth_cs.qm
 share/qsynth/translations/qsynth_de.qm
-share/qsynth/translations/qsynth_es.qm
 share/qsynth/translations/qsynth_fr.qm
 share/qsynth/translations/qsynth_ru.qm
 share/qsynth/translations/qsynth_sr.qm
 @tag update-desktop-database
+@tag gtk-update-icon-cache %D/share/icons/hicolor

Reply | Threaded
Open this post in threaded view
|

Re: [ports-gcc] Unbreak audio/qsynth

Jeremie Courreges-Anglas-2
On Tue, Mar 19 2019, Charlene Wendling <[hidden email]> wrote:
> (i've snipped many things)

[...]

>> > patches/patch-src_qsynthChannelsForm_cpp
>> > ===================================================================
>> > RCS file: patches/patch-src_qsynthChannelsForm_cpp diff -N
>> > patches/patch-src_qsynthChannelsForm_cpp
>> > --- /dev/null 1 Jan 1970 00:00:00 -0000
>> > +++ patches/patch-src_qsynthChannelsForm_cpp 18 Mar 2019
>> > 22:58:05 -0000 @@ -0,0 +1,33 @@
>> > +$OpenBSD$
>> > +
>> > +Index: src/qsynthChannelsForm.cpp
>> > +--- src/qsynthChannelsForm.cpp.orig
>> > ++++ src/qsynthChannelsForm.cpp
>> > +@@ -256,11 +256,11 @@ void qsynthChannelsForm::updateChannel ( int
>> > iChan )
>> > + #ifdef CONFIG_FLUID_BANK_OFFSET
>> > + int iSFID = 0;
>> > + QString sSFName;
>> > +- #ifdef CONFIG_FLUID_PRESET_GET_SFONT
>> > ++ #ifdef CONFIG_FLUID_PRESET_GET_SFONT
>> > + fluid_sfont_t *pSoundFont
>> > = ::fluid_preset_get_sfont(pPreset); +- #else
>> > ++ #else
>> > + fluid_sfont_t *pSoundFont = pPreset->sfont;
>> > +- #endif
>> > ++ #endif
>> > + if (pSoundFont) {
>> > + #ifdef CONFIG_FLUID_SFONT_GET_ID
>> > + iSFID = ::fluid_sfont_get_id(pSoundFont);
>>
>> Is that hunk really needed?
>
> This is the only thing my diff doesn't address.

As far as I can see, this hunk only adds a TAB to three lines and
shouldn't affect semantics.  I'd suggest to leave those lines alone.

>> > +@@ -290,10 +290,12 @@ void qsynthChannelsForm::updateChannel ( int
>> > iChan )
>> > + pItem->setText(QSYNTH_CHANNELS_PROG,
>> > + QString::number(iProg));
>> > + pItem->setText(QSYNTH_CHANNELS_NAME, sName);
>> > ++ #ifdef CONFIG_FLUID_BANK_OFFSET
>> > + pItem->setText(QSYNTH_CHANNELS_SFID,
>> > + QString::number(iSFID));
>> > + pItem->setText(QSYNTH_CHANNELS_SFNAME,
>> > + QFileInfo(sSFName).baseName());
>> > ++ #endif
>> > + // Make this a dirty-operation.
>> > + m_iDirtyCount++;
>> > + }
>> > Index: patches/patch-src_qsynthMainForm_cpp
>> > ===================================================================
>> > RCS file: patches/patch-src_qsynthMainForm_cpp
>> > diff -N patches/patch-src_qsynthMainForm_cpp
>> > --- /dev/null 1 Jan 1970 00:00:00 -0000
>> > +++ patches/patch-src_qsynthMainForm_cpp 18 Mar 2019
>> > 22:58:05 -0000 @@ -0,0 +1,18 @@
>> > +$OpenBSD$
>> > +
>> > +ports-gcc fix. lroundf() is not detected during configuration, so
>> > CONFIG_ROUND +is undefined.
>>
>> cwen:
>>
>> Could you please check why lroundf isn't detected?
>>
>> > But <cmath> is pulled by Qt headers already, creating a conflict
>> > +between <cmath>'s lroundf() and the bundled lroundf().
>>
>> If this source file falls back on the bundled lroundf, then maybe the
>> fallback path doesn't need to include math.h/cmath at all?  ofc I
>> would prefer qsynth to just use "our" lroundf.
>>
>
> Once s/LDDFLAGS/LDFLAGS has been made, that patch wasn't necessary
> anymore, lroundf() is detected.

Hah, nice.  Thanks, ok jca@

--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply | Threaded
Open this post in threaded view
|

Re: [ports-gcc] Unbreak audio/qsynth

Charlene Wendling
On Tue, 19 Mar 2019 14:39:43 +0100
Jeremie Courreges-Anglas <[hidden email]> wrote:

> On Tue, Mar 19 2019, Charlene Wendling <[hidden email]> wrote:
> > (i've snipped many things)
>
> [...]
>
> >> > patches/patch-src_qsynthChannelsForm_cpp
> >> > ===================================================================
> >> > RCS file: patches/patch-src_qsynthChannelsForm_cpp diff -N
> >> > patches/patch-src_qsynthChannelsForm_cpp
> >> > --- /dev/null 1 Jan 1970 00:00:00 -0000
> >> > +++ patches/patch-src_qsynthChannelsForm_cpp 18 Mar 2019
> >> > 22:58:05 -0000 @@ -0,0 +1,33 @@
> >> > +$OpenBSD$
> >> > +
> >> > +Index: src/qsynthChannelsForm.cpp
> >> > +--- src/qsynthChannelsForm.cpp.orig
> >> > ++++ src/qsynthChannelsForm.cpp
> >> > +@@ -256,11 +256,11 @@ void qsynthChannelsForm::updateChannel
> >> > ( int iChan )
> >> > + #ifdef CONFIG_FLUID_BANK_OFFSET
> >> > + int iSFID = 0;
> >> > + QString sSFName;
> >> > +- #ifdef CONFIG_FLUID_PRESET_GET_SFONT
> >> > ++ #ifdef CONFIG_FLUID_PRESET_GET_SFONT
> >> > + fluid_sfont_t *pSoundFont
> >> > = ::fluid_preset_get_sfont(pPreset); +- #else
> >> > ++ #else
> >> > + fluid_sfont_t *pSoundFont = pPreset->sfont;
> >> > +- #endif
> >> > ++ #endif
> >> > + if (pSoundFont) {
> >> > + #ifdef CONFIG_FLUID_SFONT_GET_ID
> >> > + iSFID
> >> > = ::fluid_sfont_get_id(pSoundFont);
> >>
> >> Is that hunk really needed?
> >
> > This is the only thing my diff doesn't address.
>
> As far as I can see, this hunk only adds a TAB to three lines and
> shouldn't affect semantics.  I'd suggest to leave those lines alone.
>

Sebastian agreed as well out of band. Here is a new diff with
that change done.

Any objection left?

Charlène.

> Hah, nice.  Thanks, ok jca@
>
> --
> jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE
> 1524 E7EE



Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/qsynth/Makefile,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 Makefile
--- Makefile 8 Mar 2019 20:00:40 -0000 1.6
+++ Makefile 19 Mar 2019 19:00:04 -0000
@@ -2,8 +2,7 @@
 
 COMMENT = Qt GUI Interface for FluidSynth
 
-DISTNAME = qsynth-0.5.4
-REVISION = 0
+DISTNAME = qsynth-0.5.5
 
 CATEGORIES = audio
 
@@ -16,22 +15,26 @@ PERMIT_PACKAGE_CDROM = Yes
 
 MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=qsynth/}
 
-WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Gui Qt5Widgets X11 c
-WANTLIB += m fluidsynth Qt5X11Extras
+WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Gui Qt5Widgets c
+WANTLIB += m fluidsynth GL Qt5Network curses readline
 
-MODULES = devel/cmake \
- x11/qt5
+.if ${MACHINE_ARCH} == "powerpc"
+WANTLIB += atomic
+.endif
 
-LIB_DEPENDS += audio/fluidsynth \
- x11/qt5/qtx11extras
+MODULES = x11/qt5
+
+LIB_DEPENDS += audio/fluidsynth
 
 RUN_DEPENDS += devel/desktop-file-utils \
+ x11/gtk+3,-guic
 
+USE_GMAKE = Yes
 NO_TEST = Yes
 
-BUILD_DEPENDS = audio/fluidsynth
+CONFIGURE_STYLE = gnu
 
-post-build:
- cp ${WRKSRC}/src/qsynth.desktop ${WRKBUILD}/src/
+CONFIGURE_ENV += CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
+ LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib -L${X11BASE}/lib"
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/audio/qsynth/distinfo,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 distinfo
--- distinfo 2 Jan 2019 21:56:15 -0000 1.4
+++ distinfo 19 Mar 2019 19:00:04 -0000
@@ -1,2 +1,2 @@
-SHA256 (qsynth-0.5.4.tar.gz) = LWvvtAI/imTzXYApkdDUE+EdAwfodIVCjJablLsr+E4=
-SIZE (qsynth-0.5.4.tar.gz) = 268106
+SHA256 (qsynth-0.5.5.tar.gz) = hY9SuVZCol9XA0LVz3+v0qKt24nVZ8W2ijVFvrb9pyM=
+SIZE (qsynth-0.5.5.tar.gz) = 269061
Index: patches/patch-Makefile_in
===================================================================
RCS file: patches/patch-Makefile_in
diff -N patches/patch-Makefile_in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-Makefile_in 19 Mar 2019 19:00:04 -0000
@@ -0,0 +1,32 @@
+$OpenBSD$
+
+Don't compress manpages, also install(1) has no -v option
+
+Index: Makefile.in
+--- Makefile.in.orig
++++ Makefile.in
+@@ -104,16 +104,18 @@ translations_lrelease: translations_lupdate $(translat
+
+ install: $(target) translations_lrelease $(name).1
+ @$(MAKE) INSTALL_ROOT=$(DESTDIR) -f $(name).mak install
+- @install -d -v -m 0755 $(DESTDIR)$(translations_dir)
+- @install -d -v -m 0755 $(DESTDIR)$(mandir)/man1
+- @install -v -m 0644 $(translations_targets) $(DESTDIR)$(translations_dir)
+- @install -v -m 0644 $(name)*.1 $(DESTDIR)$(mandir)/man1
+- @gzip -vf $(DESTDIR)$(mandir)/man1/$(name)*.1
++ @install -d -m 0755 $(DESTDIR)$(translations_dir)
++ @install -d -m 0755 $(DESTDIR)$(mandir)/man1
++ @install -d -m 0755 $(DESTDIR)$(mandir)/fr/man1
++ @install -m 0644 $(translations_targets) $(DESTDIR)$(translations_dir)
++ @install -m 0644 $(name).1 $(DESTDIR)$(mandir)/man1
++ @install -m 0644 $(name).fr.1 $(DESTDIR)$(mandir)/fr/man1/$(name).1
+
+ uninstall: $(DESTDIR)$(prefix)/bin/$(name)
+ @$(MAKE) INSTALL_ROOT=$(DESTDIR) -f $(name).mak uninstall
+ @rm -rvf $(DESTDIR)$(translations_dir)
+- @rm -vf $(DESTDIR)$(mandir)/man1/$(name)*.1.gz
++ @rm -vf $(DESTDIR)$(mandir)/man1/$(name).1
++ @rm -vf $(DESTDIR)$(mandir)/fr/man1/$(name).1
+
+
+ clean: $(name).mak
Index: patches/patch-src_qsynthChannelsForm_cpp
===================================================================
RCS file: patches/patch-src_qsynthChannelsForm_cpp
diff -N patches/patch-src_qsynthChannelsForm_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_qsynthChannelsForm_cpp 19 Mar 2019 19:00:04 -0000
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+Index: src/qsynthChannelsForm.cpp
+--- src/qsynthChannelsForm.cpp.orig
++++ src/qsynthChannelsForm.cpp
+@@ -290,10 +290,12 @@ void qsynthChannelsForm::updateChannel ( int iChan )
+ pItem->setText(QSYNTH_CHANNELS_PROG,
+ QString::number(iProg));
+ pItem->setText(QSYNTH_CHANNELS_NAME, sName);
++ #ifdef CONFIG_FLUID_BANK_OFFSET
+ pItem->setText(QSYNTH_CHANNELS_SFID,
+ QString::number(iSFID));
+ pItem->setText(QSYNTH_CHANNELS_SFNAME,
+ QFileInfo(sSFName).baseName());
++ #endif
+ // Make this a dirty-operation.
+ m_iDirtyCount++;
+ }
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/audio/qsynth/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 PLIST
--- pkg/PLIST 26 Jul 2018 12:16:34 -0000 1.3
+++ pkg/PLIST 19 Mar 2019 19:00:04 -0000
@@ -1,14 +1,19 @@
 @comment $OpenBSD: PLIST,v 1.3 2018/07/26 12:16:34 sebastia Exp $
 @bin bin/qsynth
+man/fr/
+man/fr/man1/
+@man man/fr/man1/qsynth.1
+@man man/man1/qsynth.1
 share/applications/qsynth.desktop
-share/pixmaps/
-share/pixmaps/qsynth.png
+share/icons/hicolor/32x32/apps/qsynth.png
+share/metainfo/
+share/metainfo/qsynth.appdata.xml
 share/qsynth/
 share/qsynth/translations/
 share/qsynth/translations/qsynth_cs.qm
 share/qsynth/translations/qsynth_de.qm
-share/qsynth/translations/qsynth_es.qm
 share/qsynth/translations/qsynth_fr.qm
 share/qsynth/translations/qsynth_ru.qm
 share/qsynth/translations/qsynth_sr.qm
 @tag update-desktop-database
+@tag gtk-update-icon-cache %D/share/icons/hicolor