pkgsrc-Changes archive

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

CVS commit: pkgsrc/print/xpp



Module Name:    pkgsrc
Committed By:   bouyer
Date:           Thu Mar  5 14:57:59 UTC 2020

Modified Files:
        pkgsrc/print/xpp: Makefile distinfo
        pkgsrc/print/xpp/patches: patch-ae patch-cupshelper.cxx

Log Message:
Fix build with newer cups.
While there switch to fltk13
bump PKGREVISION


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 pkgsrc/print/xpp/Makefile
cvs rdiff -u -r1.11 -r1.12 pkgsrc/print/xpp/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/print/xpp/patches/patch-ae \
    pkgsrc/print/xpp/patches/patch-cupshelper.cxx

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

Modified files:

Index: pkgsrc/print/xpp/Makefile
diff -u pkgsrc/print/xpp/Makefile:1.68 pkgsrc/print/xpp/Makefile:1.69
--- pkgsrc/print/xpp/Makefile:1.68      Sat Jan 18 23:35:05 2020
+++ pkgsrc/print/xpp/Makefile   Thu Mar  5 14:57:59 2020
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.68 2020/01/18 23:35:05 rillig Exp $
+# $NetBSD: Makefile,v 1.69 2020/03/05 14:57:59 bouyer Exp $
 
 DISTNAME=      xpp-1.5
-PKGREVISION=   27
+PKGREVISION=   28
 CATEGORIES=    print x11
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=cups/}
 
@@ -23,5 +23,5 @@ post-install:
        cd ${WRKSRC} && ${INSTALL_DATA} LICENSE README ${DESTDIR}${DOCDIR}
 
 .include "../../print/cups-base/buildlink3.mk"
-.include "../../x11/fltk/buildlink3.mk"
+.include "../../x11/fltk13/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/print/xpp/distinfo
diff -u pkgsrc/print/xpp/distinfo:1.11 pkgsrc/print/xpp/distinfo:1.12
--- pkgsrc/print/xpp/distinfo:1.11      Wed Nov  4 01:03:03 2015
+++ pkgsrc/print/xpp/distinfo   Thu Mar  5 14:57:59 2020
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.11 2015/11/04 01:03:03 agc Exp $
+$NetBSD: distinfo,v 1.12 2020/03/05 14:57:59 bouyer Exp $
 
 SHA1 (xpp-1.5.tar.gz) = 7f3c1427979516e47402a0acb708eb83b68daa61
 RMD160 (xpp-1.5.tar.gz) = a64ec4c93013d1db08a6c9b6705b43850c36c337
@@ -8,5 +8,5 @@ SHA1 (patch-aa) = f8df413715f4f9319f8d52
 SHA1 (patch-ab) = 76d0ca39bef410e580f805ca10a3d953285c58bb
 SHA1 (patch-ac) = d94f9359d19de5dff684f61a53af4607bb31f78c
 SHA1 (patch-ad) = 5af9e367c1b025ec1d9940101a8b3338d84ae5d6
-SHA1 (patch-ae) = a9adc82236847b2749eceacc4b00b2973dd80058
-SHA1 (patch-cupshelper.cxx) = beba4e1af0ff8a95d5d6042bd39254aa6e1d1e21
+SHA1 (patch-ae) = 28aa8dcfc325f89aed0f0d4a988af713ccdb8740
+SHA1 (patch-cupshelper.cxx) = 57d33096de6fdf9805d644eb21364ea8f1df3604

Index: pkgsrc/print/xpp/patches/patch-ae
diff -u pkgsrc/print/xpp/patches/patch-ae:1.1 pkgsrc/print/xpp/patches/patch-ae:1.2
--- pkgsrc/print/xpp/patches/patch-ae:1.1       Sun May  9 04:21:40 2010
+++ pkgsrc/print/xpp/patches/patch-ae   Thu Mar  5 14:57:59 2020
@@ -1,8 +1,8 @@
-$NetBSD: patch-ae,v 1.1 2010/05/09 04:21:40 sbd Exp $
+$NetBSD: patch-ae,v 1.2 2020/03/05 14:57:59 bouyer Exp $
 
