From owner-freebsd-ports@FreeBSD.ORG Thu Aug 1 11:59:12 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E1CAB207 for ; Thu, 1 Aug 2013 11:59:12 +0000 (UTC) (envelope-from kpaasial@gmail.com) Received: from mail-qe0-x230.google.com (mail-qe0-x230.google.com [IPv6:2607:f8b0:400d:c02::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A34452D0F for ; Thu, 1 Aug 2013 11:59:12 +0000 (UTC) Received: by mail-qe0-f48.google.com with SMTP id 9so1034323qea.7 for ; Thu, 01 Aug 2013 04:59:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=klyEw233lqeM72uNqwMngQ+lIj4troJsVAH6pF/5IWc=; b=tEsL8Re1O/ZEZjuUp600/SH+E4oa2ZERe3xE91Zp3YH1+SAWAD+HY0OfQ5WV84N2kZ vbnal86AxftuGYwHdYGdCROALSmWKKm2Jn9e56A9mcEbyVjWVYvwJZNe5CkBBNRrGdlI Ua+by33t2WY1gdX/2liI/V3/jjUvJuqQf0sLv1vs6XQjw69pVOmB2N3uvfKchc4q7tMi EU5jjpYpI0qST4RiErFqsgoNo0vxfv0vG/saldHXXNkniQIx7wxkOSiIVJ0f9dIDqYzT QbEtU5qjH+d0nA5/pnKmA1+DfgJ/3ih8ErY9xzjQM5VLa4tWiNFEBQc7wv1iuTCTvyLS oHZg== MIME-Version: 1.0 X-Received: by 10.49.50.198 with SMTP id e6mr1427242qeo.76.1375358351791; Thu, 01 Aug 2013 04:59:11 -0700 (PDT) Received: by 10.224.78.194 with HTTP; Thu, 1 Aug 2013 04:59:11 -0700 (PDT) In-Reply-To: References: Date: Thu, 1 Aug 2013 14:59:11 +0300 Message-ID: Subject: Re: Idea for Mk/Uses snippet From: Kimmo Paasiala To: freebsd-ports@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 11:59:12 -0000 On Thu, Aug 1, 2013 at 2:03 PM, Kimmo Paasiala wrote: > There are quite a few ports that require system sources to be present > at /usr/src. > > Would it make sense to create Mk/Uses snippet (for example named as > Mk/Uses/system-sources) that checks for let's say /usr/src/Makefile > and throws an error if the file is not present? > > A port that requires the system sources to be present (for example > sysutils/lsof) could then just say: > > USES= ... system-sources .. > > What do you think? > > -Kimmo Something as simple as this: .if !defined(_INCLUDE_USES_SYSTEM_SOURCES_MK) _INCLUDE_USES_SYSTEM_SOURCES_MK= yes .if !exists(${SRC_BASE}/Makefile) IGNORE= This port requires the system sources installed at ${SRC_BASE} .endif .endif Is there still a need to check for kernel sources separately? I would imagine that everyone checks out the whole src tree now. -Kimmo