forked from pool/ghostscript
Accepting request 293106 from home:jsmeix:branches:Printing
Version upgrade to 9.16rc2 (second release candidate for 9.16) for testing if it works. Now it also builds for SLE_11_SP3. OBS-URL: https://build.opensuse.org/request/show/293106 OBS-URL: https://build.opensuse.org/package/show/Printing/ghostscript?expand=0&rev=50
This commit is contained in:
parent
6a7f3ad3b8
commit
edc9d0cc50
92
fix.including.pread.pwrite.pthread_mutexattr_settype.diff
Normal file
92
fix.including.pread.pwrite.pthread_mutexattr_settype.diff
Normal file
@ -0,0 +1,92 @@
|
||||
|
||||
From: Chris Liddell <chris.liddell@artifex.com>
|
||||
Date: Mon, 23 Mar 2015 17:03:41 +0000 (+0000)
|
||||
Subject: Bug 695882: ensure function protypes are available
|
||||
X-Git-Url: http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff_plain;h=8bb53a7f
|
||||
|
||||
Bug 695882: ensure function protypes are available
|
||||
|
||||
There are some special defines on Linux to include prototypes for pread, pwrite
|
||||
and pthread_mutexattr_settype: add these to our "unistd_.h" header.
|
||||
|
||||
Also, tweak the the configure script to check for prototypes as well as just
|
||||
successful linking before including the code that uses those functions
|
||||
|
||||
No cluster differences
|
||||
|
||||
--- base/gp_psync.c
|
||||
+++ base/gp_psync.c
|
||||
@@ -17,6 +17,7 @@
|
||||
/* POSIX pthreads threads / semaphore / monitor implementation */
|
||||
#include "std.h"
|
||||
#include "malloc_.h"
|
||||
+#include "unistd_.h" /* for __USE_UNIX98 */
|
||||
#include <pthread.h>
|
||||
#include "gserrors.h"
|
||||
#include "gpsync.h"
|
||||
--- base/unistd_.h
|
||||
+++ base/unistd_.h
|
||||
@@ -53,6 +53,7 @@
|
||||
/* _XOPEN_SOURCE 500 define is needed to get
|
||||
* access to pread and pwrite */
|
||||
# define _XOPEN_SOURCE 500
|
||||
+# define __USE_UNIX98
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
--- configure.ac
|
||||
+++ configure.ac
|
||||
@@ -494,6 +494,16 @@ AC_CHECK_LIB(m, cos)
|
||||
|
||||
AC_CHECK_FUNCS([pread pwrite], [HAVE_PREAD_PWRITE="-DHAVE_PREAD_PWRITE=1"], [HAVE_PREAD_PWRITE=])
|
||||
|
||||
+if test "x$HAVE_PREAD_PWRITE" != "x"; then
|
||||
+ save_cflags=$CFLAGS
|
||||
+ CFLAGS="$CFLAGS -D__USE_UNIX98=1 -D_XOPEN_SOURCE=500"
|
||||
+ AC_CHECK_DECLS([pwrite,pread], [], [HAVE_PREAD_PWRITE=])
|
||||
+ CFLAGS=$save_cflags
|
||||
+ if test "x$HAVE_PREAD_PWRITE" != "x"; then
|
||||
+ GCFLAGS="$GCFLAGS -D__USE_UNIX98=1"
|
||||
+ fi
|
||||
+fi
|
||||
+
|
||||
AC_SUBST(HAVE_PREAD_PWRITE)
|
||||
|
||||
SYNC="nosync"
|
||||
@@ -515,11 +525,34 @@ if test "x$HAVE_PREAD_PWRITE" != "x"; then
|
||||
SYNC=posync;
|
||||
PTHREAD_LIBS="-lpthread"
|
||||
])
|
||||
+ AC_MSG_CHECKING([recursive mutexes.......])
|
||||
AC_TRY_COMPILE([#include <pthread.h>],
|
||||
- [static int k = PTHREAD_MUTEX_RECURSIVE;],
|
||||
+ [
|
||||
+ static int k = PTHREAD_MUTEX_RECURSIVE;
|
||||
+ #ifndef pthread_mutexattr_settype
|
||||
+ #ifdef __cplusplus
|
||||
+ (void) pthread_mutexattr_settype;
|
||||
+ #else
|
||||
+ (void) pthread_mutexattr_settype;
|
||||
+ #endif
|
||||
+ #endif
|
||||
+ ;
|
||||
+ return 0;
|
||||
+ ],
|
||||
[RECURSIVE_MUTEXATTR="-DGS_RECURSIVE_MUTEXATTR=PTHREAD_MUTEX_RECURSIVE"],
|
||||
[AC_TRY_COMPILE([#include <pthread.h>],
|
||||
- [static int k = PTHREAD_MUTEX_RECURSIVE_NP;],
|
||||
+ [
|
||||
+ static int k = PTHREAD_MUTEX_RECURSIVE_NP;
|
||||
+ #ifndef pthread_mutexattr_settype
|
||||
+ #ifdef __cplusplus
|
||||
+ (void) pthread_mutexattr_settype;
|
||||
+ #else
|
||||
+ (void) pthread_mutexattr_settype;
|
||||
+ #endif
|
||||
+ #endif
|
||||
+ ;
|
||||
+ return 0;
|
||||
+ ],
|
||||
[RECURSIVE_MUTEXATTR="-DGS_RECURSIVE_MUTEXATTR=PTHREAD_MUTEX_RECURSIVE_NP"])])
|
||||
;;
|
||||
esac
|
@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 25 12:38:16 CET 2015 - jsmeix@suse.de
|
||||
|
||||
- fix.including.pread.pwrite.pthread_mutexattr_settype.diff
|
||||
fixes on SLE11 implicit declaration of function warnings
|
||||
for 'pread' 'pwrite' 'pthread_mutexattr_settype' see
|
||||
http://bugs.ghostscript.com/show_bug.cgi?id=695882
|
||||
- ppc64le-support.patch is a remainder of the previous patch
|
||||
now the hunk for LCMS (lcms/include/lcms.h) is removed
|
||||
because LCMS 1.x is removed since Ghostscript 9.16
|
||||
but the hunk for LCMS2 (lcms2/include/lcms2.h) is still needed
|
||||
see http://bugs.ghostscript.com/show_bug.cgi?id=695544
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 20 17:12:34 CET 2015 - jsmeix@suse.de
|
||||
|
||||
|
@ -67,9 +67,17 @@ Source0: http://downloads.ghostscript.com/public/.release_candidate/ghost
|
||||
#
|
||||
# Patch10...Patch99 is for patches from SUSE which are intended for upstream:
|
||||
# Patch11 ppc64le-support.patch is a remainder of the previous patch
|
||||
# lcms2 has been fixed upstream not working and lcms has not been fixed
|
||||
# now the hunk for LCMS (lcms/include/lcms.h) is removed
|
||||
# because LCMS 1.x is removed since Ghostscript 9.16
|
||||
# but the hunk for LCMS2 (lcms2/include/lcms2.h) is still needed
|
||||
# see http://bugs.ghostscript.com/show_bug.cgi?id=695544
|
||||
Patch11: ppc64le-support.patch
|
||||
# Patch12 fix.including.pread.pwrite.pthread_mutexattr_settype.diff fixes on SLE11
|
||||
# ./base/gp_unifs.c:187: warning: implicit declaration of function 'pread'
|
||||
# ./base/gp_unifs.c:209: warning: implicit declaration of function 'pwrite'
|
||||
# ./base/gp_psync.c:170: warning: implicit declaration of function 'pthread_mutexattr_settype'
|
||||
# see http://bugs.ghostscript.com/show_bug.cgi?id=695882
|
||||
Patch12: fix.including.pread.pwrite.pthread_mutexattr_settype.diff
|
||||
#
|
||||
# Source100...Source999 is for sources from SUSE which are not intended for upstream:
|
||||
#
|
||||
@ -143,10 +151,17 @@ This package contains the development files for Minimal Ghostscript.
|
||||
# use a directory name matching Source0 to make it work also for ghostscript-mini:
|
||||
%setup -q -n ghostscript-%{tarball_version}
|
||||
# Patch11 ppc64le-support.patch is a remainder of the previous patch
|
||||
# lcms2 has been fixed upstream not working and lcms has not been fixed
|
||||
# now the hunk for LCMS (lcms/include/lcms.h) is removed
|
||||
# because LCMS 1.x is removed since Ghostscript 9.16
|
||||
# but the hunk for LCMS2 (lcms2/include/lcms2.h) is still needed
|
||||
# see http://bugs.ghostscript.com/show_bug.cgi?id=695544
|
||||
# Patch11 does no longer apply for 9.16rc2 so that it is simply skipped for now:
|
||||
#patch11 -p1
|
||||
%patch11 -p1
|
||||
# Patch12 fix.including.pread.pwrite.pthread_mutexattr_settype.diff fixes on SLE11
|
||||
# ./base/gp_unifs.c:187: warning: implicit declaration of function 'pread'
|
||||
# ./base/gp_unifs.c:209: warning: implicit declaration of function 'pwrite'
|
||||
# ./base/gp_psync.c:170: warning: implicit declaration of function 'pthread_mutexattr_settype'
|
||||
# see http://bugs.ghostscript.com/show_bug.cgi?id=695882
|
||||
%patch12
|
||||
|
||||
%build
|
||||
# Set our preferred architecture-specific flags for the compiler and linker:
|
||||
@ -154,7 +169,7 @@ export CFLAGS="$RPM_OPT_FLAGS"
|
||||
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
||||
autoreconf -fi
|
||||
# --docdir=%%{_defaultdocdir}/%%{name} does not work therefore it is not used.
|
||||
# --disable-cups and --without-pdftoraster and --without-install-cups
|
||||
# --disable-cups and --without-pdftoraster
|
||||
# to have nothing related to CUPS in the minimal Ghostscript.
|
||||
# --disable-dbus to have nothing related to D-Bus in the minimal Ghostscript.
|
||||
# --without-ijs to disable IJS printer driver support in the minimal Ghostscript.
|
||||
@ -162,10 +177,12 @@ autoreconf -fi
|
||||
# but no printer drivers in the minimal Ghostscript.
|
||||
# --without-x to not use the X Window System.
|
||||
# --without-omni to disable the outdated and unmaintained omni driver.
|
||||
# --without-jasper and --enable-openjpeg because since Ghostscript 9.05 JasPer is deprecated
|
||||
# --enable-openjpeg because since Ghostscript 9.05 JasPer is deprecated
|
||||
# (--without-jasper is now an unrecognized option by configure)
|
||||
# and Ghostscript now ships modified OpenJPEG sources for JPEG2000 decoding
|
||||
# (replacing JasPer - although JasPer is still included for this release).
|
||||
# (replacing JasPer - although JasPer is still included for this release)
|
||||
# Performance, reliability and memory use whilst decoding JPX streams are all improved.
|
||||
# see also http://bugs.ghostscript.com/show_bug.cgi?id=691430
|
||||
# --without-ufst and --without-luratech because those are relevant to commercial releases only
|
||||
# which would require a commercial license.
|
||||
# --without-libpaper disables libpaper support because SUSE does not have libpaper.
|
||||
@ -182,14 +199,12 @@ export SUSE_ASNEEDED=0
|
||||
--with-libiconv=maybe \
|
||||
--enable-freetype \
|
||||
--with-jbig2dec \
|
||||
--without-jasper \
|
||||
--enable-openjpeg \
|
||||
--enable-dynamic \
|
||||
--without-ijs \
|
||||
--disable-cups \
|
||||
--disable-dbus \
|
||||
--without-pdftoraster \
|
||||
--without-install-cups \
|
||||
--with-drivers=FILES \
|
||||
--without-x \
|
||||
--disable-gtk \
|
||||
@ -242,11 +257,16 @@ pushd %{buildroot}%{_defaultdocdir}
|
||||
ln -s ../../ghostscript/%{built_version}/doc ghostscript
|
||||
popd
|
||||
# Extract the catalog of devices which are actually built-in in exactly this Ghostscript:
|
||||
# If a needed source file is no longer accessible fail intentionally as notification
|
||||
# that something changed which needs adaptions here:
|
||||
for F in devices/devs.mak devices/contrib.mak contrib/contrib.mak
|
||||
do test -r $F || exit 99
|
||||
done
|
||||
# Do not pollute the build log file with zillions of meaningless messages:
|
||||
set +x
|
||||
cat /dev/null >catalog.devices
|
||||
for D in $( %{buildroot}/usr/bin/gs -h | sed -n -e '/^Available devices:/,/^Search path:/p' | egrep -v '^Available devices:|^Search path:' )
|
||||
do for F in base/devs.mak base/contrib.mak contrib/contrib.mak
|
||||
do for F in devices/devs.mak devices/contrib.mak contrib/contrib.mak
|
||||
do sed -n -e '/ Catalog /,/ End of catalog /p' $F | grep "[[:space:]]$D[[:space:]]" | grep -o '[[:alnum:]].*' | tr -s '[:blank:]' ' ' | sed -e 's/ /\t/' | expand -t16 >>catalog.devices
|
||||
done
|
||||
done
|
||||
|
@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 25 12:38:16 CET 2015 - jsmeix@suse.de
|
||||
|
||||
- fix.including.pread.pwrite.pthread_mutexattr_settype.diff
|
||||
fixes on SLE11 implicit declaration of function warnings
|
||||
for 'pread' 'pwrite' 'pthread_mutexattr_settype' see
|
||||
http://bugs.ghostscript.com/show_bug.cgi?id=695882
|
||||
- ppc64le-support.patch is a remainder of the previous patch
|
||||
now the hunk for LCMS (lcms/include/lcms.h) is removed
|
||||
because LCMS 1.x is removed since Ghostscript 9.16
|
||||
but the hunk for LCMS2 (lcms2/include/lcms2.h) is still needed
|
||||
see http://bugs.ghostscript.com/show_bug.cgi?id=695544
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 20 17:12:34 CET 2015 - jsmeix@suse.de
|
||||
|
||||
|
@ -87,9 +87,17 @@ Source0: http://downloads.ghostscript.com/public/.release_candidate/ghost
|
||||
#
|
||||
# Patch10...Patch99 is for patches from SUSE which are intended for upstream:
|
||||
# Patch11 ppc64le-support.patch is a remainder of the previous patch
|
||||
# lcms2 has been fixed upstream not working and lcms has not been fixed
|
||||
# now the hunk for LCMS (lcms/include/lcms.h) is removed
|
||||
# because LCMS 1.x is removed since Ghostscript 9.16
|
||||
# but the hunk for LCMS2 (lcms2/include/lcms2.h) is still needed
|
||||
# see http://bugs.ghostscript.com/show_bug.cgi?id=695544
|
||||
Patch11: ppc64le-support.patch
|
||||
# Patch12 fix.including.pread.pwrite.pthread_mutexattr_settype.diff fixes on SLE11
|
||||
# ./base/gp_unifs.c:187: warning: implicit declaration of function 'pread'
|
||||
# ./base/gp_unifs.c:209: warning: implicit declaration of function 'pwrite'
|
||||
# ./base/gp_psync.c:170: warning: implicit declaration of function 'pthread_mutexattr_settype'
|
||||
# see http://bugs.ghostscript.com/show_bug.cgi?id=695882
|
||||
Patch12: fix.including.pread.pwrite.pthread_mutexattr_settype.diff
|
||||
#
|
||||
# Source100...Source999 is for sources from SUSE which are not intended for upstream:
|
||||
#
|
||||
@ -280,10 +288,17 @@ This package contains the development files for Ghostscript.
|
||||
# use a directory name matching Source0 to make it work also for ghostscript-mini:
|
||||
%setup -q -n ghostscript-%{tarball_version}
|
||||
# Patch11 ppc64le-support.patch is a remainder of the previous patch
|
||||
# lcms2 has been fixed upstream not working and lcms has not been fixed
|
||||
# now the hunk for LCMS (lcms/include/lcms.h) is removed
|
||||
# because LCMS 1.x is removed since Ghostscript 9.16
|
||||
# but the hunk for LCMS2 (lcms2/include/lcms2.h) is still needed
|
||||
# see http://bugs.ghostscript.com/show_bug.cgi?id=695544
|
||||
# Patch11 does no longer apply for 9.16rc2 so that it is simply skipped for now:
|
||||
#patch11 -p1
|
||||
%patch11 -p1
|
||||
# Patch12 fix.including.pread.pwrite.pthread_mutexattr_settype.diff fixes on SLE11
|
||||
# ./base/gp_unifs.c:187: warning: implicit declaration of function 'pread'
|
||||
# ./base/gp_unifs.c:209: warning: implicit declaration of function 'pwrite'
|
||||
# ./base/gp_psync.c:170: warning: implicit declaration of function 'pthread_mutexattr_settype'
|
||||
# see http://bugs.ghostscript.com/show_bug.cgi?id=695882
|
||||
%patch12
|
||||
|
||||
%build
|
||||
# Set our preferred architecture-specific flags for the compiler and linker:
|
||||
@ -291,19 +306,22 @@ export CFLAGS="$RPM_OPT_FLAGS"
|
||||
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
||||
autoreconf -fi
|
||||
# --docdir=%%{_defaultdocdir}/%%{name} does not work therefore it is not used.
|
||||
# --enable-cups and --with-pdftoraster and --with-install-cups
|
||||
# (--with-install-cups is new since version 9.04)
|
||||
# to make and install cups/filter/gstoraster and cups/filter/gstopxl
|
||||
# and related files (gstoraster.convs pxlcolor.ppd pxlmono.ppd).
|
||||
# --enable-dbus to have colord support in gstoraster, see cups/colord.c (colord is accessed via D-Bus).
|
||||
# --enable-cups but no longer --with-pdftoraster --enable-dbus --with-install-cups because
|
||||
# --with-install-cups was introduced in version 9.04 but meanwhile it is an unrecognized option by configure
|
||||
# because cups/filter/gstoraster and cups/filter/gstopxl and related files gstoraster.convs pxlcolor.ppd pxlmono.ppd
|
||||
# are no longer provided by Ghostscript but were moved to the cups-filters package.
|
||||
# also pdftoraster is provided by cups-filters and there is colord support that
|
||||
# would need --enable-dbus because colord is accessed via D-Bus.
|
||||
# --with-ijs to enable IJS printer driver support (in particular needed by HPIJS).
|
||||
# --with-drivers=ALL to all file format drivers and all printer drivers.
|
||||
# --with-x to use the X Window System.
|
||||
# --without-omni to disable the outdated and unmaintained omni driver.
|
||||
# --without-jasper and --enable-openjpeg because since Ghostscript 9.05 JasPer is deprecated
|
||||
# --enable-openjpeg because since Ghostscript 9.05 JasPer is deprecated
|
||||
# (--without-jasper is now an unrecognized option by configure)
|
||||
# and Ghostscript now ships modified OpenJPEG sources for JPEG2000 decoding
|
||||
# (replacing JasPer - although JasPer is still included for this release).
|
||||
# (replacing JasPer - although JasPer is still included for this release)
|
||||
# Performance, reliability and memory use whilst decoding JPX streams are all improved.
|
||||
# see also http://bugs.ghostscript.com/show_bug.cgi?id=691430
|
||||
# --without-ufst and --without-luratech because those are relevant to commercial releases only
|
||||
# which would require a commercial license.
|
||||
# --without-libpaper disables libpaper support because SUSE does not have libpaper.
|
||||
@ -320,14 +338,10 @@ export SUSE_ASNEEDED=0
|
||||
--with-libiconv=maybe \
|
||||
--enable-freetype \
|
||||
--with-jbig2dec \
|
||||
--without-jasper \
|
||||
--enable-openjpeg \
|
||||
--enable-dynamic \
|
||||
--with-ijs \
|
||||
--enable-cups \
|
||||
--enable-dbus \
|
||||
--with-pdftoraster \
|
||||
--with-install-cups \
|
||||
--with-drivers=ALL \
|
||||
--with-x \
|
||||
--disable-gtk \
|
||||
@ -380,11 +394,16 @@ pushd %{buildroot}%{_defaultdocdir}
|
||||
ln -s ../../ghostscript/%{built_version}/doc ghostscript
|
||||
popd
|
||||
# Extract the catalog of devices which are actually built-in in exactly this Ghostscript:
|
||||
# If a needed source file is no longer accessible fail intentionally as notification
|
||||
# that something changed which needs adaptions here:
|
||||
for F in devices/devs.mak devices/contrib.mak contrib/contrib.mak
|
||||
do test -r $F || exit 99
|
||||
done
|
||||
# Do not pollute the build log file with zillions of meaningless messages:
|
||||
set +x
|
||||
cat /dev/null >catalog.devices
|
||||
for D in $( %{buildroot}/usr/bin/gs -h | sed -n -e '/^Available devices:/,/^Search path:/p' | egrep -v '^Available devices:|^Search path:' )
|
||||
do for F in base/devs.mak base/contrib.mak contrib/contrib.mak
|
||||
do for F in devices/devs.mak devices/contrib.mak contrib/contrib.mak
|
||||
do sed -n -e '/ Catalog /,/ End of catalog /p' $F | grep "[[:space:]]$D[[:space:]]" | grep -o '[[:alnum:]].*' | tr -s '[:blank:]' ' ' | sed -e 's/ /\t/' | expand -t16 >>catalog.devices
|
||||
done
|
||||
done
|
||||
|
@ -1,21 +1,3 @@
|
||||
--- ghostscript-9.15/lcms/include/lcms.h
|
||||
+++ ghostscript-9.15/lcms/include/lcms.h
|
||||
@@ -140,11 +140,15 @@
|
||||
#endif
|
||||
|
||||
#if defined(__sgi__) || defined(__sgi) || defined(__powerpc__) || defined(sparc) || defined(__ppc__) || defined(__s390__) || defined(__s390x__)
|
||||
+# ifndef __LITTLE_ENDIAN__
|
||||
# define USE_BIG_ENDIAN 1
|
||||
+# endif
|
||||
#endif
|
||||
|
||||
#if TARGET_CPU_PPC
|
||||
+# ifndef __LITTLE_ENDIAN__
|
||||
# define USE_BIG_ENDIAN 1
|
||||
+# endif
|
||||
#endif
|
||||
|
||||
#if macintosh
|
||||
--- ghostscript-9.15/lcms2/include/lcms2.h
|
||||
+++ ghostscript-9.15/lcms2/include/lcms2.h
|
||||
@@ -67,6 +67,7 @@
|
||||
|
Loading…
Reference in New Issue
Block a user