Projects
Mega:24.03
psutils
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 5
View file
_service:tar_scm:psutils.spec
Changed
@@ -3,7 +3,7 @@ Name: psutils Version: 2.08 -Release: 2 +Release: 3 Summary: Utilities for manipulating PostScript documents License: psutils URL: https://github.com/rrthomas/psutils @@ -12,6 +12,7 @@ # ./bootstrap && autoreconf -vfi && cd .. && tar -cvf psutils-1.23.tar.gz psutils-1.23 Source0: %{name}-%{version}.tar.gz Patch0: psutils-paperconf.patch +Patch1: rewrite-papersize.patch BuildRequires: gcc BuildRequires: perl-generators @@ -56,6 +57,9 @@ %{_mandir}/man1/*1* %changelog +* Fri Apr 19 2024 Ge Wang <wang__ge@126.com> - 2.08-3 +- Rewrite papersize to fix psnup psresize execute error + * Sun Apr 07 2024 wulei <wu_lei@hoperun.com> - 2.08-2 - Fix could not run 'paper' command
View file
_service:tar_scm:rewrite-papersize.patch
Added
@@ -0,0 +1,37 @@ +From 9aed7b37ac2740cf577165d4e3e348fcf17ab4f7 Mon Sep 17 00:00:00 2001 +From: wang--ge <wang__ge@126.com> +Date: Fri, 19 Apr 2024 15:37:37 +0800 +Subject: PATCH rewrite papersize + +--- + PSUtils.pm | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git a/PSUtils.pm b/PSUtils.pm +index 9a95056..8b64247 100644 +--- a/PSUtils.pm ++++ b/PSUtils.pm +@@ -73,13 +73,16 @@ sub paper { + sub paper_size { + my ($paper_name) = @_; + chomp($paper_name = paper()) unless defined($paper_name); +- my $dimensions = paper("--unit=pt", "$paper_name", 1) or return; +- $dimensions =~ / (.0-9+)x(.0-9+) pt$/; ++ my $dimensions_w = paper("-p", "$paper_name", "-m", "-w", 1) or return; ++ $dimensions_w =~ / (.0-9+) mm$/; + my $old_locale = setlocale(LC_ALL); + setlocale(LC_ALL, ""); +- my ($w, $w_unparsed) = strtod($1); +- my ($h, $h_unparsed) = strtod($2); ++ my ($w, $w_unparsed) = strtod($dimensions_w); ++ my $dimensions_h = paper("-p", "$paper_name", "-m", "-h", 1) or return; ++ $dimensions_h =~ / (.0-9+) mm$/; ++ my ($h, $h_unparsed) = strtod($dimensions_h); + setlocale(LC_ALL, $old_locale); ++ print($w,$h, $dimensions_w, $dimensions_h); + return int($w + 0.5), int($h + 0.5); # round dimensions to nearest point + } + +-- +2.33.0 +
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2