[ports-gcc] Unbreak graphics/pstoedit

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

[ports-gcc] Unbreak graphics/pstoedit

Charlene Wendling
Hi ports, Steven,

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

It requires -std=c++11 once again, it builds fine on macppc after it's
provided [1]. While here i've fixed a spacing inconsistency in COMPILER.

I didn't bump REVISION, since pstoedit-3.73 has never been built on
ports-gcc archs.

Any comment?

Charlène.

[1] http://0x0.st/z8SZ.txt

Index: Makefile
===================================================================
RCS file: /cvs/ports/graphics/pstoedit/Makefile,v
retrieving revision 1.27
diff -u -p -u -p -r1.27 Makefile
--- Makefile 5 Jan 2019 10:08:33 -0000 1.27
+++ Makefile 18 Mar 2019 13:36:47 -0000
@@ -26,9 +26,15 @@ CONFIGURE_ARGS= --without-libplot \
  --without-magick
 WANTLIB= c ${COMPILER_LIBCXX} m
 
-COMPILER = base-clang ports-gcc base-gcc
+# c++11
+COMPILER = base-clang ports-gcc base-gcc
 
 post-install:
  ${INSTALL_MAN} ${WRKSRC}/doc/pstoedit.1 ${PREFIX}/man/man1
 
 .include <bsd.port.mk>
+
+# XXX this should be retried once moving to ports-gcc>=8
+.if ${CHOSEN_COMPILER} == "ports-gcc"
+CONFIGURE_ENV +=     CXXFLAGS="${CXXFLAGS} -std=c++11"
+.endif

Reply | Threaded
Open this post in threaded view
|

Re: [ports-gcc] Unbreak graphics/pstoedit

Steven Mestdagh-3
Charlene Wendling [2019-03-18, 14:57:23]:

> Hi ports, Steven,
>
> > http://build-failures.rhaalovely.net/sparc64/2019-02-03/graphics/pstoedit.log
> > http://build-failures.rhaalovely.net/powerpc/last/graphics/pstoedit.log
>
> It requires -std=c++11 once again, it builds fine on macppc after it's
> provided [1]. While here i've fixed a spacing inconsistency in COMPILER.
>
> I didn't bump REVISION, since pstoedit-3.73 has never been built on
> ports-gcc archs.
>
> Any comment?
>
> Charlène.
>
> [1] http://0x0.st/z8SZ.txt
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/graphics/pstoedit/Makefile,v
> retrieving revision 1.27
> diff -u -p -u -p -r1.27 Makefile
> --- Makefile 5 Jan 2019 10:08:33 -0000 1.27
> +++ Makefile 18 Mar 2019 13:36:47 -0000
> @@ -26,9 +26,15 @@ CONFIGURE_ARGS= --without-libplot \
>   --without-magick
>  WANTLIB= c ${COMPILER_LIBCXX} m
>  
> -COMPILER = base-clang ports-gcc base-gcc
> +# c++11
> +COMPILER = base-clang ports-gcc base-gcc
>  
>  post-install:
>   ${INSTALL_MAN} ${WRKSRC}/doc/pstoedit.1 ${PREFIX}/man/man1
>  
>  .include <bsd.port.mk>
> +
> +# XXX this should be retried once moving to ports-gcc>=8
> +.if ${CHOSEN_COMPILER} == "ports-gcc"
> +CONFIGURE_ENV +=     CXXFLAGS="${CXXFLAGS} -std=c++11"
> +.endif

sure, but -std=c++11 is also supported by clang, we could always apply it?

Reply | Threaded
Open this post in threaded view
|

Re: [ports-gcc] Unbreak graphics/pstoedit

Charlene Wendling
Hi,

On Tue, 19 Mar 2019 00:24:08 +0100
Steven Mestdagh <[hidden email]> wrote:

> Charlene Wendling [2019-03-18, 14:57:23]:
> > Hi ports, Steven,
> >
> > > http://build-failures.rhaalovely.net/sparc64/2019-02-03/graphics/pstoedit.log
> > > http://build-failures.rhaalovely.net/powerpc/last/graphics/pstoedit.log
> >
> > It requires -std=c++11 once again, it builds fine on macppc after
> > it's provided [1]. While here i've fixed a spacing inconsistency in
> > COMPILER.
> >
> > I didn't bump REVISION, since pstoedit-3.73 has never been built on
> > ports-gcc archs.
> >
> > Any comment?
> >
> > Charlène.
> >
> > [1] http://0x0.st/z8SZ.txt
> >

