Package: flag-sort
Version: 0.5.1
Revision: 1

BuildDepends: fink (>= 0.24.12-1)

Source: none
PatchFile: %n.patch
PatchFile-MD5: d397ff6d55ba1a3ad94c2cddd636c2f7
PatchScript: sed 's,@PREFIX@,%p,' < %{PatchFile} | patch -p1

CompileScript: #
InstallScript: <<
	mkdir -p %i/bin
	install -m755 flag-sort %i/bin
<<

DescUsage: <<
	flag-sort [-r] [-v] CMD ARG1 ARG2 ...

The command CMD is launched with ARG1 ARG2 ... as arguments. The
arguments are re-ordered to put compiler search-path flags (-I and -L)
in an order appropriate for fink. The paths are sorted in the
following order:
	anything un-recognized
	local/relative (full paths that are local aren't noticed here) 
	fink %p/opt (self-contained rooted packages)
	fink %p
	x11 (and /opt/X11 before /usr/X11 before /usr/X11R6)
	system $SDK/usr (and Xcode.app SDK before Command Line Tools SDK)
	system (/usr)
	/usr/local
Within each category, order is maintained as given. In addition, lib/
is placed before include/ in each category so that arch-dependent
comes before generic and "PREFIX/lib/PACKAGE/{include,lib} hidden
packages override standard ones. (%p/opt does not distinguish between
lib/ and include/ because the rooted packages need not put those
in any well-defined place)

The -r flag causes flag-sort to print relative paths before absolute
paths.  Order is preserved within each class of path.  For example,
the following command:

  flag-sort -r echo -L/absolute -Lrelative -L../relative \
    -I/absolute -I../relative -Irelative

...would result in:

  -I../relative -Irelative -I/absolute \
    -Lrelative -L../relative -L/absolute

The -v flag causes flag-sort to print the command that will be
launched and all the flags in order on STDOUT.
<<
Description: Wrapper that sorts compiler flags
#Homepage: 
License: GPL
Maintainer: Daniel Macks <dmacks@netspace.org>