rpms/ps2eps/FC-6 ps2eps-1.64-tmpfile.patch, NONE, 1.1 ps2eps.spec, NONE, 1.1 sources, 1.1, 1.2

Terje Røsten (terjeros) fedora-extras-commits at redhat.com
Tue Jun 5 21:27:58 UTC 2007


Author: terjeros

Update of /cvs/extras/rpms/ps2eps/FC-6
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5502/FC-6

Modified Files:
	sources 
Added Files:
	ps2eps-1.64-tmpfile.patch ps2eps.spec 
Log Message:
Importing ps2eps to fc5, fc6 and fc7.



ps2eps-1.64-tmpfile.patch:

--- NEW FILE ps2eps-1.64-tmpfile.patch ---
-- ps2eps/bin/ps2eps.fix_tmp	2007-06-02 18:14:46.000000000 +0200
+++ ps2eps/bin/ps2eps	2007-06-02 18:40:55.000000000 +0200
@@ -1,5 +1,4 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $argv:q' # -*-perl-*-
-        if 0;
+#! /usr/bin/perl
 # The expression in the previous line replaces the unix specific line 
 # {#!/usr/bin/perl}.   
 # ps2eps - convert PostScript to EPS (Encapsulated PostScript) files
@@ -36,6 +35,7 @@ eval '(exit $?0)' && eval 'exec perl -S 
 #         for calculation of the actual BoundingBox)
 
 use POSIX;
+use File::Temp qw/ tempfile /;
 
 #use warnings;
 
@@ -105,29 +105,12 @@ $dummy="";
 @ver= split(/ /,$version);
 
 # filename for temporary files
-if ($^O =~ /MSWin32/i or $^O =~ /cygwin/i) 
+if ($^O =~ /MSWin32/i or $^O =~ /cygwin/i or defined($ENV{'TMP'})) 
 {
-  # it is less trouble to use the current directory if working on
-  # cygwin and nevertheless using gswin32c.
-  $tmpfname= "$prgname.$$";
   $win=1;
 }
-elsif (defined($ENV{'TMP'}))
-{ 
-  $tmpdir= $ENV{'TMP'};
-  $filesep= ($tmpdir =~ /^?\:\\/) ? '\\' : '/';
-  if ($tmpdir =~ /$filesep$/)  
-  { $tmpfname= $tmpdir . "$prgname.$$"; }
-  else 
-  { $tmpfname= $tmpdir . "$filesep$prgname.$$"; }
-  $win=1;
-}
-else #assume we're on a UNIXBOX
-{ 
-  $tmpfname= "/tmp/" . "$prgname.$$";
-  $win=0;
-}
 
+($fh, $tmpfname) = tempfile(UNLINK => 1);
 
 $licensetxt= "\
     This program is free software; you can redistribute it and/or modify\



--- NEW FILE ps2eps.spec ---
Summary:   PS-to-EPS converter
Name:      ps2eps
Version:   1.64
Release:   2%{?dist}
Source0:   http://www.tm.uka.de/~bless/%{name}-%{version}.tar.gz
Patch0:    ps2eps-1.64-tmpfile.patch
License:   GPL
URL:       http://www.tm.uka.de/~bless/ps2eps
Group:     Applications/Publishing
Requires:  ghostscript
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%description
ps2eps is a tool to produce Encapsulated PostScript Files (EPS/EPSF)
from usual one-paged Postscript documents. It calculates correct 
Bounding Boxes for those EPS files and filters some special postscript 
command sequences that can produce errorneous results on printers. 

%prep

%setup -q -n ps2eps
%patch0 -p1

%build
%{__cc} %{optflags} -o bbox src/C/bbox.c

%install
%{__rm} -rf %{buildroot}
%{__install} -d %{buildroot}%{_bindir}
%{__install} -m 0755 bbox %{buildroot}%{_bindir}
%{__install} -m 0755 bin/ps2eps %{buildroot}%{_bindir}
%{__install} -d  %{buildroot}%{_mandir}/man1
%{__install} -m 0644 -p doc/man/man1/* %{buildroot}%{_mandir}/man1
%{__rm} -f INSTALL.txt

%clean
%{__rm} -rf %{buildroot}

%files
%defattr (-, root, root, -)
%{_bindir}/*
%{_mandir}/man1/*
%doc *.txt  doc/html/*.html doc/pdf/*.pdf

%changelog
* Sat Jun  2 2007 Terje Røsten <terjeros at phys.ntnu.no> - 1.64-2
- add secure tmpfile patch
- don't skip Install.txt
- preserve dates on files (where possible)
- fix defattr

* Sat Jun  2 2007 Terje Røsten <terjeros at phys.ntnu.no> - 1.64-1
- 1.64
- Fix shebang

* Thu Oct 14 2004 Terje Røsten <terjeros at phys.ntnu.no>
- 1.54

* Sat Mar  6 2004 Susumu Tanimura  <stanimura-ngs at umin.ac.jp>
- initial package 


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/ps2eps/FC-6/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	5 Jun 2007 21:01:29 -0000	1.1
+++ sources	5 Jun 2007 21:26:42 -0000	1.2
@@ -0,0 +1 @@
+89aec3f075cee662f2367b12337b5c3e  ps2eps-1.64.tar.gz




More information about the fedora-extras-commits mailing list