Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Jul 2021 06:27:36 +0200
From:      "Tobias C. Berner" <tcberner@gmail.com>
To:        Alexey Dokuchaev <danfe@freebsd.org>
Cc:        ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org
Subject:   Re: git: bc02049bf8bb - main - graphics/inkscape: update to 1.1
Message-ID:  <2627985.TYJnH3iKXO@angua.firefly>
In-Reply-To: <YOJs9v8mjWkxEayc@FreeBSD.org>
References:  <202107042022.164KMF2R002159@gitrepo.freebsd.org> <YOJs9v8mjWkxEayc@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart7719469.iDzAj6rjnq
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"; protected-headers="v1"
From: "Tobias C. Berner" <tcberner@gmail.com>
To: Alexey Dokuchaev <danfe@freebsd.org>
Cc: ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org
Subject: Re: git: bc02049bf8bb - main - graphics/inkscape: update to 1.1
Date: Mon, 05 Jul 2021 06:27:36 +0200
Message-ID: <2627985.TYJnH3iKXO@angua.firefly>
In-Reply-To: <YOJs9v8mjWkxEayc@FreeBSD.org>
References: <202107042022.164KMF2R002159@gitrepo.freebsd.org> <YOJs9v8mjWkxEayc@FreeBSD.org>

Moin moin


Am Montag, 5. Juli 2021, 04:22:46 CEST schrieb Alexey Dokuchaev:
> On Sun, Jul 04, 2021 at 08:22:15PM +0000, Tobias C. Berner wrote:
> > commit bc02049bf8bbba23d78ca07d75c02d7940b98995
> > 
> >     graphics/inkscape: update to 1.1
> > 
> > ...
> > +-#ifdef __APPLE__
> > ++#if defined(__APPLE__) || defined(__FreeBSD__)
> > +     // workaround for
> > +     //
> > static_assert(__is_cpp17_forward_iterator<_ForwardIterator>::value
> > +     auto const n = std::vector<Inkscape::XML::Node *>(nodes.begin(),
> > nodes.end());
> Interesting...  Is this the bug in Clang or Inkscape?
>From what I gather, it seems like it was a way to follow the standard in clang 
[1] .

> 
> > ++#elif defined(__FreeBSD__)
> > ++       int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
> > ++       char buf[MAXPATHLEN];
> > ++       size_t cb = sizeof(buf);
> > ++       if (sysctl(mib, 4, buf, &cb, NULL, 0) == 0) {
> > ++           program_name = realpath(buf, nullptr);
> 
> I've recently had to patch one program in a similar way, and it looks
> like returned path is already normalized on FreeBSD, so you don't have
> to call realpath(), contrary to Linux' /proc/self/exe.  If the buffer
> is expected to be free()able, s/char buf[...]/char *buf = malloc(...)/
> and change the condition to ``if (!buf || sysctl(...) == -1)'' as they
> both would set errno and thus could be handled in one if().
Indeed, a quick (probably not complete) test agrees with realpath being 
unnecessary. I added it to match the NetBSD implementation of the 
same [2]. 


> 
> ./danfe

mfg Tobias

[1] https://stackoverflow.com/questions/57596150/why-does-clang-not-like-boosttransform-iterator
[2] https://gitlab.com/inkscape/inkscape/-/commit/
ca31162e74eab75e02a6441a2caf33c56d0f8183
--nextPart7719469.iDzAj6rjnq
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.
Content-Transfer-Encoding: 7Bit

-----BEGIN PGP SIGNATURE-----

iQGTBAABCgB9FiEEulg44mHRo8gJYMULAh23OlApOtAFAmDiijhfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEJB
NTgzOEUyNjFEMUEzQzgwOTYwQzUwQjAyMURCNzNBNTAyOTNBRDAACgkQAh23OlAp
OtBIBAf/XXl2XTe97feKYziADIcy9ugXpLk/M8FIgNZs+g+gwSGBuvNjPaRUmJD2
vJdTqtRQbvd9pjaSDXWtNmIpv68BKQETEsh+CXYVXrUgU0vRWyqdmnjVpUhlDUc9
W7JMne0tGII8AYdXMMtfq1JHvMjZPk+tyOLWh0o8000ti3niqL1Ojqau2lfUiQ5T
NPKWCrSlihxPmrxu4GsOLvSVO2L76fVtU1sSM9PXpeeFvTPVYesazXNfglsrfjwR
uYPKHHQj/WsDkbxfScCPbTME83EEDrVN2XCzB2b/mxiQBaY882qF6RKf7RnbWtXA
al9EMPAuWnGAfV5zfvNhX0AtGF299w==
=M/cf
-----END PGP SIGNATURE-----

--nextPart7719469.iDzAj6rjnq--






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2627985.TYJnH3iKXO>