Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Nov 2002 16:15:38 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
To:        freebsd-ports@FreeBSD.org
Subject:   Package Names and dependencies
Message-ID:  <Pine.BSF.4.44.0211061523000.32930-100000@e0-0.zab2.int.zabbadoz.net>

next in thread | raw e-mail | index | archive | help
Hi,

having read ch 18 (and others of course ;) of porter's handbook I
do have following problem:


say a port 'base' is compiled per default with lib-default. Via a
define it can also be compiled with lib-alternate.

Either one could have:

	a) one port/(2) packages(same name 'base' for both) linked
		either against lib-default or lib-alternate

	b) one port linked against lib-default and another port
		p.ex. called base-alternate (set PKGNAMESUFFIX)
		including base/Makefile and setting define for
		alternate build. Thus have 2 ports with two names,
		and one Makefile to maintain.
		Installing both will mean having conflicts.

	c) have one port per default linked against lib-default and
		if defined to link against lib-alternate also set
		PKGNAMESUFFIX.
		thus having one port and two package names.
		results in two packages that can be installed both
		together -> conflicts too.


Now you may say the answer may be well known ?

Getting complex now:

So let's say we do have another port called 'dep'. This port should
depend on port 'base' and also needs to be linked against lib-default
or lib-alternate depending on what port 'base' was linked against -
if package 'base' is found.
Else - if package 'base' not found - have a define and also build port
'base' with that define (or default if no define given).
If define given and port 'base' found and either uses one and the other
wants to use the other we could either error out or force to use the
value obtained from already installed port 'base'.


Now we can have:

	1. chosen a) above:
		a shell script mainly using ldconfig, pkg_info and sed
		to gather the information against which lib port
		'base' was linked against. We will also depend on the
		same port 'base'. Our name will always be the same
		('dep') too.

	2. chosen b) above:
		check for base-alternate package: if installed build
		dep-alternate.
		if not found check for base package: if installed
		build dep.
		if not found check for define or build both as
		default.

	3. chosen c) above:
		see 2.


Or:
	two complete parallel hierachies on for default one for
	-alternate. Best always with one Makefile to maintain and the
	-alternate will include thi one, set define and PKGNAMESUFFIX.
	This will mean #ports * 2 where we do have these problems.



So what would be the "best" solution ?


-- 
Bjoern A. Zeeb				bzeeb at Zabbadoz dot NeT
56 69 73 69 74				http://www.zabbadoz.net/


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?Pine.BSF.4.44.0211061523000.32930-100000>