pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
xpp: Update patches for FLTK 1.4.
Module Name: pkgsrc-wip
Committed By: Michael Baeuerle <micha%NetBSD.org@localhost>
Pushed By: micha
Date: Wed Jan 22 17:02:20 2025 +0100
Changeset: cf85cf4652ed0aafb8a5973886ec5411ccf70ade
Modified Files:
Makefile
Added Files:
xpp/COMMIT_MSG
xpp/DESCR
xpp/Makefile
xpp/PLIST
xpp/README
xpp/distinfo
xpp/patches/patch-ab
xpp/patches/patch-ac
xpp/patches/patch-ad
xpp/patches/patch-ae
xpp/patches/patch-cupshelper.cxx
xpp/patches/patch-mainwindow.fl
xpp/patches/patch-xppmain.cxx
Log Message:
xpp: Update patches for FLTK 1.4.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=cf85cf4652ed0aafb8a5973886ec5411ccf70ade
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 +
xpp/COMMIT_MSG | 1 +
xpp/DESCR | 6 ++
xpp/Makefile | 33 ++++++++
xpp/PLIST | 4 +
xpp/README | 1 +
xpp/distinfo | 12 +++
xpp/patches/patch-ab | 13 +++
xpp/patches/patch-ac | 13 +++
xpp/patches/patch-ad | 21 +++++
xpp/patches/patch-ae | 170 +++++++++++++++++++++++++++++++++++++++
xpp/patches/patch-cupshelper.cxx | 51 ++++++++++++
xpp/patches/patch-mainwindow.fl | 24 ++++++
xpp/patches/patch-xppmain.cxx | 15 ++++
14 files changed, 365 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index e456092c71..2b603b2ee1 100644
--- a/Makefile
+++ b/Makefile
@@ -6050,6 +6050,7 @@ SUBDIR+= xpipe
SUBDIR+= xplore
SUBDIR+= xplugd
SUBDIR+= xpopple
+SUBDIR+= xpp
SUBDIR+= xqf
SUBDIR+= xrdp
SUBDIR+= xrdp09
diff --git a/xpp/COMMIT_MSG b/xpp/COMMIT_MSG
new file mode 100644
index 0000000000..0869244a29
--- /dev/null
+++ b/xpp/COMMIT_MSG
@@ -0,0 +1 @@
+print/xpp: Patch to work with FLTK 1.4.
diff --git a/xpp/DESCR b/xpp/DESCR
new file mode 100644
index 0000000000..63fb84388b
--- /dev/null
+++ b/xpp/DESCR
@@ -0,0 +1,6 @@
+The X Printing Panel (XPP) is a completely free tool that interfaces with
+the Common UNIX Printing System (CUPS) for easy choosing of the desired
+printer out of a list of all available printers and for setting printer
+options by and easy-to-use graphical user interface. One simply calls the
+program (xpp) instead of the usual utilities (lpr or lp) at the command
+line or out of applications.
diff --git a/xpp/Makefile b/xpp/Makefile
new file mode 100644
index 0000000000..3bcc471a9a
--- /dev/null
+++ b/xpp/Makefile
@@ -0,0 +1,33 @@
+# $NetBSD$
+
+DISTNAME= xpp-1.5
+PKGREVISION= 50
+CATEGORIES= print x11
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=cups/}
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= http://cups.sourceforge.net/xpp/index.html
+COMMENT= X Printing Panel
+LICENSE= gnu-gpl-v2
+
+USE_TOOLS+= gmake
+GNU_CONFIGURE= yes
+USE_LANGUAGES= c c++
+
+CFLAGS+= -D_IPP_PRIVATE_STRUCTURES
+
+# mainwindow.h must be generated before compilation of mainwindow.c
+MAKE_JOBS_SAFE= no
+
+DOCDIR= ${PREFIX}/share/doc/xpp
+
+INSTALLATION_DIRS+= ${DOCDIR}
+
+post-install:
+ cd ${WRKSRC} && ${INSTALL_DATA} LICENSE README ${DESTDIR}${DOCDIR}
+
+.include "../../print/cups-base/buildlink3.mk"
+.include "../../x11/libXcursor/buildlink3.mk"
+.include "../../wip/fltk14-devel/buildlink3.mk"
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/xpp/PLIST b/xpp/PLIST
new file mode 100644
index 0000000000..8c54174e91
--- /dev/null
+++ b/xpp/PLIST
@@ -0,0 +1,4 @@
+@comment $NetBSD$
+bin/xpp
+share/doc/xpp/LICENSE
+share/doc/xpp/README
diff --git a/xpp/README b/xpp/README
new file mode 100644
index 0000000000..5bd87046f4
--- /dev/null
+++ b/xpp/README
@@ -0,0 +1 @@
+Test whether FLTK 1.4 is supported.
diff --git a/xpp/distinfo b/xpp/distinfo
new file mode 100644
index 0000000000..f6591db7f8
--- /dev/null
+++ b/xpp/distinfo
@@ -0,0 +1,12 @@
+$NetBSD$
+
+BLAKE2s (xpp-1.5.tar.gz) = 997243685b7393ee02ff91d6abf5d812cfb0c01b0d0472b7fbdfbae246f6ffd7
+SHA512 (xpp-1.5.tar.gz) = 098ce2f78f0f38153680a52e8af1707eadf2f96ed58a2087bdb3e462e44f5e4f5d1a382cd319d8c0d030dea416ce1bf76d0698b3b91ab7019a1c0dab08418d77
+Size (xpp-1.5.tar.gz) = 107755 bytes
+SHA1 (patch-ab) = 76d0ca39bef410e580f805ca10a3d953285c58bb
+SHA1 (patch-ac) = d94f9359d19de5dff684f61a53af4607bb31f78c
+SHA1 (patch-ad) = 5af9e367c1b025ec1d9940101a8b3338d84ae5d6
+SHA1 (patch-ae) = 28aa8dcfc325f89aed0f0d4a988af713ccdb8740
+SHA1 (patch-cupshelper.cxx) = 57d33096de6fdf9805d644eb21364ea8f1df3604
+SHA1 (patch-mainwindow.fl) = 7cc3fa44a169bfb49b93b90c21029accd57da66c
+SHA1 (patch-xppmain.cxx) = 22fd3c51678613eb05f1cb6611d60e9eb7053772
diff --git a/xpp/patches/patch-ab b/xpp/patches/patch-ab
new file mode 100644
index 0000000000..b4da5d3906
--- /dev/null
+++ b/xpp/patches/patch-ab
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- configure.orig 2006-03-03 12:54:12.000000000 +0100
++++ configure 2006-03-03 12:55:35.000000000 +0100
+@@ -2765,7 +2765,7 @@
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+- ac_dummy="$PATH:/usr/sbin:/sbin:/usr/local/sbin"
++ ac_dummy="$PATH:/usr/sbin:/sbin:/usr/local/sbin:$prefix/sbin"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
diff --git a/xpp/patches/patch-ac b/xpp/patches/patch-ac
new file mode 100644
index 0000000000..918ea24105
--- /dev/null
+++ b/xpp/patches/patch-ac
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- configure.in.orig 2006-03-03 12:54:21.000000000 +0100
++++ configure.in 2006-03-03 12:56:12.000000000 +0100
+@@ -103,7 +103,7 @@
+ AC_CHECK_LIB(cups,httpConnect)
+
+ dnl Check for CUPSD
+-AC_PATH_PROG(CUPSD,cupsd,,$PATH:/usr/sbin:/sbin:/usr/local/sbin)
++AC_PATH_PROG(CUPSD,cupsd,,$PATH:/usr/sbin:/sbin:/usr/local/sbin:$prefix/sbin)
+ if test "$CUPSD" = ""; then
+ AC_MSG_ERROR(CUPS daemon not found, please install CUPS package (http://www.cups.org).)
+ fi
diff --git a/xpp/patches/patch-ad b/xpp/patches/patch-ad
new file mode 100644
index 0000000000..a38640ded3
--- /dev/null
+++ b/xpp/patches/patch-ad
@@ -0,0 +1,21 @@
+$NetBSD$
+
+--- xpp.h.orig 2004-12-06 17:59:35.000000000 +0000
++++ xpp.h
+@@ -36,6 +36,7 @@
+ #include <cups/cups.h>
+ #include <cups/ipp.h>
+ #include <cups/language.h>
++#include <cups/ppd.h>
+ #include <FL/Fl.H>
+ #include <FL/Fl_Window.H>
+ #include <FL/Fl_Box.H>
+@@ -177,7 +178,7 @@ public:
+ */
+
+ int /* O - index of the record of the given option in the array */
+- printFiles::getSpecialOptionIndex(int *num_special_opts_in_arr,
++ getSpecialOptionIndex(int *num_special_opts_in_arr,
+ /* number of options in the array */
+ special_opt_t **special_opts_arr,
+ /* array of numerical/string
diff --git a/xpp/patches/patch-ae b/xpp/patches/patch-ae
new file mode 100644
index 0000000000..fe3bc3ada4
--- /dev/null
+++ b/xpp/patches/patch-ae
@@ -0,0 +1,170 @@
+$NetBSD$
+
+--- 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;
+
+- if ((tmp = strchr(dest,'/'))) {
++ if ((tmp = strchr((char*)dest,'/'))) {
+ 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);
+ }
diff --git a/xpp/patches/patch-cupshelper.cxx b/xpp/patches/patch-cupshelper.cxx
new file mode 100644
index 0000000000..742997041b
--- /dev/null
+++ b/xpp/patches/patch-cupshelper.cxx
@@ -0,0 +1,51 @@
+$NetBSD$
+
+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"
+
++#include <stdio.h>
+ #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;
diff --git a/xpp/patches/patch-mainwindow.fl b/xpp/patches/patch-mainwindow.fl
new file mode 100644
index 0000000000..4e09d2fce4
--- /dev/null
+++ b/xpp/patches/patch-mainwindow.fl
@@ -0,0 +1,24 @@
+$NetBSD$
+
+Use header "FL/Fl_File_Chooser.H" for FLTK 1.4.
+
+--- mainwindow.fl.orig 2004-12-07 03:24:46.000000000 +0000
++++ mainwindow.fl
+@@ -18,6 +18,8 @@ class xppMainWindow {open
+ Function {xppMainWindow(int argc, char *argv[], int &exitstat)} {open
+ } {
+ code {exitstat = 0;
++optionDialog=NULL;
++instanceDialog=NULL;
+ print=new printFiles(argc,argv,exitstat);
+ if (exitstat != 0) return;} {}
+ Fl_Window mainWindow {
+@@ -70,7 +72,7 @@ if (chosen_file)
+ fileList->value(print->filelist);
+ }}
+ private xywh {440 75 65 25} down_box DOWN_BOX shortcut 0x80062 align 16
+- code0 {\#include <FL/fl_file_chooser.H>}
++ code0 {\#include <FL/Fl_File_Chooser.H>}
+ code1 {\#include "xpp.h"}
+ }
+ Fl_Scroll printerList {
diff --git a/xpp/patches/patch-xppmain.cxx b/xpp/patches/patch-xppmain.cxx
new file mode 100644
index 0000000000..a1c75915aa
--- /dev/null
+++ b/xpp/patches/patch-xppmain.cxx
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Include header "FL/Fl_Shared_Image.H" for FLTK 1.4.
+
+--- xppmain.cxx.orig 2004-12-01 01:28:01.000000000 +0000
++++ xppmain.cxx
+@@ -32,7 +32,7 @@
+ */
+
+ #include "mainwindow.h"
+-#include <Fl/Fl_Shared_Image.h>
++#include <FL/Fl_Shared_Image.H>
+
+ /*
+ * 'main()' - Do all what xpp should do
Home |
Main Index |
Thread Index |
Old Index