pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/print/cups-base



Module Name:    pkgsrc
Committed By:   youri
Date:           Mon Jul  9 13:53:34 UTC 2018

Modified Files:
        pkgsrc/print/cups-base: distinfo
        pkgsrc/print/cups-base/patches: patch-cups_ipp.c
Added Files:
        pkgsrc/print/cups-base/patches: patch-cups_thread.c

Log Message:
clock_gettime definition for macOS <= Sierra.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 pkgsrc/print/cups-base/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/print/cups-base/patches/patch-cups_ipp.c
cvs rdiff -u -r0 -r1.1 pkgsrc/print/cups-base/patches/patch-cups_thread.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/print/cups-base/distinfo
diff -u pkgsrc/print/cups-base/distinfo:1.7 pkgsrc/print/cups-base/distinfo:1.8
--- pkgsrc/print/cups-base/distinfo:1.7 Fri Jun 22 14:12:45 2018
+++ pkgsrc/print/cups-base/distinfo     Mon Jul  9 13:53:34 2018
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2018/06/22 14:12:45 bouyer Exp $
+$NetBSD: distinfo,v 1.8 2018/07/09 13:53:34 youri Exp $
 
 SHA1 (cups-2.2.8-source.tar.gz) = f8c572d5b2405091e3be6836523a6abdda645f60
 RMD160 (cups-2.2.8-source.tar.gz) = 79bc052e3f70408a698bfbe2556b53d2f0140b2c
@@ -17,7 +17,8 @@ SHA1 (patch-config-scripts_cups-libtool.
 SHA1 (patch-config-scripts_cups-manpages.m4) = 5cc943738df29f11fc366557938b82c1e9162344
 SHA1 (patch-config-scripts_cups-opsys.m4) = 2bbacc401d4d8dbc157889b6a6cf66684c52357b
 SHA1 (patch-cups-tls.c) = f89c25f8089d9e11a983a270adbb2cbde3c22511
-SHA1 (patch-cups_ipp.c) = 3528644cf52b716ae2342342949ee94a1c0cf61d
+SHA1 (patch-cups_ipp.c) = 139e6596ba22c62c3d2b16852b2da0d0e677151a
+SHA1 (patch-cups_thread.c) = e625a2b81f3d831d2a0c02bc0fa9a9d31c1097a7
 SHA1 (patch-doc-help-man-cups-files.conf.html) = fcd3d06c00b0a85b6c0790235ccb68685252ea68
 SHA1 (patch-man-cups-files.conf.man.in) = 820da58aa3f854018a48b68256d0cf0dc75b986e
 SHA1 (patch-ppdc_Makefile) = cdeb0ef9a68f9dd85453ef3076a0120ad9983698

Index: pkgsrc/print/cups-base/patches/patch-cups_ipp.c
diff -u pkgsrc/print/cups-base/patches/patch-cups_ipp.c:1.1 pkgsrc/print/cups-base/patches/patch-cups_ipp.c:1.2
--- pkgsrc/print/cups-base/patches/patch-cups_ipp.c:1.1 Fri Jun 22 14:12:45 2018
+++ pkgsrc/print/cups-base/patches/patch-cups_ipp.c     Mon Jul  9 13:53:34 2018
@@ -1,10 +1,10 @@
-$NetBSD: patch-cups_ipp.c,v 1.1 2018/06/22 14:12:45 bouyer Exp $
+$NetBSD: patch-cups_ipp.c,v 1.2 2018/07/09 13:53:34 youri Exp $
 From upstream: https://github.com/apple/cups/commit/18545a5e7ab478b187a0d7136ee19496ae32fc9b
  Fix regressions in ippValidateAttribute (Issue #5322, Issue #5330) 
 
---- cups/ipp.c.orig
+--- cups/ipp.c.orig    2018-06-05 16:06:54.000000000 +0000
 +++ cups/ipp.c
-@@ -5101,16 +5101,19 @@ ippValidateAttribute(
+@@ -5097,16 +5097,19 @@ ippValidateAttribute(
              break;
          }
  
@@ -34,18 +34,18 @@ From upstream: https://github.com/apple/
  
          if ((ptr - attr->values[i].string.text) > (IPP_MAX_TEXT - 1))
          {
-@@ -5163,16 +5166,19 @@ ippValidateAttribute(
+@@ -5159,16 +5162,19 @@ ippValidateAttribute(
              break;
          }
  
 -        if (*ptr < ' ' || *ptr == 0x7f)
--        {
++        if (*ptr)
+         {
 -          ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad control character (PWG 5100.14 section 8.1)."), attr->name, attr->values[i].string.text);
 -          return (0);
 -        }
 -        else if (*ptr)
-+        if (*ptr)
-         {
+-        {
 -          ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.3)."), attr->name, attr->values[i].string.text);
 -          return (0);
 -        }

Added files:

Index: pkgsrc/print/cups-base/patches/patch-cups_thread.c
diff -u /dev/null pkgsrc/print/cups-base/patches/patch-cups_thread.c:1.1
--- /dev/null   Mon Jul  9 13:53:34 2018
+++ pkgsrc/print/cups-base/patches/patch-cups_thread.c  Mon Jul  9 13:53:34 2018
@@ -0,0 +1,33 @@
+$NetBSD: patch-cups_thread.c,v 1.1 2018/07/09 13:53:34 youri Exp $
+
+Patch for macOS Sierra and before.
+
+--- cups/thread.c.orig 2018-06-05 16:06:54.000000000 +0000
++++ cups/thread.c
+@@ -19,6 +19,26 @@
+ #include "cups-private.h"
+ #include "thread-private.h"
+ 
++#if __APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200
++#include <mach/mach_time.h>
++#ifndef CLOCK_REALTIME
++#define CLOCK_REALTIME 0
++#define CLOCK_MONOTONIC 0
++#endif
++static int
++clock_gettime(int clk_id, struct timespec *t){
++    mach_timebase_info_data_t timebase;
++    mach_timebase_info(&timebase);
++    uint64_t time;
++    time = mach_absolute_time();
++    double nseconds = ((double)time * (double)timebase.numer)/((double)timebase.denom);
++    double seconds = ((double)time * (double)timebase.numer)/((double)timebase.denom * 1e9);
++    t->tv_sec = seconds;
++    t->tv_nsec = nseconds;
++    return 0;
++}
++#endif
++
+ 
+ #if defined(HAVE_PTHREAD_H)
+ /*



Home | Main Index | Thread Index | Old Index