Notes on Debian patches to CERNLIB source:
------------------------------------------

All patches in this directory are, unless otherwise specified in the patch
header, copyright 2001-2005 Kevin B. McCarty and are licensed under the GNU
General Public License version 2 or later, at your option.  The GNU GPL may be
found at http://www.gnu.org/licenses/gpl.html or, on Debian systems, at
/usr/share/common-licenses/GPL .

Dpatch is used because some of the files in this directory are really
shell scripts, and no other patch system (quilt, cdbs, etc.) appears to
support this.  (Am I the only person using this "feature" of dpatch?)
Dpatch files that are really patches are named NNN-<description>.dpatch
while dpatch files that are shell scripts are named NNN-<description>.sh.dpatch
NNN is a three digit number ranging from 000 through 999.

Note that, contrary to the usual practice, the file debian/patches/00list
(listing the patches to be applied) is auto-generated by "debian/rules clean",
and may be further modified in the stampdir/configure-stamp target of the
debian/add-ons/Makefile (called from "debian/rules unpack") depending upon
settings in $DEB_BUILD_OPTIONS.  See debian/README.source for a list of
supported $DEB_BUILD_OPTIONS parameters.

A few of the patches (*.dpatch.in) include values that need to be filled in
at configure time; this is also done in the stampdir/configure-stamp target of
debian/add-ons/Makefile.

(You do not _really_ need dpatch to work with these patches; they are applied
for non-Debian systems in a hacky way by the patch target of
debian/add-ons/Makefile.)

The numbering scheme of patches in this directory is as follows:

000	is a dummy patch used to force dpatch-edit-patch to create diffs
	relative to already-unpacked source.  It has no effect when "applied"
	or "de-applied" against an unpacked source tree.
001-099 are reserved for patches that permit compilation after having
	removed non-free code from CERNLIB source.
100-199 are for bug fixes that should eventually be submitted upstream
	and have a reasonable probability of being merged, for instance,
	security bugs, file-specific compiler optimization settings, etc.
200-299 are for feature enhancements that should eventually be submitted
	upstream, for example, including ERTRAK code in libgeant.
300-399 are for implementation of non-Debian-specific niceties that are
	probably too intrusive to go upstream, for instance FHS implementation
	or use of shadow passwords by pawserv.
400-599 are reserved for future use.
600-699 are for Debian-specific customizations, for instance setting the
	default editor as sensible-editor, having Paw send bug reports
	to the BTS, etc.  Most of these are protected by
	"#if defined(CERNLIB_DEBIAN)" in the source code so they can be safely
	applied on non-Debian systems.
700-799 are for patches that move source code around.  Many of these are
	actually shell scripts.  Typically this is done to split
	libraries apart or to move functions from one library into another.
800-899 are for implementation of shared libraries.  (They must be implemented
	only after moving files around, or they have many undefined symbol
	problems.)
900-999 are for optional patches that may or may not be applied depending
	upon settings in $DEB_BUILD_OPTIONS.  These patches are stored
	in the "optional" subdirectory, copied here in the "unpack" target
	of debian/rules or add-ons/Makefile, and removed in the "clean"
	target.

Ideally, the source should compile with any complete set of the
patches numbered 000 through NNN (where NNN is 100 or greater) applied,
possibly excluding patches in the 9xx series.  (All patches with the same
number must be applied or not, as a whole.)  Unfortunately this does not
actually work when linking the Paw and Paw++ programs since some of the
libraries have circular dependencies on each other before the 700 series
of patches are applied.

To select the set of patches to be applied, after running debian/rules clean,
edit debian/patches/00list to include only the desired ones.

-- Kevin B. McCarty <kmccarty@debian.org>, 21 Jul 2005
