Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Jan 2002 21:24:54 +0300
From:      Sergey Skvortsov <skv@protey.ru>
To:        Alan Eldridge <alane@geeksrus.net>
Cc:        ports@FreeBSD.ORG, portmgr@FreeBSD.ORG
Subject:   Re: patch for ports/Mk/bsd.port.mk
Message-ID:  <3C52F476.CA20E11E@protey.ru>
References:  <200201251504.g0PF4Re43715@freefall.freebsd.org> <20020125160633.GA70080@wwweasel.geeksrus.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Eldridge wrote:
> 
> >This patch is intended to:
> >
> >1. set default MAN3PREFIX for perl ports
> >2. set correct values for DOCSDIR, EXAMPLESDIR, DATADIR and so on.
> >   for example, there is a situation when port databases/ruby-interbase
> >   installs docs into /usr/local/share/doc/interbase - it is an obvious
> 
> PeteF and I were discussing this a bit.
> 
> >-DOCSDIR?=     ${PREFIX}/share/doc/${PORTNAME}
> >-EXAMPLESDIR?= ${PREFIX}/share/examples/${PORTNAME}
> >-DATADIR?=     ${PREFIX}/share/${PORTNAME}
> >+DOCSDIR?=     ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
> 
> How about:
>                 ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}
> 
> >+EXAMPLESDIR?= ${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME}
> 
> How about:
>                 ${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}


I think no.
${PKGNAMESUFFIX} is "Suffix to specify compilation options".
Imho DOCS, EXAMPLES, DATA can't be different for port which different only
in compilation options. But not sure for DATA.

> >+DATADIR?=     ${PREFIX}/share/${PKGNAMEPREFIX}${PORTNAME}
> 
> Are you *SURE* about this one? I'd hate to see things break because of
> hidden assumptions that packages have about this.

No, I don't sure and want to listen other opinions & suggestions.

Maybe current xxxDIRs are adequate for common cases and solution is next:
override these variables for some well-known prefixes (like p5-, ruby-, py-)?

Moreover, maybe best solution is
DATADIR?=     ${PREFIX}/share/${PORTNAME}${PKGNAMESUFFIX}
because its semantics?
I doubt whether it's a good idea :)

Too hard to decide :(
I am sure in the barest necessity of these changes only for p5- ports.

Other way - localize these changes to bsd.perl.mk or variables like PERL_(DOCS|EXAMPLES|DATA)DIR.
This way seems not elegant to me.

> If you are, then:
>                 ${PREFIX}/share/${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}
> 
> >+PLIST_DIRS=   DOCSDIR="${DOCSDIR}" \
> >+              EXAMPLESDIR="${EXAMPLESDIR}" \
> >+              DATADIR="${DATADIR}"
> >+PLIST_SUB+=   ${PLIST_DIRS:S,DIR="${LOCALBASE}/,DIR=",}
> 
> I think you meant:
>                 ${PLIST_DIRS:S,DIR="${PREFIX}/,DIR=",}
> We want to cut off whatever PREFIX we stuck on above, right?

Oh, yes, undoubtedly.

> N.B. When I checked (less than a month ago) there were 28 ports that
> suffered collateral damage from the DOCSDIR change. If we really want
> to do something like this, we need to find all the ports that it will
> break (just some fugly greps) and patch them at the same time.
> 
> Since this changes EXAMPLESDIR and (maybe) DATADIR, too, the number
> of affected ports will, of course, be higher.
> 
> I'd be happy to assist in the triage and repair. Tonight or tomorrow I'll
> make some lists of what will get broken by this, if you don't beat me to it.
> Basically, any Makefile that references those vars is suspect, and any
> pkg-plist which contains strings /examples/, /share/, or /doc/ is also
> suspect and needs to be evaluated.

You're absolutely right.

-- 
Sergey Skvortsov
mailto: skv@protey.ru

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C52F476.CA20E11E>