Update of /cvsroot/fink/dists/10.4/stable/main/finkinfo/devel
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22762/main/finkinfo/devel

Modified Files:
        diffuse.info gtk-doc.info gtranslator.info 
Added Files:
        devhelp.info devhelp.patch flag-sort.info flag-sort.patch 
Log Message:
GNOME2.26 to stable


Index: diffuse.info
===================================================================
RCS file: /cvsroot/fink/dists/10.4/stable/main/finkinfo/devel/diffuse.info,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- diffuse.info        16 Jul 2008 03:00:43 -0000      1.1
+++ diffuse.info        15 Nov 2009 08:20:26 -0000      1.2
@@ -1,5 +1,5 @@
 Package: diffuse
-Version: 0.2.11
+Version: 0.3.3
 Revision: 1
 Description: Visual diff and merge tool
 DescDetail: <<
@@ -14,32 +14,30 @@
 License: GPL
 Maintainer: Daniel Macks <dma...@netspace.org>
 Depends: <<
-       pygtk2-gtk-py25 (>= 2.12.1-1),
-       python25,
+       desktop-file-utils,
+       pygobject2-py26 (>= 2.18.0-1),
+       pygtk2-gtk-py26 (>= 2.15.1-1),
+       python26,
        rarian-compat
 <<
 Source: mirror:sourceforge:%n/%n-%v.tar.bz2
-Source-MD5: aa2a1a6f69ea2f4d6d2dfd089ed13592
-PatchScript: <<
-       perl -pi -e 's,/usr/bin/env python,%p/bin/python2.5,' 
src/usr/bin/diffuse
-       perl -pi -e 's,/etc,%p/etc,' src/usr/bin/diffuse 
src/usr/share/gnome/help/diffuse/C/diffuse.xml
-       perl -pi -e 's,/usr,%p,' src/usr/bin/diffuse src/etc/diffuse.conf 
src/usr/share/omf/diffuse/diffuse-C.omf
-<<
+Source-MD5: 4c483b557d270024704120adc2552c2c
 CompileScript: #
 InstallScript: <<
