summaryrefslogtreecommitdiff
path: root/print
diff options
context:
space:
mode:
authorryoon <ryoon@pkgsrc.org>2014-06-01 06:19:02 +0000
committerryoon <ryoon@pkgsrc.org>2014-06-01 06:19:02 +0000
commit9240d85dad1d301c07f2471ea6a91b662584c8bd (patch)
treee2f4b7ac95024e0912acf4e7c0288e06cc4fecfc /print
parent77c55d2361fbbfed64cebdfb2103cfabe987418f (diff)
downloadpkgsrc-9240d85dad1d301c07f2471ea6a91b662584c8bd.tar.gz
Fix OpenBSD and FreeBSD (clang) builds
Diffstat (limited to 'print')
-rw-r--r--print/cups/Makefile9
-rw-r--r--print/cups/distinfo6
-rw-r--r--print/cups/patches/patch-config.h.in18
-rw-r--r--print/cups/patches/patch-filter_raster.c14
-rw-r--r--print/cups/patches/patch-scheduler_auth.c24
5 files changed, 66 insertions, 5 deletions
diff --git a/print/cups/Makefile b/print/cups/Makefile
index 23e9e57395a..01030cc52c0 100644
--- a/print/cups/Makefile
+++ b/print/cups/Makefile
@@ -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_VARS+= notmac
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 --git a/print/cups/distinfo b/print/cups/distinfo
index 53246bff73b..70b6c112e3e 100644
--- a/print/cups/distinfo
+++ b/print/cups/distinfo
@@ -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-at) = bbda891ed0820e23fe7f6fe3dd5326eeda5b3b2e
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 --git a/print/cups/patches/patch-config.h.in b/print/cups/patches/patch-config.h.in
new file mode 100644
index 00000000000..eeb30f279a1
--- /dev/null
+++ b/print/cups/patches/patch-config.h.in
@@ -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 --git a/print/cups/patches/patch-filter_raster.c b/print/cups/patches/patch-filter_raster.c
new file mode 100644
index 00000000000..5450d0b6859
--- /dev/null
+++ b/print/cups/patches/patch-filter_raster.c
@@ -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 --git a/print/cups/patches/patch-scheduler_auth.c b/print/cups/patches/patch-scheduler_auth.c
index e036c8a5667..eaa0826f1d9 100644
--- a/print/cups/patches/patch-scheduler_auth.c
+++ b/print/cups/patches/patch-scheduler_auth.c
@@ -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 @@ included and conflicts between _FILE_OFFSET_BITS=64 and 32-bit procfs.
# 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.