> sure, but -std=c++11 is also supported by clang, we could always
> apply it?
>

If you're fine with this, so am i :) I've quickly grep'd the source
code and it seems there is no c++14/17 feature that change could
disable.

Just to be sure, i've retested the build on macppc [1] and amd64 [2],
without any issues.

OK?

Charlène.

[1] http://0x0.st/z8pi.txt
[2] http://0x0.st/z8p-.txt


Index: Makefile
===================================================================
RCS file: /cvs/ports/graphics/pstoedit/Makefile,v
retrieving revision 1.27
diff -u -p -u -p -r1.27 Makefile
--- Makefile 5 Jan 2019 10:08:33 -0000 1.27
+++ Makefile 19 Mar 2019 09:33:40 -0000
@@ -5,6 +5,7 @@ COMMENT= translate PostScript/PDF graphi
 DISTNAME= pstoedit-3.73
 SHARED_LIBS= pstoedit 3.0
 CATEGORIES= graphics
+REVISION= 0
 
 HOMEPAGE= http://www.pstoedit.net/
 
@@ -26,7 +27,11 @@ CONFIGURE_ARGS= --without-libplot \
  --without-magick
 WANTLIB= c ${COMPILER_LIBCXX} m
 
-COMPILER = base-clang ports-gcc base-gcc
+# c++11
+COMPILER = base-clang ports-gcc base-gcc
+
+# This should be reviewed once moving to ports-gcc>=8
+CXXFLAGS += -std=c++11
 
 post-install:
  ${INSTALL_MAN} ${WRKSRC}/doc/pstoedit.1 ${PREFIX}/man/man1

Reply | Threaded
Open this post in threaded view
|

Re: [ports-gcc] Unbreak graphics/pstoedit

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

> Charlene Wendling [2019-03-18, 14:57:23]:
>> Hi ports, Steven,
>>
>> > http://build-failures.rhaalovely.net/sparc64/2019-02-03/graphics/pstoedit.log
>> > http://build-failures.rhaalovely.net/powerpc/last/graphics/pstoedit.log
>>
>> It requires -std=c++11 once again, it builds fine on macppc after it's
>> provided [1]. While here i've fixed a spacing inconsistency in COMPILER.
>>
>> I didn't bump REVISION, since pstoedit-3.73 has never been built on
>> ports-gcc archs.
>>
>> Any comment?
>>
>> Charlène.
>>
>> [1] http://0x0.st/z8SZ.txt
>>
>> Index: Makefile
>> ===================================================================
>> RCS file: /cvs/ports/graphics/pstoedit/Makefile,v
>> retrieving revision 1.27
>> diff -u -p -u -p -r1.27 Makefile
>> --- Makefile 5 Jan 2019 10:08:33 -0000 1.27
>> +++ Makefile 18 Mar 2019 13:36:47 -0000
>> @@ -26,9 +26,15 @@ CONFIGURE_ARGS= --without-libplot \
>>   --without-magick
>>  WANTLIB= c ${COMPILER_LIBCXX} m
>>  
>> -COMPILER = base-clang ports-gcc base-gcc
>> +# c++11
>> +COMPILER = base-clang ports-gcc base-gcc
>>  
>>  post-install:
>>   ${INSTALL_MAN} ${WRKSRC}/doc/pstoedit.1 ${PREFIX}/man/man1
>>  
>>  .include <bsd.port.mk>
>> +
>> +# XXX this should be retried once moving to ports-gcc>=8

I guess we could add a guard for this kind of workaround, as in:

   && ${MODGCC4_VERSION} == "4.9"

But this should probably be done for the whole tree, in one sweep, after
testing with gcc8.

>> +.if ${CHOSEN_COMPILER} == "ports-gcc"
>> +CONFIGURE_ENV +=     CXXFLAGS="${CXXFLAGS} -std=c++11"
>> +.endif

I would suggest -std=gnu++11 here, if only because -std=gnu... is what
gcc and clang default to.  But I must admit that I don't know what it
actually changes in C++ land.

But I see that you have already used -std=c++11 in other parts of the
tree, maybe it's not a problem in practice?

Anyway, ok jca@

> sure, but -std=c++11 is also supported by clang, we could always apply it?

clang defaults to -std=gnu++14 so this would change the defaults on
clang archs, possibly warranting a REVISION bump.

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