Re: NEW: audio/portmidi (unbreak audacity)

2019-03-25 Thread Jeremie Courreges-Anglas
On Mon, Mar 25 2019, Stuart Henderson  wrote:
> On 2019/03/25 13:08, Jeremie Courreges-Anglas wrote:
>> - any reason to force -std=c++11 in CXXFLAGS?  The build works fine for
>>   me with base-clang (which defaults to gnu++14).
>
> ports-gcc defaults to old c++ until we switch over to gcc 8.

Yep but I'd like to know if it is actually needed. I have started a partial
bulk on sparc64 to find out.

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



Re: NEW: audio/portmidi (unbreak audacity)

2019-03-25 Thread Stuart Henderson
On 2019/03/25 13:08, Jeremie Courreges-Anglas wrote:
> - any reason to force -std=c++11 in CXXFLAGS?  The build works fine for
>   me with base-clang (which defaults to gnu++14).

ports-gcc defaults to old c++ until we switch over to gcc 8.



Re: NEW: audio/portmidi (unbreak audacity)

2019-03-25 Thread Jeremie Courreges-Anglas
On Fri, Mar 22 2019, Jeremie Courreges-Anglas  wrote:
> Back to this,
>
> On Tue, Mar 12 2019, Raphael Graf  wrote:
>> On Sun, Mar 10, 2019 at 08:06:59PM +0100, Jeremie Courreges-Anglas wrote:
>>> On Sun, Mar 10 2019, Raphael Graf  wrote:
>>> > The attached portmidi.tar.gz contains a port of the newest release from 
>>> > 2010.
>>> > I've added very rudimentary and incomplete support for sndio, it's just 
>>> > enough
>>> > for playing a midi track via audacity. The sndio stuff is in 
>>> > files/pm_sndio/.
>>> > It is extremely simple compared to the alsa version (pm_linux). :)
>>> 
>>> Please comments below,
>>> 
>>> > Audacity can then use the shared portmidi library instead of the bundled
>>> > version. The attached audacity.diff does that.
>>> > It seems to work ok, I've tested midi playback in audacity using 
>>> > fluidsynth.
>>> 
>>> I'm not sure I understand the rationale for all the changes contained in
>>> the audacity diff, but it definitely looks like an improvement!  Sadly
>>> it doesn't apply any more, now that audacity has been updated to 2.3.1
>>> by Antoine.
>>
>> Attached is an new diff for audacity 2.3.1.
>> It works for me on amd64/i386, I couldn't test on other archs yet.
>> I didn't manage to make it work without the do-gen step, mainly because
>> some of the libs (e.g. FileDialog) where wrongly built as shared libs
>> instead of static libs.
>> Any help on improving the patches is welcome.
>
> ack.  I may have some tweaks but the changes look sane overall.
> audacity seemed to run fine in my (limited) tests.

So, about your diff:
- audio/jack seems to be picked up even though it isn't actually used;
  only ${WRKSRC}/lib-src/portaudio-v19 seems to actually make use of it
  but we use audio/portaudio-svn instead.  We could force-disable it.[1]
- was there a reason to disable LV2 support?  I thought LV2 would be
  nice to have, that's the reason why I added patches.
- is there a reason to set SEPARATE_BUILD=No?  If so I think a comment
  is due. [2]
- the CPPFLAGS change doesn't make sense to me
- any reason to force -std=c++11 in CXXFLAGS?  The build works fine for
  me with base-clang (which defaults to gnu++14).

Here's an updated diff with additional tweaks:
- reenable LV2 support, uses waf -> python.port.mk
- update HOMEPAGE (now with https)
- misc cleanup, eg NO_TEST comment appears irrelevant, simplify
  CONFIGURE_ENV
- use ${SETENV} in do-gen to avoid polluting the environment

ok jca@ if you agree with my tweaks. [1] and [2] can be dealt with later
I think.


Index: Makefile
===
RCS file: /cvs/ports/audio/audacity/Makefile,v
retrieving revision 1.58
diff -u -p -r1.58 Makefile
--- Makefile10 Mar 2019 11:45:50 -  1.58
+++ Makefile25 Mar 2019 12:02:31 -
@@ -1,7 +1,5 @@
 # $OpenBSD: Makefile,v 1.58 2019/03/10 11:45:50 ajacoutot Exp $
 
