pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/print/cups Fix OpenBSD and FreeBSD (clang) builds
details: https://anonhg.NetBSD.org/pkgsrc/rev/781c99be8249
branches: trunk
changeset: 635154:781c99be8249
user: ryoon <ryoon%pkgsrc.org@localhost>
date: Sun Jun 01 06:19:02 2014 +0000
description:
Fix OpenBSD and FreeBSD (clang) builds
diffstat:
print/cups/Makefile | 9 ++++++++-
print/cups/distinfo | 6 ++++--
print/cups/patches/patch-config.h.in | 18 ++++++++++++++++++
print/cups/patches/patch-filter_raster.c | 14 ++++++++++++++
print/cups/patches/patch-scheduler_auth.c | 24 ++++++++++++++++++++++--
5 files changed, 66 insertions(+), 5 deletions(-)
diffs (125 lines):
diff -r e1a2354fa1d4 -r 781c99be8249 print/cups/Makefile
--- a/print/cups/Makefile Sun Jun 01 06:13:53 2014 +0000
+++ b/print/cups/Makefile Sun Jun 01 06:19:02 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.206 2014/05/29 23:37:15 wiz Exp $
+# $NetBSD: Makefile,v 1.207 2014/06/01 06:19:02 ryoon Exp $
#
# The CUPS author is very good about taking back changes into the main
# CUPS distribution. The correct place to send patches or bug-fixes is:
@@ -80,6 +80,13 @@
PLIST.notmac= yes
.endif
+# Avoid the following error when compiling with clang.
+# /usr/local/bin/ld: /usr/lib/crt1.o: relocation R_X86_64_32 against `_DYNAMIC'
+# can not be used when making a shared object; recompile with -fPIC
+.if ${OPSYS} == "FreeBSD"
+BUILDLINK_TRANSFORM+= rm:-Wl,-pie
+.endif
+
# CUPS_USER user to run filter and CGI programs as
# CUPS_GROUP group to run filter and CGI programs as
# CUPS_SYSTEM_GROUPS group for system administration
diff -r e1a2354fa1d4 -r 781c99be8249 print/cups/distinfo
--- a/print/cups/distinfo Sun Jun 01 06:13:53 2014 +0000
+++ b/print/cups/distinfo Sun Jun 01 06:19:02 2014 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.98 2014/05/15 12:51:58 wiz Exp $
+$NetBSD: distinfo,v 1.99 2014/06/01 06:19:02 ryoon Exp $
SHA1 (cups-1.5.4-source.tar.bz2) = cb39961cbaf1851a47694828ad9a7cdf4da51fbd
RMD160 (cups-1.5.4-source.tar.bz2) = 9d6a7fd69d3036ec1f3dfd9c70672a2c6fb517b6
@@ -16,7 +16,9 @@
SHA1 (patch-au) = 0d1d3cf255b996c96b0ea798f46b08523ef22a60
SHA1 (patch-conf_Makefile) = 5b5d45abc1e8d6b73a1ad6b7a7098714d4c55395
SHA1 (patch-config-scripts_cups-gssapi.m4) = 6f558ee1d2d56ceba3a9705d3278c7969495be5d
+SHA1 (patch-config.h.in) = 0f072063d24810dcbdd2d095b9f2fa6bab44ff20
+SHA1 (patch-filter_raster.c) = fc48e9cc7f7f32355816355dfc199157a00246c7
SHA1 (patch-ppdc_Makefile) = 7dcc34217557a4c6f42064b61abf593bd7620b60
-SHA1 (patch-scheduler_auth.c) = 2056f20500e3c6e857f9dd2c83709c15be38fe0e
+SHA1 (patch-scheduler_auth.c) = 29cd4378eb4ceeb1e618534fc5a9975022dbcf2c
SHA1 (patch-scheduler_client.c) = d4b6667199c0ff9617847ba119b82a50457cfd98
SHA1 (patch-scheduler_dirsvc.c) = 62c6b47522a60b9f8042421e4a9d25a5dfa47c47
diff -r e1a2354fa1d4 -r 781c99be8249 print/cups/patches/patch-config.h.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/print/cups/patches/patch-config.h.in Sun Jun 01 06:19:02 2014 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-config.h.in,v 1.1 2014/06/01 06:19:02 ryoon Exp $
+
+* OpenBSD has no arc4random_stir
+
+--- config.h.in.orig 2012-03-21 04:45:48.000000000 +0000
++++ config.h.in
+@@ -674,7 +674,11 @@
+
+ #ifdef HAVE_ARC4RANDOM
+ # define CUPS_RAND() arc4random()
++#if defined(__OpenBSD__)
++# define CUPS_SRAND(v)
++#else
+ # define CUPS_SRAND(v) arc4random_stir()
++#endif
+ #elif defined(HAVE_RANDOM)
+ # define CUPS_RAND() random()
+ # define CUPS_SRAND(v) srandom(v)
diff -r e1a2354fa1d4 -r 781c99be8249 print/cups/patches/patch-filter_raster.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/print/cups/patches/patch-filter_raster.c Sun Jun 01 06:19:02 2014 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-filter_raster.c,v 1.1 2014/06/01 06:19:02 ryoon Exp $
+
+* OpenBSD needs stdint.h
+
+--- filter/raster.c.orig 2011-09-20 18:36:33.000000000 +0000
++++ filter/raster.c
+@@ -50,6 +50,7 @@
+ # include <io.h>
+ # include <winsock2.h> /* for htonl() definition */
+ #else
++# include <stdint.h>
+ # include <unistd.h>
+ #endif /* WIN32 || __EMX__ */
+
diff -r e1a2354fa1d4 -r 781c99be8249 print/cups/patches/patch-scheduler_auth.c
--- a/print/cups/patches/patch-scheduler_auth.c Sun Jun 01 06:13:53 2014 +0000
+++ b/print/cups/patches/patch-scheduler_auth.c Sun Jun 01 06:19:02 2014 +0000
@@ -1,8 +1,10 @@
-$NetBSD: patch-scheduler_auth.c,v 1.1 2013/02/12 14:12:19 jperkin Exp $
+$NetBSD: patch-scheduler_auth.c,v 1.2 2014/06/01 06:19:02 ryoon Exp $
Don't pull in sys/ucred.h on Solaris as it results in procfs.h being
included and conflicts between _FILE_OFFSET_BITS=64 and 32-bit procfs.
+OpenBSD defines SO_PEERCRED, but it is different from Linux's one.
+
--- scheduler/auth.c.orig 2011-08-31 04:58:33.000000000 +0000
+++ scheduler/auth.c
@@ -84,7 +84,7 @@ extern const char *cssmErrorString(int e
@@ -10,7 +12,25 @@
# include <sys/param.h>
#endif /* HAVE_SYS_PARAM_H */
-#ifdef HAVE_SYS_UCRED_H
-+#if defined(HAVE_SYS_UCRED_H) && !defined(__sun)
++#if defined(HAVE_SYS_UCRED_H) && !defined(__sun) && !defined(__OpenBSD__)
# include <sys/ucred.h>
typedef struct xucred cupsd_ucred_t;
# define CUPSD_UCRED_UID(c) (c).cr_uid
+@@ -493,7 +493,7 @@ cupsdAuthorize(cupsd_client_t *con) /* I
+ con->type = CUPSD_AUTH_BASIC;
+ }
+ #endif /* HAVE_AUTHORIZATION_H */
+-#if defined(SO_PEERCRED) && defined(AF_LOCAL)
++#if defined(SO_PEERCRED) && defined(AF_LOCAL) && !defined(__OpenBSD__)
+ else if (!strncmp(authorization, "PeerCred ", 9) &&
+ con->http.hostaddr->addr.sa_family == AF_LOCAL)
+ {
+@@ -1120,7 +1120,7 @@ cupsdAuthorize(cupsd_client_t *con) /* I
+
+ gss_delete_sec_context(&minor_status, &context, GSS_C_NO_BUFFER);
+
+-# if defined(SO_PEERCRED) && defined(AF_LOCAL)
++# if defined(SO_PEERCRED) && defined(AF_LOCAL) && !defined(__OpenBSD__)
+ /*
+ * Get the client's UID if we are printing locally - that allows a backend
+ * to run as the correct user to get Kerberos credentials of its own.
Home |
Main Index |
Thread Index |
Old Index