-       mkdir -p %i
-       cp -pr src/usr/* %i
-       cp -pr src/etc %i
-       chmod -R go=u-w %i
+       %p/bin/python2.6 install.py --destdir=%d --prefix=%p 
--sysconfdir=%p/etc --python-interpreter=%p/bin/python2.6 --files-only
 <<
-DocFileS: AUTHORS COPYING ChangeLog README TODO
+DocFileS: AUTHORS COPYING ChangeLog README
 PostInstScript: <<
+  . %p/bin/init.sh
   if [ configure = "$1" ]; then
     scrollkeeper-update -q
   fi
+  update-desktop-database -q
 <<
 PostRmScript: <<  
+  . %p/bin/init.sh
   if [ remove != "$1" ]; then
     scrollkeeper-update -q
   fi
+  update-desktop-database -q
 <<

--- NEW FILE: flag-sort.info ---
Package: flag-sort
Version: 0.3
Revision: 1

BuildDepends: fink (>= 0.24.12-1)

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

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

DescUsage: <<
        flag-sort [-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 /usr/X11 before /usr/X11R6)
        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 -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 <dma...@netspace.org>

Index: gtranslator.info
===================================================================
RCS file: /cvsroot/fink/dists/10.4/stable/main/finkinfo/devel/gtranslator.info,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- gtranslator.info    20 Jul 2008 05:41:17 -0000      1.2
+++ gtranslator.info    15 Nov 2009 08:20:26 -0000      1.3
@@ -1,67 +1,75 @@
 Package: gtranslator
 Version: 1.1.7
-Revision: 5
+Revision: 6
 Source: mirror:gnome:sources/%n/1.1/%n-%v.tar.bz2
 Source-MD5: 47531195b74b22a6284dad609377cbb0
 Depends: <<
-       aspell-shlibs,
-       atk1-shlibs (>= 1.20.0-1),
-       gconf2-shlibs (>= 2.20.0-1),
-       glib2-shlibs (>= 2.14.0-1),
+       aspell-shlibs (>= 0.60.5-1002),
+       atk1-shlibs (>= 1.24.0-1),
+       cairo-shlibs (>= 1.8-1),
+       dbus-shlibs (>= 1.2.1-1),
+       expat1-shlibs,
+       fontconfig2-shlibs (>= 2.4.1-1),
+       freetype219-shlibs (>= 2.3.7-7),
+       gconf2-shlibs (>= 2.24.0-1),
+       glib2-shlibs (>= 2.18.0-1),
+       glitz-shlibs,
        gnome-keyring-shlibs (>= 0.8.1-1),
-       gnome-vfs2-unified-shlibs (>= 1:2.20.0-1),
-       gtk+2-shlibs (>= 2.12.0-1),
-       gtkspell2-shlibs (>= 2.0.11-1004),
+       gnome-vfs2-unified-shlibs (>= 1:2.24.0-1),
+       gtk+2-shlibs (>= 2.14.0-1),
+       gtkspell2-shlibs (>= 2.0.14-1),
        libart2-shlibs (>= 2.3.10-2),
-       libbonobo2-shlibs (>= 2.20.0-1),
-       libbonoboui2-shlibs (>= 2.20.0-1),
+       libbonobo2-shlibs (>= 2.24.0-1),
+       libbonoboui2-shlibs (>= 2.24.0-1),
        libgettext3-shlibs,
-       libgnome2-shlibs (>= 2.20.0-1),
-       libgnomecanvas2-shlibs (>= 2.20.0-1),
-       libgnomeui2-shlibs (>= 2.20.0-1),
+       libgnome2-shlibs (>= 2.24.0-1),
+       libgnomeui2-shlibs (>= 2.24.0-1),
+       libgnomecanvas2-shlibs (>= 2.20.1.1-1),
        libiconv (>= 1.7-7),
+       libpng3-shlibs,
        libxml2-shlibs (>= 2.6.30-1),
-       orbit2-shlibs (>= 2.14.9-1),
-       pango1-xft2-ft219-shlibs (>= 1.18.4-4),
+       orbit2-shlibs (>= 2.14.16-1),
+       pango1-xft2-ft219-shlibs (>= 1.22.0-4),
+       pixman-shlibs (>= 0.12.0-1),
        popt-shlibs (>= 1.6.4-1),
        rarian-compat,
        x11-shlibs
 <<
 BuildDepends: <<
-       aspell-dev,
-       atk1 (>= 1.20.0-1),
+       aspell-dev (>= 0.60.5-1002),
+       atk1 (>= 1.24.0-1),
        audiofile,
-       cairo (>= 1.6-1),
-       dbus-dev (>= 1.0-1),
+       cairo (>= 1.8-1),
+       dbus-dev (>= 1.2.1-1),
        esound,
        expat1,
        fontconfig2-dev (>= 2.4.1-1),
-       freetype219 (>= 2.3.5-1),
-       gail18-dev,
-       gconf2-dev (>= 2.20.0-1),
+       freetype219 (>= 2.3.7-7),
+       gconf2-dev (>= 2.24.0-1),
        gettext-bin,
        gettext-tools,
-       glib2-dev (>= 2.14.0-1),
+       glib2-dev (>= 2.18.0-1),
        glitz,
        gnome-keyring-dev (>= 0.8.1-1),
-       gnome-vfs2-unified-dev (>= 1:2.20.0-1),
-       gtk+2-dev (>= 2.12.0-1),
-       gtkspell2-dev (>= 2.0.11-1004),
-       intltool (>= 0.36.0-1),
+       gnome-vfs2-unified-dev (>= 1:2.24.0-1),
+       gtk-doc (>= 1.8-1),
+       gtk+2-dev (>= 2.14.0-1),
+       gtkspell2-dev (>= 2.0.14-1),
+       intltool40,
        libart2 (>= 2.3.10-2),
-       libbonobo2-dev (>= 2.20.0-1),
-       libbonoboui2-dev (>= 2.20.0-1),
+       libbonobo2-dev (>= 2.24.0-1),
+       libbonoboui2-dev (>= 2.24.0-1),
        libgettext3-dev,
-       libgnome2-dev (>= 2.20.0-1),
-       libgnomeui2-dev (>= 2.20.0-1),
-       libgnomecanvas2-dev (>= 2.20.0-1),
+       libgnome2-dev (>= 2.24.0-1),
+       libgnomeui2-dev (>= 2.24.0-1),
+       libgnomecanvas2-dev (>= 2.20.1.1-1),
        libiconv-dev (>= 1.7-7),
        libpng3,
        libxml2 (>= 2.6.30-1),
-       orbit2-dev (>= 2.14.9-1),
-       pango1-xft2-ft219-dev (>= 1.18.4-4),
-       pixman (>= 0.10.0-1),
-       pkgconfig (>= 0.21-1),
+       orbit2-dev (>= 2.14.16-1),
+       pango1-xft2-ft219-dev (>= 1.22.0-4),
+       pixman (>= 0.12.0-1),
+       pkgconfig (>= 0.23),
        popt (>= 1.6.4-1),
        x11-dev,
        xft2-dev
@@ -70,7 +78,7 @@
   perl -pi -e 's/-scrollkeeper-update/#$&/' help/C/Makefile.in
   perl -pi -e "s,s/\\\.//g',$& -e 's/ .*//'," configure
 <<
