rpms/gscan2pdf/FC-5 gscan2pdf-load-save-fix.patch, NONE, 1.1 gscan2pdf.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
Bernard Johnson (bjohnson)
fedora-extras-commits at redhat.com
Wed Mar 21 19:39:06 UTC 2007
- Previous message (by thread): fedora-security/audit fe5,1.175,1.176 fe6,1.88,1.89
- Next message (by thread): rpms/gscan2pdf/FC-6 gscan2pdf-load-save-fix.patch, NONE, 1.1 gscan2pdf.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: bjohnson
Update of /cvs/extras/rpms/gscan2pdf/FC-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6235/FC-5
Modified Files:
.cvsignore sources
Added Files:
gscan2pdf-load-save-fix.patch gscan2pdf.spec
Log Message:
copy from devel branch
gscan2pdf-load-save-fix.patch:
--- NEW FILE gscan2pdf-load-save-fix.patch ---
--- gscan2pdf-0.9.5/bin/gscan2pdf 2007-03-08 12:55:14.000000000 -0700
+++ /usr/bin/gscan2pdf 2007-03-20 11:34:01.000000000 -0600
@@ -938,12 +941,12 @@
# Check that the file really is a tiff
my $output = `tiffinfo \"$filename\" 2>&1 1>/dev/null`;
- if ($output =~ /Not a TIFF file/) {
+ if ($output =~ /Not a TIFF file/ || $output =~ /Cannot open/) {
my $dialog = Gtk2::MessageDialog -> new ($window,
'destroy-with-parent',
'error',
'close',
- $d->get('Not a TIFF file'));
+ $d->get('Not a TIFF file or file is inaccessable'));
$dialog -> run;
$dialog -> destroy;
}
@@ -1378,6 +1380,19 @@
# $SETTING{'Page range'} = 'selected' if $SETTING{'RMB'};
#warn "rmb pdf $SETTING{'RMB'} $SETTING{'Page range'}\n";
+ # do not allow save if there are no pages
+ if ($#{$slist -> {data}} < 0) {
+ my $dialog = Gtk2::MessageDialog -> new ($window,
+ 'destroy-with-parent',
+ 'error',
+ 'close',
+ $d->get('No pages to save'));
+ $dialog -> run;
+ $dialog -> destroy;
+ return;
+ }
+
+
if ($uimanager->get_widget('/MenuBar/Edit/Options') -> get_active) {
if (defined $windowp) {
--- NEW FILE gscan2pdf.spec ---
Name: gscan2pdf
Version: 0.9.5
Release: 5%{?dist}
Summary: A GUI for producing a multipage PDF from a scan
Group: Applications/Publishing
License: GPL
URL: http://gscan2pdf.sourceforge.net
Source0: http://downloads.sourceforge.net/gscan2pdf/gscan2pdf-0.9.5.tar.gz
Patch0: gscan2pdf-load-save-fix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: gettext, desktop-file-utils
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires: ImageMagick, djvulibre, sane-backends, sane-frontends, xdg-utils
# Required for help system to be functional
Requires: perl-Gtk2-Ex-PodViewer
# These package can be added for additional functionality
#Requires: unpaper
#Requires: gocr
%description
A GUI to ease the process of producing a multipage PDF from a scan.
%prep
%setup -q
%patch -p1 -b .load-save-fix
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null ';'
rm -f $RPM_BUILD_ROOT/%{perl_archlib}/perllocal.pod
chmod -R u+w $RPM_BUILD_ROOT/*
desktop-file-install --vendor="" \
--dir=$RPM_BUILD_ROOT/%{_datadir}/applications \
$RPM_BUILD_ROOT/%{_datadir}/applications/%{name}.desktop
%find_lang %{name}
%check
make test
%clean
rm -rf $RPM_BUILD_ROOT
%post
update-desktop-database &> /dev/null ||:
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
%postun
update-desktop-database &> /dev/null ||:
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc LICENCE
%{_bindir}/*
%{_datadir}/%{name}/*
%{_datadir}/applications/%{name}.desktop
%{_mandir}/man1/*.1*
%changelog
* Tue Mar 20 2007 Bernard Johnson <bjohnson at symetrix.com> - 0.9.5-5
- patch to fix:
a) tiff files that can not be opened
b) restrict saving a pdf with no pages
* Mon Mar 19 2007 Bernard Johnson <bjohnson at symetrix.com> - 0.9.5-4
- add Requires: for perl-Gtk2-Ex-PodViewer
* Sat Mar 17 2007 Bernard Johnson <bjohnson at symetrix.com> - 0.9.5-3
- add desktop file the fedora way
* Thu Mar 15 2007 Bernard Johnson <bjohnson at symetrix.com> - 0.9.5-2
- add scriptlets to update icon cache
* Wed Mar 14 2007 Bernard Johnson <bjohnson at symetrix.com> - 0.9.5-1
- initial release
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/gscan2pdf/FC-5/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 21 Mar 2007 19:30:30 -0000 1.1
+++ .cvsignore 21 Mar 2007 19:38:33 -0000 1.2
@@ -0,0 +1 @@
+gscan2pdf-0.9.5.tar.gz
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/gscan2pdf/FC-5/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 21 Mar 2007 19:30:30 -0000 1.1
+++ sources 21 Mar 2007 19:38:33 -0000 1.2
@@ -0,0 +1 @@
+a32ca34599f8d93576ee31c6f10768e8 gscan2pdf-0.9.5.tar.gz
- Previous message (by thread): fedora-security/audit fe5,1.175,1.176 fe6,1.88,1.89
- Next message (by thread): rpms/gscan2pdf/FC-6 gscan2pdf-load-save-fix.patch, NONE, 1.1 gscan2pdf.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list