mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* Re: [ptxdist] [PATCH] cups: Add new package
@ 2013-07-20 20:45 Pawel Suchanecki
  2013-07-22  8:36 ` Jürgen Beisert
  0 siblings, 1 reply; 6+ messages in thread
From: Pawel Suchanecki @ 2013-07-20 20:45 UTC (permalink / raw)
  To: ptxdist

Dear list,

Juergen,

A year ago you wrote:

>Seems like my own patches when I tried with CUPS-1.4.8. CUPS is a mess
>regarding to cross compile:

>http://www.cups.org/str.php?L2390:
>"We currently do not support cross-compiling CUPS, nor do we have plans to do so."

I did cross-compile CUPS-1.6.2 using OSELAS toolchain 2012.12.1 for Mini2440:

.../mini2440_custom_packages/cups-1.6.2 $ file scheduler/cupsd
scheduler/cupsd: ELF 32-bit LSB shared object, ARM, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.32, not
stripped

although I had to do some manual tweaks in Makefiles. I am currently
stuck at trying to install manually on the target.

Do you possibly plan to include the recipe for CUPS into ptxdist
somewhere in the near future?

Thanks,
Pawel

p.s. pls CC me when replying as I am not at the list.

p.s.2. Btw. Thank you for your work on ptxdist. It is great!

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [ptxdist] [PATCH] cups: Add new package
@ 2012-05-28 12:42 Bart vdr. Meulen
  2012-05-30  7:39 ` Michael Olbrich
  0 siblings, 1 reply; 6+ messages in thread
From: Bart vdr. Meulen @ 2012-05-28 12:42 UTC (permalink / raw)
  To: ptxdist

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-07-22 12:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-20 20:45 [ptxdist] [PATCH] cups: Add new package Pawel Suchanecki
2013-07-22  8:36 ` Jürgen Beisert
2013-07-22 12:36   ` Pawel Suchanecki
  -- strict thread matches above, loose matches on Subject: below --
2012-05-28 12:42 Bart vdr. Meulen
2012-05-30  7:39 ` Michael Olbrich
2012-05-30  8:09   ` Juergen Beisert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox