Package init
This commit is contained in:
commit
f1cd2f40a2
BIN
gv-3.7.4.tar.gz
Normal file
BIN
gv-3.7.4.tar.gz
Normal file
Binary file not shown.
1144
gv-aarch64.patch
Normal file
1144
gv-aarch64.patch
Normal file
File diff suppressed because it is too large
Load Diff
13
gv-bounding-box.patch
Normal file
13
gv-bounding-box.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/gv/src/ps.c b/gv/src/ps.c
|
||||||
|
index 2428bcc..822b65a 100644
|
||||||
|
--- a/gv/src/ps.c
|
||||||
|
+++ b/gv/src/ps.c
|
||||||
|
@@ -357,7 +357,7 @@ static int parse_boundingbox(const char *l, int *boundingbox) {
|
||||||
|
while (*p == ' ' || *p == '\t')
|
||||||
|
p++;
|
||||||
|
fury = strtod(p, &pe);
|
||||||
|
- if (*pe != '\n' && *pe != '\0' && *pe != ' ' && *pe != '\t') {
|
||||||
|
+ if (*pe != '\n' && *pe != '\r'&& *pe != '\0' && *pe != ' ' && *pe != '\t') {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
18
gv-bug1071238.patch
Normal file
18
gv-bug1071238.patch
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
diff -up gv-3.7.4/src/zoom.c.bug1071238 gv-3.7.4/src/zoom.c
|
||||||
|
--- gv-3.7.4/src/zoom.c.bug1071238 2012-03-29 10:03:50.000000000 -0600
|
||||||
|
+++ gv-3.7.4/src/zoom.c 2014-03-03 09:13:09.724941964 -0700
|
||||||
|
@@ -104,12 +104,12 @@ zoom_createZoom(Widget w _GL_UNUSED, XtP
|
||||||
|
|
||||||
|
BEGINMESSAGE(zoom_createZoom)
|
||||||
|
|
||||||
|
- if (!(gv_psfile != NULL || (gv_gs_arguments && *gv_gs_arguments))) {
|
||||||
|
+ if (!gv_psfile) {
|
||||||
|
INFMESSAGE(no file) ENDMESSAGE(zoom_createZoom)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (strcmp(gv_filename, "-")) {
|
||||||
|
+ if (gv_filename != NULL && strcmp(gv_filename, "-")) {
|
||||||
|
stat(gv_filename, &sbuf);
|
||||||
|
if (mtime != sbuf.st_mtime) {
|
||||||
|
INFMESSAGE1(file has changed) ENDMESSAGE1(zoom_createZoom)return;
|
||||||
11
gv-dat.patch
Normal file
11
gv-dat.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- gv-3.7.4/src/gv_user_res.dat- 2012-04-01 10:43:24.000000000 -0400
|
||||||
|
+++ gv-3.7.4/src/gv_user_res.dat 2013-04-05 17:22:03.619436586 -0400
|
||||||
|
@@ -39,7 +39,7 @@
|
||||||
|
save_marked
|
||||||
|
GV.scale: 0
|
||||||
|
GV.scaleBase: 1
|
||||||
|
-GV.scales: Natural size, 1.000, screen \n\
|
||||||
|
+GV.scales: Natural size, 1.000, screen \n\
|
||||||
|
Pixel based, 1.000, pixel \n\
|
||||||
|
Arbitrary magnification, -2 \n\
|
||||||
|
Fit height to window, -3 \n\
|
||||||
29
gv-resource.patch
Normal file
29
gv-resource.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
--- gv-3.7.4/src/main.c- 2012-04-01 10:43:24.000000000 -0400
|
||||||
|
+++ gv-3.7.4/src/main.c 2013-04-12 18:39:47.578033642 -0400
|
||||||
|
@@ -1449,7 +1449,7 @@
|
||||||
|
if (s) gv_gs_arguments = s;
|
||||||
|
|
||||||
|
s = resource_getResource(db,gv_class,gv_name,"gsSafeDir",NULL);
|
||||||
|
- if (!strcasecmp(s,"true")) gv_gs_safeDir = 1; else gv_gs_safeDir = 0;
|
||||||
|
+ if (s && !strcasecmp(s,"true")) gv_gs_safeDir = 1; else gv_gs_safeDir = 0;
|
||||||
|
|
||||||
|
s = resource_getResource(db,gv_class,gv_name,"gsSafer",NULL);
|
||||||
|
if (s && !strcasecmp(s,"true")) gv_gs_safer = 1; else gv_gs_safer = 0;
|
||||||
|
@@ -1468,13 +1468,13 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
s = resource_getResource(db,gv_class,gv_name,"infoVerbose",NULL);
|
||||||
|
- if (!strcasecmp(s, "Silent")) gv_infoVerbose=0;
|
||||||
|
- else if (!strcasecmp(s, "Errors")) gv_infoVerbose=1;
|
||||||
|
- else if (!strcasecmp(s, "All")) gv_infoVerbose=2;
|
||||||
|
+ if (!s || !strcasecmp(s, "Errors")) gv_infoVerbose=1;
|
||||||
|
+ else if (!strcasecmp(s, "Silent")) gv_infoVerbose=0;
|
||||||
|
+ else if (!strcasecmp(s, "All")) gv_infoVerbose=2;
|
||||||
|
else gv_infoVerbose = 1;
|
||||||
|
|
||||||
|
s = resource_getResource(db,gv_class,gv_name,"xinerama",NULL);
|
||||||
|
- if (!strcasecmp(s, "Off")) gv_xinerama=0;
|
||||||
|
+ if (!s || !strcasecmp(s, "Off")) gv_xinerama=0;
|
||||||
|
else if (!strcasecmp(s, "On")) gv_xinerama=1;
|
||||||
|
else if (!strcasecmp(s, "Auto")) gv_xinerama=-1;
|
||||||
|
else gv_xinerama = 0;
|
||||||
124
gv.spec
Normal file
124
gv.spec
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
#spec file for gv
|
||||||
|
|
||||||
|
Name: gv
|
||||||
|
Version: 3.7.4
|
||||||
|
Release: 18
|
||||||
|
Summary: gv is a Ghostscript PostScript interpreter by providing a graphical user interface
|
||||||
|
License: GPLv3+
|
||||||
|
|
||||||
|
URL: http://www.gnu.org/software/gv
|
||||||
|
Source0: ftp://ftp.gnu.org/gnu/gv/gv-%{version}.tar.gz
|
||||||
|
Source1: gv.png
|
||||||
|
|
||||||
|
Requires: ghostscript-x11
|
||||||
|
BuildRequires: /usr/bin/makeinfo
|
||||||
|
BuildRequires: gcc Xaw3d-devel zlib-devel bzip2-devel desktop-file-utils
|
||||||
|
Requires(post): /sbin/install-info, /usr/bin/update-mime-database
|
||||||
|
Requires(post): /usr/bin/update-desktop-database
|
||||||
|
Requires(preun): /sbin/install-info
|
||||||
|
Requires(postun): /usr/bin/update-mime-database
|
||||||
|
Requires(postun): /usr/bin/update-desktop-database
|
||||||
|
|
||||||
|
Patch0: gv-resource.patch
|
||||||
|
Patch1: gv-dat.patch
|
||||||
|
Patch2: gv-aarch64.patch
|
||||||
|
Patch3: gv-bounding-box.patch
|
||||||
|
Patch4: gv-bug1071238.patch
|
||||||
|
|
||||||
|
%description
|
||||||
|
GNU gv allows to view and navigate through PostScript and PDF documents on an
|
||||||
|
X display by providing a graphical user interface for the Ghostscript interpreter.
|
||||||
|
|
||||||
|
%package help
|
||||||
|
Summary: Documentation for gv
|
||||||
|
|
||||||
|
%description help
|
||||||
|
This package contains help documentation for gv
|
||||||
|
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
%patch0 -p1 -b .resource
|
||||||
|
%patch1 -p1 -b .resdat
|
||||||
|
%patch2 -p1 -b .aarch64
|
||||||
|
%patch3 -p2 -b .bounding-box
|
||||||
|
%patch4 -p1 -b .bug1071238
|
||||||
|
|
||||||
|
|
||||||
|
%build
|
||||||
|
%configure
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
|
|
||||||
|
%install
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
#provide link for gv with ghostview
|
||||||
|
ln $RPM_BUILD_ROOT%{_bindir}/gv $RPM_BUILD_ROOT%{_bindir}/ghostview
|
||||||
|
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
|
||||||
|
|
||||||
|
cat > gv.desktop <<EOF
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=GNU GV PostScript/PDF Viewer
|
||||||
|
GenericName=PostScript/PDF Viewer
|
||||||
|
Comment="View PostScript and PDF files"
|
||||||
|
Type=Application
|
||||||
|
Icon=gv
|
||||||
|
MimeType=application/postscript;application/pdf;
|
||||||
|
StartupWMClass=GV
|
||||||
|
Exec=gv %f
|
||||||
|
EOF
|
||||||
|
|
||||||
|
#putting application in the desktop menus
|
||||||
|
desktop-file-install --add-category=Applications --add-category=Graphics --dir %{buildroot}%{_datadir}/applications/ gv.desktop
|
||||||
|
|
||||||
|
#icon
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
|
||||||
|
cp -p %SOURCE1 $RPM_BUILD_ROOT%{_datadir}/pixmaps
|
||||||
|
|
||||||
|
#remove info dir file
|
||||||
|
rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir
|
||||||
|
|
||||||
|
|
||||||
|
%post
|
||||||
|
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
|
||||||
|
/usr/bin/update-mime-database /usr/share/mime > /dev/null 2>&1 || :
|
||||||
|
/usr/bin/update-desktop-database /usr/share/applications > /dev/null 2>&1 || :
|
||||||
|
|
||||||
|
|
||||||
|
%preun
|
||||||
|
if [[ $1 = 0 ]]; then
|
||||||
|
/sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
%postun
|
||||||
|
if [[ $1 = 0 ]]; then
|
||||||
|
/usr/bin/update-mime-database /usr/share/mime > /dev/null 2>&1 || :
|
||||||
|
/usr/bin/update-desktop-database /usr/share/applications > /dev/null 2>&1 || :
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc AUTHORS ChangeLog COPYING NEWS README
|
||||||
|
%{_bindir}/ghostview
|
||||||
|
%{_bindir}/gv
|
||||||
|
%{_bindir}/gv-update-userconfig
|
||||||
|
%{_datadir}/gv/
|
||||||
|
%{_datadir}/applications/gv.desktop
|
||||||
|
%{_datadir}/info/gv.info.gz
|
||||||
|
%{_datadir}/pixmaps/gv.png
|
||||||
|
|
||||||
|
%files help
|
||||||
|
%{_mandir}/man1/gv.*
|
||||||
|
%{_mandir}/man1/gv-update-userconfig.*
|
||||||
|
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Sep 26 2019 Centos7 Release Engineering <liuzekun@huawei> - 3.7.4-18
|
||||||
|
- Update gv release
|
||||||
|
|
||||||
|
* Sun Sep 15 2019 Centos7 Release Engineering <liuzekun@huawei> - 3.7.4-17
|
||||||
|
- Rebuilt gv rpm package
|
||||||
Loading…
x
Reference in New Issue
Block a user