-BROKEN=missing portmidi support
-
 COMMENT=   free audio editor
 
 V= 2.3.1
@@ -11,40 +9,60 @@ CATEGORIES=  audio
 
 MASTER_SITES=  https://github.com/audacity/audacity/archive/
 
-HOMEPAGE=  http://audacity.sourceforge.net/
+HOMEPAGE=  https://www.audacityteam.org/
 
 # GPLv2
 PERMIT_PACKAGE_CDROM=   Yes
 
-# XXX WANTLIB
+WANTLIB += ${COMPILER_LIBCXX} FLAC FLAC++ ICE SDL2 SM SoundTouch
+WANTLIB += X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi Xinerama
+WANTLIB += Xrandr Xrender Xxf86vm atk-1.0 atk-bridge-2.0 c cairo
+WANTLIB += cairo-gobject epoxy expat ffi fontconfig freetype fribidi
+WANTLIB += gdk-3 gdk_pixbuf-2.0 gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0
+WANTLIB += graphite2 gthread-2.0 gtk-3 harfbuzz iconv id3tag intl
+WANTLIB += jpeg m mad mspack notify ogg pango-1.0 pangocairo-1.0
+WANTLIB += pangoft2-1.0 pcre pixman-1 png16 portaudio portmidi
+WANTLIB += samplerate sndfile sndio soxr tiff usbhid vorbis vorbisenc
+WANTLIB += vorbisfile wx_baseu-3.0 wx_baseu_net-3.0 wx_baseu_xml-3.0
+WANTLIB += wx_gtk3u_adv-3.0 wx_gtk3u_core-3.0 wx_gtk3u_html-3.0
+WANTLIB += wx_gtk3u_qa-3.0 wx_gtk3u_xrc-3.0 xcb xcb-render xcb-shm
+WANTLIB += z db jack
 
 COMPILER = base-clang ports-gcc base-gcc
 
-BUILD_DEPENDS= archivers/zip \
+MODULES=   lang/python
+MODPY_RUNDEP=  No
+
+BUILD_DEPENDS= ${MODGNU_AUTOCONF_DEPENDS} \
+   ${MODGNU_AUTOMAKE_DEPENDS} \
+   archivers/zip \
devel/gettext-tools \
+   devel/libtool \
shells/bash
 LIB_DEPENDS=   x11/wxWidgets>=3.0.4 \
+   audio/jack \
audio/libsoxr \
audio/flac \
audio/libvorbis \
audio/libid3tag \
audio/libmad \
audio/portaudio-svn>=1406p1 \
-   audio/soundtouch \
-   audio/taglib
-# XXX libtool/ld(1) fail to find libvamp-hostsdk.so
-#LIB_DEPENDS+= audio/vamp-plugin-sdk>=2.2.1p0
+   audio/portmidi \
+   audio/soundtouch
 RUN_DEPENDS=   devel/desktop-file-util

Re: NEW: audio/portmidi (unbreak audacity)

2019-03-22 Thread Jeremie Courreges-Anglas
On Fri, Mar 22 2019, Theo Buehler  wrote:
>> Thanks, I can't test the actual functionality but I think that portmidi
>> is ready to be imported.  Could I please get reviews/oks to import?
>
> You could also give rapha@ an ok to import :)

Woops, right, thank you. 8)

Raphael: ok jca@

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



Re: NEW: audio/portmidi (unbreak audacity)

2019-03-22 Thread Alexandre Ratchov
On Fri, Mar 22, 2019 at 02:47:22PM +0100, Theo Buehler wrote:
> > Thanks, I can't test the actual functionality but I think that portmidi
> > is ready to be imported.  Could I please get reviews/oks to import?
> 
> You could also give rapha@ an ok to import :)

I'm OK with the portmidi diff. The midi bits could be improved later
in tree.

I tested audacity, and it works fine, so I'm OK as well for it.



Re: NEW: audio/portmidi (unbreak audacity)

2019-03-22 Thread Theo Buehler
> Thanks, I can't test the actual functionality but I think that portmidi
> is ready to be imported.  Could I please get reviews/oks to import?

You could also give rapha@ an ok to import :)



Re: NEW: audio/portmidi (unbreak audacity)

2019-03-22 Thread Jeremie Courreges-Anglas


Back to this,

