From owner-freebsd-ports@freebsd.org Sun Aug 14 06:46:53 2016 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34982BB9120 for ; Sun, 14 Aug 2016 06:46:53 +0000 (UTC) (envelope-from pi@opsec.eu) 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 245C11F91 for ; Sun, 14 Aug 2016 06:46:53 +0000 (UTC) (envelope-from pi@opsec.eu) Received: by mailman.ysv.freebsd.org (Postfix) id 1FEEFBB911F; Sun, 14 Aug 2016 06:46:53 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D4B9BB911E for ; Sun, 14 Aug 2016 06:46:53 +0000 (UTC) (envelope-from pi@opsec.eu) Received: from home.opsec.eu (home.opsec.eu [IPv6:2001:14f8:200::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C84251F90 for ; Sun, 14 Aug 2016 06:46:52 +0000 (UTC) (envelope-from pi@opsec.eu) Received: from pi by home.opsec.eu with local (Exim 4.87 (FreeBSD)) (envelope-from ) id 1bYpC4-0002ia-Qf; Sun, 14 Aug 2016 08:46:48 +0200 Date: Sun, 14 Aug 2016 08:46:48 +0200 From: Kurt Jaeger To: qjail1 Cc: "ports@FreeBSD.org" Subject: Re: requesting help with Variable OSREL in port Makefile Message-ID: <20160814064648.GI96200@home.opsec.eu> References: <57AF9F07.9020208@a1poweruser.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <57AF9F07.9020208@a1poweruser.com> X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Aug 2016 06:46:53 -0000 Hi! > >> .if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000 > >> IGNORE= builds only on 10 or greater than 10 > >> .endif > > > > That's OSVERSION. The OP asked about OSREL. > > > > (however, OSVERSION is more useful as one can test it numerically; it > > is documented in Chapter 16 of the Porter's Handbook, if the OP wants > > to know more) > > I read Chapter 16 of the Porter's Handbook before posting. It doesn't > say how you got to a "1000000" value for OSVERSION. Why so many zeros? We read os-versions like 10.3 or 2.2.1 or something. make does not support version comparisons like that. To allow comparisions, we need a way to map 10.3.x to some numeric value. To allow increments of sub-versions while the major version already progressed, 0's are added. Sometimes, the version has to increment to differentiate that the ABI or API changed. See for example 1000000 and 1000001, where the 1 notes the addition of the posix_fadvise(2) system call. > A 10.0 value is what I interpret to be the value for OSREL. Is that > correct? I think so, yes. > The IGNORE= keyword is confusing also. The port will build/install on > all versions. Its just that some things in 10.0 changed that caused the > port source to be modified to work on 10.0 and newer systems. It will > not work correctly on 9.3 and older systems. So I want the port/pkg to > check the host version and refuse to install if installing on 9.3 or > older systems. This has no impact on the auto building of pkgs. Then use BROKEN or IGNORE. > The Porter's Handbook section containing the OSREL Variable talks about > the placement of the OSREL Variable is critical and based on where > bsd.port.pre.mk statement is located in the Makefile. I don't have a > existing bsd.port.pre.mk statement in the Makefile. Do I need to add one? If you refer to OSREL, yes. It is defined in bsd.port.pre.mk. -- pi@opsec.eu +49 171 3101372 4 years to go !