[ports-gcc] Unbreak audio/ncmpc

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ports-gcc] Unbreak audio/ncmpc

Charlene Wendling

> http://build-failures.rhaalovely.net/powerpc/last/audio/ncmpc.log
> http://build-failures.rhaalovely.net/sparc64/last/audio/ncmpc.log

The core issue is simple: it croaks because ports-gcc-4.9 is not
C++14 compliant, and ncmpc "requires" that.

If we downgrade that C++14 construct to C++11, it builds [1] and
runs [2] fine, and still work with base-clang. One of the mpd
developer agreed it's correct [3], but it won't be merged in any
case.

We may, until ports-gcc-8 is used, change COMPILER to "base-clang
ports-clang". I'm fine with this as well, i haven't tried but will
do if required :)


What do you think about it?

Charlène.


[1] http://ix.io/1D2z
[2] https://bsd.network/@julianaito/101722705132528522
[3] https://github.com/MusicPlayerDaemon/ncmpc/pull/47


Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/ncmpc/Makefile,v
retrieving revision 1.43
diff -u -p -u -p -r1.43 Makefile
--- Makefile 12 Jan 2019 07:56:51 -0000 1.43
+++ Makefile 9 Mar 2019 20:50:24 -0000
@@ -6,7 +6,7 @@ VER= 0.33
 DISTNAME= ncmpc-${VER}
 EPOCH= 0
 CATEGORIES= audio
-REVISION= 1
+REVISION= 2
 
 HOMEPAGE= https://www.musicpd.org/clients/ncmpc/
 
Index: patches/patch-src_TagListPage_cxx
===================================================================
RCS file: patches/patch-src_TagListPage_cxx
diff -N patches/patch-src_TagListPage_cxx
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_TagListPage_cxx 9 Mar 2019 20:50:24 -0000
@@ -0,0 +1,17 @@
+$OpenBSD$
+ports-gcc-4.9 is not C++14-compatible, we fix the issue by
+using C++11 constructors instead. It can be safely removed
+once we use ports-gcc-8.2.
+see: https://github.com/MusicPlayerDaemon/ncmpc/pull/47
+Index: src/TagListPage.cxx
+--- src/TagListPage.cxx.orig
++++ src/TagListPage.cxx
+@@ -38,7 +38,7 @@ TagListPage::MakeCursorFilter() const noexcept
+ unsigned i = lw.selected;
+ if (parent != nullptr) {
+ if (i == 0)
+- return {};
++ return {{}};
+
+ --i;
+ }