From e12ca703f4078698f62fc49d2e7f96cd2925225e Mon Sep 17 00:00:00 2001 From: guibuilder_pel7x64builder0 Date: Sun, 9 Dec 2018 15:06:04 +0100 Subject: [PATCH] xsane package update Signed-off-by: guibuilder_pel7x64builder0 --- SOURCES/xsane-0.995-close-fds.patch | 101 +++ SOURCES/xsane-0.995-xdg-open.patch | 32 + SOURCES/xsane-0.996-no-eula.patch | 94 +++ SOURCES/xsane-0.997-ipv6.patch | 148 ++++ SOURCES/xsane-0.997-off-root-build.patch | 127 ++++ SOURCES/xsane-0.998-desktop-file.patch | 53 ++ SOURCES/xsane-0.998-libpng.patch | 41 ++ SOURCES/xsane-0.998-preview-selection.patch | 60 ++ SOURCES/xsane-0.998-wmclass.patch | 33 + SOURCES/xsane-0.999-lcms2.patch | 372 ++++++++++ SOURCES/xsane-0.999-man-page.patch | 109 +++ SOURCES/xsane-0.999-no-file-selected.patch | 91 +++ SOURCES/xsane-0.999-pdf-no-high-bpp.patch | 51 ++ SOURCES/xsane-256x256.png | Bin 0 -> 18478 bytes SPECS/xsane.spec | 714 ++++++++++++++++++++ 15 files changed, 2026 insertions(+) create mode 100644 SOURCES/xsane-0.995-close-fds.patch create mode 100644 SOURCES/xsane-0.995-xdg-open.patch create mode 100644 SOURCES/xsane-0.996-no-eula.patch create mode 100644 SOURCES/xsane-0.997-ipv6.patch create mode 100644 SOURCES/xsane-0.997-off-root-build.patch create mode 100644 SOURCES/xsane-0.998-desktop-file.patch create mode 100644 SOURCES/xsane-0.998-libpng.patch create mode 100644 SOURCES/xsane-0.998-preview-selection.patch create mode 100644 SOURCES/xsane-0.998-wmclass.patch create mode 100644 SOURCES/xsane-0.999-lcms2.patch create mode 100644 SOURCES/xsane-0.999-man-page.patch create mode 100644 SOURCES/xsane-0.999-no-file-selected.patch create mode 100644 SOURCES/xsane-0.999-pdf-no-high-bpp.patch create mode 100644 SOURCES/xsane-256x256.png create mode 100644 SPECS/xsane.spec diff --git a/SOURCES/xsane-0.995-close-fds.patch b/SOURCES/xsane-0.995-close-fds.patch new file mode 100644 index 0000000..917b075 --- /dev/null +++ b/SOURCES/xsane-0.995-close-fds.patch @@ -0,0 +1,101 @@ +From 6dee7eadd1b7352ec503ea04fa1639d4a93f370b Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Thu, 16 Aug 2012 11:18:31 +0200 +Subject: [PATCH] patch: close-fds + +Squashed commit of the following: + +commit 4fdedd3a8b66fb42b2d4dde62df28c78571c1c5d +Author: Nils Philippsen +Date: Fri Nov 19 12:15:58 2010 +0100 + + don't leak file descriptors to help browser process (#455450) +--- + src/xsane.c | 43 +++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 43 insertions(+) + +diff --git a/src/xsane.c b/src/xsane.c +index 775610e..1c5d61d 100644 +--- a/src/xsane.c ++++ b/src/xsane.c +@@ -48,6 +48,8 @@ + + #include + ++#include ++ + /* ---------------------------------------------------------------------------------------------------------------------- */ + + struct option long_options[] = +@@ -3684,6 +3686,41 @@ static void xsane_show_gpl(GtkWidget *widget, gpointer data) + + /* ---------------------------------------------------------------------------------------------------------------------- */ + ++static void xsane_close_fds_for_exec(signed int first_fd_to_leave_open, ...) ++{ ++ int open_max; ++ signed int i; ++ ++ va_list ap; ++ unsigned char *close_fds; ++ ++ open_max = (int) sysconf (_SC_OPEN_MAX); ++ ++ close_fds = malloc (open_max); ++ ++ memset (close_fds, 1, open_max); ++ ++ va_start (ap, first_fd_to_leave_open); ++ ++ for (i = first_fd_to_leave_open; i >= 0; i = va_arg (ap, signed int)) { ++ if (i < open_max) ++ close_fds[i] = 0; ++ } ++ ++ va_end (ap); ++ ++ DBG(DBG_info, "closing unneeded file descriptors\n"); ++ ++ for (i = 0; i < open_max; i++) { ++ if (close_fds[i]) ++ close (i); ++ } ++ ++ free (close_fds); ++} ++ ++/* ---------------------------------------------------------------------------------------------------------------------- */ ++ + static void xsane_show_doc_via_nsr(GtkWidget *widget, gpointer data) /* show via netscape remote */ + { + char *name = (char *) data; +@@ -3736,6 +3773,8 @@ static void xsane_show_doc_via_nsr(GtkWidget *widget, gpointer data) /* show via + ipc_file = fdopen(xsane.ipc_pipefd[1], "w"); + } + ++ xsane_close_fds_for_exec (1, 2, xsane.ipc_pipefd[1], -1); ++ + DBG(DBG_info, "trying to change user id for new subprocess:\n"); + DBG(DBG_info, "old effective uid = %d\n", (int) geteuid()); + setuid(getuid()); +@@ -3778,6 +3817,8 @@ static void xsane_show_doc_via_nsr(GtkWidget *widget, gpointer data) /* show via + ipc_file = fdopen(xsane.ipc_pipefd[1], "w"); + } + ++ xsane_close_fds_for_exec (1, 2, xsane.ipc_pipefd[1], -1); ++ + DBG(DBG_info, "trying to change user id for new subprocess:\n"); + DBG(DBG_info, "old effective uid = %d\n", (int) geteuid()); + setuid(getuid()); +@@ -3899,6 +3940,8 @@ static void xsane_show_doc(GtkWidget *widget, gpointer data) + ipc_file = fdopen(xsane.ipc_pipefd[1], "w"); + } + ++ xsane_close_fds_for_exec (1, 2, xsane.ipc_pipefd[1], -1); ++ + DBG(DBG_info, "trying to change user id for new subprocess:\n"); + DBG(DBG_info, "old effective uid = %d\n", (int) geteuid()); + setuid(getuid()); +-- +1.7.11.4 + diff --git a/SOURCES/xsane-0.995-xdg-open.patch b/SOURCES/xsane-0.995-xdg-open.patch new file mode 100644 index 0000000..c276938 --- /dev/null +++ b/SOURCES/xsane-0.995-xdg-open.patch @@ -0,0 +1,32 @@ +From 813d7063e3d265ba7e625766a040b8ba9bb130a9 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Thu, 16 Aug 2012 11:18:00 +0200 +Subject: [PATCH] patch: xdg-open + +Squashed commit of the following: + +commit 55380b90cece459e20d14e6da552abcf5ca54621 +Author: Nils Philippsen +Date: Fri Nov 19 12:14:17 2010 +0100 + + use "xdg-open" instead of "netscape" to launch help browser +--- + src/xsane.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/xsane.h b/src/xsane.h +index cf6111f..3d8caaa 100644 +--- a/src/xsane.h ++++ b/src/xsane.h +@@ -251,7 +251,7 @@ + # elif defined(HAVE_OS2_H) + # define DEFAULT_BROWSER "netscape" + # else +-# define DEFAULT_BROWSER "netscape" ++# define DEFAULT_BROWSER "xdg-open" + # endif + #endif + +-- +1.7.11.4 + diff --git a/SOURCES/xsane-0.996-no-eula.patch b/SOURCES/xsane-0.996-no-eula.patch new file mode 100644 index 0000000..66cd684 --- /dev/null +++ b/SOURCES/xsane-0.996-no-eula.patch @@ -0,0 +1,94 @@ +From 7018206ea45db2e8bdfeb67d33f3387c9678a407 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Thu, 16 Aug 2012 11:19:16 +0200 +Subject: [PATCH] patch: no-eula + +Squashed commit of the following: + +commit d13f1ccfdf4c150cab91105e9b8542ecbb048a9b +Author: Nils Philippsen +Date: Fri Nov 19 12:20:52 2010 +0100 + + don't show EULA, mention bugzilla in about dialog (#504344) +--- + src/xsane-text.h | 2 ++ + src/xsane.c | 16 ++++++---------- + src/xsane.h | 3 +++ + 3 files changed, 11 insertions(+), 10 deletions(-) + +diff --git a/src/xsane-text.h b/src/xsane-text.h +index fc6bbeb..ee4a222 100644 +--- a/src/xsane-text.h ++++ b/src/xsane-text.h +@@ -230,6 +230,8 @@ + "This program is distributed in the hope that it will be useful, but\n" \ + "WITHOUT ANY WARRANTY; without even the implied warranty of\n" \ + "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n") ++#define TEXT_MODIFIED_BLURB _("This package is modified from the original version.\n" \ ++ "Please contact your vendor or report problems at") + #define TEXT_EMAIL_ADR _("E-mail:") + #define TEXT_HOMEPAGE _("Homepage:") + #define TEXT_FILE _("File:") +diff --git a/src/xsane.c b/src/xsane.c +index 1c5d61d..8b24b0c 100644 +--- a/src/xsane.c ++++ b/src/xsane.c +@@ -3533,10 +3533,13 @@ static void xsane_about_dialog(GtkWidget *widget, gpointer data) + snprintf(buf, sizeof(buf), "XSane %s %s\n" + "%s %s\n" + "\n" ++ "%s\n%s" ++ "\n\n" + "%s %s\n" + "%s %s\n", + TEXT_VERSION, XSANE_VERSION, + XSANE_COPYRIGHT_SIGN, XSANE_COPYRIGHT_TXT, ++ TEXT_MODIFIED_BLURB, XSANE_BUGTRACKER_URL, + TEXT_HOMEPAGE, XSANE_HOMEPAGE, + TEXT_EMAIL_ADR, XSANE_EMAIL_ADR); + +@@ -5733,6 +5736,7 @@ static int xsane_init(int argc, char **argv) + + case 'v': /* --version */ + g_print("%s-%s %s %s\n", xsane.prog_name, XSANE_VERSION, XSANE_COPYRIGHT_SIGN, XSANE_COPYRIGHT_TXT); ++ g_print("\n%s\n%s\n\n", TEXT_MODIFIED_BLURB, XSANE_BUGTRACKER_URL); + g_print(" %s %s\n", TEXT_EMAIL_ADR, XSANE_EMAIL_ADR); + g_print(" %s %s\n", TEXT_PACKAGE, XSANE_PACKAGE_VERSION); + g_print(" %s%d.%d.%d\n", TEXT_GTK_VERSION, GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); +@@ -5859,17 +5863,9 @@ static int xsane_init(int argc, char **argv) + } + + +- if (xsane_pref_restore()) /* restore preferences, returns TRUE if license is not accpted yet */ ++ if (xsane_pref_restore()) /* restore preferences, returns TRUE if the version is different from the last run */ + { +- if (xsane_display_eula(1)) /* show license and ask for accept/not accept */ +- { +- DBG(DBG_info, "user did not accept eula, we abort\n"); +- return 1; /* User did not accept eula */ +- } +- else /* User did accept eula */ +- { +- xsane_pref_save(); +- } ++ xsane_pref_save(); + } + + xsane_pref_restore_media(); +diff --git a/src/xsane.h b/src/xsane.h +index 3d8caaa..6c7568e 100644 +--- a/src/xsane.h ++++ b/src/xsane.h +@@ -98,6 +98,9 @@ + #define XSANE_EMAIL_ADR "Oliver.Rauch@xsane.org" + #define XSANE_HOMEPAGE "http://www.xsane.org" + #define XSANE_COPYRIGHT_TXT XSANE_DATE " " XSANE_COPYRIGHT ++#ifndef XSANE_BUGTRACKER_URL ++#define XSANE_BUGTRACKER_URL "(no bug tracker configured)" ++#endif + + /* ---------------------------------------------------------------------------------------------------------------------- */ + +-- +1.7.11.4 + diff --git a/SOURCES/xsane-0.997-ipv6.patch b/SOURCES/xsane-0.997-ipv6.patch new file mode 100644 index 0000000..43f7af6 --- /dev/null +++ b/SOURCES/xsane-0.997-ipv6.patch @@ -0,0 +1,148 @@ +From a2ef22d59904d5e53c3d58093b561fa1ab7127a6 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Thu, 16 Aug 2012 10:58:54 +0200 +Subject: [PATCH] patch: ipv6 + +Squashed commit of the following: + +commit 9f9d5c46fdef5ba7baccb81ab8170cfc24797de6 +Author: Nils Philippsen +Date: Fri Nov 19 12:27:42 2010 +0100 + + support IPv6 (#198422) +--- + src/xsane-save.c | 96 ++++++++++++++++++++++++++++++++++++-------------------- + 1 file changed, 62 insertions(+), 34 deletions(-) + +diff --git a/src/xsane-save.c b/src/xsane-save.c +index 84f5d59..87ef685 100644 +--- a/src/xsane-save.c ++++ b/src/xsane-save.c +@@ -29,6 +29,8 @@ + #include + #include + ++#include ++ + /* the following test is always false */ + #ifdef _native_WIN32 + # include +@@ -7488,55 +7490,81 @@ void write_email_attach_file(int fd_socket, char *boundary, FILE *infile, char * + /* returns fd_socket if sucessfull, < 0 when error occured */ + int open_socket(char *server, int port) + { +- int fd_socket; +- struct sockaddr_in sin; +- struct hostent *he; ++ int fd_socket, e; ++ ++ struct addrinfo *ai_list, *ai; ++ struct addrinfo hints; ++ gchar *port_s; ++ gint connected; ++ ++ memset(&hints, '\0', sizeof(hints)); ++ hints.ai_flags = AI_ADDRCONFIG; ++ hints.ai_socktype = SOCK_STREAM; ++ ++ port_s = g_strdup_printf("%d", port); ++ e = getaddrinfo(server, port_s, &hints, &ai_list); ++ g_free(port_s); + +- he = gethostbyname(server); +- if (!he) ++ if (e != 0) + { +- DBG(DBG_error, "open_socket: Could not get hostname of \"%s\"\n", server); ++ DBG(DBG_error, "open_socket: Could not lookup \"%s\"\n", server); + return -1; + } +- else ++ ++ connected = 0; ++ for (ai = ai_list; ai != NULL && !connected; ai = ai->ai_next) + { +- DBG(DBG_info, "open_socket: connecting to \"%s\" = %d.%d.%d.%d\n", +- he->h_name, +- (unsigned char) he->h_addr_list[0][0], +- (unsigned char) he->h_addr_list[0][1], +- (unsigned char) he->h_addr_list[0][2], +- (unsigned char) he->h_addr_list[0][3]); +- } ++ gchar hostname[NI_MAXHOST]; ++ gchar hostaddr[NI_MAXHOST]; ++ ++ /* If all else fails */ ++ strncpy(hostname, "(unknown name)", NI_MAXHOST-1); ++ strncpy(hostaddr, "(unknown address)", NI_MAXHOST-1); ++ ++ /* Determine canonical name and IPv4/IPv6 address */ ++ (void) getnameinfo(ai->ai_addr, ai->ai_addrlen, hostname, sizeof(hostname), ++ NULL, 0, 0); ++ (void) getnameinfo(ai->ai_addr, ai->ai_addrlen, hostaddr, sizeof(hostaddr), ++ NULL, 0, NI_NUMERICHOST); ++ ++ DBG(DBG_info, "open_socket: connecting to \"%s\" (\"%s\"): %s\n", ++ server, hostname, hostaddr); + +- if (he->h_addrtype != AF_INET) +- { +- DBG(DBG_error, "open_socket: Unknown address family: %d\n", he->h_addrtype); +- return -1; +- } ++ if ((ai->ai_family != AF_INET) && (ai->ai_family != AF_INET6)) ++ { ++ DBG(DBG_error, "open_socket: Unknown address family: %d\n", ai->ai_family); ++ continue; ++ } + +- fd_socket = socket(AF_INET, SOCK_STREAM, 0); ++ fd_socket = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); + +- if (fd_socket < 0) +- { +- DBG(DBG_error, "open_socket: Could not create socket: %s\n", strerror(errno)); +- return -1; +- } ++ if (fd_socket < 0) ++ { ++ DBG(DBG_error, "open_socket: Could not create socket: %s\n", strerror(errno)); ++ continue; ++ } + +-/* setsockopt (dev->ctl, level, TCP_NODELAY, &on, sizeof (on)); */ ++ /* setsockopt (dev->ctl, level, TCP_NODELAY, &on, sizeof (on)); */ + +- sin.sin_port = htons(port); +- sin.sin_family = AF_INET; +- memcpy(&sin.sin_addr, he->h_addr_list[0], he->h_length); ++ if (connect(fd_socket, ai->ai_addr, ai->ai_addrlen) != 0) ++ { ++ DBG(DBG_error, "open_socket: Could not connect with port %d of socket: %s\n", port, strerror(errno)); ++ continue; ++ } ++ ++ /* All went well */ ++ connected = 1; ++ } + +- if (connect(fd_socket, &sin, sizeof(sin))) ++ if (!connected) + { +- DBG(DBG_error, "open_socket: Could not connect with port %d of socket: %s\n", ntohs(sin.sin_port), strerror(errno)); +- return -1; ++ DBG(DBG_info, "open_socket: Could not connect to any address"); ++ return -1; + } + +- DBG(DBG_info, "open_socket: Connected with port %d\n", ntohs(sin.sin_port)); ++ DBG(DBG_info, "open_socket: Connected with port %d\n", port); + +- return fd_socket; ++ return fd_socket; + } + + /* ---------------------------------------------------------------------------------------------------------------------- */ +-- +1.7.11.4 + diff --git a/SOURCES/xsane-0.997-off-root-build.patch b/SOURCES/xsane-0.997-off-root-build.patch new file mode 100644 index 0000000..02155f8 --- /dev/null +++ b/SOURCES/xsane-0.997-off-root-build.patch @@ -0,0 +1,127 @@ +From 7f43255972b741ff178f94233ffff67c9779c247 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Thu, 16 Aug 2012 10:57:38 +0200 +Subject: [PATCH] patch: off-root-build + +Squashed commit of the following: + +commit f88d28c807667f618b3b1cf91c12b823f3853983 +Author: Nils Philippsen +Date: Fri Nov 19 12:23:57 2010 +0100 + + enable off-root builds +--- + configure.in | 2 +- + doc/Makefile.in | 12 ++++++------ + lib/Makefile.in | 4 ++-- + src/Makefile.in | 8 ++++---- + 4 files changed, 13 insertions(+), 13 deletions(-) + +diff --git a/configure.in b/configure.in +index a770253..770077b 100644 +--- a/configure.in ++++ b/configure.in +@@ -312,4 +312,4 @@ echo "* ------------------------------------------------------------ *" + echo "* ... PLEASE READ SANE DOCUMENTATION BEFORE STARTING XSANE ... *" + echo "* ------------------------------------------------------------ *" + echo "****************************************************************" +-cat xsane.NEWS ++cat ${srcdir}/xsane.NEWS +diff --git a/doc/Makefile.in b/doc/Makefile.in +index 59b022b..4038a6b 100644 +--- a/doc/Makefile.in ++++ b/doc/Makefile.in +@@ -57,14 +57,14 @@ install: $(MANPAGES) + $(MKINSTALLDIRS) $(DESTDIR)$(datadir) + + $(MKINSTALLDIRS) $(DESTDIR)$(xsanedocdir) +- @for page in *.html; do\ ++ @for page in $(notdir $(wildcard $(srcdir)/*.html)); do \ + echo installing $${page} in $(DESTDIR)$(xsanedocdir)/$${page}...; \ +- $(INSTALL_DATA) $${page} $(DESTDIR)$(xsanedocdir)/$${page} || exit 1; \ ++ $(INSTALL_DATA) $(srcdir)/$${page} $(DESTDIR)$(xsanedocdir)/$${page} || exit 1; \ + done + +- @for image in *.jpg; do\ ++ @for image in $(notdir $(wildcard $(srcdir)/*.jpg)); do \ + echo installing $${image} in $(DESTDIR)$(xsanedocdir)/$${image}...; \ +- $(INSTALL_DATA) $${image} $(DESTDIR)$(xsanedocdir)/$${image} || exit 1; \ ++ $(INSTALL_DATA) $(srcdir)/$${image} $(DESTDIR)$(xsanedocdir)/$${image} || exit 1; \ + done + + uninstall: +@@ -73,12 +73,12 @@ uninstall: + rm -f $(DESTDIR)$(mandir)/man1/$${page} || exit 1; \ + done + +- @for page in *.html; do\ ++ @for page in $(notdir $(wildcard $(srcdir)/*.html)); do \ + echo uninstalling $(DESTDIR)$(xsanedocdir)/$${page}...; \ + rm -f $(DESTDIR)$(xsanedocdir)/$${page} || exit 1; \ + done + +- @for image in *.jpg; do\ ++ @for image in $(notdir $(wildcard $(srcdir)/*.jpg)); do \ + echo uninstalling $${image} in $(DESTDIR)$(xsanedocdir)/$${image}...; \ + rm -f $(DESTDIR)$(xsanedocdir)/$${image} || exit 1; \ + done +diff --git a/lib/Makefile.in b/lib/Makefile.in +index 7567d54..6be1eeb 100644 +--- a/lib/Makefile.in ++++ b/lib/Makefile.in +@@ -30,7 +30,7 @@ RANLIB = @RANLIB@ + + CC = @CC@ + INCLUDES = -I. -I$(srcdir) \ +- -I$(top_builddir)/include/sane -I$(top_srcdir)/include ++ -I$(top_builddir)/include/sane -I$(top_builddir)/include -I$(top_srcdir)/include + CPPFLAGS = @CPPFLAGS@ + CFLAGS = @CFLAGS@ + LDFLAGS = @LDFLAGS@ +@@ -68,7 +68,7 @@ uninstall: + check: + + depend: +- makedepend -I. -I../include *.c ++ makedepend -I. -I../include $(srcdir)/*.c + + clean: + rm -f *.out *.o *.lo *~ *.a *.bak $(TESTPROGRAMS) +diff --git a/src/Makefile.in b/src/Makefile.in +index 905ef93..2b246db 100644 +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -77,10 +77,10 @@ install: $(PROGRAMS) + $(INSTALL_DATA) $(srcdir)/xsane-eula.txt $(DESTDIR)$(sanedatadir)/xsane/xsane-eula.txt + $(INSTALL_DATA) $(srcdir)/xsane.desktop $(DESTDIR)$(desktopappdir)/xsane.desktop + $(INSTALL_DATA) $(srcdir)/xsane.xpm $(DESTDIR)$(pixmapdir)/xsane.xpm +- @for logo in *-logo.xpm; do \ ++ @for logo in $(notdir $(wildcard $(srcdir)/*-logo.xpm)); do \ + echo installing $(DESTDIR)$(sanedatadir)/xsane/$${logo}; \ + $(INSTALL_DATA) $(srcdir)/$${logo} $(DESTDIR)$(sanedatadir)/xsane/$${logo}; \ +- done ++ done + + uninstall: + @for program in $(BINPROGS); do \ +@@ -99,7 +99,7 @@ uninstall: + rm -f $(DESTDIR)$(desktopappdir)/xsane.desktop + echo uninstalling $(DESTDIR)$(pixmapdir)/xsane.xpm + rm -f $(DESTDIR)$(pixmapdir)/xsane.xpm +- @for logo in *-logo.xpm; do \ ++ @for logo in $(notdir $(wildcard $(srcdir)/*-logo.xpm)); do \ + echo uninstalling $(DESTDIR)$(sanedatadir)/xsane/$${logo}; \ + rm -f $(DESTDIR)$(sanedatadir)/xsane/$${logo}; \ + done +@@ -119,7 +119,7 @@ distclean: clean + rm -f Makefile $(PROGRAMS) + + depend: +- makedepend $(INCLUDES) *.c ++ makedepend $(INCLUDES) $(srcdir)/*.c + + .PHONY: all install depend clean distclean + +-- +1.7.11.4 + diff --git a/SOURCES/xsane-0.998-desktop-file.patch b/SOURCES/xsane-0.998-desktop-file.patch new file mode 100644 index 0000000..396be67 --- /dev/null +++ b/SOURCES/xsane-0.998-desktop-file.patch @@ -0,0 +1,53 @@ +From e3f3e266249f77ff655299daeab3128347d6cb17 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Wed, 30 Jan 2013 15:59:40 +0100 +Subject: [PATCH] patch: desktop-file + +Squashed commit of the following: + +commit e472b870c4490f41b9257c835d4c8c72a575e9e9 +Author: Nils Philippsen +Date: Wed Jan 30 15:57:57 2013 +0100 + + desktop file: use Name, GenericName, X-GNOME-FullName + +commit 9f7f6a039193f91473ded79780bd72e29d7b94fb +Author: Nils Philippsen +Date: Wed Jan 30 15:57:14 2013 +0100 + + desktop file: remove obsolete encoding key + +commit 79a444793a60bd729c72283ad1920f0ce9c65dc2 +Author: Nils Philippsen +Date: Fri Nov 19 12:41:23 2010 +0100 + + customize desktop file +--- + src/xsane.desktop | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/src/xsane.desktop b/src/xsane.desktop +index d5161e5..a2a4a61 100644 +--- a/src/xsane.desktop ++++ b/src/xsane.desktop +@@ -1,9 +1,14 @@ + [Desktop Entry] +-Encoding=UTF-8 +-Name=XSane - Scanning ++Version=1.0 ++#Name=XSane - Scanning ++Name=XSane ++GenericName=Scanner Tool ++X-GNOME-FullName=XSane (Scanner Tool) + Comment=Acquire images from a scanner + Exec=xsane ++TryExec=xsane + Icon=xsane + Terminal=false + Type=Application +-Categories=Application;Graphics ++Categories=Graphics;2DGraphics;RasterGraphics;Scanning;GTK; ++StartupNotify=true +-- +1.8.1 + diff --git a/SOURCES/xsane-0.998-libpng.patch b/SOURCES/xsane-0.998-libpng.patch new file mode 100644 index 0000000..c792c5a --- /dev/null +++ b/SOURCES/xsane-0.998-libpng.patch @@ -0,0 +1,41 @@ +From bd29bb933cf80f397dd28286635da2aec58e6e6c Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Thu, 16 Aug 2012 11:26:54 +0200 +Subject: [PATCH] patch: libpng + +Squashed commit of the following: + +commit 9df6d60274c95b5081faf5b398aa27cde969c649 +Author: Nils Philippsen +Date: Mon Nov 21 13:50:38 2011 +0100 + + support libpng-1.5 +--- + src/xsane-save.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/xsane-save.c b/src/xsane-save.c +index 87ef685..5461bf1 100644 +--- a/src/xsane-save.c ++++ b/src/xsane-save.c +@@ -4912,7 +4912,7 @@ int xsane_save_png(FILE *outfile, int compression, FILE *imagefile, Image_info * + return -1; /* error */ + } + +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + snprintf(buf, sizeof(buf), "%s %s", ERR_DURING_SAVE, ERR_LIBPNG); + xsane_back_gtk_error(buf, TRUE); +@@ -5102,7 +5102,7 @@ int xsane_save_png_16(FILE *outfile, int compression, FILE *imagefile, Image_inf + return -1; /* error */ + } + +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + snprintf(buf, sizeof(buf), "%s %s", ERR_DURING_SAVE, ERR_LIBPNG); + xsane_back_gtk_error(buf, TRUE); +-- +1.7.11.4 + diff --git a/SOURCES/xsane-0.998-preview-selection.patch b/SOURCES/xsane-0.998-preview-selection.patch new file mode 100644 index 0000000..2939818 --- /dev/null +++ b/SOURCES/xsane-0.998-preview-selection.patch @@ -0,0 +1,60 @@ +From d8bf0d3f0af16e208b52084f19a9a1287acbcea0 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Fri, 2 Sep 2011 11:56:26 +0200 +Subject: [PATCH] patch: preview-selection +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Squashed commit of the following: + +commit e7c03a6de0c76256810b6340e0a954e88c3448e9 +Author: Reinhard Fössmeier +Date: Wed May 12 20:23:18 2010 +0200 + + fixed a problem in mouse event processing + + Fixed a problem in mouse event processing that interfered with selecting + the scan rectangle in the preview window. +--- + src/xsane-preview.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/src/xsane-preview.c b/src/xsane-preview.c +index f089dd1..264c775 100644 +--- a/src/xsane-preview.c ++++ b/src/xsane-preview.c +@@ -80,7 +80,6 @@ + #include "xsane-preview.h" + #include "xsane-preferences.h" + #include "xsane-gamma.h" +-#include + + + #ifndef PATH_MAX +@@ -3023,9 +3022,9 @@ static gint preview_motion_event_handler(GtkWidget *window, GdkEvent *event, gpo + preview_display_color_components(p, event->motion.x, event->motion.y); + + switch (((GdkEventMotion *)event)->state & +- GDK_Num_Lock & GDK_Caps_Lock & GDK_Shift_Lock & GDK_Scroll_Lock) /* mask all Locks */ ++ (GDK_BUTTON1_MASK | GDK_BUTTON2_MASK | GDK_BUTTON3_MASK)) /* only check for mouse buttons */ + { +- case 256: /* left button */ ++ case GDK_BUTTON1_MASK: /* left button */ + + DBG(DBG_info2, "left button\n"); + +@@ -3292,8 +3291,8 @@ static gint preview_motion_event_handler(GtkWidget *window, GdkEvent *event, gpo + } + break; + +- case 512: /* middle button */ +- case 1024: /* right button */ ++ case GDK_BUTTON2_MASK: /* middle button */ ++ case GDK_BUTTON3_MASK: /* right button */ + DBG(DBG_info2, "middle or right button\n"); + + if (p->selection_drag) +-- +1.7.11.4 + diff --git a/SOURCES/xsane-0.998-wmclass.patch b/SOURCES/xsane-0.998-wmclass.patch new file mode 100644 index 0000000..4fd84ba --- /dev/null +++ b/SOURCES/xsane-0.998-wmclass.patch @@ -0,0 +1,33 @@ +From a0b23d7e1991b23e2b9ab78bf382c55b9e24cfb9 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Fri, 25 May 2012 11:47:39 +0200 +Subject: [PATCH] patch: wmclass + +Squashed commit of the following: + +commit d42b7a9dbe397a301373e3cbaa589540a1475a0b +Author: Nils Philippsen +Date: Fri May 25 11:45:48 2012 +0200 + + set program name -> wmclass to match desktop file name +--- + src/xsane.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/xsane.c b/src/xsane.c +index 8b24b0c..eee76ff 100644 +--- a/src/xsane.c ++++ b/src/xsane.c +@@ -6208,6 +6208,9 @@ int main(int argc, char **argv) + xsane.ipc_pipefd[1] = 0; + } + ++ /* Set program name -> wmclass to match desktop file name */ ++ g_set_prgname("xsane"); ++ + #if 0 + bindtextdomain(PACKAGE, STRINGIFY(LOCALEDIR)); + textdomain(PACKAGE); +-- +1.7.11.4 + diff --git a/SOURCES/xsane-0.999-lcms2.patch b/SOURCES/xsane-0.999-lcms2.patch new file mode 100644 index 0000000..c3d696c --- /dev/null +++ b/SOURCES/xsane-0.999-lcms2.patch @@ -0,0 +1,372 @@ +From 30af0e2edbf061b71bed9536d826894449f0390d Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Mon, 23 Sep 2013 16:11:31 +0200 +Subject: [PATCH] patch: lcms2 + +Squashed commit of the following: + +commit f975accf7e1a08438b63580ea848457d373200f5 +Author: Nils Philippsen +Date: Mon Sep 23 14:53:45 2013 +0200 + + Add support for lcms 2.x. +--- + configure.in | 22 ++++++++++++++---- + include/config.h.in | 8 ++++++- + src/xsane-preview.c | 6 +++-- + src/xsane-save.c | 38 ++++++++++++++++++++++++++----- + src/xsane-viewer.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++--- + src/xsane.h | 8 ++++++- + 6 files changed, 130 insertions(+), 17 deletions(-) + +diff --git a/configure.in b/configure.in +index df7b114..3659c97 100644 +--- a/configure.in ++++ b/configure.in +@@ -130,7 +130,17 @@ if test "${USE_TIFF}" = "yes"; then + fi + + if test "${USE_LCMS}" = "yes"; then +- AC_CHECK_LIB(lcms, cmsOpenProfileFromFile) ++ AC_SEARCH_LIBS(cmsOpenProfileFromFile, [lcms2 lcms]) ++ if test "${ac_cv_search_cmsOpenProfileFromFile}" != "no"; then ++ AC_DEFINE(HAVE_LIBLCMS, 1, [Define if LCMS is to be used.]) ++ fi ++ if test "${ac_cv_search_cmsOpenProfileFromFile}" == "-llcms2"; then ++ AC_DEFINE(HAVE_LIBLCMS2, 1, [Define if you have liblcms2.]) ++ else ++ if test "${ac_cv_search_cmsOpenProfileFromFile}" == "-llcms"; then ++ AC_DEFINE(HAVE_LIBLCMS1, 1, [Define if you have liblcms.]) ++ fi ++ fi + fi + + dnl Checks for library functions. +@@ -294,10 +304,14 @@ else + echo "* - PNG support deactivated *" + fi + +-if test "${ac_cv_lib_lcms_cmsOpenProfileFromFile}" = "yes"; then +- echo "* - LCMS (color management) support activated *" ++if test "${ac_cv_search_cmsOpenProfileFromFile}" = "-llcms2"; then ++ echo "* - LCMS (color management) support activated (lcms2) *" + else +- echo "* - LCMS (color management) support deactivated *" ++ if test "${ac_cv_search_cmsOpenProfileFromFile}" = "-llcms"; then ++ echo "* - LCMS (color management) support activated (lcms) *" ++ else ++ echo "* - LCMS (color management) support deactivated *" ++ fi + fi + + echo "* *" +diff --git a/include/config.h.in b/include/config.h.in +index ecc9637..f9a3e40 100755 +--- a/include/config.h.in ++++ b/include/config.h.in +@@ -290,9 +290,15 @@ + /* Define if you have libtiff. */ + #undef HAVE_LIBTIFF + +-/* Define if you have liblcms. */ ++/* Define if LCMS is to be used. */ + #undef HAVE_LIBLCMS + ++/* Define if you have liblcms. */ ++#undef HAVE_LIBLCMS1 ++ ++/* Define if you have liblcms2. */ ++#undef HAVE_LIBLCMS2 ++ + #ifndef HAVE_STRNCASECMP + /* OS/2 needs this */ + # define strncasecmp(a, b, c) strnicmp(a, b, c) +diff --git a/src/xsane-preview.c b/src/xsane-preview.c +index 6327ca7..6eaf687 100644 +--- a/src/xsane-preview.c ++++ b/src/xsane-preview.c +@@ -6346,8 +6346,8 @@ int preview_do_color_correction(Preview *p) + cmsHPROFILE hOutProfile = NULL; + cmsHPROFILE hProofProfile = NULL; + cmsHTRANSFORM hTransform = NULL; +- DWORD input_format, output_format; +- DWORD cms_flags = 0; ++ cmsUInt32Number input_format, output_format; ++ cmsUInt32Number cms_flags = 0; + int proof = 0; + char *cms_proof_icm_profile = NULL; + int linesize = 0; +@@ -6355,7 +6355,9 @@ int preview_do_color_correction(Preview *p) + + DBG(DBG_proc, "preview_do_color_correction\n"); + ++#ifdef HAVE_LIBLCMS1 + cmsErrorAction(LCMS_ERROR_SHOW); ++#endif + + if (preferences.cms_bpc) + { +diff --git a/src/xsane-save.c b/src/xsane-save.c +index 75e0a63..2d0e44b 100644 +--- a/src/xsane-save.c ++++ b/src/xsane-save.c +@@ -832,9 +832,9 @@ cmsHTRANSFORM xsane_create_cms_transform(Image_info *image_info, int cms_functio + cmsHPROFILE hInProfile = NULL; + cmsHPROFILE hOutProfile = NULL; + cmsHTRANSFORM hTransform = NULL; +- DWORD cms_input_format; +- DWORD cms_output_format; +- DWORD cms_flags = 0; ++ cmsUInt32Number cms_input_format; ++ cmsUInt32Number cms_output_format; ++ cmsUInt32Number cms_flags = 0; + + if (cms_function == XSANE_CMS_FUNCTION_EMBED_SCANNER_ICM_PROFILE) + { +@@ -843,7 +843,9 @@ cmsHTRANSFORM xsane_create_cms_transform(Image_info *image_info, int cms_functio + + DBG(DBG_info, "Prepare CMS transform\n"); + ++#ifdef HAVE_LIBLCMS1 + cmsErrorAction(LCMS_ERROR_SHOW); ++#endif + + if (cms_bpc) + { +@@ -890,10 +892,18 @@ cmsHTRANSFORM xsane_create_cms_transform(Image_info *image_info, int cms_functio + if (image_info->channels == 1) /* == 1 (grayscale) */ + { + #if 1 /* xxx oli */ ++# ifdef HAVE_LIBLCMS2 ++ cmsToneCurve *Gamma = cmsBuildGamma(NULL, 2.2); ++# else + LPGAMMATABLE Gamma = cmsBuildGamma(256, 2.2); ++# endif + + hOutProfile = cmsCreateGrayProfile(cmsD50_xyY(), Gamma); ++# ifdef HAVE_LIBLCMS2 ++ cmsFreeToneCurve(Gamma); ++# else + cmsFreeGamma(Gamma); ++# endif + #endif + } + else +@@ -2896,7 +2906,11 @@ static int xsane_write_CSA(FILE *outfile, char *input_profile, int intent) + return -1; + } + ++#ifdef HAVE_LIBLCMS2 ++ n = cmsGetPostScriptCSA(NULL, hProfile, intent, 0, NULL, 0); ++#else + n = cmsGetPostScriptCSA(hProfile, intent, NULL, 0); ++#endif + if (n == 0) + { + return -2; +@@ -2908,7 +2922,11 @@ static int xsane_write_CSA(FILE *outfile, char *input_profile, int intent) + return -3; + } + ++#ifdef HAVE_LIBLCMS2 ++ cmsGetPostScriptCSA(NULL, hProfile, intent, 0, buffer, n); ++#else + cmsGetPostScriptCSA(hProfile, intent, buffer, n); ++#endif + buffer[n] = 0; + + fprintf(outfile, "%s", buffer); +@@ -2927,7 +2945,7 @@ static int xsane_write_CRD(FILE *outfile, char *output_profile, int intent, int + cmsHPROFILE hProfile; + size_t n; + char* buffer; +- DWORD flags = cmsFLAGS_NODEFAULTRESOURCEDEF; ++ cmsUInt32Number flags = cmsFLAGS_NODEFAULTRESOURCEDEF; + + hProfile = cmsOpenProfileFromFile(output_profile, "r"); + if (!hProfile) +@@ -2940,7 +2958,11 @@ static int xsane_write_CRD(FILE *outfile, char *output_profile, int intent, int + flags |= cmsFLAGS_BLACKPOINTCOMPENSATION; + } + ++#ifdef HAVE_LIBLCMS2 ++ n = cmsGetPostScriptCRD(NULL, hProfile, intent, flags, NULL, 0); ++#else + n = cmsGetPostScriptCRDEx(hProfile, intent, flags, NULL, 0); ++#endif + if (n == 0) + { + return -2; +@@ -2952,7 +2974,11 @@ static int xsane_write_CRD(FILE *outfile, char *output_profile, int intent, int + return -3; + } + ++#ifdef HAVE_LIBLCMS2 ++ cmsGetPostScriptCRD(NULL, hProfile, intent, flags, buffer, n); ++#else + cmsGetPostScriptCRDEx(hProfile, intent, flags, buffer, n); ++#endif + buffer[n] = 0; + + fprintf(outfile, "%s", buffer); +@@ -4349,7 +4375,7 @@ static void xsane_jpeg_embed_scanner_icm_profile(j_compress_ptr cinfo_ptr, const + { + FILE *icm_profile; + size_t size, embed_len; +- LPBYTE embed_buffer; ++ cmsUInt8Number *embed_buffer; + + DBG(DBG_proc, "xsane_jpeg_embed_scanner_icm_profile(%s)\n", icm_filename); + +@@ -4363,7 +4389,7 @@ static void xsane_jpeg_embed_scanner_icm_profile(j_compress_ptr cinfo_ptr, const + size = ftell(icm_profile); + fseek(icm_profile, 0, SEEK_SET); + +- embed_buffer = (LPBYTE) malloc(size + 1); ++ embed_buffer = (cmsUInt8Number *) malloc(size + 1); + if (embed_buffer) + { + embed_len = fread(embed_buffer, 1, size, icm_profile); +diff --git a/src/xsane-viewer.c b/src/xsane-viewer.c +index 69a444d..844c077 100644 +--- a/src/xsane-viewer.c ++++ b/src/xsane-viewer.c +@@ -1795,6 +1795,9 @@ static void xsane_viewer_set_cms_gamut_alarm_color_callback(GtkWidget *widget, g + { + Viewer *v = (Viewer *) data; + int val; ++#ifdef HAVE_LIBLCMS2 ++ cmsUInt16Number alarm_codes[cmsMAXCHANNELS]; ++#endif + + g_signal_handlers_block_by_func(GTK_OBJECT(v->cms_gamut_alarm_color_widget[0]), (GtkSignalFunc) xsane_viewer_set_cms_gamut_alarm_color_callback, v); + g_signal_handlers_block_by_func(GTK_OBJECT(v->cms_gamut_alarm_color_widget[1]), (GtkSignalFunc) xsane_viewer_set_cms_gamut_alarm_color_callback, v); +@@ -1811,6 +1814,49 @@ static void xsane_viewer_set_cms_gamut_alarm_color_callback(GtkWidget *widget, g + v->cms_gamut_alarm_color = val; + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(v->cms_gamut_alarm_color_widget[v->cms_gamut_alarm_color]), TRUE); + ++#ifdef HAVE_LIBLCMS2 ++ switch(v->cms_gamut_alarm_color) ++ { ++ default: ++ case 0: /* black */ ++ alarm_codes[0] = (cmsUInt16Number) 0; ++ alarm_codes[1] = (cmsUInt16Number) 0; ++ alarm_codes[2] = (cmsUInt16Number) 0; ++ break; ++ ++ case 1: /* gray */ ++ alarm_codes[0] = (cmsUInt16Number) 128; ++ alarm_codes[1] = (cmsUInt16Number) 128; ++ alarm_codes[2] = (cmsUInt16Number) 128; ++ break; ++ ++ case 2: /* white */ ++ alarm_codes[0] = (cmsUInt16Number) 255; ++ alarm_codes[1] = (cmsUInt16Number) 255; ++ alarm_codes[2] = (cmsUInt16Number) 255; ++ break; ++ ++ case 3: /* red */ ++ alarm_codes[0] = (cmsUInt16Number) 255; ++ alarm_codes[1] = (cmsUInt16Number) 0; ++ alarm_codes[2] = (cmsUInt16Number) 0; ++ break; ++ ++ case 4: /* green */ ++ alarm_codes[0] = (cmsUInt16Number) 0; ++ alarm_codes[1] = (cmsUInt16Number) 255; ++ alarm_codes[2] = (cmsUInt16Number) 0; ++ break; ++ ++ case 5: /* blue */ ++ alarm_codes[0] = (cmsUInt16Number) 0; ++ alarm_codes[1] = (cmsUInt16Number) 0; ++ alarm_codes[2] = (cmsUInt16Number) 255; ++ break; ++ } ++ ++ cmsSetAlarmCodes(alarm_codes); ++#else + switch(v->cms_gamut_alarm_color) + { + default: +@@ -1838,6 +1884,7 @@ static void xsane_viewer_set_cms_gamut_alarm_color_callback(GtkWidget *widget, g + cmsSetAlarmCodes(0, 0, 255); + break; + } ++#endif + + g_signal_handlers_unblock_by_func(GTK_OBJECT(v->cms_gamut_alarm_color_widget[0]), (GtkSignalFunc) xsane_viewer_set_cms_gamut_alarm_color_callback, v); + g_signal_handlers_unblock_by_func(GTK_OBJECT(v->cms_gamut_alarm_color_widget[1]), (GtkSignalFunc) xsane_viewer_set_cms_gamut_alarm_color_callback, v); +@@ -2172,9 +2219,9 @@ static int xsane_viewer_read_image(Viewer *v) + cmsHTRANSFORM hTransform = NULL; + int proof = 0; + char *cms_proof_icm_profile = NULL; +- DWORD cms_input_format; +- DWORD cms_output_format; +- DWORD cms_flags = 0; ++ cmsUInt32Number cms_input_format; ++ cmsUInt32Number cms_output_format; ++ cmsUInt32Number cms_flags = 0; + #endif + + /* open imagefile */ +@@ -2203,7 +2250,9 @@ static int xsane_viewer_read_image(Viewer *v) + + if ((v->enable_color_management) && (v->cms_enable)) + { ++#ifdef HAVE_LIBLCMS1 + cmsErrorAction(LCMS_ERROR_SHOW); ++#endif + + if (v->cms_bpc) + { +@@ -2801,6 +2850,9 @@ Viewer *xsane_viewer_new(char *filename, char *selection_filetype, int allow_red + GtkWidget *scrolled_window; + GtkWidget *zoom_option_menu, *zoom_menu, *zoom_menu_item; + int i, selection; ++#ifdef HAVE_LIBLCMS2 ++ cmsUInt16Number alarm_codes[cmsMAXCHANNELS]; ++#endif + + DBG(DBG_proc, "viewer_new(%s)\n", filename); + +@@ -2830,8 +2882,15 @@ Viewer *xsane_viewer_new(char *filename, char *selection_filetype, int allow_red + v->cms_proofing_intent = INTENT_ABSOLUTE_COLORIMETRIC; + v->cms_gamut_check = 0; + v->cms_gamut_alarm_color = 3; /* red */ ++#ifdef HAVE_LIBLCMS2 ++ alarm_codes[0] = (cmsUInt16Number) 255; ++ alarm_codes[1] = (cmsUInt16Number) 0; ++ alarm_codes[2] = (cmsUInt16Number) 0; ++ cmsSetAlarmCodes(alarm_codes); ++#else + cmsSetAlarmCodes(255, 0, 0); + #endif ++#endif + if (selection_filetype) + { + v->selection_filetype = strdup(selection_filetype); +diff --git a/src/xsane.h b/src/xsane.h +index 4067d61..adcc0ed 100644 +--- a/src/xsane.h ++++ b/src/xsane.h +@@ -70,7 +70,13 @@ + #include + + #ifdef HAVE_LIBLCMS +-# include "lcms.h" ++# ifdef HAVE_LIBLCMS2 ++# include "lcms2.h" ++# else ++# include "lcms.h" ++typedef BYTE cmsUInt8Number; ++typedef DWORD cmsUInt32Number; ++# endif + #else + # define cmsHTRANSFORM void * + #endif +-- +1.8.3.1 + diff --git a/SOURCES/xsane-0.999-man-page.patch b/SOURCES/xsane-0.999-man-page.patch new file mode 100644 index 0000000..169dad3 --- /dev/null +++ b/SOURCES/xsane-0.999-man-page.patch @@ -0,0 +1,109 @@ +From 2dbbd80a5fb80741729c7cd5027af058b9c08c2c Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Mon, 8 Jul 2013 17:46:06 +0200 +Subject: [PATCH] patch: man-page + +Squashed commit of the following: + +commit e1915d50b677458127a8ad1c7953ee1d2e2ce250 +Author: Nils Philippsen +Date: Mon Jul 8 17:44:26 2013 +0200 + + xsane.man: update command line options +--- + doc/xsane.man | 29 ++++++++++++++++++++++++----- + 1 file changed, 24 insertions(+), 5 deletions(-) + +diff --git a/doc/xsane.man b/doc/xsane.man +index ee363a8..38b453d 100644 +--- a/doc/xsane.man ++++ b/doc/xsane.man +@@ -4,6 +4,7 @@ + xsane - scanner frontend for SANE + .SH SYNOPSIS + .B xsane ++.RB [ --help | -h ] + .RB [ --version | -v ] + .RB [ --license | -l ] + .RB [ --device-settings +@@ -13,8 +14,9 @@ xsane - scanner frontend for SANE + .RB [ --viewer | -V ] + .RB [ --save | -s ] + .RB [ --copy | -c ] ++.RB [ --multipage | -m ] + .RB [ --fax | -f ] +-.RB [ --mail | -m ] ++.RB [ --email | -e ] + .RB [ --no-mode-selection | -n ] + .RB [ --Fixed | -F ] + .RB [ --Resizable | -R ] +@@ -25,6 +27,7 @@ xsane - scanner frontend for SANE + .IR name ] + .RB [ --display + .IR d ] ++.RB [ --no-xshm ] + .RB [ --sync ] + .RI [ devicename ] + .SH DESCRIPTION +@@ -121,6 +124,12 @@ and + .SH OPTIONS + .PP + If the ++.B --help ++or ++.B -h ++flag is given xsane displays a short help message and exits. ++.PP ++If the + .B --version + or + .B -v +@@ -128,7 +137,7 @@ flag is given xsane prints a version information, some + information about gtk+ and gimp version it is compiled + against and lists the supported file formats, then it exits. + .PP +-when the ++If the + .B --license + or + .B -l +@@ -161,16 +170,22 @@ or + flag forces xsane to start in copy mode. + .PP + The ++.B --multipage ++or ++.B -m ++flag forces xsane to start in multipage mode. ++.PP ++The + .B --fax + or + .B -f + flag forces xsane to start in fax mode. + .PP + The +-.B --mail ++.B --email + or +-.B -m +-flag forces xsane to start in mail mode. ++.B -e ++flag forces xsane to start in e-mail mode. + .PP + The + .B --no-mode-selection +@@ -217,6 +232,10 @@ flag selects the X11 display used to present the graphical user-interface + for details). + .PP + The ++.B --no-xshm ++flag forces xsane not to use shared memory images. ++.PP ++The + .B --sync + flag requests a synchronous connection with the X11 server. This is for + debugging purposes only. +-- +1.8.3.1 + diff --git a/SOURCES/xsane-0.999-no-file-selected.patch b/SOURCES/xsane-0.999-no-file-selected.patch new file mode 100644 index 0000000..5550c4c --- /dev/null +++ b/SOURCES/xsane-0.999-no-file-selected.patch @@ -0,0 +1,91 @@ +From 2f7abcaa7ad39f118b2f49fdcba9c90b37b3d972 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Fri, 5 Jul 2013 16:15:55 +0200 +Subject: [PATCH] patch: no-file-selected + +Squashed commit of the following: + +commit f887550276e324151947960292a7266c71aeb573 +Author: Pavel Polischouk +Date: Fri Nov 25 23:55:49 2011 -0500 + + fix changing working directory (#621778) + + The patch checks the value returned by xsane_back_gtk_get_filename. In + most places it will check the result properly (taking 0 for success), + except one case where it takes 0 for an error, and this happens in + xsane_browse_filename_callback (xsane-front-gtk.c). The new code would + abort copying the filename into preferences structure if 0 was returned, + and that's the OK case. I'm very curious how wonderfully it would blow + up if an actual error was returned, but that's a different story. + +commit 2c02ddd8282fa231107d8860aee4d92bdb5cb8e8 +Author: Nils Philippsen +Date: Fri Nov 19 12:25:54 2010 +0100 + + don't crash if no files are selected (#608047) +--- + src/xsane-back-gtk.c | 20 ++++++++++++++++---- + src/xsane-front-gtk.c | 6 +++++- + 2 files changed, 21 insertions(+), 5 deletions(-) + +diff --git a/src/xsane-back-gtk.c b/src/xsane-back-gtk.c +index bca9eb2..6ef1506 100644 +--- a/src/xsane-back-gtk.c ++++ b/src/xsane-back-gtk.c +@@ -1111,6 +1111,11 @@ static void xsane_back_gtk_filetype2_callback(GtkWidget *widget, gpointer data) + + chooser_filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(filechooser)); + ++ if (!chooser_filename) ++ { ++ return; ++ } ++ + if ((new_filetype) && (*new_filetype)) + { + extension = strrchr(chooser_filename, '.'); +@@ -1505,12 +1510,19 @@ int xsane_back_gtk_get_filename(const char *label, const char *default_name, siz + #endif + + chooser_filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(filechooser)); +- strncpy(filename, chooser_filename, max_len - 1); +- g_free(chooser_filename); ++ if (chooser_filename) ++ { ++ strncpy(filename, chooser_filename, max_len - 1); ++ g_free(chooser_filename); + +- filename[max_len - 1] = '\0'; ++ filename[max_len - 1] = '\0'; + +- ok = TRUE; ++ ok = TRUE; ++ } ++ else ++ { ++ ok = FALSE; ++ } + } + + gtk_widget_destroy(filechooser); +diff --git a/src/xsane-front-gtk.c b/src/xsane-front-gtk.c +index 4c973fb..7bb49b0 100644 +--- a/src/xsane-front-gtk.c ++++ b/src/xsane-front-gtk.c +@@ -1333,7 +1333,11 @@ static void xsane_browse_filename_callback(GtkWidget *widget, gpointer data) + snprintf(windowname, sizeof(windowname), "%s %s %s", xsane.prog_name, WINDOW_OUTPUT_FILENAME, xsane.device_text); + + umask((mode_t) preferences.directory_umask); /* define new file permissions */ +- xsane_back_gtk_get_filename(windowname, filename, sizeof(filename), filename, &preferences.filetype, &preferences.cms_function, XSANE_FILE_CHOOSER_ACTION_SELECT_SAVE, show_extra_widgets, XSANE_FILE_FILTER_ALL | XSANE_FILE_FILTER_IMAGES, XSANE_FILE_FILTER_IMAGES); ++ if (xsane_back_gtk_get_filename(windowname, filename, sizeof(filename), filename, &preferences.filetype, &preferences.cms_function, XSANE_FILE_CHOOSER_ACTION_SELECT_SAVE, show_extra_widgets, XSANE_FILE_FILTER_ALL | XSANE_FILE_FILTER_IMAGES, XSANE_FILE_FILTER_IMAGES) < 0) ++ { ++ xsane_set_sensitivity(TRUE); ++ return; ++ } + umask(XSANE_DEFAULT_UMASK); /* define new file permissions */ + + if (preferences.filename) +-- +1.8.3.1 + diff --git a/SOURCES/xsane-0.999-pdf-no-high-bpp.patch b/SOURCES/xsane-0.999-pdf-no-high-bpp.patch new file mode 100644 index 0000000..10cdbea --- /dev/null +++ b/SOURCES/xsane-0.999-pdf-no-high-bpp.patch @@ -0,0 +1,51 @@ +From c0686879ac66c1933aefbb62b69afb0c9a0db912 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Mon, 9 Sep 2013 17:13:15 +0200 +Subject: [PATCH] patch: pdf-no-high-bpp + +Squashed commit of the following: + +commit 9f7d97e114389595481f6e9d3ac1038972f3f73b +Author: Nils Philippsen +Date: Mon Sep 9 17:08:38 2013 +0200 + + avoid producing PDFs with bpp > 8 +--- + src/xsane-save.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/src/xsane-save.c b/src/xsane-save.c +index 5461bf1..75e0a63 100644 +--- a/src/xsane-save.c ++++ b/src/xsane-save.c +@@ -4205,6 +4205,18 @@ int xsane_save_pdf(FILE *outfile, FILE *imagefile, Image_info *image_info, float + + *cancel_save = 0; + ++ if (image_info->depth > 8) ++ { ++ char buf[TEXTBUFSIZE]; ++ ++ snprintf(buf, sizeof(buf), "%s %s", ERR_DURING_SAVE, "PDF doesn't allow bit depths > 8"); ++ DBG(DBG_error, "%s\n", buf); ++ xsane_back_gtk_decision(ERR_HEADER_ERROR, (gchar **) error_xpm, buf, BUTTON_OK, NULL, TRUE /* wait */); ++ *cancel_save = 1; ++ ++ goto bail_out; ++ } ++ + xsane_save_pdf_create_document_header(outfile, &xref, 1, flatedecode); + + if (apply_ICM_profile && (cms_function == XSANE_CMS_FUNCTION_EMBED_SCANNER_ICM_PROFILE)) +@@ -4232,6 +4244,8 @@ int xsane_save_pdf(FILE *outfile, FILE *imagefile, Image_info *image_info, float + *cancel_save = 1; + } + ++bail_out: ++ + return (*cancel_save); + } + +-- +1.8.3.1 + diff --git a/SOURCES/xsane-256x256.png b/SOURCES/xsane-256x256.png new file mode 100644 index 0000000000000000000000000000000000000000..608d63aca2866af0ef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literal 0 HcmV?d00001 diff --git a/SPECS/xsane.spec b/SPECS/xsane.spec new file mode 100644 index 0000000..b9fb97a --- /dev/null +++ b/SPECS/xsane.spec @@ -0,0 +1,714 @@ +# if you rebuild, please change bugtracker_url accordingly: +%global bugtracker_url http://bugzilla.redhat.com + +# Drop the vendor tag from Fedora 19 on +%if (0%{?fedora} && 0%{?fedora} < 19) || (0%{?rhel} && 0%{?rhel} < 7) +%global with_desktop_vendor_tag 1 +%endif + +%global gimpplugindir %(gimptool --gimpplugindir 2>/dev/null || echo INVALID)/plug-ins +%global iconrootdir %{_datadir}/icons/hicolor + +# needed for off-root building +%global _configure ../configure + +Name: xsane +Summary: X Window System front-end for the SANE scanner interface +Version: 0.999 +Release: 9%{?dist} +Source0: http://www.xsane.org/download/%{name}-%{version}.tar.gz +Source1: xsane-256x256.png +# use "xdg-open" instead of "netscape" to launch help browser +# submitted to upstream (Oliver Rauch) via email, 2013-06-04 +Patch0: xsane-0.995-xdg-open.patch +# submitted to upstream (Oliver Rauch) via email, 2009-08-18 +Patch1: xsane-0.995-close-fds.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=504344 +# distro-specific(?), upstream won't accept it: "don't show license dialog" +# submitted to upstream (Oliver Rauch) anyway via email, 2013-06-04 +Patch2: xsane-0.996-no-eula.patch +# enable off-root building +# submitted to upstream (Oliver Rauch) via email, 2010-06-23 +Patch3: xsane-0.997-off-root-build.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=608047 +# https://bugzilla.redhat.com/show_bug.cgi?id=621778 +# submitted to upstream (Oliver Rauch) via email, 2013-07-05 +Patch4: xsane-0.999-no-file-selected.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=198422 +# submitted to upstream (Oliver Rauch) via email, 2010-06-29 +Patch5: xsane-0.997-ipv6.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=624190 +# fix from: https://bugs.launchpad.net/ubuntu/+source/xsane/+bug/370818 +# submitted to upstream (Oliver Rauch) via email, 2011-06-01 +Patch6: xsane-0.998-preview-selection.patch +# fix building with libpng >= 1.5 +# submitted to upstream (Oliver Rauch) via email, 2011-11-21 +Patch7: xsane-0.998-libpng.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=795085 +# set program name/wmclass so GNOME shell picks appropriate high resolution +# icon file +# submitted to upstream (Oliver Rauch) via email, 2013-06-04 +Patch8: xsane-0.998-wmclass.patch +# partly distro-specific: customize desktop file +# submitted to upstream (Oliver Rauch) via email, 2013-06-04 +Patch9: xsane-0.998-desktop-file.patch +# man page: update command line options +# submitted to upstream (Oliver Rauch) via email, 2013-07-08 +Patch10: xsane-0.999-man-page.patch +# avoid producing PDFs with bpp > 8 +# submitted to upstream (Oliver Rauch) via email, 2013-09-09 +Patch11: xsane-0.999-pdf-no-high-bpp.patch +# build against lcms 2.x +# submitted to upstream (Oliver Rauch) via email, 2013-09-23 +Patch12: xsane-0.999-lcms2.patch +# autoconf-generated files +Patch100: xsane-0.999-7-autoconf.patch.bz2 +License: GPLv2+ +URL: http://www.xsane.org/ +Group: Applications/Multimedia +Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%__id_u -n) +BuildRequires: gimp-devel +BuildRequires: lcms2-devel +BuildRequires: libjpeg-devel +BuildRequires: libpng-devel +BuildRequires: sane-backends-devel >= 1.0.19-15 +BuildRequires: desktop-file-utils >= 0.2.92 +BuildRequires: libtiff-devel +BuildRequires: gettext-devel +BuildRequires: netpbm-progs +BuildRequires: ImageMagick +Requires: xsane-common + +%description +XSane is an X based interface for the SANE (Scanner Access Now Easy) +library, which provides access to scanners, digital cameras, and other +capture devices. XSane is written in GTK+ and provides control for +performing the scan and then manipulating the captured image. + +%package gimp +Summary: GIMP plug-in providing the SANE scanner interface +Group: Applications/Multimedia +Requires: gimp >= 2:2.2.12-4 +Requires: xsane-common + +%description gimp +This package provides the regular XSane frontend for the SANE scanner +interface, but it works as a GIMP plug-in. You must have GIMP +installed to use this package. + +%package common +Summary: Common files for xsane packages +Group: Applications/Multimedia + +%description common +This package contains common files needed by other xsane packages. + +%prep +%setup -q + +# convert some files to UTF-8 +for doc in xsane.{CHANGES,PROBLEMS,INSTALL}; do + iconv -f ISO-8859-1 -t utf8 "$doc" -o "$doc.new" && \ + touch -r "$doc" "$doc.new" && \ + mv "$doc.new" "$doc" +done + +%patch0 -p1 -b .xdg-open +%patch1 -p1 -b .close-fds +%patch2 -p1 -b .no-eula +%patch3 -p1 -b .off-root-build +%patch4 -p1 -b .no-file-selected +%patch5 -p1 -b .ipv6 +%patch6 -p1 -b .preview-selection.patch +%patch7 -p1 -b .libpng +%patch8 -p1 -b .wmclass +%patch9 -p1 -b .desktop-file +%patch10 -p1 -b .man-page +%patch11 -p1 -b .pdf-no-high-bpp +%patch12 -p1 -b .lcms2 + +%patch100 -p1 -b .autoconf + +# in-root config.h breaks off-root building +rm include/config.h + +mkdir build-with-gimp +mkdir build-without-gimp + +%build +CFLAGS='%optflags -fno-strict-aliasing -DXSANE_BUGTRACKER_URL=\"%{bugtracker_url}\"' +export CFLAGS + +pushd build-with-gimp +%configure --enable-gimp +make %{?_smp_mflags} +popd + +pushd build-without-gimp +%configure --disable-gimp +make +popd + +# Ensure that src/xsane.xpm is 32px high/wide +test "$(identify -format "%wx%h" src/xsane.xpm)" = "32x32" + +xpmtoppm src/xsane.xpm | pnmtopng > src/xsane-32x32.png + +cp %{SOURCE1} src/ + +%install +rm -rf %{buildroot} + +pushd build-without-gimp +make DESTDIR=%{buildroot} install +popd + +# install GIMP plugin +install -m 0755 -d %{buildroot}%{gimpplugindir} +install -m 0755 build-with-gimp/src/xsane %{buildroot}%{gimpplugindir} + +# install customized desktop file +rm %{buildroot}%{_datadir}/applications/xsane.desktop +desktop-file-install \ +%if %{with desktop_vendor_tag} + --vendor fedora \ +%endif + --dir %{buildroot}%{_datadir}/applications \ + src/xsane.desktop + +# icon files in multiple resolutions +for res in 32 48 256; do + tdir="%{buildroot}%{iconrootdir}/${res}x${res}/apps" + install -m 0755 -d "$tdir" + install -m 0644 src/xsane-${res}x${res}.png "${tdir}/xsane.png" +done + +%find_lang %{name} XSANE.lang + +%clean +rm -rf %{buildroot} + +%pre gimp +# remove obsolete gimp-plugin-mgr managed symlink +if [ -L "%{gimpplugindir}/xsane" ]; then + rm -f "%{gimpplugindir}/xsane" +fi + +%post +/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : + +%postun +if [ $1 -eq 0 ] ; then + /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null + /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || : +fi + +%posttrans +/usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || : + +%files -f XSANE.lang +%defattr(-,root,root) +%doc xsane.ACCELKEYS xsane.AUTHOR xsane.BEGINNERS-INFO xsane.BUGS xsane.CHANGES xsane.COPYING xsane.FAQ xsane.LANGUAGES xsane.LOGO xsane.NEWS xsane.ONLINEHELP xsane.PROBLEMS xsane.ROOT xsane.TODO +%{_bindir}/xsane +%{_mandir}/man1/* +%if %{with desktop_vendor_tag} +%{_datadir}/applications/fedora-xsane.desktop +%else +%{_datadir}/applications/xsane.desktop +%endif +%{_datadir}/pixmaps/xsane.xpm +%{iconrootdir} + +%files gimp +%defattr(-,root,root) +%{gimpplugindir}/xsane + +%files common +%defattr(-,root,root) +%doc xsane.AUTHOR xsane.COPYING +%dir %{_datadir}/sane +%{_datadir}/sane/xsane + +%changelog +* Fri Jan 24 2014 Daniel Mach - 0.999-9 +- Mass rebuild 2014-01-24 + +* Fri Dec 27 2013 Daniel Mach - 0.999-8 +- Mass rebuild 2013-12-27 + +* Mon Sep 23 2013 Nils Philippsen - 0.999-7 +- get rid of ancient compat cruft +- build against lcms2 + +* Mon Sep 09 2013 Nils Philippsen - 0.999-6 +- avoid producing PDFs with bpp > 8 + +* Sun Aug 04 2013 Fedora Release Engineering - 0.999-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Mon Jul 08 2013 Nils Philippsen - 0.999-4 +- man page: update command line options + +* Fri Jul 05 2013 Nils Philippsen - 0.999-3 +- fix no-file-selected patch: change working directories (#621778, fix by Pavel + Polischouk) + +* Thu Jun 27 2013 Nils Philippsen - 0.999-2 +- ensure correct autoconf patch is used + +* Tue Jun 04 2013 Nils Philippsen - 0.999-1 +- version 0.999 +- remove obsolete patches +- update/fix patch comments +- fix changelog dates + +* Fri May 17 2013 Nils Philippsen - 0.998-21 +- don't dereference NULL preview objects when quitting (#963696) +- fix vendor tag logic in a prettier way + +* Tue May 14 2013 Jon Ciesla - 0.998-20 +- Re-fix vendor tag logic. + +* Fri Mar 08 2013 Nils Philippsen - 0.998-19 +- fix vendor tag retaining logic (thanks to Toshio Kuratomi) + +* Thu Mar 07 2013 Nils Philippsen - 0.998-18 +- retain vendor tag up to Fedora 18 + +* Mon Feb 11 2013 Parag Nemade - 0.998-17 +- Add BR: ImageMagick for identify + +* Sun Feb 10 2013 Parag Nemade - 0.998-16 +- Remove vendor tag from desktop file as per https://fedorahosted.org/fesco/ticket/1077 + +* Wed Jan 30 2013 Nils Philippsen - 0.998-15 +- build with -fno-strict-aliasing +- tidy up desktop file +- catch errors when determining the %%gimpplugindir macro +- use netpbm pipeline to create 32px PNG icon instead of convert (which embeds + timestamps in the resulting file) + +* Mon Jan 21 2013 Adam Tkac - 0.998-14 +- rebuild due to "jpeg8-ABI" feature drop + +* Fri Dec 21 2012 Adam Tkac - 0.998-13 +- rebuild against new libjpeg + +* Mon Sep 03 2012 Nils Philippsen - 0.998-12 +- calculate minimum window size better for multi-head setups +- correct man page (#675437) + +* Sun Jul 22 2012 Fedora Release Engineering - 0.998-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat May 26 2012 Nils Philippsen - 0.998-10 +- add icon cache update scriptlets + +* Fri May 25 2012 Nils Philippsen - 0.998-9 +- install and use higher resolution icons (#795085) + +* Tue Apr 03 2012 Nils Philippsen - 0.998-8 +- rebuild against gimp 2.8.0 release candidate + +* Tue Jan 10 2012 Nils Philippsen - 0.998-7 +- rebuild for gcc 4.7 + +* Fri Dec 16 2011 Nils Philippsen - 0.998-6 +- rebuild for GIMP 2.7 + +* Mon Nov 21 2011 Nils Philippsen - 0.998-5 +- patch and rebuild for libpng-1.5 + +* Wed Jun 01 2011 Nils Philippsen - 0.998-4 +- fix a problem in mouse event processing that interferes with selecting the + scan rectangle in the preview window (#624190, patch by Reinhard Fössmeier) + +* Mon Apr 04 2011 Nils Philippsen - 0.998-3 +- don't dereference unset xsane.preview (#693224) + +* Tue Feb 08 2011 Fedora Release Engineering - 0.998-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Fri Nov 19 2010 Nils Philippsen - 0.998-1 +- version 0.998 +- patch desktop file instead of copying it over + +* Tue Jul 13 2010 Nils Philippsen - 0.997-10 +- don't crash if no files are selected, take two + +* Mon Jul 12 2010 Nils Philippsen - 0.997-9 +- distribute license and other documentation with xsane-common + +* Tue Jun 29 2010 Nils Philippsen 0.997-8 +- support IPv6 (#198422) + +* Mon Jun 28 2010 Nils Philippsen 0.997-7 +- work around old %%configure macro + +* Mon Jun 28 2010 Nils Philippsen 0.997-6 +- don't crash if no files are selected (#608047) + +* Wed Jun 23 2010 Nils Philippsen 0.997-5 +- don't use gimp-plugin-mgr anymore +- use off-root builds + +* Thu Feb 25 2010 Nils Philippsen 0.997-4 +- quote RPM macros in changelog + +* Tue Aug 18 2009 Nils Philippsen +- explain patches + +* Wed Aug 05 2009 Nils Philippsen 0.997-3 +- Merge Review (#226658): + - replace %%desktop_vendor macro with "fedora" + - fix xsane-gimp requirements + - move EULA and documentation into -common subpackage + +* Mon Aug 03 2009 Nils Philippsen 0.997-2 +- remove ExcludeArch: s390 s390x + +* Fri Jul 31 2009 Nils Philippsen 0.997-1 +- version 0.997 +- drop obsolete sane-backends-1.0.20 patch + +* Mon Jul 27 2009 Fedora Release Engineering - 0.996-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue Jul 21 2009 Nils Philippsen 0.996-9 +- don't show EULA, mention bugzilla in about dialog (#504344) + +* Mon Jul 20 2009 Nils Philippsen 0.996-8 +- don't use obsolete SANE_CAP_ALWAYS_SETTABLE macro (#507823) + +* Tue Jul 7 2009 Tom "spot" Callaway 0.996-7 +- don't own %%{_datadir}/applications/ (filesystem package owns it) + +* Fri May 29 2009 Nils Philippsen +- Merge review (#226658): + - convert documentation files to UTF-8 + - don't BR: sed + - don't own %%{_datadir}/applications, %%{_sysconfdir}/gimp, + %%{_sysconfdir}/gimp/plugins.d + - don't package unnecessary documentation + +* Mon Mar 02 2009 Nils Philippsen - 0.996-6 +- rebuild against new sane-backends (just in case) + +* Thu Feb 26 2009 Fedora Release Engineering - 0.996-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Tue Jan 20 2009 Nils Philippsen - 0.996-3 +- pickup changed desktop file, close-fds patch in F9, F10 + +* Tue Jan 20 2009 Nils Philippsen - 0.996-2 +- BR: lcms-devel + +* Sun Jan 18 2009 Nils Philippsen - 0.996-1 +- version 0.996 +- don't use %%makeinstall +- use shipped xsane.xpm as application icon + +* Fri Jul 18 2008 Nils Philippsen - 0.995-5 +- fix fd leak prevention (#455450) + +* Tue Jul 15 2008 Nils Philippsen - 0.995-4 +- don't leak file descriptors to help browser process (#455450) + +* Tue Feb 19 2008 Fedora Release Engineering - 0.995-3 +- Autorebuild for GCC 4.3 + +* Thu Nov 29 2007 Nils Philippsen - 0.995-2 +- make EULA, license dialogs be viewable on 800x600 displays + +* Fri Nov 23 2007 Nils Philippsen - 0.995-1 +- version 0.995 +- remove obsolete gimp2.0, medium-definitions, showeulaonce patches + +* Thu Nov 15 2007 Nils Philippsen +- explicitely enable building the gimp plugin in configure call +- reorder spec file sections + +* Wed Sep 05 2007 Nils Philippsen - 0.994-4 +- fix "Category" entries in desktop file + +* Wed Sep 05 2007 Nils Philippsen +- change license to GPLv2+ + +* Tue Apr 24 2007 Nils Philippsen - 0.994-3 +- don't include obsolete Application category in desktop file (#226658) + +* Wed Apr 04 2007 Nils Philippsen - 0.994-2 +- save prefs when EULA is accepted to ensure that EULA is only shown once at + startup (#233645) + +* Tue Apr 03 2007 Nils Philippsen - 0.994-1 +- version 0.994 (#235038) + +* Fri Mar 30 2007 Nils Philippsen - 0.993-2 +- fix summaries and buildroot, don't remove buildroot on %%prep, mark dirs and + config files, don't reference %%buildroot in %%build, use double-%% in + changelog entries (#226658) + +* Fri Mar 02 2007 Nils Philippsen - 0.993-1 +- version 0.993 (#230706) + +* Wed Oct 25 2006 Nils Philippsen - 0.991-4 +- fix typo in scriptlet (#212063) + +* Mon Oct 23 2006 Nils Philippsen - 0.991-3 +- really don't barf on missing gimp-plugin-mgr when updating (#208159) + +* Mon Oct 02 2006 Nils Philippsen - 0.991-2 +- don't barf on missing gimp-plugin-mgr when updating (#208159) + +* Mon Aug 28 2006 Nils Philippsen - 0.991-1 +- version 0.991 +- remove obsolete buffer patch + +* Wed Aug 16 2006 Nils Philippsen - 0.99-6 +- revamp scheme for integrating external GIMP plugins (#202545) +- use disttag + +* Wed Jul 12 2006 Jesse Keating - 0.99-5.1 +- rebuild + +* Thu Jun 08 2006 Nils Philippsen - 0.99-5 +- re-add desktop file (#170835) +- use %%buildroot consistently +- add automake, autoconf build requirements + +* Wed Apr 05 2006 Nils Philippsen - 0.99-4 +- use XSANE.lang instead of xsane.lang to avoid %%doc multilib regression + +* Tue Apr 04 2006 Nils Philippsen - 0.99-3 +- fix medium-definitions patch to not barf on obsolete options in config file + (#185269, by Aldy Hernandez) + +* Fri Feb 10 2006 Jesse Keating - 0.99-2.2 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 0.99-2.1 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Mon Jan 16 2006 Nils Philippsen 0.99-2 +- fix buffer overflow + +* Fri Jan 13 2006 Nils Philippsen 0.99-1 +- version 0.99 + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Thu Nov 24 2005 Nils Philippsen 0.98a-1 +- version 0.98a + +* Tue Oct 04 2005 Nils Philippsen 0.97-1 +- version 0.97 + +* Mon Jun 20 2005 Tim Waugh 0.95-4 +- Build requires gettext-devel (bug #160994). + +* Wed Mar 2 2005 Tim Waugh 0.95-3 +- Rebuild for new GCC. + +* Wed Dec 8 2004 Tim Waugh 0.95-2 +- Fix crash on start (bug #142148). + +* Fri Dec 3 2004 Tim Waugh 0.95-1 +- 0.95. +- No longer need badcode patch. +- Enable translations again. +- New method of installing GIMP plug-in due to Nils Philippsen. + +* Mon Jun 28 2004 Tim Waugh 0.92-13 +- Build requires libtiff-devel (bug #126564). + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Fri Jun 4 2004 Tim Waugh 0.92-11 +- Fix GIMP plug-in package (bug #125254). + +* Wed Apr 21 2004 Seth Nickell 0.92-10 +- Remove .desktop file + +* Wed Mar 31 2004 Tim Waugh 0.92-9 +- Rebuilt. + +* Thu Mar 18 2004 Nils Philippsen 0.92-8 +- Rebuild against new gimp. + +* Tue Mar 9 2004 Tim Waugh 0.92-7 +- Fix desktop file Name (bug #117370). + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Fri Feb 13 2004 Tim Waugh 0.92-5 +- Fixed %%post scriptlet. + +* Sun Jan 25 2004 Tim Waugh 0.92-4 +- Gimp patch updated. + +* Fri Jan 23 2004 Tim Waugh 0.92-3 +- Translations are broken -- turn them off for the time being. +- Really apply the patch this time. +- Fix up post/postun scriptlets. + +* Fri Jan 23 2004 Tim Waugh 0.92-2 +- Apply patch for building against new gimp. + +* Mon Dec 15 2003 Tim Waugh 0.92-1 +- 0.92. + +* Thu Nov 27 2003 Thomas Woerner 0.91-2 +- removed rpath + +* Wed Oct 8 2003 Tim Waugh +- Avoid undefined behaviour in xsane-preview.c (bug #106314). + +* Thu Jul 24 2003 Tim Waugh 0.91-1 +- 0.91. + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + +* Wed Apr 9 2003 Tim Waugh 0.90-2 +- Set default HTML viewer to htmlview (bug #88318). + +* Thu Mar 20 2003 Tim Waugh 0.90-1 +- 0.90. + +* Sat Feb 1 2003 Matt Wilson 0.89-3 +- use %%{_libdir} for gimp plugin path + +* Wed Jan 22 2003 Tim Powers +- rebuilt + +* Fri Oct 25 2002 Tim Waugh 0.89-1 +- 0.89. +- Use %%find_lang. + +* Fri Aug 30 2002 Tim Waugh 0.84-8 +- Don't require gimp-devel (cf. bug #70754). + +* Tue Jul 23 2002 Tim Waugh 0.84-7 +- Desktop file fixes (bug #69555). + +* Mon Jul 15 2002 Tim Waugh 0.84-6 +- Use desktop-file-install. + +* Fri Jun 21 2002 Tim Powers 0.84-5 +- automated rebuild + +* Wed Jun 12 2002 Tim Waugh 0.84-4 +- Rebuild to fix bug #66132. + +* Thu May 23 2002 Tim Powers 0.84-3 +- automated rebuild + +* Thu Feb 21 2002 Tim Waugh 0.84-2 +- Rebuild in new environment. + +* Wed Jan 23 2002 Tim Waugh 0.84-1 +- 0.84. +- Remove explicit sane-backends dependency, since it is automatically + found by rpm. + +* Wed Jan 09 2002 Tim Powers 0.83-2 +- automated rebuild + +* Tue Jan 8 2002 Tim Waugh 0.83-1 +- 0.83. + +* Tue Dec 11 2001 Tim Waugh 0.82-3.1 +- 0.82. +- Some extra patches from Oliver Rauch. +- Require sane not sane-backends since it's available throughout 7.x. +- Built for Red Hat Linux 7.1, 7.2. + +* Tue Jul 24 2001 Tim Waugh 0.77-4 +- Build requires libpng-devel, libjpeg-devel (#bug 49760). + +* Tue Jul 17 2001 Preston Brown 0.77-3 +- add an icon to the desktop entry + +* Tue Jun 19 2001 Florian La Roche +- add ExcludeArch: s390 s390x + +* Mon Jun 11 2001 Tim Waugh 0.77-1 +- 0.77. + +* Sun Jun 3 2001 Tim Waugh 0.76-2 +- Require sane-backends, not all of sane. + +* Wed May 23 2001 Tim Waugh 0.76-1 +- 0.76. + +* Thu May 3 2001 Tim Waugh 0.75-1 +- 0.75 +- Fix summary/description to match specspo. + +* Mon Jan 8 2001 Matt Wilson +- fix post script of gimp subpackage to install into the correct location + +* Mon Dec 25 2000 Matt Wilson +- rebuilt against gimp 1.2.0 + +* Thu Dec 21 2000 Matt Wilson +- rebuilt against gimp 1.1.32 +- use -DGIMP_ENABLE_COMPAT_CRUFT=1 to build with compat macros + +* Thu Oct 12 2000 Than Ngo +- 0.62 + +* Wed Aug 23 2000 Matt Wilson +- rebuilt against gimp-1.1.25 + +* Mon Aug 07 2000 Than Ngo +- added swedish translation (Bug #15316) + +* Fri Aug 4 2000 Than Ngo +- fix, shows error dialogbox if no scanner exists (Bug #15445) +- update to 0.61 + +* Wed Aug 2 2000 Matt Wilson +- rebuilt against new libpng + +* Thu Jul 13 2000 Prospector +- automatic rebuild + +* Mon Jul 3 2000 Matt Wilson +- rebuilt against gimp 1.1.24 +- make clean before building non gimp version + +* Fri Jun 30 2000 Preston Brown +- made gimp subpkg + +* Wed Jun 14 2000 Preston Brown +- desktop entry added + +* Tue Jun 13 2000 Preston Brown +- fixed gimp link +- FHS paths + +* Tue May 30 2000 Karsten Hopp +- update to 0.59 + +* Sat Jan 29 2000 TIm Powers +- fixed bug 8948 + +* Thu Dec 2 1999 Tim Powers +- updated to 0.47 +- gzip man pages + +* Mon Aug 30 1999 Tim Powers +- changed group + +* Mon Jul 26 1999 Tim Powers +- update to 0.30 +- added %%defattr +- built for 6.1 + +* Thu Apr 22 1999 Preston Brown +- initial RPM for PowerTools 6.0