-ConfigureParams: --mandir=%p/share/man --disable-dependency-tracking 
PKG_CONFIG_PATH="%p/lib/pango-ft219/lib/pkgconfig:%p/lib/fontconfig2/lib/pkgconfig:%p/lib/freetype219/lib/pkgconfig:$PKG_CONFIG_PATH"
 FREETYPE_CONFIG=%p/lib/freetype219/bin/freetype-config
+ConfigureParams: --mandir=%p/share/man --disable-dependency-tracking 
PKG_CONFIG_PATH="%p/lib/fontconfig2/lib/pkgconfig:$PKG_CONFIG_PATH"
 InstallScript: make install DESTDIR=%d
 DocFiles: AUTHORS COPYING ChangeLog po/ChangeLog:ChangeLog.po DEPENDS HACKING 
MAINTAINERS NEWS README THANKS TODO
 PostInstScript: <<

--- NEW FILE: devhelp.patch ---
diff -Nurd -x'*~' devhelp-0.23.orig/src/dh-window.c devhelp-0.23/src/dh-window.c
--- devhelp-0.23.orig/src/dh-window.c   2008-11-28 10:56:04.000000000 -0500
+++ devhelp-0.23/src/dh-window.c        2009-07-08 03:36:23.000000000 -0400
@@ -133,6 +133,20 @@
 #define GET_PRIVATE(instance) G_TYPE_INSTANCE_GET_PRIVATE \
   (instance, DH_TYPE_WINDOW, DhWindowPriv);
 
+
+static void
+_webkit_web_view_open_compat (WebKitWebView *view,
+                              const gchar   *uri)
+{
+        gchar *real_uri;
+        if (g_path_is_absolute(uri))
+                real_uri = g_strdup_printf ("file://%s", uri);
+        else
+                real_uri = g_strdup (uri);
+        webkit_web_view_load_uri (view, real_uri);
+        g_free(real_uri);
+}
+
 static void
 window_activate_new_window (GtkAction *action,
                             DhWindow  *window)
@@ -803,7 +817,7 @@
                                          window);
 
         uri = dh_link_get_uri (link);
-        webkit_web_view_open (view, uri);
+        _webkit_web_view_open_compat (view, uri);
         g_free (uri);
 
         g_signal_handlers_unblock_by_func (view,
@@ -827,7 +841,7 @@
         view = window_get_active_web_view (window);
 
         uri = dh_link_get_uri (link);
-        webkit_web_view_open (view, uri);
+        _webkit_web_view_open_compat (view, uri);
         g_free (uri);
 
         window_check_history (window, view);
@@ -1093,7 +1107,7 @@
         }
 
         if (location) {
-                webkit_web_view_open (WEBKIT_WEB_VIEW (view), location);
+                _webkit_web_view_open_compat (WEBKIT_WEB_VIEW (view), 
location);
         } else {
                 webkit_web_view_open (WEBKIT_WEB_VIEW (view), "about:blank");
         }
@@ -1357,6 +1371,6 @@
         priv = window->priv;
 
         web_view = window_get_active_web_view (window);
-        webkit_web_view_open (web_view, uri);
+        _webkit_web_view_open_compat (web_view, uri);
         dh_book_tree_select_uri (DH_BOOK_TREE (priv->book_tree), uri);
 }

Index: gtk-doc.info
===================================================================
RCS file: /cvsroot/fink/dists/10.4/stable/main/finkinfo/devel/gtk-doc.info,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- gtk-doc.info        12 May 2009 01:48:54 -0000      1.5
+++ gtk-doc.info        15 Nov 2009 08:20:26 -0000      1.6
@@ -1,9 +1,9 @@
 Package: gtk-doc
 Version: 1.11
-Revision: 6
+Revision: 7
 BuildDepends: <<
        fink (>= 0.24.12-1),
-       gnome-doc-utils (>= 0.14.2-1),
+       gnome-doc-utils (>= 0.16.1-1),
        libxml2 (>= 2.6.30-1),
        libxslt (>= 1.1.14-1),
        pkgconfig (>= 0.23)
@@ -49,11 +49,13 @@
        cp debian/*.1 %i/share/man/man1
 <<
 PostInstScript: <<
+       . %p/bin/init.sh
        if [ configure = "$1" ]; then
                scrollkeeper-update -q
        fi
 <<
 PostRmScript: <<  
+       . %p/bin/init.sh
        if [ remove != "$1" ]; then
                scrollkeeper-update -q
        fi

--- NEW FILE: devhelp.info ---
Package: devhelp
Version: 0.23
Revision: 5
Source: mirror:gnome:sources/devhelp/%v/devhelp-%v.tar.bz2
Source-MD5: 704c0c90616aeb1c52ca3af1df93fde6
BuildDepends: <<
        atk1 (>= 1.26.0-1),
        cairo (>= 1.8.0-1),
        dbus-dev (>= 1.2.1-1),
        enchant1-dev (>= 1.4.2-1),
        expat1,
        fink (>= 0.24.12),
        fontconfig2-dev (>= 2.4.1-1),
        freetype219 (>= 2.3.8-2),
        gconf2-dev (>= 2.26.0-1),
        gettext-bin,
        gettext-tools,
        glib2-dev (>= 2.20.0-1),
        glitz,
        gnutls26 (>= 2.8.0-1),
        gtk+2-dev (>= 2.16.0-1),
        intltool40,
        libgcrypt (>= 1.4.3-2),
        libgettext3-dev,
        libgpg-error,
        libiconv-dev,
        libjpeg,
        libpng3,
        libsoup2.4.1-ssl (>= 2.26.0-1),
        libtasn1-3 (>= 2.2-2),
        libwnck1.22 (>= 2.26.0-1),
        libxml2 (>= 2.6.30-1),
        libxslt,
        orbit2-dev (>= 2.14.17-1),
        pango1-xft2-ft219-dev (>= 1.24.0-1),
        pixman (>= 0.14.0-1),
        pkgconfig (>= 0.23),
        sqlite3,
        startup-notification-dev,
        webkit-1.0.2 (>= 1.1.10-1),
        x11-dev
<<
Depends: <<
        lib%N23-shlibs (>= %v-%r),
        atk1-shlibs (>= 1.26.0-1),
        cairo-shlibs (>= 1.8.0-1),
        dbus-shlibs (>= 1.2.1-1),
        desktop-file-utils (>= 0.15-1),
        enchant1-shlibs (>= 1.4.2-1),
        expat1-shlibs,
        fontconfig2-shlibs (>= 2.4.1-1),
        freetype219-shlibs (>= 2.3.8-2),
        gconf2 (>= 2.26.0-1),
        gconf2-shlibs (>= 2.26.0-1),
        glib2-shlibs (>= 2.20.0-1),
        glitz-shlibs,
        gnutls26-shlibs (>= 2.8.0-1),
        gtk+2 (>= 2.16.0-1),
        gtk+2-shlibs (>= 2.16.0-1),
        libgcrypt-shlibs (>= 1.4.3-2),
        libgettext3-shlibs,
        libgpg-error-shlibs,
        libiconv,
        libjpeg-shlibs,
        libpng3-shlibs,
        libsoup2.4.1-ssl-shlibs (>= 2.26.0-1),
        libtasn1-3-shlibs (>= 2.2-2),
        libwnck1.22-shlibs (>= 2.26.0-1),
        libxml2-shlibs (>= 2.6.30-1),
        libxslt-shlibs,
        orbit2-shlibs (>= 2.14.17-1),
        pango1-xft2-ft219-shlibs (>= 1.24.0-1),
        pixman-shlibs (>= 0.14.0-1),
        shared-mime-info (>= 0.40-1),
        sqlite3-shlibs,
        startup-notification-shlibs,
        webkit-1.0.2-shlibs (>= 1.1.10-1),
        x11
<<
Conflicts: <<
        devhelp-shlibs (<< 0.10-1101)
<<
Replaces: <<
        devhelp-shlibs (<< 0.10-1101),
        devhelp-viewer-firefox (<< 0.23-1), devhelp-viewer-mozilla (<< 0.23-1)
<<
PatchFile: %n.patch
PatchFile-MD5: 95fd9db1db2bc7c56c9a78f36f2d9c73
PatchScript: <<
        %{default_script}
        perl -pi -e 's/gedit-plugin//g' misc/Makefile.in
<<
ConfigureParams: -disable-dependency-tracking --libdir=%p/lib/libdevhelp23 
--disable-schemas-install PYTHON="true but python is disabled"
InstallScript: <<
        make -j1 install DESTDIR="%d" pkgconfigdir=%p/lib/pkgconfig
        ln -s libdevhelp23/libdevhelp-1.{la,dylib} %i/lib
<<
DocFiles: AUTHORS COPYING ChangeLog NEWS README TODO
PostInstScript: <<
        . %p/bin/init.sh
        export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
        gconftool-2 --makefile-install-rule 
%p/etc/gconf/schemas/devhelp.schemas >/dev/null
        [ -x %p/bin/update-mime-database ] && update-mime-database 
%p/share/mime > /dev/null 2>&1 || :
        [ -x %p/bin/update-desktop-database ] && update-desktop-database -q || :
        gtk-update-icon-cache -f -t %p/share/icons/hicolor || :
<<
PostRmScript: <<
        . %p/bin/init.sh
        [ -x %p/bin/update-mime-database ] && update-mime-database 
%p/share/mime > /dev/null 2>&1 || :
        [ -x %p/bin/update-desktop-database ] && update-desktop-database -q || :
        gtk-update-icon-cache -f -t %p/share/icons/hicolor || :
<<
ConfFiles: %p/etc/gconf/schemas/devhelp.schemas
SplitOff: <<
        Package: lib%N23-shlibs
        Depends: <<
                atk1-shlibs (>= 1.26.0-1),
                cairo-shlibs (>= 1.8.0-1),
                dbus-shlibs (>= 1.2.1-1),
                enchant1-shlibs (>= 1.4.2-1),
                expat1-shlibs,
                fontconfig2-shlibs (>= 2.4.1-1),
                freetype219-shlibs (>= 2.3.8-2),
                gconf2-shlibs (>= 2.26.0-1),
                glib2-shlibs (>= 2.20.0-1),
                glitz-shlibs,
                gnutls26-shlibs (>= 2.8.0-1),
                gtk+2-shlibs (>= 2.16.0-1),
                libgcrypt-shlibs (>= 1.4.3-2),
                libgettext3-shlibs,
                libgpg-error-shlibs,
                libiconv,
                libjpeg-shlibs,
                libpng3-shlibs,
                libsoup2.4.1-ssl-shlibs (>= 2.26.0-1),
                libtasn1-3-shlibs (>= 2.2-2),
                libwnck1.22-shlibs (>= 2.26.0-1),
                libxml2-shlibs (>= 2.6.30-1),
                libxslt-shlibs,
                orbit2-shlibs (>= 2.14.17-1),
                pango1-xft2-ft219-shlibs (>= 1.24.0-1),
                pixman-shlibs (>= 0.14.0-1),
                sqlite3-shlibs,
                startup-notification-shlibs,
                webkit-1.0.2-shlibs (>= 1.1.10-1),
                x11-shlibs
        <<
        Conflicts: <<
                devhelp-viewer-firefox-dev  (<< 0.23-1), 
devhelp-viewer-mozilla-dev (<< 0.23-1)
        <<
        Replaces: <<
                devhelp-viewer-firefox-dev  (<< 0.23-1), 
devhelp-viewer-mozilla-dev (<< 0.23-1)
        <<
        Files: lib/libdevhelp23/libdevhelp*.*.dylib
        Shlibs: %p/lib/libdevhelp23/libdevhelp-1.0.dylib 1.0.0 %n (>= 0.23-1)
        DocFiles: AUTHORS COPYING ChangeLog NEWS README TODO
<<
SplitOff2: <<
        Package: lib%N23-dev
        Depends: %N (>= %v-%r), lib%N23-shlibs (= %v-%r)
        BuildDependsOnly: true
        Files: <<
                include
                lib
        <<
        DocFiles: AUTHORS COPYING ChangeLog NEWS README TODO
<<
Description: API documentation browser for GNOME
DescDetail: <<
API documentation browser for GNOME 2. It works natively with gtk-doc 
(the API reference framework developed for GTK+ and used throughout 
GNOME for API documentation). If you use gtk-doc with your project, 
you can use Devhelp to browse the documentation.

Starting in 0.10-1101, the "devhelp" package is a place-holder to let user
pick which rendering engine to use (it's hard-coded and linked at
compile-time, not a swappable back-end). Starting in 0.23-1, uses
webkit (no gecko multiple-choice), so no need for this -viewer
back-end game.
<<
DescPackaging: <<
        Formerly maintained by Michele Garoche

        Disable gedit plugin so we don't need a dependency on gedit or
        on pygtk stuff. Could roll its own standalone pkg if wanted.

        Lots of non-backward-compatible changes to public interface of
        lib for same install_name...bury in subdir to avoid breakage.
        See: http://bugzilla.gnome.org/show_bug.cgi?id=586236

        Former viewer*-dev pkg depended on %N=%v-%r, which can block
        updates to new libversion, and not on its -shlibs, so need to
        nuke that -dev as early as possible in the packge-upgrading
        process.

        Fix "Search" results links and similar local-file links. See:
        http://bugzilla.gnome.org/show_bug.cgi?id=586559
<<
License: GPL
Maintainer: None <fink-de...@lists.sourceforge.net>
Homepage: http://www.gtk.org

--- NEW FILE: flag-sort.patch ---
diff -Nurd flag-sort-0.3.orig/flag-sort flag-sort-0.3/flag-sort
--- flag-sort-0.3.orig/flag-sort        1969-12-31 19:00:00.000000000 -0500
+++ flag-sort-0.3/flag-sort     2009-07-09 01:10:53.000000000 -0400
@@ -0,0 +1,94 @@
+#!/usr/bin/perl
+# -*- mode: Perl; tab-width: 4; -*-
+
+# A dirty hack by Daniel Macks
+
+use warnings;
+use strict;
+
+# all flags for a listed prefix are grouped together before the next prefix
+my @prefix_order = (
+       '@PREFIX@/opt',
+       '@PREFIX@/lib',
+       '@PREFIX@/include',
+       '/usr/X11/lib',
+       '/usr/X11/include',
+       '/usr/X11R6/lib',
+       '/usr/X11R6/include',
+       '/usr/lib',
+       '/usr/include',
+       '/usr/local/lib',
+       '/usr/local/include'
+);
+
+# track the following flags (in this order)
+my @flag_order = (
+       '-I',
+       '-L',
+);
+my %flag_queues = ();   # $flag => \...@paths_for_flag
+my @other_queue = ();   # things not fitting into any of %flag_queues
+
+my $verbose = 0;
+if (@ARGV && $ARGV[0] eq '-v') {
+       $verbose = 1;
+       shift;
+}
+
+if (!...@argv) {
+       warn "Usage: $0 [-v] cmd [flags for cmd]\n";
+       warn "  resort [flags for cmd] and call cmd with them\n";
+       warn "  -v causes display of some diagnostics on STDOUT\n";
+       exit 1;
+}
+
+# what we will launch after organizing the flags
+my @subcmd = ();
+
+# separate the args according to flag
+while (@ARGV) {
+       my $arg = shift;
+       my($flag) = grep { $arg =~ s/^$_// } @flag_order;
+       if (defined $flag) {
+               # parsed off a known flag
+               push @{$flag_queues{$flag}}, $arg;
+       } else {
+               # unknown flag
+               push @other_queue, $arg;
+       }
+}
+
+#assume totally unknown flags and args are most important
+push @subcmd, @other_queue;
+
+# sort all paths for each flag
+foreach my $flag (@flag_order) {
+       next unless defined $flag_queues{$flag};
+       my @path_list = @{$flag_queues{$flag}};
+       #warn "$0: $flag: @path_list\n";
+
+       # first separate the paths according to prefix
+       my %sorted_paths;                       # $prefix => 
\...@sorted_dirs_for_prefix
+       my @other_paths;                        # paths not under any of 
%sorted_paths
+       foreach my $path (@{$flag_queues{$flag}}) {
+               my($prefix) = grep { $path =~ /^$_(\/|\z)/ } @prefix_order;
+               if (defined $prefix) {
+                       # $path is $prefix or a subdir of it
+                       push @{$sorted_paths{$prefix}}, $path;
+               } else {
+                       # unknown prefix
+                       push @other_paths, $path;
+               }
+       }
+
+       # now reconstruct list of paths according to prefix priority
+       @path_list = @other_paths;  # assume unknowns are "very important"
+       foreach my $prefix (@prefix_order) {
+               push @path_list, @{$sorted_paths{$prefix}} if exists 
$sorted_paths{$prefix};
+       }
+       #warn "$0: now $flag: @path_list\n";
+       push @subcmd, map "$flag$_", @path_list;
+}
+
+print "$0: @subcmd\n" if $verbose;
+exec {$subcmd[0]} @subcmd or die "Could not exec $subcmd[0]: $!\n";


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to