!1 package init

Merge pull request !1 from small_leek/add-sane-frontends
This commit is contained in:
openeuler-ci-bot 2020-02-14 19:38:17 +08:00 committed by Gitee
commit 8a0fcece75
5 changed files with 1509 additions and 0 deletions

View File

@ -0,0 +1,40 @@
commit c4cb247732767aed76502069d0b3040c4c4e5123
Author: Nils Philippsen <nils@redhat.com>
Date: Fri Jul 31 16:21:53 2009 +0200
patch: array-out-of-bounds
Squashed commit of the following:
commit 337bcefaa7a67931095b74317a266a1244978ab6
Author: Nils Philippsen <nils@redhat.com>
Date: Fri Jul 31 16:03:28 2009 +0200
fix array subscript out of bounds errors (#133121)
diff --git a/src/xcam.c b/src/xcam.c
index 2d494a5..f6859b7 100644
--- a/src/xcam.c
+++ b/src/xcam.c
@@ -1289,7 +1289,7 @@ save_frame_button (GtkWidget * widget, gpointer client_data,
/* test for pnm formats */
strncpy (testfilename, preferences.filename, sizeof (testfilename));
- testfilename[sizeof (testfilename)] = 0;
+ testfilename[sizeof (testfilename) - 1] = 0;
g_strreverse (testfilename);
if (!((!strncmp (testfilename, "mnp.", 4)) ||
(!strncmp (testfilename, "mgp.", 4)) ||
diff --git a/src/xscanimage.c b/src/xscanimage.c
index a36324f..065923d 100644
--- a/src/xscanimage.c
+++ b/src/xscanimage.c
@@ -1284,7 +1284,7 @@ scan_dialog (GtkWidget * widget, gpointer call_data)
{ /* We are running in standalone mode */
/* test for pnm formats */
strncpy (testfilename, preferences.filename, sizeof (testfilename));
- testfilename[sizeof (testfilename)] = 0;
+ testfilename[sizeof (testfilename) - 1] = 0;
g_strreverse (testfilename);
if (!((!strncmp (testfilename, "mnp.", 4)) ||
(!strncmp (testfilename, "mgp.", 4)) ||

View File

@ -0,0 +1,31 @@
commit ddd90b1502a263d03938b1e45a57684d576993ba
Author: Nils Philippsen <nils@redhat.com>
Date: Fri Jul 31 16:25:58 2009 +0200
patch: sane-backends-1.0.20
Squashed commit of the following:
commit 0c84326fa37bb309481c4d2658ab6cb17c9f0e85
Author: Nils Philippsen <nils@redhat.com>
Date: Fri Jul 31 16:18:59 2009 +0200
use SANE_CAP_ALWAYS_SETTABLE only if available
diff --git a/src/gtkglue.c b/src/gtkglue.c
index ba5cbf5..ec81f45 100644
--- a/src/gtkglue.c
+++ b/src/gtkglue.c
@@ -1476,8 +1476,12 @@ gsg_set_sensitivity (GSGDialog * dialog, int sensitive)
|| opt->type == SANE_TYPE_GROUP || !dialog->element[i].widget)
continue;
+#ifdef SANE_CAP_ALWAYS_SETTABLE
if (!(opt->cap & SANE_CAP_ALWAYS_SETTABLE))
gtk_widget_set_sensitive (dialog->element[i].widget, sensitive);
+#else
+ gtk_widget_set_sensitive (dialog->element[i].widget, sensitive);
+#endif
}
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

48
sane-frontends.spec Normal file
View File

@ -0,0 +1,48 @@
Name: sane-frontends
Version: 1.0.14
Release: 32
Summary: These SANE applications (frontends)
License: GPLv2+
URL: http://www.sane-project.org
Source0: https://gitlab.com/sane-project/frontends/uploads/14e5c5a9205b10bd3df04501852eab28/%{name}-%{version}.tar.gz
Patch0: sane-frontends-1.0.14-array-out-of-bounds.patch
Patch1: sane-frontends-1.0.14-sane-backends-1.0.20.patch
Patch2: sane-frontends-1.0.14-update-to-current-lprng-plp_snprintf.patch
BuildRequires: gcc gtk2-devel sane-backends-devel >= 1.0.19-15
%description
These SANE applications (frontends) are included in this package (together with \
their documentation).
%package_help
%prep
%autosetup -n %{name}-%{version} -p1
%build
%configure --with-gnu-ld
%make_build
%install
%make_install
rm -f %{buildroot}%{_bindir}/xscanimage
rm -f %{buildroot}%{_mandir}/man1/xscanimage*
rm -f %{buildroot}%{_datadir}/sane/sane-style.rc
%files
%defattr(-,root,root)
%doc AUTHORS
%license COPYING
%{_bindir}/*
%files help
%defattr(-,root,root)
%doc README Changelog NEWS PROBLEMS
%{_mandir}/man1/*
%changelog
* Fri Feb 14 2020 Senlin Xia <xiasenlin1@huawei.com> - 1.0.14-32
- Package init