[ports-gcc] Unbreak geo/qlandkartegt

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

[ports-gcc] Unbreak geo/qlandkartegt

Charlene Wendling

> http://build-failures.rhaalovely.net/powerpc/last/geo/qlandkartegt.log
> http://build-failures.rhaalovely.net/sparc64/2019-02-03/geo/qlandkartegt.log

So this one needs -std=c++11. Once provided there is the usual
<cmath>/<math.h> fight later during the build. I tried to be
conservative here, but anyway upstream moved to a remake of its own
software called QMapShack.

It builds fine on macppc [1] and amd64 [2]. I don't have the
hardware to fully test it, but geotiff maps are fine.

Any comment?

Charlène.


[1] http://0x0.st/z8ai.txt
[2] http://0x0.st/z8az.txt


Index: Makefile
===================================================================
RCS file: /cvs/ports/geo/qlandkartegt/Makefile,v
retrieving revision 1.29
diff -u -p -u -p -r1.29 Makefile
--- Makefile 24 Oct 2018 14:28:04 -0000 1.29
+++ Makefile 17 Mar 2019 22:43:44 -0000
@@ -4,7 +4,7 @@ COMMENT = garmin GPS map management tool
 
 DISTNAME = qlandkartegt-1.8.1
 CATEGORIES = geo x11
-REVISION = 2
+REVISION = 3
 
 HOMEPAGE = http://www.qlandkarte.org/
 MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=qlandkartegt/}
@@ -39,3 +39,9 @@ post-extract:
  @rm ${WRKSRC}/cmake/Modules/FindJPEG.cmake
 
 .include <bsd.port.mk>
+
+# fix error: #error Must have C++11 or newer.
+# XXX this should be retried once moving to ports-gcc>=8
+.if ${CHOSEN_COMPILER} == "ports-gcc"
+CONFIGURE_ENV +=     CXXFLAGS="${CXXFLAGS} -std=c++11"
+.endif
Index: patches/patch-src_GeoMath_cpp
===================================================================
RCS file: patches/patch-src_GeoMath_cpp
diff -N patches/patch-src_GeoMath_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_GeoMath_cpp 17 Mar 2019 22:43:44 -0000
@@ -0,0 +1,20 @@
+$OpenBSD$
+
+ports-gcc fix for "error: 'isnan' was not declared in this scope"
+
+Index: src/GeoMath.cpp
+--- src/GeoMath.cpp.orig
++++ src/GeoMath.cpp
+@@ -26,7 +26,12 @@
+ #include <tzdata.h>
+ #endif
+
++#if defined(__OpenBSD__) && !defined(__clang__)
++#include <cmath>
++#define isnan std::isnan
++#else
+ #include <math.h>
++#endif
+
+ #if WIN32
+ #include <float.h>




Reply | Threaded
Open this post in threaded view
|

Re: [ports-gcc] Unbreak geo/qlandkartegt

Landry Breuil-5
On Mon, Mar 18, 2019 at 12:09:01AM +0100, Charlene Wendling wrote:

>
> > http://build-failures.rhaalovely.net/powerpc/last/geo/qlandkartegt.log
> > http://build-failures.rhaalovely.net/sparc64/2019-02-03/geo/qlandkartegt.log
>
> So this one needs -std=c++11. Once provided there is the usual
> <cmath>/<math.h> fight later during the build. I tried to be
> conservative here, but anyway upstream moved to a remake of its own
> software called QMapShack.
>
> It builds fine on macppc [1] and amd64 [2]. I don't have the
> hardware to fully test it, but geotiff maps are fine.
>
> Any comment?
<snip>

> +# fix error: #error Must have C++11 or newer.
> +# XXX this should be retried once moving to ports-gcc>=8

removed :) retired isnt right either i think..
otherwise looks good.

Landry

Reply | Threaded
Open this post in threaded view
|

Re: [ports-gcc] Unbreak geo/qlandkartegt

Stuart Henderson
On 2019/03/18 08:23, Landry Breuil wrote:

> On Mon, Mar 18, 2019 at 12:09:01AM +0100, Charlene Wendling wrote:
> >
> > > http://build-failures.rhaalovely.net/powerpc/last/geo/qlandkartegt.log
> > > http://build-failures.rhaalovely.net/sparc64/2019-02-03/geo/qlandkartegt.log
> >
> > So this one needs -std=c++11. Once provided there is the usual
> > <cmath>/<math.h> fight later during the build. I tried to be
> > conservative here, but anyway upstream moved to a remake of its own
> > software called QMapShack.
> >
> > It builds fine on macppc [1] and amd64 [2]. I don't have the
> > hardware to fully test it, but geotiff maps are fine.
> >
> > Any comment?
> <snip>
>
> > +# fix error: #error Must have C++11 or newer.
> > +# XXX this should be retried once moving to ports-gcc>=8
>
> removed :) retired isnt right either i think..
> otherwise looks good.
>
> Landry
>

'reviewed' is probably the best word, but 'retried' is understandable and
matches the wording in other ports.

hopefully it won't stay there for long anyway :)

Reply | Threaded
Open this post in threaded view
|

Re: [ports-gcc] Unbreak geo/qlandkartegt

Charlene Wendling
Hi,

On Mon, 18 Mar 2019 09:06:09 +0000
Stuart Henderson <[hidden email]> wrote:

> On 2019/03/18 08:23, Landry Breuil wrote:
> > On Mon, Mar 18, 2019 at 12:09:01AM +0100, Charlene Wendling wrote:
> > >
> > > > http://build-failures.rhaalovely.net/powerpc/last/geo/qlandkartegt.log
> > > > http://build-failures.rhaalovely.net/sparc64/2019-02-03/geo/qlandkartegt.log
> > >
> > > So this one needs -std=c++11. Once provided there is the usual
> > > <cmath>/<math.h> fight later during the build. I tried to be
> > > conservative here, but anyway upstream moved to a remake of its
> > > own software called QMapShack.
> > >
> > > It builds fine on macppc [1] and amd64 [2]. I don't have the
> > > hardware to fully test it, but geotiff maps are fine.
> > >
> > > Any comment?
> > <snip>
> >
> > > +# fix error: #error Must have C++11 or newer.
> > > +# XXX this should be retried once moving to ports-gcc>=8
> >
> > removed :) retired isnt right either i think..
> > otherwise looks good.

In fact it's careful wording, i haven't tested with ports-gcc-8 ;)

> > Landry
> >
>
> 'reviewed' is probably the best word, but 'retried' is understandable
> and matches the wording in other ports.
>
> hopefully it won't stay there for long anyway :)
>

Sadly, the next fix i'm going to propose requires that as well.