On Tue, Mar 12 2019, Raphael Graf  wrote:
> On Sun, Mar 10, 2019 at 08:06:59PM +0100, Jeremie Courreges-Anglas wrote:
>> On Sun, Mar 10 2019, Raphael Graf  wrote:
>> > The attached portmidi.tar.gz contains a port of the newest release from 
>> > 2010.
>> > I've added very rudimentary and incomplete support for sndio, it's just 
>> > enough
>> > for playing a midi track via audacity. The sndio stuff is in 
>> > files/pm_sndio/.
>> > It is extremely simple compared to the alsa version (pm_linux). :)
>> 
>> Please comments below,
>> 
>> > Audacity can then use the shared portmidi library instead of the bundled
>> > version. The attached audacity.diff does that.
>> > It seems to work ok, I've tested midi playback in audacity using 
>> > fluidsynth.
>> 
>> I'm not sure I understand the rationale for all the changes contained in
>> the audacity diff, but it definitely looks like an improvement!  Sadly
>> it doesn't apply any more, now that audacity has been updated to 2.3.1
>> by Antoine.
>
> Attached is an new diff for audacity 2.3.1.
> It works for me on amd64/i386, I couldn't test on other archs yet.
> I didn't manage to make it work without the do-gen step, mainly because
> some of the libs (e.g. FileDialog) where wrongly built as shared libs
> instead of static libs.
> Any help on improving the patches is welcome.

ack.  I may have some tweaks but the changes look sane overall.
audacity seemed to run fine in my (limited) tests.

>> > Any thoughts or comments?
>> 
>> Regarding portmidi:
>> - SHARED_LIBS should start at 0.0 (if only because it tends to prove
>>   that SHARED_LIBS is honored)
>> - java is still needed even if you don't include the pm_java subdir
>>   and the jni lib is built unconditionally, this is bad for !(x86).
>>   I think the easiest way to handle it is just to force-disable all
>>   java-related stuff for now.
>> - what is the rationale for the .pc file?  Do other distros provide it
>>   and does audacity depend on it? Is "Version: 1.0" what the ecosystem
>>   expect?
>
> The .pc file is not provided by other distros, but audacity depends on it.
> Building audacity with '-with-portmidi=system' probably never worked.
> (see this thread: 
> https://sourceforge.net/p/audacity/mailman/message/36095045/)
> Of course, the .pc file should be upstreamed if possible..
> You are right that "Version: 1.0" doesn't make any sense.  In the attached
> tarball, i've changed it to "Version: 217".

Thanks, I can't test the actual functionality but I think that portmidi
is ready to be imported.  Could I please get reviews/oks to import?

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



Re: NEW: audio/portmidi (unbreak audacity)

2019-03-12 Thread Raphael Graf
On Sun, Mar 10, 2019 at 08:06:59PM +0100, Jeremie Courreges-Anglas wrote:
> On Sun, Mar 10 2019, Raphael Graf  wrote:
> > The attached portmidi.tar.gz contains a port of the newest release from 
> > 2010.
> > I've added very rudimentary and incomplete support for sndio, it's just 
> > enough
> > for playing a midi track via audacity. The sndio stuff is in 
> > files/pm_sndio/.
> > It is extremely simple compared to the alsa version (pm_linux). :)
> 
> Please comments below,
> 
> > Audacity can then use the shared portmidi library instead of the bundled
> > version. The attached audacity.diff does that.
> > It seems to work ok, I've tested midi playback in audacity using fluidsynth.
> 
> I'm not sure I understand the rationale for all the changes contained in
> the audacity diff, but it definitely looks like an improvement!  Sadly
> it doesn't apply any more, now that audacity has been updated to 2.3.1
> by Antoine.

Attached is an new diff for audacity 2.3.1.
It works for me on amd64/i386, I couldn't test on other archs yet.
I didn't manage to make it work without the do-gen step, mainly because
some of the libs (e.g. FileDialog) where wrongly built as shared libs
instead of static libs.
Any help on improving the patches is welcome.

> 
> > Any thoughts or comments?
> 
> Regarding portmidi:
> - SHARED_LIBS should start at 0.0 (if only because it tends to prove
>   that SHARED_LIBS is honored)
> - java is still needed even if you don't include the pm_java subdir
>   and the jni lib is built unconditionally, this is bad for !(x86).
>   I think the easiest way to handle it is just to force-disable all
>   java-related stuff for now.
> - what is the rationale for the .pc file?  Do other distros provide it
>   and does audacity depend on it? Is "Version: 1.0" what the ecosystem
>   expect?