---- xpp.cxx.orig       2004-12-07 08:00:04.000000000 +1300
-+++ xpp.cxx
-@@ -168,7 +168,7 @@ printFiles::printFiles(int  argc, /* I -
+--- xpp.cxx.orig       2004-12-06 20:00:04.000000000 +0100
++++ xpp.cxx    2020-03-04 15:20:53.406423152 +0100
+@@ -168,7 +168,7 @@
            {     
              char *tmp;
  
@@ -11,3 +11,160 @@ $NetBSD: patch-ae,v 1.1 2010/05/09 04:21
                tmp[0] = '\0';
                instance = tmp + 1;
              } 
+@@ -287,13 +287,14 @@
+     // Get printer information to show in the menu entry
+ 
+     ipp_t *request = CupsHelper::newIppRequest();
+-    char buf[1024], *state, *type, *location, *comment;
++    char buf[1024];
++    const char *state, *type, *location, *comment;
+     sprintf(buf,"ipp://%s:%d/printers/%s",CupsHelper::host(),
+             CupsHelper::port(),dests[i].name);
+     ippAddString(request,IPP_TAG_OPERATION,IPP_TAG_URI,"printer-uri",NULL,buf);
+-    request->request.op.operation_id = IPP_GET_PRINTER_ATTRIBUTES;
++    ippSetOperation(request, IPP_GET_PRINTER_ATTRIBUTES);
+     request = CupsHelper::processRequest(request,"/printers/");
+-    if (!request || request->curtag != IPP_TAG_PRINTER) {
++    if (!request) {
+       state = "Unknown";
+       type = "No Information Available";
+       location = "Location Unknown";
+@@ -302,7 +303,7 @@
+       ipp_attribute_t *attr = ippFindAttribute(request,"printer-state",
+                                                IPP_TAG_ENUM);
+       if (attr)
+-        switch (attr->values[0].integer) {
++        switch (ippGetInteger(attr, 0)) {
+           case IPP_PRINTER_IDLE:
+             state = "Printer idle";
+             break;
+@@ -316,19 +317,19 @@
+       else state = "Unknown";
+       attr = ippFindAttribute(request,"printer-info",IPP_TAG_TEXT);
+       if (attr)
+-        type = attr->values[0].string.text;
++        type = ippGetString(attr, 0, NULL);
+       else
+         type = "No Information Available";
+       if (strlen(type) == 0) type = "No Information Available";
+       attr = ippFindAttribute(request,"printer-location",IPP_TAG_TEXT);
+       if (attr)
+-        location = attr->values[0].string.text;
++        location = ippGetString(attr, 0, NULL);
+       else
+         location = "Location Unknown";
+       if (strlen(location) == 0) location = "Location Unknown";
+       attr = ippFindAttribute(request,"printer-make-and-model",IPP_TAG_TEXT);
+       if (attr)
+-        comment = attr->values[0].string.text;
++        comment = ippGetString(attr, 0, NULL);
+       else
+         comment = "";
+     }
+@@ -714,15 +715,15 @@
+   // return when the request fails.
+ 
+   ipp_t *request = CupsHelper::newIppRequest();
+-  char buffer[1024], *t;
+-  const char *s, *u;
++  char buffer[1024], *t2;
++  const char *s, *t, *u;
+   sprintf(buffer,"ipp://%s:%d/printers/%s",CupsHelper::host(),
+           CupsHelper::port(),dests[dest_pos].name);
+   ippAddString(request,IPP_TAG_OPERATION,IPP_TAG_URI,
+                "printer-uri",NULL,buffer);
+-  request->request.op.operation_id = IPP_GET_PRINTER_ATTRIBUTES;
++  ippSetOperation(request, IPP_GET_PRINTER_ATTRIBUTES);
+   request = CupsHelper::processRequest(request,"/printers/");
+-  if (!request || request->curtag != IPP_TAG_PRINTER) return;
++  if (!request) return;
+ 
+   // Check whether the printer supports banner pages and continue only
+   // if it does so
+@@ -732,13 +733,13 @@
+     // Enable the menus and insert all available banners
+     before->activate();
+     after->activate();
+-    for (i = 0; i < attr->num_values; i ++) {
++    for (i = 0; i < ippGetCount(attr); i ++) {
+       // Use the replacement method to avoid weird banner file names
+       // messing up the menues
+       before->add("x",0,0,0,0);
+-      before->replace(i,attr->values[i].string.text);
++      before->replace(i,ippGetString(attr, i, NULL));
+       after->add("x",0,0,0,0);
+-      after->replace(i,attr->values[i].string.text);
++      after->replace(i,ippGetString(attr, i, NULL));
+     }
+     // Determine which banners are currently set
+     u = before->menu()->label();
+@@ -746,18 +747,19 @@
+                                        changed_options)) {
+       strcpy(buffer,s);
+       s = buffer;
+-      t = strchr(buffer,',');
+-      if (t) {
+-        *t = '\0';
+-        t ++;
++      t2 = strchr(buffer,',');
++      if (t2) {
++        *t2 = '\0';
++        t2 ++;
+       } else {
+-        t = (char *)u;
++        t2 = (char *)u;
+       }
++      t = t2;
+     } else if ((attr = ippFindAttribute(request, "job-sheets-default",
+                                         IPP_TAG_NAME)) != NULL) {
+-      if (attr->num_values > 0) s = attr->values[0].string.text;
++      if (ippGetCount(attr) > 0) s = ippGetString(attr, 0, NULL);
+       else s = u;
+-      if (attr->num_values > 1) t = attr->values[1].string.text;
++      if (ippGetCount(attr) > 1) t = ippGetString(attr, 1, NULL);
+       else t = (char *)u;
+     } else {
+       s = u;
+@@ -795,20 +797,20 @@
+           CupsHelper::port(),dests[dest_pos].name);
+   ippAddString(request,IPP_TAG_OPERATION,IPP_TAG_URI,
+                "printer-uri",NULL,buffer);
+-  request->request.op.operation_id = IPP_GET_PRINTER_ATTRIBUTES;
++  ippSetOperation(request, IPP_GET_PRINTER_ATTRIBUTES);
+   request = CupsHelper::processRequest(request,"/printers/");
+ 
+   // Get the default settings
+ 
+   ipp_attribute_t *attr;
+-  if ((request) && (request->curtag == IPP_TAG_PRINTER))
++  if (request)
+     attr = ippFindAttribute(request,"job-sheets-default", IPP_TAG_NAME);
+   else attr = NULL;
+   u = before->menu()->label();
+   if (attr) {
+-    if (attr->num_values > 0) s = attr->values[0].string.text;
++    if (ippGetCount(attr) > 0) s = ippGetString(attr, 0, NULL);
+     else s = u;
+-    if (attr->num_values > 1) t = attr->values[1].string.text;
++    if (ippGetCount(attr) > 1) t = ippGetString(attr, 1, NULL);
+     else t = u;
+   } else {
+     s = u;
+@@ -2500,7 +2502,7 @@
+     // Redraw the destination menu in the main window
+ 
+     printerPack->parent()->redraw();
+-    printerPack->draw();
++    printerPack->redraw();
+   
+   }
+ 
+@@ -2674,7 +2676,7 @@
+   // Redraw the destination menu in the main window
+ 
+   printerPack->parent()->redraw();
+-  printerPack->draw();
++  printerPack->redraw();
+   
+   return(dest_index);
+ }
Index: pkgsrc/print/xpp/patches/patch-cupshelper.cxx
diff -u pkgsrc/print/xpp/patches/patch-cupshelper.cxx:1.1 pkgsrc/print/xpp/patches/patch-cupshelper.cxx:1.2
--- pkgsrc/print/xpp/patches/patch-cupshelper.cxx:1.1   Tue Dec  6 19:48:47 2011
+++ pkgsrc/print/xpp/patches/patch-cupshelper.cxx       Thu Mar  5 14:57:59 2020
@@ -1,7 +1,9 @@
-$NetBSD: patch-cupshelper.cxx,v 1.1 2011/12/06 19:48:47 joerg Exp $
+$NetBSD: patch-cupshelper.cxx,v 1.2 2020/03/05 14:57:59 bouyer Exp $
 
---- cupshelper.cxx.orig        2011-12-06 14:22:14.000000000 +0000
-+++ cupshelper.cxx
+update for new cups API
+
+--- cupshelper.cxx.orig        2002-05-28 17:49:45.000000000 +0200
++++ cupshelper.cxx     2020-03-04 15:02:34.300403189 +0100
 @@ -34,6 +34,7 @@
  #include "cupshelper.h"
  #include "passworddialog.h"
@@ -10,3 +12,40 @@ $NetBSD: patch-cupshelper.cxx,v 1.1 2011
  #include <stdlib.h>
  #include <cups/language.h>
  
+@@ -90,7 +91,7 @@
+ 
+ ipp_t* CupsHelper::newIppRequest(){
+       ipp_t   *request = ippNew();
+-      request->request.op.request_id = 1;
++      ippSetRequestId(request, 1);
+       cups_lang_t     *lang = cupsLangDefault();
+       ippAddString(request,IPP_TAG_OPERATION,IPP_TAG_CHARSET,"attributes-charset",NULL,cupsLangEncoding(lang));
+       ippAddString(request,IPP_TAG_OPERATION,IPP_TAG_LANGUAGE,"attributes-natural-language",NULL,lang->language);
+@@ -108,7 +109,7 @@
+       httpClose(HTTP);
+       if (!answer)
+               return 0;
+-      if (answer->state == IPP_ERROR || answer->state == IPP_IDLE)
++      if (ippGetState(answer) == IPP_ERROR || ippGetState(answer) == IPP_IDLE)
+       {
+               ippDelete(answer);
+               return 0;
+@@ -151,15 +152,15 @@
+       char      str[256];
+       int       value(-1);
+ 
+-      request->request.op.operation_id = IPP_GET_PRINTER_ATTRIBUTES;
++      ippSetOperation(request, IPP_GET_PRINTER_ATTRIBUTES);
+       sprintf(str,"ipp://%s:%d/printers/%s",host(),port(),name);
+       ippAddString(request,IPP_TAG_OPERATION,IPP_TAG_URI,"printer-uri",NULL,str);
+       //sprintf(str,"/printers/%s",name);
+       sprintf(str,"/printers/");
+       request = processRequest(request,str);
+-      if (request && request->curtag == IPP_TAG_PRINTER) {
++      if (request) {
+               ipp_attribute_t *attr = ippFindAttribute(request,"printer-type",IPP_TAG_ENUM);
+-              if (attr) value = attr->values[0].integer;
++              if (attr) value = ippGetInteger(attr, 0);
+       }
+       ippDelete(request);
+       return value;



Home | Main Index | Thread Index | Old Index