mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Bart vdr. Meulen" <bartvdrmeulen@gmail.com>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] cups: Add new package
Date: Mon, 28 May 2012 14:42:33 +0200	[thread overview]
Message-ID: <1338208981-8681-7-git-send-email-bartvdrmeulen@gmail.com> (raw)

From: Remy Bohmer <linux@bohmer.net>

Add The Common Unix Printing System (cups)

Signed-off-by: Remy Bohmer <linux@bohmer.net>
---
 .../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 <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))
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 <linux@bohmer.net>
+#
+# 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 <linux@bohmer.net>")
+	@$(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

             reply	other threads:[~2012-05-28 12:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-28 12:42 Bart vdr. Meulen [this message]
2012-05-30  7:39 ` Michael Olbrich
2012-05-30  8:09   ` Juergen Beisert
2013-07-20 20:45 Pawel Suchanecki
2013-07-22  8:36 ` Jürgen Beisert
2013-07-22 12:36   ` Pawel Suchanecki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1338208981-8681-7-git-send-email-bartvdrmeulen@gmail.com \
    --to=bartvdrmeulen@gmail.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox