--- gimp-2.6.4/tools/Makefile.am.alt 2008-11-21 01:43:13 +0300 +++ gimp-2.6.4/tools/Makefile.am 2009-01-01 22:12:55 +0300 @@ -72,6 +72,7 @@ EXTRA_DIST = \ install-exec-hook: + $(LN_S) gimptool-@GIMP_TOOL_VERSION@ $(DESTDIR)$(bindir)/gimptool if DEFAULT_BINARY if test -f "$(DESTDIR)$(bindir)/gimp-remote-@GIMP_APP_VERSION@"; then \ echo "cd $(DESTDIR)$(bindir)"; \ --- gimp-2.6.4/tools/gimptool.c.alt 2008-11-21 01:43:13 +0300 +++ gimp-2.6.4/tools/gimptool.c 2009-01-01 22:24:22 +0300 @@ -52,7 +52,7 @@ static const gchar *env_cc; static const gchar *env_cflags; static const gchar *env_ldflags; static const gchar *env_libs; - +static const gchar *env_destdir; #ifdef G_OS_WIN32 #define EXEEXT ".exe" @@ -277,6 +277,11 @@ find_out_env_flags (void) env_libs = p; else env_libs = ""; + + if ((p = getenv ("DESTDIR")) != NULL) + env_destdir = p; + else + env_destdir = ""; } static void @@ -567,9 +572,8 @@ get_sys_plugin_dir (gboolean forward_sla const gchar slash = '/'; #endif - return g_strdup_printf ("%s%clib%cgimp%c" GIMP_PLUGIN_VERSION "%cplug-ins", - get_runtime_prefix (slash), - slash, slash, slash, slash); + return g_strdup_printf (LIBDIR "%cgimp%c" GIMP_PLUGIN_VERSION "%cplug-ins", + slash, slash, slash); } static void @@ -594,6 +598,9 @@ static void do_install_bin_2 (const gchar *dir, const gchar *what) { + if ( env_destdir != NULL ) + dir = g_strconcat (env_destdir, dir, NULL); + g_mkdir_with_parents (dir, S_IRUSR | S_IXUSR | S_IWUSR | S_IRGRP | S_IXGRP |