Skip to content
Permalink
Browse files

ipe: Enforce a c++14 capable compiler, add patch to fix missing cstdl…

…ib include issue
  • Loading branch information
cjones051073 committed Apr 17, 2019
1 parent 32b4994 commit 5a492077ab90915e28fdf7f0bf7e44cc87099e7d
Showing with 27 additions and 5 deletions.
  1. +16 −5 graphics/ipe/Portfile
  2. +11 −0 graphics/ipe/files/fix-missing-cstdlib.patch
@@ -1,10 +1,12 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem 1.0
PortGroup cxx11 1.1
PortSystem 1.0
PortGroup cxx11 1.1
PortGroup compiler_blacklist_versions 1.0

name ipe
version 7.2.11
revision 1
set branch [join [lrange [split ${version} .] 0 1] .]
categories graphics
maintainers {gmail.com:m7.thon @m7thon} openmaintainer
@@ -22,9 +24,9 @@ master_sites https://dl.bintray.com/otfried/generic/ipe/${branch}
distname ${name}-${version}-src
worksrcdir ${name}-${version}/src

checksums rmd160 eaa2b9fc1a923a78b14e1c1c27f8ffc139febe0e \
sha256 a22dcae9cb660f466678a6b568e9fed1b12a3830e49465594d65fc789b0ba725 \
size 1950071
checksums rmd160 eaa2b9fc1a923a78b14e1c1c27f8ffc139febe0e \
sha256 a22dcae9cb660f466678a6b568e9fed1b12a3830e49465594d65fc789b0ba725 \
size 1950071

depends_build-append port:pkgconfig

@@ -37,6 +39,15 @@ depends_lib-append port:freetype \
use_configure no
universal_variant no

patch.pre_args -p1

# needs a c++14 compatible compiler
compiler.blacklist-append {clang < 602}

This comment has been minimized.

Copy link
@ra1nb0w

ra1nb0w Apr 17, 2019

Contributor

I also need c++14 for mu. what do you think to create a new portgroup like cxx11?

This comment has been minimized.

Copy link
@cjones051073

cjones051073 Apr 17, 2019

Author Contributor

I think someone is(was) working on a more general new portgroup, that would handle things like this. It is something we need, rather than ports individually blacklisting compilers to achieve the same. I suggst you bring this up on the devel mailing list, to see where things current stand.

This comment has been minimized.

Copy link
@ra1nb0w

ra1nb0w Apr 18, 2019

Contributor

ok.I search on trac/-dev. Anyway, a general approach can be like this

PortGroup          cxx 1.0
...
cxx.version        14
....

This comment has been minimized.

Copy link
@cjones051073

cjones051073 Apr 18, 2019

Author Contributor

That would be a good approach, if we were starting from scratch now and the cxx11 portgrpup did not exist. However, as it does, and as it is used in a lot of places changing this to a different named PG would be a pain, as it implies touching a huge lot of ports. For that reason I would suggest a slight alternative apporach, which is to leave cxx11 as it is, and add cxx14 and cxx17 PGs, that internally just use cxx11, but set the tighter compiler selections as appropriate. Basically, what ports are doing now, just in a centralised place.

This comment has been minimized.

Copy link
@ra1nb0w

ra1nb0w Apr 18, 2019

Contributor

To improve your reasoning, we could think on creating a more generalised one, like cxx, and create cxx11 cxx14 and cxx17 as "variant". this is more neat and clear in the long term. I searched on trac but I didn't find anything cxx related; can you search on -dev history because I have only the last three weeks? thanks

This comment has been minimized.

Copy link
@cjones051073

cjones051073 Apr 18, 2019

Author Contributor

I don't think PGs can have 'variants'. Might be wrong, but I suspect the easiest approach is exactly what I describe. In fact, I am playing with something just now that does exactly this. In any case, as long as this is not seen by the ports, this is an 'internal implementation detail' and can be changed later on.

I don't have a history of dev messages to search. you can find the web archives from the links at

https://trac.macports.org/wiki/MailingLists

This comment has been minimized.

This comment has been minimized.

Copy link
@cjones051073

cjones051073 Apr 18, 2019

Author Contributor

Now I remember...

Unfortunately, whilst that is now merged into master, its not in a released version of base, which is why no ports yet can use compiler.cxx_standard....

This comment has been minimized.

Copy link
@ra1nb0w

ra1nb0w Apr 18, 2019

Contributor

ok, so we need only to wait a macports-base release ;-) and then use that directive. thank you
ps. now I follow your discussion on -dev.


# Fix missing cstdlib include
# https://github.com/otfried/ipe-issues/issues/240
patchfiles fix-missing-cstdlib.patch

variant qt4 conflicts qt5 description {Build using Qt4 based gui} {
PortGroup qt4 1.0
build.args-append QT_CFLAGS="`pkg-config --cflags QtGui QtCore`" \
@@ -0,0 +1,11 @@
--- src/ipelua/ipeluaipelet.cpp.orig 2019-04-17 11:57:38.000000000 +0100
+++ src/ipelua/ipeluaipelet.cpp 2019-04-17 11:58:24.000000000 +0100
@@ -36,6 +36,8 @@
#include <dlfcn.h>
#endif

+#include <cstdlib>
+
using namespace ipe;
using namespace ipelua;

0 comments on commit 5a49207

Please sign in to comment.
You can’t perform that action at this time.