The .pc file is not provided by other distros, but audacity depends on it.
Building audacity with '-with-portmidi=system' probably never worked.
(see this thread: https://sourceforge.net/p/audacity/mailman/message/36095045/)
Of course, the .pc file should be upstreamed if possible..
You are right that "Version: 1.0" doesn't make any sense.  In the attached
tarball, i've changed it to "Version: 217".



portmidi.3.tgz
Description: application/tar-gz
Index: Makefile
===
RCS file: /cvs/ports/audio/audacity/Makefile,v
retrieving revision 1.58
diff -u -p -u -p -r1.58 Makefile
--- Makefile10 Mar 2019 11:45:50 -  1.58
+++ Makefile12 Mar 2019 09:56:51 -
@@ -1,7 +1,5 @@
 # $OpenBSD: Makefile,v 1.58 2019/03/10 11:45:50 ajacoutot Exp $
 
-BROKEN=missing portmidi support
-
 COMMENT=   free audio editor
 
 V= 2.3.1
@@ -16,35 +14,55 @@ HOMEPAGE=   http://audacity.sourceforge.ne
 # GPLv2
 PERMIT_PACKAGE_CDROM=   Yes
 
-# XXX WANTLIB
-
-COMPILER = base-clang ports-gcc base-gcc
-
-BUILD_DEPENDS= archivers/zip \
+WANTLIB += ${COMPILER_LIBCXX} FLAC FLAC++ ICE SDL2 SM SoundTouch
+WANTLIB += X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi Xinerama
+WANTLIB += Xrandr Xrender Xxf86vm atk-1.0 atk-bridge-2.0 c cairo
+WANTLIB += cairo-gobject epoxy expat ffi fontconfig freetype fribidi
+WANTLIB += gdk-3 gdk_pixbuf-2.0 gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0
+WANTLIB += graphite2 gthread-2.0 gtk-3 harfbuzz iconv id3tag intl
+WANTLIB += jpeg m mad mspack notify ogg pango-1.0 pangocairo-1.0
+WANTLIB += pangoft2-1.0 pcre pixman-1 png16 portaudio portmidi
+WANTLIB += samplerate sndfile sndio soxr tiff usbhid vorbis vorbisenc
+WANTLIB += vorbisfile wx_baseu-3.0 wx_baseu_net-3.0 wx_baseu_xml-3.0
+WANTLIB += wx_gtk3u_adv-3.0 wx_gtk3u_core-3.0 wx_gtk3u_html-3.0
+WANTLIB += wx_gtk3u_qa-3.0 wx_gtk3u_xrc-3.0 xcb xcb-render xcb-shm
+WANTLIB += z db jack
+
+COMPILER = base-clang ports-gcc base-gcc
+
+BUILD_DEPENDS= ${MODGNU_AUTOCONF_DEPENDS} \
+   ${MODGNU_AUTOMAKE_DEPENDS} \
+   archivers/zip \
devel/gettext-tools \
+   devel/libtool \
shells/bash
 LIB_DEPENDS=   x11/wxWidgets>=3.0.4 \
+   audio/jack \
audio/libsoxr \
audio/flac \
audio/libvorbis \
audio/libid3tag \
audio/libmad \
audio/portaudio-svn>=1406p1 \
-   audio/soundtouch \
-   audio/taglib
+   audio/portmidi \
+   audio/soundtouch
 # XXX libtool/ld(1) fail to find libvamp-hostsdk.so
 #LIB_DEPENDS+= audio/vamp-plugin-sdk>=2.2.1p0
 RUN_DEPENDS=   devel/desktop-file-utils \
-   misc/shared-mime-info
+   misc/shared-mime-info \
+   x11/gtk+3,-guic
+
+SEPARATE_BUILD= No
 
 USE_GMAKE= Yes
+AUTOCONF_VERSION=  2.69
+AUTOMAKE_VERSION=  1.15
 CONFIGURE_STYLE=   gnu
 CONFIGURE_ENV= CC="${CC}" CXX="${CXX}" OBJCXX="${CXX}" \
-   CPPFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include