From 27830e7b940f7db13d9c1cca6c7b9cd84fa90c22136c886ee6842fd675d2a3bc Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 26 Feb 2013 17:06:50 +0000 Subject: [PATCH] . OBS-URL: https://build.opensuse.org/package/show/Publishing/gv?expand=0&rev=15 --- gv-3.7.2-libzio.dif | 54 +++++++++++++++++++++++++++++++++++++++++++++ gv.changes | 5 +++++ gv.spec | 11 +++++++-- 3 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 gv-3.7.2-libzio.dif diff --git a/gv-3.7.2-libzio.dif b/gv-3.7.2-libzio.dif new file mode 100644 index 0000000..78595cb --- /dev/null +++ b/gv-3.7.2-libzio.dif @@ -0,0 +1,54 @@ +--- configure.ac ++++ configure.ac 2013-02-26 17:06:18.609444764 +0000 +@@ -73,6 +73,14 @@ AC_CHECK_HEADER(bzlib.h,[ + do + AC_CHECK_LIB($lib, BZ2_bzopen, [LIBS="$LIBS -l$lib" ; break]) + done]) ++AC_CHECK_HEADER(lzmadec.h, [ ++ for lib in lzma lzmadec; do ++ AC_CHECK_LIB($lib, lzmadec_open, [LIBS="$LIBS -l$lib"; break]) ++ done]) ++ AC_CHECK_HEADER(lzma.h, [ ++ for lib in lzma; do ++ AC_CHECK_LIB($lib, lzma_easy_encoder, [LIBS="$LIBS -l$lib"; break]) ++ done]) + AC_CHECK_HEADER(zio.h,[ + AC_CHECK_LIB(zio, fzopen, [LIBS="$LIBS -lzio" ; AC_DEFINE(HAVE_ZIO, 1, [Have ZIO Library])],[LIBS=$savedLIBS]) + ],[LIBS=$savedLIBS]) +--- src/ps.c ++++ src/ps.c 2013-02-26 16:58:04.321444640 +0000 +@@ -385,10 +385,11 @@ psscan(fileP,filename,filename_raw,filen + int ignore_dsc; /* Derived from scanstyle. + If set the document structure will be ignored. + */ +- unsigned char b[3]; /* The first 3 bytes of the input file */ ++ unsigned char b[5]; /* The first 3 bytes of the input file */ + + BEGINMESSAGE(psscan) + ++#ifndef HAVE_ZIO + if (cmd_uncompress) { + if ( fread(b, sizeof(char), 3, *fileP) != 3 || /* If ((read error) OR */ + ( memcmp(b, "\037\235", 2) != 0 && /* (not compress AND */ +@@ -398,6 +399,21 @@ psscan(fileP,filename,filename_raw,filen + cmd_uncompress=NULL; + } + } ++#else ++ if (cmd_uncompress) { ++ if ( fread(b, sizeof(char), 5, *fileP) != 5 || /* If read error OR */ ++ ( memcmp(b, "\037\235", 2) != 0 && /* not compress */ ++ memcmp(b, "\037\236", 2) != 0 && ++ memcmp(b, "\037\213", 2) != 0 && /* not gzip */ ++ memcmp(b, "BZh", 3) != 0 && /* not bzip2 */ ++ memcmp(b, "]\0\0\200",5) != 0 && ++ memcmp(b, "\377LZMA", 5) != 0 && ++ memcmp(b, "\3757zXZ", 5) != 0 )) { ++ rewind(*fileP); ++ cmd_uncompress=NULL; ++ } ++ } ++#endif + #ifndef HAVE_ZIO + if (cmd_uncompress) { + struct document *retval = NULL; diff --git a/gv.changes b/gv.changes index e231f7d..71d2334 100644 --- a/gv.changes +++ b/gv.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 26 17:00:33 UTC 2013 - werner@suse.de + +- Add patch gv-3.7.2-libzio.dif: make libzio usable (bnc#805149) + ------------------------------------------------------------------- Fri Feb 22 08:31:32 UTC 2013 - werner@suse.de diff --git a/gv.spec b/gv.spec index 1810952..23fc313 100644 --- a/gv.spec +++ b/gv.spec @@ -19,6 +19,8 @@ Name: gv BuildRequires: automake BuildRequires: help2man +BuildRequires: libbz2-devel +BuildRequires: libzio-devel BuildRequires: makeinfo BuildRequires: update-desktop-files BuildRequires: xorg-x11 @@ -28,6 +30,8 @@ BuildRequires: xaw3d-devel %else BuildRequires: xaw3d %endif +BuildRequires: xz-devel +BuildRequires: zlib-devel %if %suse_version < 1100 BuildRequires: desktop-data-SuSE %endif @@ -48,6 +52,8 @@ Source1: gv.desktop Source2: gv.png Patch1: gv-3.7.0.dif Patch2: gv-3.7.0-I18N-mb.patch +# PATCH-FIX-OPENSUSE: make libzio usable +Patch3: gv-3.7.2-libzio.dif BuildRoot: %{_tmppath}/%{name}-%{version}-build %{expand: %%global _exec_prefix %(type -p pkg-config &>/dev/null && pkg-config --variable prefix x11 || echo /usr/X11R6)} %if "%_exec_prefix" == "/usr/X11R6" @@ -77,8 +83,9 @@ Authors: %prep %setup echo >> src/Makefile.am -%patch1 -p0 -%patch2 -p0 +%patch1 -p0 -b .one +%patch2 -p0 -b .two +%patch3 -p0 -b .zio %build autoreconf -fis