Skip to content
Permalink
Browse files

aria2: non-gnutls variants need C++14

  • Loading branch information
Schamschula committed Jun 30, 2019
1 parent b120a68 commit ce9cf2d12d0012144c6bf57e5b758508acec4de0
Showing with 32 additions and 0 deletions.
  1. +8 −0 net/aria2/Portfile
  2. +24 −0 net/aria2/files/patch-src-bignum.h.diff
@@ -41,6 +41,14 @@ configure.args --with-libiconv-prefix=${prefix} \
--without-libcares \
--without-sqlite3

if {![variant_isset gnutls]} {
# C++14
configure.cxxflags-append -std=c++14
compiler.blacklist-append {clang < 800.0.38}

This comment has been minimized.

Copy link
@ryandesign

ryandesign Jul 1, 2019

Contributor

In other ports, we achieve C++14 compatibility by blacklisting clang < 602. Is blacklisting clang < 800.0.38 necessary for a different reason?

This comment has been minimized.

Copy link
@Schamschula

Schamschula Jul 1, 2019

Author Contributor

I searched for another port with the same C++14 requirement, found poppler and used its blacklist.


patchfiles-append patch-src-bignum.h.diff
}

variant cares description {Add c-ares support} {
configure.args-replace --without-libcares --with-libcares
depends_lib-append port:c-ares
@@ -0,0 +1,24 @@
--- src/bignum.h.orig 2018-05-15 07:33:25.000000000 -0500
+++ src/bignum.h 2019-06-30 18:25:59.000000000 -0500
@@ -31,17 +31,17 @@
std::unique_ptr<char_t[]> buf_;

public:
- inline ulong() : buf_(make_unique<char_t[]>(dim)) {}
- inline ulong(size_t t) : buf_(make_unique<char_t[]>(dim))
+ inline ulong() : buf_(std::make_unique<char_t[]>(dim)) {}
+ inline ulong(size_t t) : buf_(std::make_unique<char_t[]>(dim))
{
memcpy(buf_.get(), (char_t*)&t, sizeof(t));
}
- inline ulong(const ulong<dim>& rhs) : buf_(make_unique<char_t[]>(dim))
+ inline ulong(const ulong<dim>& rhs) : buf_(std::make_unique<char_t[]>(dim))
{
memcpy(buf_.get(), rhs.buf_.get(), dim);
}
explicit inline ulong(const char_t* data, size_t size)
- : buf_(make_unique<char_t[]>(dim))
+ : buf_(std::make_unique<char_t[]>(dim))
{
if (size > dim) {
throw std::bad_alloc();

0 comments on commit ce9cf2d

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