From owner-dev-commits-ports-main@freebsd.org Mon Jul 5 02:22:46 2021 Return-Path: Delivered-To: dev-commits-ports-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 89CAE651CED; Mon, 5 Jul 2021 02:22:46 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GJ8bp3ZRfz3JVm; Mon, 5 Jul 2021 02:22:46 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1625451766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Tz1NBG3CbC2IqRI5b+XCtqGPUd4QSisjvv17HE3POn0=; b=volK+Ud+GotxfFTEBQaqNygRk7nvXopme2aJ+IX9744jDKTpZytmqlxuT1aqSL27MMeExm 53NRMriwmwODfwMcLt/J+v8nUCeWkV69wD336q8KmI52QQTCIhIZtS+7g8U+iakufhJC2d 3CkxtZUfRQuileU0BoCi6wNC5n+VL1wr5ArdDmKJTW0B9vXG4CCj/md3Xhp2hJQR+cO60l Oi+L6gmtgg3UA3FC2ba5S9iAqFJurSaiQpSp5N+X5IZMvJ9pvOYyySfZr6e6+85SdlTv8/ xdMp7up1F5dRA5GY8Zl1M98Kfjgqv1R0PDi0wCWDGr8LXNkfEotxaWqGrl1f8A== Received: by freefall.freebsd.org (Postfix, from userid 1033) id 670EB18493; Mon, 5 Jul 2021 02:22:46 +0000 (UTC) Date: Mon, 5 Jul 2021 02:22:46 +0000 From: Alexey Dokuchaev To: "Tobias C. Berner" 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: References: <202107042022.164KMF2R002159@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202107042022.164KMF2R002159@gitrepo.freebsd.org> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1625451766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Tz1NBG3CbC2IqRI5b+XCtqGPUd4QSisjvv17HE3POn0=; b=T/6ab6nhOpypQWHTQkbsT6O12ZHK7hd8AunxiSfqgpZ5eS566ue8DUvw9iKmg3njjAdO/C AN0M63aMsBVTIuBChpSaxUreA3lf6bdIVDyjuFVDFfjmqCbooAICdHjIU9GKFGFnyXmOFH wbSDzkVBSjnPIrpyPJdgVpay8pmdGDXlJeLy8Cuw4J+vViIV9U+ZU0G9VijmBJh4kNaaHf I3ZWUAdZzseS+f+/Z8PPlRM/A1L8yWYe1ZvBH+BuH4Sa1vRuWgzpjuKjgE4MVRaJpKAo2S 2ep4eBQLHh+EFoWhqg70AJn35Y3x/POOxBk2HhXifknkYRa824ajjHiCqRelFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1625451766; a=rsa-sha256; cv=none; b=eYm40ck7dPsoQ/6chEWtdKhedBg82nx5kSK9sRIDsmM6g0xbNrQJLYdNr4RPZAGMSEe/ua fazsqTGp8UHNMx4Tm2Z5dQZu2VHbPaQBXgPmgyx3BvnDAGSCdUwKC6pzUBakDtPb4NPkdH /XaEDaQts+/5Jryoe5795O3Mahiv8m1jnwCxrzBM80m30PaeWtNOjBRGgP1KCMebk6tSOZ Bai/8T20eLA+2tw3mdmFLdYs3AdLVLqHmnzdrNVDsNd4w2lFWCIRSmKJyScJRuU2gUlRhw 9y+soOhwQbF7n/cMSwYmJDAJ24+DRhbZMDVbob4vzfv8vRweH5mrOWdhfuYRog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: dev-commits-ports-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the main branch of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2021 02:22:46 -0000 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(nodes.begin(), nodes.end()); Interesting... Is this the bug in Clang or Inkscape? > ++#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(). ./danfe