summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-support/cups/cups-1.4.4/configure.patch117
-rw-r--r--recipes-support/cups/cups-1.4.4/skip_tools.patch51
-rw-r--r--recipes-support/cups/cups-1.4.4/use_echo_only_in_init.patch11
-rw-r--r--recipes-support/cups/cups.inc89
-rw-r--r--recipes-support/cups/cups14.inc83
-rw-r--r--recipes-support/cups/cups_1.4.4.bb17
6 files changed, 368 insertions, 0 deletions
diff --git a/recipes-support/cups/cups-1.4.4/configure.patch b/recipes-support/cups/cups-1.4.4/configure.patch
new file mode 100644
index 000000000..877e8d323
--- /dev/null
+++ b/recipes-support/cups/cups-1.4.4/configure.patch
@@ -0,0 +1,117 @@
1--- cups-1.4.3/configure.orig 2010-04-08 11:14:19.092296014 +0200
2+++ cups-1.4.3/configure 2010-04-08 11:19:02.661417938 +0200
3@@ -10940,114 +10940,6 @@
4 OPTIM="-fPIC $OPTIM"
5 fi
6
7- # The -fstack-protector option is available with some versions of
8- # GCC and adds "stack canaries" which detect when the return address
9- # has been overwritten, preventing many types of exploit attacks.
10- { echo "$as_me:$LINENO: checking if GCC supports -fstack-protector" >&5
11-echo $ECHO_N "checking if GCC supports -fstack-protector... $ECHO_C" >&6; }
12- OLDCFLAGS="$CFLAGS"
13- CFLAGS="$CFLAGS -fstack-protector"
14- cat >conftest.$ac_ext <<_ACEOF
15-/* confdefs.h. */
16-_ACEOF
17-cat confdefs.h >>conftest.$ac_ext
18-cat >>conftest.$ac_ext <<_ACEOF
19-/* end confdefs.h. */
20-
21-int
22-main ()
23-{
24-
25- ;
26- return 0;
27-}
28-_ACEOF
29-rm -f conftest.$ac_objext conftest$ac_exeext
30-if { (ac_try="$ac_link"
31-case "(($ac_try" in
32- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33- *) ac_try_echo=$ac_try;;
34-esac
35-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
36- (eval "$ac_link") 2>conftest.er1
37- ac_status=$?
38- grep -v '^ *+' conftest.er1 >conftest.err
39- rm -f conftest.er1
40- cat conftest.err >&5
41- echo "$as_me:$LINENO: \$? = $ac_status" >&5
42- (exit $ac_status); } && {
43- test -z "$ac_c_werror_flag" ||
44- test ! -s conftest.err
45- } && test -s conftest$ac_exeext &&
46- $as_test_x conftest$ac_exeext; then
47- OPTIM="$OPTIM -fstack-protector"
48- { echo "$as_me:$LINENO: result: yes" >&5
49-echo "${ECHO_T}yes" >&6; }
50-else
51- echo "$as_me: failed program was:" >&5
52-sed 's/^/| /' conftest.$ac_ext >&5
53-
54- { echo "$as_me:$LINENO: result: no" >&5
55-echo "${ECHO_T}no" >&6; }
56-fi
57-
58-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
59- conftest$ac_exeext conftest.$ac_ext
60- CFLAGS="$OLDCFLAGS"
61-
62- # The -pie option is available with some versions of GCC and adds
63- # randomization of addresses, which avoids another class of exploits
64- # that depend on a fixed address for common functions.
65- { echo "$as_me:$LINENO: checking if GCC supports -pie" >&5
66-echo $ECHO_N "checking if GCC supports -pie... $ECHO_C" >&6; }
67- OLDCFLAGS="$CFLAGS"
68- CFLAGS="$CFLAGS -pie -fPIE"
69- cat >conftest.$ac_ext <<_ACEOF
70-/* confdefs.h. */
71-_ACEOF
72-cat confdefs.h >>conftest.$ac_ext
73-cat >>conftest.$ac_ext <<_ACEOF
74-/* end confdefs.h. */
75-
76-int
77-main ()
78-{
79-
80- ;
81- return 0;
82-}
83-_ACEOF
84-rm -f conftest.$ac_objext
85-if { (ac_try="$ac_compile"
86-case "(($ac_try" in
87- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
88- *) ac_try_echo=$ac_try;;
89-esac
90-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
91- (eval "$ac_compile") 2>conftest.er1
92- ac_status=$?
93- grep -v '^ *+' conftest.er1 >conftest.err
94- rm -f conftest.er1
95- cat conftest.err >&5
96- echo "$as_me:$LINENO: \$? = $ac_status" >&5
97- (exit $ac_status); } && {
98- test -z "$ac_c_werror_flag" ||
99- test ! -s conftest.err
100- } && test -s conftest.$ac_objext; then
101- PIEFLAGS="-pie -fPIE"
102- { echo "$as_me:$LINENO: result: yes" >&5
103-echo "${ECHO_T}yes" >&6; }
104-else
105- echo "$as_me: failed program was:" >&5
106-sed 's/^/| /' conftest.$ac_ext >&5
107-
108- { echo "$as_me:$LINENO: result: no" >&5
109-echo "${ECHO_T}no" >&6; }
110-fi
111-
112-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
113- CFLAGS="$OLDCFLAGS"
114-
115 if test "x$with_optim" = x; then
116 # Add useful warning options for tracking down problems...
117 OPTIM="-Wall -Wno-format-y2k $OPTIM"
diff --git a/recipes-support/cups/cups-1.4.4/skip_tools.patch b/recipes-support/cups/cups-1.4.4/skip_tools.patch
new file mode 100644
index 000000000..272110146
--- /dev/null
+++ b/recipes-support/cups/cups-1.4.4/skip_tools.patch
@@ -0,0 +1,51 @@
1--- cups-1.4.3/ppdc/Makefile.orig 2010-04-07 12:38:56.650327699 +0200
2+++ cups-1.4.3/ppdc/Makefile 2010-04-07 12:40:05.842418876 +0200
3@@ -243,8 +243,8 @@
4 $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o genstrings genstrings.o \
5 libcupsppdc.a ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) \
6 $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
7- echo Generating localization strings...
8- ./genstrings >sample.c
9+# echo Generating localization strings...
10+# ./genstrings >sample.c
11
12
13 #
14@@ -261,9 +261,9 @@
15 $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a \
16 ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
17 $(COMMONLIBS) $(LIBZ)
18- echo Testing PPD compiler...
19- ./ppdc-static -l en,fr -I ../data foo.drv
20- ./ppdc-static -l en,fr -z -I ../data foo.drv
21+# echo Testing PPD compiler...
22+# ./ppdc-static -l en,fr -I ../data foo.drv
23+# ./ppdc-static -l en,fr -z -I ../data foo.drv
24
25
26 #
27@@ -291,15 +291,15 @@
28 $(COMMONLIBS) $(LIBZ)
29 echo Testing PPD importer...
30 $(RM) -r ppd ppd2 sample-import.drv
31- ./ppdc-static -I ../data sample.drv
32- ./ppdi-static -I ../data -o sample-import.drv ppd/*
33- ./ppdc-static -I ../data -d ppd2 sample-import.drv
34- if diff -qr ppd ppd2; then \
35- echo PPD import OK; \
36- else \
37- echo PPD import FAILED; \
38- exit 1; \
39- fi
40+# ./ppdc-static -I ../data sample.drv
41+# ./ppdi-static -I ../data -o sample-import.drv ppd/*
42+# ./ppdc-static -I ../data -d ppd2 sample-import.drv
43+# if diff -qr ppd ppd2; then \
44+# echo PPD import OK; \
45+# else \
46+# echo PPD import FAILED; \
47+# exit 1; \
48+# fi
49
50
51 #
diff --git a/recipes-support/cups/cups-1.4.4/use_echo_only_in_init.patch b/recipes-support/cups/cups-1.4.4/use_echo_only_in_init.patch
new file mode 100644
index 000000000..21ff0e535
--- /dev/null
+++ b/recipes-support/cups/cups-1.4.4/use_echo_only_in_init.patch
@@ -0,0 +1,11 @@
1--- a/init/cups.sh.in.orig 2008-10-04 16:50:46.000000000 -0300
2+++ b/init/cups.sh.in 2008-10-04 16:51:39.000000000 -0300
3@@ -68,7 +68,7 @@
4 ECHO_ERROR=:
5 ;;
6
7- Linux*)
8+ DISABLELinux*)
9 IS_ON=/bin/true
10 if test -f /etc/init.d/functions; then
11 . /etc/init.d/functions
diff --git a/recipes-support/cups/cups.inc b/recipes-support/cups/cups.inc
new file mode 100644
index 000000000..0c7b103b8
--- /dev/null
+++ b/recipes-support/cups/cups.inc
@@ -0,0 +1,89 @@
1DESCRIPTION = "An Internet printing system for Unix."
2SECTION = "console/utils"
3LICENSE = "GPL LGPL"
4DEPENDS = "gnutls jpeg dbus dbus-glib libpng zlib fakeroot-native"
5
6INC_PR = "r7"
7
8SRC_URI = "ftp://ftp.easysw.com/pub/cups/${PV}/cups-${PV}-source.tar.bz2 \
9 "
10
11inherit autotools binconfig
12
13EXTRA_OECONF = " \
14 --enable-gnutls \
15 --enable-dbus \
16 --enable-browsing \
17 --disable-openssl \
18 --disable-tiff \
19 --disable-ssl \
20 --without-php \
21 --without-perl \
22 --without-python \
23 --without-java \
24 "
25
26
27do_configure() {
28 export DSOFLAGS="${LDFLAGS}"
29 gnu-configize
30 libtoolize --force
31 oe_runconf
32}
33
34do_compile () {
35 sed -i s:STRIP:NOSTRIP: Makedefs
36 sed -i s:serial:: backend/Makefile
37
38 echo "all:" > man/Makefile
39 echo "install:" >> man/Makefile
40
41 oe_runmake "SSLLIBS=-lgnutls -L${STAGING_LIBDIR}" \
42 "LIBPNG=-lpng -lm -L${STAGING_LIBDIR}" \
43 "LIBJPEG=-ljpeg -L${STAGING_LIBDIR}" \
44 "LIBZ=-lz -L${STAGING_LIBDIR}" \
45 "-I."
46}
47
48fakeroot do_install () {
49 oe_runmake "DSTROOT=${D}" install
50
51 # This directory gets installed with perms 511, which makes packaging fail
52 chmod 0711 "${D}/${localstatedir}/run/cups/certs"
53}
54
55python do_package_append() {
56 # Change permissions back the way they were, they probably had a reason...
57 pkgdest = bb.data.getVar('PKGDEST', d, 1)
58 os.system('chmod 0511 %s/cups/var/run/cups/certs' % pkgdest)
59}
60
61SYSROOT_PREPROCESS_FUNCS += "cups_config_mangle"
62
63cups_config_mangle() {
64 # Undo mangle of cups_datadir and cups_serverbin
65 sed -e 's:cups_datadir=.*:cups_datadir=${datadir}/cups:g' \
66 -e 's:cups_serverbin=.*:cups_serverbin=${libdir}/cups:g' \
67 -i ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/cups-config
68}
69
70PACKAGES =+ "${PN}-lib ${PN}-libimage"
71
72FILES_${PN}-lib = "${libdir}/libcups.so.*"
73
74FILES_${PN}-libimage = "${libdir}/libcupsimage.so.*"
75
76FILES_${PN}-dbg += "${libdir}/cups/backend/.debug \
77 ${libdir}/cups/cgi-bin/.debug \
78 ${libdir}/cups/filter/.debug \
79 ${libdir}/cups/monitor/.debug \
80 ${libdir}/cups/notifier/.debug \
81 ${libdir}/cups/daemon/.debug \
82 "
83#package the html for the webgui inside the main packages (~1MB uncompressed)
84
85FILES_${PN} += "${datadir}/doc/cups/images \
86 ${datadir}/doc/cups/*html \
87 ${datadir}/doc/cups/*.css \
88 ${datadir}/icons/ \
89 "
diff --git a/recipes-support/cups/cups14.inc b/recipes-support/cups/cups14.inc
new file mode 100644
index 000000000..0828187c1
--- /dev/null
+++ b/recipes-support/cups/cups14.inc
@@ -0,0 +1,83 @@
1DESCRIPTION = "An Internet printing system for Unix."
2SECTION = "console/utils"
3LICENSE = "GPL LGPL"
4DEPENDS = "gnutls libpng jpeg dbus dbus-glib zlib fakeroot-native"
5PROVIDES = "cups14"
6
7SRC_URI = "ftp://ftp.easysw.com/pub/cups/${PV}/cups-${PV}-source.tar.bz2"
8
9LEAD_SONAME = "libcupsdriver.so"
10
11inherit autotools binconfig
12
13EXTRA_OECONF = " \
14 --enable-gnutls \
15 --enable-dbus \
16 --enable-browsing \
17 --disable-openssl \
18 --disable-tiff \
19 --without-php \
20 --without-perl \
21 --without-python \
22 --without-java \
23 "
24
25
26do_configure() {
27 gnu-configize
28 libtoolize --force
29 DSOFLAGS="${LDFLAGS}" oe_runconf
30}
31
32do_compile () {
33 sed -i s:STRIP:NOSTRIP: Makedefs
34 sed -i s:serial:: backend/Makefile
35
36 echo "all:" > man/Makefile
37 echo "libs:" >> man/Makefile
38 echo "install:" >> man/Makefile
39 echo "install-data:" >> man/Makefile
40 echo "install-exec:" >> man/Makefile
41 echo "install-headers:" >> man/Makefile
42 echo "install-libs:" >> man/Makefile
43
44 oe_runmake "SSLLIBS=-lgnutls -L${STAGING_LIBDIR}" \
45 "LIBPNG=-lpng -lm -L${STAGING_LIBDIR}" \
46 "LIBJPEG=-ljpeg -L${STAGING_LIBDIR}" \
47 "LIBZ=-lz -L${STAGING_LIBDIR}" \
48 "-I."
49}
50
51fakeroot do_install () {
52 oe_runmake "DSTROOT=${D}" install
53
54 # This directory gets installed with perms 511, which makes packaging fail
55 chmod 0711 "${D}/${localstatedir}/run/cups/certs"
56}
57
58python do_package_append() {
59 # Change permissions back the way they were, they probably had a reason...
60 workdir = bb.data.getVar('WORKDIR', d, 1)
61 os.system('chmod 0511 %s/install/cups/var/run/cups/certs' % workdir)
62}
63
64PACKAGES =+ "${PN}-lib ${PN}-libimage"
65
66FILES_${PN}-lib = "${libdir}/libcups.so.*"
67
68FILES_${PN}-libimage = "${libdir}/libcupsimage.so.*"
69
70FILES_${PN}-dbg += "${libdir}/cups/backend/.debug \
71 ${libdir}/cups/cgi-bin/.debug \
72 ${libdir}/cups/filter/.debug \
73 ${libdir}/cups/monitor/.debug \
74 ${libdir}/cups/notifier/.debug \
75 ${libdir}/cups/daemon/.debug \
76 "
77#package the html for the webgui inside the main packages (~1MB uncompressed)
78
79FILES_${PN} += "${datadir}/doc/cups/images \
80 ${datadir}/doc/cups/*html \
81 ${datadir}/doc/cups/*.css \
82 ${datadir}/icons/ \
83 "
diff --git a/recipes-support/cups/cups_1.4.4.bb b/recipes-support/cups/cups_1.4.4.bb
new file mode 100644
index 000000000..bf23cc523
--- /dev/null
+++ b/recipes-support/cups/cups_1.4.4.bb
@@ -0,0 +1,17 @@
1require cups14.inc
2
3SRC_URI += " \
4 file://use_echo_only_in_init.patch \
5 file://skip_tools.patch \
6 file://configure.patch \
7 "
8
9SRC_URI[md5sum] = "8776403ad60fea9e85eab9c04d88560d"
10SRC_URI[sha256sum] = "d25ffa35add3abeeec0eba60be2cffc89425b649c64ef3a73dfc724683a59aa3"
11
12PR = "r2"
13
14DEFAULT_PREFERENCE = "-1"
15DEPENDS += "virtual/libusb0"
16EXTRA_OECONF += " --disable-gssapi --disable-largefile --enable-debug --disable-relro --enable-libusb"
17CONFFILES_${PN} += "${sysconfdir}/cups/cupsd.conf"