summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/cups
diff options
context:
space:
mode:
authorAdrian Dudau <adrian.dudau@enea.com>2014-06-26 14:36:22 +0200
committerAdrian Dudau <adrian.dudau@enea.com>2014-06-26 15:32:53 +0200
commitf4cf9fe05bb3f32fabea4e54dd92d368967a80da (patch)
tree487180fa9866985ea7b28e625651765d86f515c3 /meta/recipes-extended/cups
downloadpoky-f4cf9fe05bb3f32fabea4e54dd92d368967a80da.tar.gz
initial commit for Enea Linux 4.0
Migrated from the internal git server on the daisy-enea branch Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-extended/cups')
-rw-r--r--meta/recipes-extended/cups/cups.inc113
-rw-r--r--meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch70
-rw-r--r--meta/recipes-extended/cups/cups/cups_serverbin.patch32
-rw-r--r--meta/recipes-extended/cups/cups/use_echo_only_in_init.patch15
-rw-r--r--meta/recipes-extended/cups/cups_1.7.1.bb6
5 files changed, 236 insertions, 0 deletions
diff --git a/meta/recipes-extended/cups/cups.inc b/meta/recipes-extended/cups/cups.inc
new file mode 100644
index 0000000000..e4771f7c80
--- /dev/null
+++ b/meta/recipes-extended/cups/cups.inc
@@ -0,0 +1,113 @@
1SUMMARY = "An Internet printing system for Unix"
2SECTION = "console/utils"
3LICENSE = "GPLv2 & LGPLv2"
4DEPENDS = "gnutls libpng jpeg dbus dbus-glib zlib libusb"
5PROVIDES = "cups14"
6
7SRC_URI = "http://www.cups.org/software/${PV}/${BP}-source.tar.bz2 \
8 file://use_echo_only_in_init.patch \
9 file://0001-don-t-try-to-run-generated-binaries.patch \
10 file://cups_serverbin.patch \
11 "
12
13LEAD_SONAME = "libcupsdriver.so"
14
15inherit autotools-brokensep binconfig
16
17PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
18 ${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
19PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi"
20PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
21PACKAGECONFIG[pam] = "--enable-pam, --disable-pam, libpam"
22
23EXTRA_OECONF = " \
24 --enable-gnutls \
25 --enable-dbus \
26 --enable-browsing \
27 --disable-openssl \
28 --disable-gssapi \
29 --enable-debug \
30 --disable-relro \
31 --enable-libusb \
32 --without-php \
33 --without-perl \
34 --without-python \
35 --without-java \
36 "
37
38
39do_configure() {
40 gnu-configize
41 libtoolize --force
42 DSOFLAGS="${LDFLAGS}" SERVERBIN="${libdir}/cups" oe_runconf
43}
44
45do_compile () {
46 sed -i s:STRIP:NOSTRIP: Makedefs
47 sed -i s:serial:: backend/Makefile
48
49 echo "all:" > man/Makefile
50 echo "libs:" >> man/Makefile
51 echo "install:" >> man/Makefile
52 echo "install-data:" >> man/Makefile
53 echo "install-exec:" >> man/Makefile
54 echo "install-headers:" >> man/Makefile
55 echo "install-libs:" >> man/Makefile
56
57 oe_runmake "SSLLIBS=-lgnutls -L${STAGING_LIBDIR}" \
58 "LIBPNG=-lpng -lm -L${STAGING_LIBDIR}" \
59 "LIBJPEG=-ljpeg -L${STAGING_LIBDIR}" \
60 "LIBZ=-lz -L${STAGING_LIBDIR}" \
61 "-I."
62}
63
64fakeroot do_install () {
65 oe_runmake "DSTROOT=${D}" install
66
67 # Remove /var/run from package as cupsd will populate it on startup
68 rm -fr ${D}/${localstatedir}/run
69 rmdir ${D}/${libdir}/${BPN}/driver
70}
71
72python do_package_append() {
73 import subprocess
74 # Change permissions back the way they were, they probably had a reason...
75 workdir = d.getVar('WORKDIR', True)
76 subprocess.call('chmod 0511 %s/install/cups/var/run/cups/certs' % workdir, shell=True)
77}
78
79PACKAGES =+ "${PN}-lib ${PN}-libimage"
80
81FILES_${PN} += "${libdir}/cups/backend \
82 ${libdir}/cups/cgi-bin \
83 ${libdir}/cups/filter \
84 ${libdir}/cups/monitor \
85 ${libdir}/cups/notifier \
86 ${libdir}/cups/daemon \
87 "
88
89FILES_${PN}-lib = "${libdir}/libcups.so.*"
90
91FILES_${PN}-libimage = "${libdir}/libcupsimage.so.*"
92
93FILES_${PN}-dbg += "${libdir}/cups/backend/.debug \
94 ${libdir}/cups/cgi-bin/.debug \
95 ${libdir}/cups/filter/.debug \
96 ${libdir}/cups/monitor/.debug \
97 ${libdir}/cups/notifier/.debug \
98 ${libdir}/cups/daemon/.debug \
99 "
100
101#package the html for the webgui inside the main packages (~1MB uncompressed)
102
103FILES_${PN} += "${datadir}/doc/cups/images \
104 ${datadir}/doc/cups/*html \
105 ${datadir}/doc/cups/*.css \
106 ${datadir}/icons/ \
107 "
108CONFFILES_${PN} += "${sysconfdir}/cups/cupsd.conf"
109
110SYSROOT_PREPROCESS_FUNCS += "cups_sysroot_preprocess"
111cups_sysroot_preprocess () {
112 sed -i ${SYSROOT_DESTDIR}${bindir_crossscripts}/cups-config -e 's:cups_datadir=.*:cups_datadir=${datadir}/cups:' -e 's:cups_serverbin=.*:cups_serverbin=${libdir}/cups:'
113}
diff --git a/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch b/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch
new file mode 100644
index 0000000000..e6544b5607
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch
@@ -0,0 +1,70 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3From 90069586167b930befce7303aea57078f04b4ed8 Mon Sep 17 00:00:00 2001
4From: Koen Kooi <koen@dominion.thruhere.net>
5Date: Sun, 30 Jan 2011 16:37:27 +0100
6Subject: [PATCH] don't try to run generated binaries
7
8Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
9---
10 ppdc/Makefile | 30 +++++++++++++++---------------
11 1 files changed, 15 insertions(+), 15 deletions(-)
12
13diff --git a/ppdc/Makefile b/ppdc/Makefile
14index 0288d47..fc87f1b 100644
15--- a/ppdc/Makefile
16+++ b/ppdc/Makefile
17@@ -243,8 +243,8 @@ genstrings: genstrings.o libcupsppdc.a ../cups/libcups.a \
18 $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o genstrings genstrings.o \
19 libcupsppdc.a ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) \
20 $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
21- echo Generating localization strings...
22- ./genstrings >sample.c
23+# echo Generating localization strings...
24+# ./genstrings >sample.c
25
26
27 #
28@@ -261,9 +261,9 @@ ppdc-static: ppdc.o libcupsppdc.a ../cups/libcups.a foo.drv foo-fr.po
29 $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a \
30 ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
31 $(COMMONLIBS) $(LIBZ)
32- echo Testing PPD compiler...
33- ./ppdc-static -l en,fr -I ../data foo.drv
34- ./ppdc-static -l en,fr -z -I ../data foo.drv
35+# echo Testing PPD compiler...
36+# ./ppdc-static -l en,fr -I ../data foo.drv
37+# ./ppdc-static -l en,fr -z -I ../data foo.drv
38
39
40 #
41@@ -290,16 +290,16 @@ ppdi-static: ppdc-static ppdi.o libcupsppdc.a ../cups/libcups.a
42 ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
43 $(COMMONLIBS) $(LIBZ)
44 echo Testing PPD importer...
45- $(RM) -r ppd ppd2 sample-import.drv
46- ./ppdc-static -I ../data sample.drv
47- ./ppdi-static -I ../data -o sample-import.drv ppd/*
48- ./ppdc-static -I ../data -d ppd2 sample-import.drv
49- if diff -r ppd ppd2 >/dev/null; then \
50- echo PPD import OK; \
51- else \
52- echo PPD import FAILED; \
53- exit 1; \
54- fi
55+# $(RM) -r ppd ppd2 sample-import.drv
56+# ./ppdc-static -I ../data sample.drv
57+# ./ppdi-static -I ../data -o sample-import.drv ppd/*
58+# ./ppdc-static -I ../data -d ppd2 sample-import.drv
59+# if diff -r ppd ppd2 >/dev/null; then \
60+# echo PPD import OK; \
61+# else \
62+# echo PPD import FAILED; \
63+# exit 1; \
64+# fi
65
66
67 #
68--
691.6.6.1
70
diff --git a/meta/recipes-extended/cups/cups/cups_serverbin.patch b/meta/recipes-extended/cups/cups/cups_serverbin.patch
new file mode 100644
index 0000000000..f7b44a7bc1
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/cups_serverbin.patch
@@ -0,0 +1,32 @@
1Make CUPS_SERVERBIN relative to libdir otherwise on 64bit arches
2e.g. ppc64 where base libdir is lib64 this does not go well
3
4Signed-off-by: Khem Raj <raj.khem@gmail.com>
5Upstream-Status: Inappropriate [OE config specific]
6
7Index: cups-1.4.6/config-scripts/cups-directories.m4
8===================================================================
9--- cups-1.4.6.orig/config-scripts/cups-directories.m4 2009-04-12 16:04:51.000000000 -0700
10+++ cups-1.4.6/config-scripts/cups-directories.m4 2012-07-21 12:12:05.896405923 -0700
11@@ -397,7 +397,7 @@
12 *)
13 # All others
14 INSTALL_SYSV="install-sysv"
15- CUPS_SERVERBIN="$exec_prefix/lib/cups"
16+ CUPS_SERVERBIN="$libdir/cups"
17 ;;
18 esac
19
20Index: cups-1.4.6/configure
21===================================================================
22--- cups-1.4.6.orig/configure 2012-07-21 12:13:34.512405950 -0700
23+++ cups-1.4.6/configure 2012-07-21 12:14:05.724406017 -0700
24@@ -11181,7 +11181,7 @@
25 *)
26 # All others
27 INSTALL_SYSV="install-sysv"
28- CUPS_SERVERBIN="$exec_prefix/lib/cups"
29+ CUPS_SERVERBIN="$libdir/cups"
30 ;;
31 esac
32
diff --git a/meta/recipes-extended/cups/cups/use_echo_only_in_init.patch b/meta/recipes-extended/cups/cups/use_echo_only_in_init.patch
new file mode 100644
index 0000000000..696f1374d9
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/use_echo_only_in_init.patch
@@ -0,0 +1,15 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3Index: cups-1.6.1/scheduler/cups.sh.in
4===================================================================
5--- cups-1.6.1.orig/scheduler/cups.sh.in
6+++ cups-1.6.1/scheduler/cups.sh.in
7@@ -67,7 +67,7 @@ case "`uname`" in
8 ECHO_ERROR=:
9 ;;
10
11- Linux*)
12+ DisableLinux*)
13 IS_ON=/bin/true
14 if test -f /etc/init.d/functions; then
15 . /etc/init.d/functions
diff --git a/meta/recipes-extended/cups/cups_1.7.1.bb b/meta/recipes-extended/cups/cups_1.7.1.bb
new file mode 100644
index 0000000000..9854a4ddca
--- /dev/null
+++ b/meta/recipes-extended/cups/cups_1.7.1.bb
@@ -0,0 +1,6 @@
1require cups.inc
2
3LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c5e50cb4b8f24b04636b719683a9102d"
4
5SRC_URI[md5sum] = "55277c40fd4b7183dc3671d39c5c42b7"
6SRC_URI[sha256sum] = "f52bec893d9daf92b6029be79c07e6c516b4c85ffae3e6e01885cc85e9081681"