From owner-freebsd-ports@freebsd.org Wed Jan 17 18:49:20 2018 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 64B47EA64E7 for ; Wed, 17 Jan 2018 18:49:20 +0000 (UTC) (envelope-from adamw@adamw.org) Received: from apnoea.adamw.org (apnoea.adamw.org [104.225.5.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "apnoea.adamw.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B50A97C79E for ; Wed, 17 Jan 2018 18:49:19 +0000 (UTC) (envelope-from adamw@adamw.org) Received: by apnoea.adamw.org (OpenSMTPD) with ESMTPSA id b65da6bd TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Wed, 17 Jan 2018 11:49:15 -0700 (MST) Content-Type: text/plain; charset=utf-8; delsp=yes; format=flowed Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: Re: Help with versioning scheme From: Adam Weinberger In-Reply-To: <638AE69B-CB7C-41E1-9CA8-D0B9E2A6BC32@waschbuesch.de> Date: Wed, 17 Jan 2018 11:49:13 -0700 Cc: Freddie Cash , freebsd-ports Content-Transfer-Encoding: 8bit Message-Id: <2332F791-ACC9-4407-99AF-C184CB1BC55E@adamw.org> References: <638AE69B-CB7C-41E1-9CA8-D0B9E2A6BC32@waschbuesch.de> To: =?utf-8?Q?Martin_Waschb=C3=BCsch?= X-Mailer: Apple Mail (2.3445.5.20) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jan 2018 18:49:20 -0000 > On 17 Jan, 2018, at 11:40, Martin Waschbüsch wrote: > > Thanks, Freddie, >> Am 17.01.2018 um 19:35 schrieb Freddie Cash : >> >> On Wed, Jan 17, 2018 at 10:29 AM, Martin Waschbüsch >> > wrote: >> Hi Adam, >>> Am 17.01.2018 um 19:19 schrieb Adam Weinberger >> >: >>> Hi Martin, >>> >>> You don't want to use the upstream version to represent PORTREVISION. >>> PORTREVISION is for when you need to force rebuilds of the port itself, >>> and so tying it to upstream would make it impossible to bump it >>> ourselves. >>> >>> Why do you need to ignore the fourth digit? It's perfectly valid for >>> our purposes. >> >> So far, I had (because it coincided with their version number) used it >> to provide SO_VER. But that breaks now: >> >> --- >> # Created by: adamw >> # $FreeBSD: head/archivers/liblz4/Makefile 448415 2017-08-20 12:30:25Z >> sunpoet $ >> >> PORTNAME= lz4 >> PORTVERSION= 1.8.1 >> DISTVERSIONPREFIX= v >> PORTEPOCH= 1 >> CATEGORIES= archivers >> PKGNAMEPREFIX= lib >> >> MAINTAINER= martin@waschbuesch.de >> COMMENT= LZ4 compression library, lossless and very fast >> >> LICENSE= BSD2CLAUSE GPLv2 >> LICENSE_COMB= multi >> >> USES= gmake pathfix pkgconfig >> USE_GITHUB= yes >> USE_LDCONFIG= yes >> #PATHFIX_MAKEFILEIN= Makefile >> >> ALL_TARGET= default # don't remove this >> SO_VER= ${PORTVERSION} >> PLIST_SUB+= SO_VER=${SO_VER} SO_VER_MAJ=${SO_VER:R:R} >> >> ​Why can't you do something like the above to get SO_VER? >> >> PORTVERSION=1.8.1.2 >> SO_VER=${PORTVERSION:R:R:R) >> >> Similar to how you get SO_VER_MAJ out of SO_VER.​ > > That is true. Do you think this is a robust solution, though? > Or is the whole relying on upstream variables idea problematic? In general, I recommend against doing clever things. It's too easy to outsmart yourself. It's not terribly difficult to edit the plist and increase a number. I recommend clear over clever every time. # Adam -- Adam Weinberger adamw@adamw.org http://www.adamw.org