Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jul 2001 08:36:07 -0500
From:      Mike Meyer <mwm@mired.org>
To:        Hans Zaunere <zaunere@yahoo.com>
Cc:        questions@freebsd.org
Subject:   Re: Patches Question
Message-ID:  <15200.7367.74322.64463@guru.mired.org>
In-Reply-To: <20010726131235.51770.qmail@web12807.mail.yahoo.com>
References:  <15199.50518.840767.808395@guru.mired.org> <20010726131235.51770.qmail@web12807.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
[I've added this to -questions to get it into the archives, in the
hopes that people will start using them more often.]

Hans Zaunere <zaunere@yahoo.com> types:
> > The most common patch type is probably
> > to make the port
> > honor the PREFIX and LOCALBASE variables, or similar
> > things. Others
> > are changes to deal with BSD vs. Linux vs. SysV type
> > things.
> 
> Thank you for your response, it is exactly what I've
> been looking for.  If you have the time, could you
> elaborate on the above PREFIX and LOCALBASE vars and
> the "BSD vs Linux vs SysV type things".  I'm coming
> from Linux and will be writing some cross platform
> software and am curious to these details.  A good link
> on the web would suffice as well.

PREFIX and LOCALBASE are variables used by the ports system to specify
where ports are installed. LOCALBASE is where other ports are
installed, and where that port should look for applications, include
files, libraries, etc. from other ports. It defaults to /usr/local for
most things, and /usr/X11R6 for X applications. PREFIX is where the
port is going to be installed, and where it should look for things
that are part of the application the port installs. It defaults to
LOCALBASE. More information about these - and other port variables -
can be found in The FreeBSD Porter's Handbook at <URL:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/index.html
> and the make.conf(7) man page.

Version-dependent type things are just that: things that differ
depending on which Unix or Unix-like system they are being installed
on. Anything that isn't wired down by a standard is liable to be
different, ranging from the functions invoked to do different things,
symbols defined in include files and where the include files are, the
location of binaries and system files, and so on. BSD and SysV are the
two major unix variants, and Linux is the best-known of the Unix-like
platforms.

It used to be standard practice to have to edit the configuration
information - either in a Makefile, or an include file - by hand when
installing applications from source. These days, there are tools that
will sniff that information out of the environment in various ways,
and build the configuration file automatically. I first saw this in
the Icon programming language distribution, and the best known of the
early versions was the one that came with Larry Wall's rn, which
inspired a parody that involved it noticing it was running on Primos
and installing a Unix kernel.

The most popular such tool these days is the GNU autoconf utility, and
programs that use that will generally compile on FreeBSD with no
problems. Even with those you still see patches for things like what
the the gtk-config program is called, and not all programs have
them. For the latter case, the patches will edit the config file
appropriately for FreeBSD, hopefully getting the PREFIX setting done
at the same time. Take a look at the patches in the skipstone port for
examples of that kind of thing.

	<mike
--
Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

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




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