From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-wi0-f172.google.com ([209.85.212.172]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1SYzII-00089o-HJ for ptxdist@pengutronix.de; Mon, 28 May 2012 14:43:39 +0200 Received: by wibhj8 with SMTP id hj8so1179988wib.7 for ; Mon, 28 May 2012 05:43:24 -0700 (PDT) From: "Bart vdr. Meulen" Date: Mon, 28 May 2012 14:42:33 +0200 Message-Id: <1338208981-8681-7-git-send-email-bartvdrmeulen@gmail.com> Subject: [ptxdist] [PATCH] cups: Add new package Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de From: Remy Bohmer Add The Common Unix Printing System (cups) Signed-off-by: Remy Bohmer --- .../cups-fix-stack-protector-check.patch | 25 +++++ .../cups-genstrings-runs-on-build-system.patch | 19 ++++ patches/cups-1.4.5/cups-mantohtml.patch | 19 ++++ patches/cups-1.4.5/cups-no-tests-man.patch | 17 ++++ patches/cups-1.4.5/series | 4 + rules/cups.in | 38 +++++++ rules/cups.make | 106 ++++++++++++++++++++ 7 files changed, 228 insertions(+) create mode 100644 patches/cups-1.4.5/cups-fix-stack-protector-check.patch create mode 100644 patches/cups-1.4.5/cups-genstrings-runs-on-build-system.patch create mode 100644 patches/cups-1.4.5/cups-mantohtml.patch create mode 100644 patches/cups-1.4.5/cups-no-tests-man.patch create mode 100644 patches/cups-1.4.5/series create mode 100644 rules/cups.in create mode 100644 rules/cups.make diff --git a/patches/cups-1.4.5/cups-fix-stack-protector-check.patch b/patches/cups-1.4.5/cups-fix-stack-protector-check.patch new file mode 100644 index 0000000..1db35ff --- /dev/null +++ b/patches/cups-1.4.5/cups-fix-stack-protector-check.patch @@ -0,0 +1,25 @@ +[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 +--- + 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)) diff --git a/patches/cups-1.4.5/cups-genstrings-runs-on-build-system.patch b/patches/cups-1.4.5/cups-genstrings-runs-on-build-system.patch new file mode 100644 index 0000000..234447e --- /dev/null +++ b/patches/cups-1.4.5/cups-genstrings-runs-on-build-system.patch @@ -0,0 +1,19 @@ +--- + ppdc/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: cups-1.4.5/ppdc/Makefile +=================================================================== +--- cups-1.4.5.orig/ppdc/Makefile ++++ cups-1.4.5/ppdc/Makefile +@@ -243,8 +243,8 @@ genstrings: genstrings.o libcupsppdc.a + $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o genstrings genstrings.o \ + libcupsppdc.a ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) \ + $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) +- echo Generating localization strings... +- ./genstrings >sample.c ++ #echo Generating localization strings... ++ #./genstrings >sample.c + + + # diff --git a/patches/cups-1.4.5/cups-mantohtml.patch b/patches/cups-1.4.5/cups-mantohtml.patch new file mode 100644 index 0000000..68d8727 --- /dev/null +++ b/patches/cups-1.4.5/cups-mantohtml.patch @@ -0,0 +1,19 @@ +--- + man/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: cups-1.4.5/man/Makefile +=================================================================== +--- cups-1.4.5.orig/man/Makefile ++++ cups-1.4.5/man/Makefile +@@ -226,8 +226,8 @@ html: $(MAN1) $(MAN5) $(MAN7) $(MAN8) ma + done + + mantohtml: mantohtml.o +- $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ mantohtml.o +- ++ #$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ mantohtml.o ++ gcc -I/usr/include -I../ -L/usr/lib mantohtml.c -o mantohtml + + # + # End of "$Id: Makefile 9181 2010-06-22 21:42:44Z mike $". diff --git a/patches/cups-1.4.5/cups-no-tests-man.patch b/patches/cups-1.4.5/cups-no-tests-man.patch new file mode 100644 index 0000000..78999c6 --- /dev/null +++ b/patches/cups-1.4.5/cups-no-tests-man.patch @@ -0,0 +1,17 @@ +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: cups-1.4.5/Makefile +=================================================================== +--- cups-1.4.5.orig/Makefile ++++ cups-1.4.5/Makefile +@@ -20,7 +20,7 @@ include Makedefs + # Directories to make... + # + +-DIRS = cups filter backend berkeley cgi-bin driver locale man monitor \ ++DIRS = cups filter backend berkeley cgi-bin driver locale monitor \ + notifier ppdc scheduler systemv test \ + $(PHPDIR) \ + conf data doc examples $(FONTS) templates diff --git a/patches/cups-1.4.5/series b/patches/cups-1.4.5/series new file mode 100644 index 0000000..6ed5667 --- /dev/null +++ b/patches/cups-1.4.5/series @@ -0,0 +1,4 @@ +#cups-fix-stack-protector-check.patch +cups-mantohtml.patch +cups-no-tests-man.patch +cups-genstrings-runs-on-build-system.patch diff --git a/rules/cups.in b/rules/cups.in new file mode 100644 index 0000000..15ab2db --- /dev/null +++ b/rules/cups.in @@ -0,0 +1,38 @@ +## SECTION=networking + +config CUPS + tristate + prompt "cups" + select ZLIB + help + The Common Unix Printing System + + http://www.cups.org + +if CUPS + +config CUPS_DBUS + bool "dbus support" + select DBUS + help + Enable dbus support + +config CUPS_PHP5 + bool "php 5 support" + select PHP5 + help + Enable php5 support + +config CUPS_PYTHON + bool "Python support" + select PYTHON + help + Enable Pyhton support + +config CUPS_PDFTOPS + bool "pdftops support" + help + Enable pdftops support + (C++ compiler and runtime libs required) + +endif diff --git a/rules/cups.make b/rules/cups.make new file mode 100644 index 0000000..4d969d7 --- /dev/null +++ b/rules/cups.make @@ -0,0 +1,106 @@ +# -*-makefile-*- +# +# Copyright (C) 2010 by Remy Bohmer +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_CUPS) += cups + +# +# Paths and names +# +CUPS_VERSION := 1.4.5 +CUPS_MD5 := 50729f6fc46ba54223e0eaf5009f3419 +CUPS := cups-$(CUPS_VERSION) +CUPS_SUFFIX := tar.bz2 +CUPS_URL := http://ftp.easysw.com/pub/cups/$(CUPS_VERSION)/$(CUPS)-source.$(CUPS_SUFFIX) +CUPS_SOURCE := $(SRCDIR)/$(CUPS)-source.$(CUPS_SUFFIX) +CUPS_DIR := $(BUILDDIR)/$(CUPS) +CUPS_LICENSE := GPLv2+ + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +CUPS_CONF_ENV := \ + $(CROSS_ENV) \ + DSOFLAGS="$(CROSS_LDFLAGS)" + +# +# autoconf +# +CUPS_CONF_TOOL := autoconf +CUPS_CONF_OPT := \ + $(CROSS_AUTOCONF_USR) \ + --disable-perl \ + --disable-java \ + --disable-gssapi + +ifdef PTXCONF_CUPS_DBUS +CUPS_CONF_OPT += --enable-dbus +else +CUPS_CONF_OPT += --disable-dbus +endif + +ifdef PTXCONF_CUPS_PHP5 +CUPS_CONF_OPT += --with-php +else +CUPS_CONF_OPT += --disable-php +endif + +ifdef PTXCONF_CUPS_PYTHON +CUPS_CONF_OPT += --with-python +else +CUPS_CONF_OPT += --disable-python +endif + +ifdef PTXCONF_CUPS_PDFTOPS +CUPS_CONF_OPT += --enable-pdftops +else +CUPS_CONF_OPT += --disable-pdftops +endif + +# ---------------------------------------------------------------------------- +# Install +# ---------------------------------------------------------------------------- + +CUPS_INSTALL_OPT := DESTDIR=$(CUPS_PKGDIR) DSTROOT=$(CUPS_PKGDIR) install + +# Buildroot does these steps during install, why? +# sed "s,^prefix=.*,prefix=\'$(CUPS_PKGDIR)/usr\',g" $(CUPS_PKGDIR)/usr/bin/cups-config +# sed "s,^exec_prefix=.*,exec_prefix=\'$(CUPS_PKGDIR)/usr\',g" $(CUPS_PKGDIR)/usr/bin/cups-config +# sed "s,^includedir=.*,includedir=\'$(CUPS_PKGDIR)/usr/include\',g" $(CUPS_PKGDIR)/usr/bin/cups-config +# sed "s,^libdir=.*,libdir=\'$(CUPS_PKGDIR)/usr/lib\',g" $(CUPS_PKGDIR)/usr/bin/cups-config +#$(STATEDIR)/cups.install: +# @$(call targetinfo) +# $(call world/install, CUPS) +# @$(call touch) + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/cups.targetinstall: + @$(call targetinfo) + + @$(call install_init, cups) + @$(call install_fixup, cups,PRIORITY,optional) + @$(call install_fixup, cups,SECTION,base) + @$(call install_fixup, cups,AUTHOR,"Remy Bohmer ") + @$(call install_fixup, cups,DESCRIPTION,missing) + +# @$(call install_copy, cups, 0, 0, 0755, $(CUPS_DIR)/foobar, /dev/null) +# @$(call install_lib, cups, 0, 0, 0644, libcups) + + @$(call install_finish, cups) + + @$(call touch) + +# vim: syntax=make -- 1.7.9.5 -- ptxdist mailing list ptxdist@pengutronix.de