From owner-freebsd-ports@freebsd.org Sun Jun 9 15:48:31 2019 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E703715CA309 for ; Sun, 9 Jun 2019 15:48:30 +0000 (UTC) (envelope-from adamw@adamw.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 2227D7480F for ; Sun, 9 Jun 2019 15:48:30 +0000 (UTC) (envelope-from adamw@adamw.org) Received: by mailman.ysv.freebsd.org (Postfix) id D4E2C15CA308; Sun, 9 Jun 2019 15:48:29 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AEBDD15CA307 for ; Sun, 9 Jun 2019 15:48:29 +0000 (UTC) (envelope-from adamw@adamw.org) Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 11A167480E for ; Sun, 9 Jun 2019 15:48:28 +0000 (UTC) (envelope-from adamw@adamw.org) Received: by mail-wr1-x429.google.com with SMTP id f9so6677090wre.12 for ; Sun, 09 Jun 2019 08:48:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adamw-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=k0B3JHMV8KNIOTSsXi9Q7kkb/Hgf2DDq93Mpdmy0ZRw=; b=PXSHufEHmWJk4P/ToD75xnTztEFZrm6WoRijokXNZMNa+249GRa5g6vgjv9zxQQc8S v1qfMJovKn58d+jSvYsGwEXU78T/RB64TEnmUR13pIL7U/2TOnE8gXA0NxQN46kkAKE6 D1J60R/Wk8G8yPQp8k5MBf/0BXVyUPpH2fD1M+sbKOlP5Z0ZEsTBIKaGvm+PGY1FMy57 QpxcbkMktxI9lBW1qO4tQpZ3dnEWkAisYh2Pevly6LCyXWz1FPDxXRkvqGQ43XdJbsRs fdwwVopRDyofa3KY+Lwyhiu0fZ8eJyZ5map7BlPDJQEF1Zd+iNvRN6Bd2Q1HD7C6OiIq K5EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=k0B3JHMV8KNIOTSsXi9Q7kkb/Hgf2DDq93Mpdmy0ZRw=; b=sDbMBYYjBj4V1NCfMekk2q5ar3DMFAUViIWwnKj49NdjlAi+oI4U13prTK3uHZdTn2 BCXzR41jcXRadzLKrN+9fYL6xSIBp6wyBjwUsn0up4r1f8xxmRXEZkDXAcn5hKDDmB1b BmflDGON3FGvJ/cMw26yp1ohMMXZnsLwHYfVO1lzcXTqmFXn1sqZy58Wm5O6QFzBwh0t NIiQ8FQIa9Hinq+RWY8BxYSRzJZwVKiob2Xgrpne1Wn9DLEFl0YWlsZWd0ovAXlkAkH3 OGvdw6CkraInLuRXxHvSFGyMkOxZ782pAkOOjYOjjE5f2VM5BwbCLJYk6vTU87Uaklm9 +lPQ== X-Gm-Message-State: APjAAAXIs7gKj5+WsZyOEu/fZcGcbh/9mW6PeBtMgpT/nGk3lX2F7vPK A5J/u/ytOx2RvCL/q+0gpYvHgIjqLCt8rQhQAB89cdRxEm0= X-Google-Smtp-Source: APXvYqxsszRpDZjYW5Fcg9PKaufbO9CtJYtvx51AGcSRKUnrhkDNv2Lsm6S8ooNqxHuNTtF5oFrDuE9P5Js9/COJvXY= X-Received: by 2002:adf:eb0f:: with SMTP id s15mr32072290wrn.147.1560095306047; Sun, 09 Jun 2019 08:48:26 -0700 (PDT) MIME-Version: 1.0 References: <736af897-818e-68cd-c354-f295d03fb176@bluerosetech.com> In-Reply-To: <736af897-818e-68cd-c354-f295d03fb176@bluerosetech.com> From: Adam Weinberger Date: Sun, 9 Jun 2019 09:48:10 -0600 Message-ID: Subject: Re: How to best check a configuration of another port/package? To: Mel Pilgrim Cc: Gerald Pfeifer , FreeBSD Ports Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 11A167480E X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-7.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2019 15:48:31 -0000 On Sat, Jun 8, 2019 at 11:00 PM Mel Pilgrim wrote: > > On 2019-06-08 9:57, Adam Weinberger wrote: > > On Sat, Jun 8, 2019 at 10:02 AM Gerald Pfeifer wrote: > >> > >> In https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237688 we had > >> a user report against lang/gcc* ports that could be traced back to > >> a certain functionality (option) in another port (devel/binutils) > >> missing. > >> > >> In pseudo-code this could be addressed as follows in lang/gcc* > >> > >> .if $(binutils built statically) > >> IGNORE= GCC requires dynamically linked binutils > >> .endif > >> > >> Now the question is: How to implement something like this practically? > > > > What you have there won't work, because `make index` won't work, plus > > Makefiles shouldn't be doing external calls if they don't have to. > > You'll also have a problem whereby LOCALBASE isn't defined yet, and I > > don't believe that IGNORE after bsd.port.pre.mk will work (I could be > > wrong about that). > > > > You have two options: > > 1) Turn it into a pre-configure, which is slightly ugly for the > > end-user but still gets the job done > > pre-configure: > > if some file in binutils is static; then echo "NOPE"; exit 1; fi > > > > 2) (The correct way to do it) Create a binutils-static slave port, > > remove the static option from binutils proper, and depend specifically > > on the non-static port. > > Why is a slave port the correct option here instead of flavouring binutils? No, you're absolutely right. Flavours is the right way to do it now. I keep forgetting about them, because I don't in any way understand how to use them. # Adam -- Adam Weinberger adamw@adamw.org https://www.adamw.org