On Wed, Jan 17, 2018 at 10:40 AM, Martin Waschbüsch <[email protected]> wrote:
> Thanks, Freddie, > > Am 17.01.2018 um 19:35 schrieb Freddie Cash <[email protected]>: > > On Wed, Jan 17, 2018 at 10:29 AM, Martin Waschbüsch <[email protected] > > wrote: > >> Hi Adam, >> > Am 17.01.2018 um 19:19 schrieb Adam Weinberger <[email protected]>: >> > 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= [email protected] >> 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? > So long as they continue to have 4 digit version numbers (meaning 1.9.0.0 and not just 1.9), then everything will be fine. If upstream does weird things with their version numbers (1.8.1.2 --> 1.8.2 --> 1.9 --> 2 --> 2.1 --> 2.1.1 --> 2.1.1.1), then you'll have to manually massage things in the port Makefile with each update. Hopefully, they don't do that, and keep things logical (1.8.1.2 --> 1.8.2.0 --> 1.9.0.0 --> 2.0.0.0 --> 2.1.0.0 --> 2.1.1.0 --> 2.1.1.1) which would make things simpler on your end. :) -- Freddie Cash [email protected] _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "[email protected]"
