Commit d37ce8e1 authored by Olivier Schonken's avatar Olivier Schonken Committed by Thomas Petazzoni
Browse files

package/cups: Un-deprecate, and update CUPS to 2.1.2



 - Remove 0001-fix-static.patch - Fixed upstream
 - Remove 0002-fix-stack-protector-check.patch - Fixed upstream
 - Remove 0003-mantohtml.patch - Replaced by
   0001-Remove-man-from-BUILDDIRS-in- configure.patch
 - Add 0002-Do-not-use-genstrings.patch
 - Add CUPS_PDFTOPS option to Config.in.legacy - This support was
   moved to the cups-filters package.

Signed-off-by: default avatarOlivier Schonken <olivier.schonken@gmail.com>
[Thomas:
 - rewrap patch description in patch 0001
 - adjust patch 0002 to completely remove the call to genstrings
   instead of commenting it, and remove the potentially confusing
   'echo' above it
 - add a third patch that sanitizes the installation process to avoid
   non-working stripping, owernship changes, etc.]
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent 837de179
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -145,6 +145,13 @@ endif
###############################################################################
comment "Legacy options removed in 2016.02"

config BR2_PACKAGE_CUPS_PDFTOPS
	bool "Pdftops support has been removed from Cups"
	select BR2_LEGACY
	help
	  Pdftops support has been removed from the cups package
	  It is now part of the cups-filters package.

config BR2_KERNEL_HEADERS_3_16
	bool "kernel headers version 3.16.x are no longer supported"
	select BR2_KERNEL_HEADERS_3_18
+29 −0
Original line number Diff line number Diff line
From a77bb18a5584bb23687ed3c522dbd91a9987d5a7 Mon Sep 17 00:00:00 2001
From: Olivier Schonken <olivier.schonken@gmail.com>
Date: Wed, 20 Jan 2016 22:13:11 +0200
Subject: [PATCH] Remove man from BUILDDIRS in configure

Since cups doesn't autoreconf properly, we directly patch the
configure script.

Signed-off-by: Olivier Schonken <olivier.schonken@gmail.com>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 4170ff3..3879a75 100755
--- a/configure
+++ b/configure
@@ -5921,7 +5921,7 @@ fi
 
 case "$COMPONENTS" in
 	all)
-		BUILDDIRS="filter backend berkeley cgi-bin monitor notifier ppdc scheduler systemv conf data desktop locale man doc examples templates"
+		BUILDDIRS="filter backend berkeley cgi-bin monitor notifier ppdc scheduler systemv conf data desktop locale doc examples templates"
 		;;
 
 	core)
-- 
2.5.0
+0 −28
Original line number Diff line number Diff line
cups: fix static linking

Append -lz to the cups linking libs to fix a problem like this one:

../cups/libcups.a(file.o): In function `cupsFileSeek':
/home/test/test/1/output/build/cups-1.3.11/cups/file.c:1444: undefined 
reference to `inflateEnd'
collect2: error: ld returned 1 exit status
make[2]: *** [ipp] Error 1
make[2]: *** Waiting for unfinished jobs....

This solution is the same used upstream in newer versions.

Fixes:
   http://autobuild.buildroot.net/results/f3d/f3d4f67ce7ee1d54f5bd4c87dfddb7417db614e5/

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
--- cups-1.3.11/Makedefs.in.orig	2014-03-05 13:28:10.175437880 +0000
+++ cups-1.3.11/Makedefs.in	2014-03-05 13:28:35.398845162 +0000
@@ -132,7 +132,7 @@ LDFLAGS		=	-L../cups -L../filter @LDARCH
 LEGACY_BACKENDS	=	@LEGACY_BACKENDS@
 LIBCUPSORDER	=	@LIBCUPSORDER@
 LIBCUPSIMAGEORDER =	@LIBCUPSIMAGEORDER@
-LINKCUPS	=	@LINKCUPS@ $(SSLLIBS)
+LINKCUPS	=	@LINKCUPS@ $(SSLLIBS) $(LIBZ)
 LINKCUPSIMAGE	=	@LINKCUPSIMAGE@
 LIBS		=	$(LINKCUPS) $(COMMONLIBS)
 OPTIM		=	@OPTIM@
+36 −0
Original line number Diff line number Diff line
From 193c8d8c55a3478ca5c9e161ce581e5794098c6d Mon Sep 17 00:00:00 2001
From: Olivier Schonken <olivier.schonken@gmail.com>
Date: Thu, 21 Jan 2016 23:04:49 +0100
Subject: [PATCH] Do not use genstrings

Using cross compiled genstrings while cross-compiling will break
compilation.  Genstrings is still compiled because some power users
might want to do ppd compilation on their target machine, and for that
they would need to use the native compiled genstrings binary, to
generate a sample.c file for their target

Signed-off-by: Olivier Schonken <olivier.schonken@gmail.com>
[Thomas: completely remove call to genstrings rather than commenting
it, remove useless and potentially confusing 'echo' before the
genstrings call.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ppdc/Makefile | 2 --
 1 file changed, 2 deletions(-)

diff --git a/ppdc/Makefile b/ppdc/Makefile
index 68bf6b2..d57a0c9 100644
--- a/ppdc/Makefile
+++ b/ppdc/Makefile
@@ -242,8 +242,6 @@ genstrings:		genstrings.o libcupsppdc.a ../cups/$(LIBCUPSSTATIC) \
 	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o genstrings genstrings.o \
 		libcupsppdc.a ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) \
 		$(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
-	echo Generating localization strings...
-	./genstrings >sample.c
 
 
 #
-- 
2.6.4
+0 −25
Original line number Diff line number Diff line
[PATCH]: use AC_TRY_LINK for stack protector check

Actually try to link an executable to test for stack protector support,
as gcc seems to accept the -fstack-protector argument even when it's
compiled with --disable-libssp (but linking fails with a error
finding -lssp_nonshared).

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 config-scripts/cups-compiler.m4 |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: cups-1.3.9/config-scripts/cups-compiler.m4
===================================================================
--- cups-1.3.9.orig/config-scripts/cups-compiler.m4
+++ cups-1.3.9/config-scripts/cups-compiler.m4
@@ -109,7 +109,7 @@ if test -n "$GCC"; then
 	AC_MSG_CHECKING(if GCC supports -fstack-protector)
 	OLDCFLAGS="$CFLAGS"
 	CFLAGS="$CFLAGS -fstack-protector"
-	AC_TRY_COMPILE(,,
+	AC_TRY_LINK(,,
 		OPTIM="$OPTIM -fstack-protector"
 		AC_MSG_RESULT(yes),
 		AC_MSG_RESULT(no))
Loading