From owner-freebsd-questions Thu Jul 26 6:36:12 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-27-141-144.mmcable.com [24.27.141.144]) by hub.freebsd.org (Postfix) with SMTP id F08E737B401 for ; Thu, 26 Jul 2001 06:36:07 -0700 (PDT) (envelope-from mwm@mired.org) Received: (qmail 14362 invoked by uid 100); 26 Jul 2001 13:36:07 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15200.7367.74322.64463@guru.mired.org> Date: Thu, 26 Jul 2001 08:36:07 -0500 To: Hans Zaunere Cc: questions@freebsd.org Subject: Re: Patches Question 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> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [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 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 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. 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