]> git.ipfire.org Git - thirdparty/cups-filters.git/commitdiff
libcupsfilters: In the PPD generator removed check for presence of gstopxl
authorTill Kamppeter <till.kamppeter@gmail.com>
Thu, 24 Mar 2022 22:47:27 +0000 (23:47 +0100)
committerTill Kamppeter <till.kamppeter@gmail.com>
Thu, 24 Mar 2022 22:47:27 +0000 (23:47 +0100)
Generally gstopxl is part of cups-filters as cups-browsed is and so
they usually get installed together. So we remove the check for the
presence of the filter. The check will also not work in many cases,
especially when the program using the PPD generator is not called by
CUPS, for example if the PPD generator is called by cups-browsed (and
not by the driverless utility used by CUPS).

For cups-filters installations without Ghostscript, gstopxl is not
built/installed, for this case we will later add conditionals in the
PPD generator to not build the support for PCL-XL via gstopxl.

cupsfilters/ppdgenerator.c

index 597e7b6e9f5cbe213d88270f1b5bc2a05acf1068..3d676ed8bfd49b50c850e614946d391daca55333 100644 (file)
@@ -1530,11 +1530,7 @@ cfCreatePPDFromIPP2(char         *buffer,          /* I - Filename buffer */
   const char           *keyword;       /* Keyword value */
   cups_array_t         *fin_options = NULL;
                                        /* Finishing options */
-  char                 buf[256],
-                        filter_path[1024];
-                                        /* Path to filter executable */
-  const char           *cups_serverbin;/* CUPS_SERVERBIN environment
-                                          variable */
+  char                 buf[256];
   char                 *defaultoutbin = NULL;
   const char           *outbin;
   char                 outbin_properties[1024];
@@ -1981,17 +1977,9 @@ cfCreatePPDFromIPP2(char         *buffer,          /* I - Filename buffer */
   /* Legacy formats only if we have no driverless format */
   else if (cupsArrayFind(pdl_list, "application/vnd.hp-pclxl"))
   {
-    /* Check whether the gstopxl filter is installed,
-       otherwise ignore the PCL-XL support of the printer */
-    if ((cups_serverbin = getenv("CUPS_SERVERBIN")) == NULL)
-      cups_serverbin = CUPS_SERVERBIN;
-    snprintf(filter_path, sizeof(filter_path), "%s/filter/gstopxl",
-            cups_serverbin);
-    if (access(filter_path, X_OK) == 0) {
-      cupsFilePrintf(fp, "*cupsFilter2: \"application/vnd.cups-pdf application/vnd.hp-pclxl 100 gstopxl\"\n");
-      if (formatfound == 0) manual_copies = 1;
-      formatfound = 1;
-    }
+    cupsFilePrintf(fp, "*cupsFilter2: \"application/vnd.cups-pdf application/vnd.hp-pclxl 100 gstopxl\"\n");
+    if (formatfound == 0) manual_copies = 1;
+    formatfound = 1;
   }
   else if (cupsArrayFind(pdl_list, "application/postscript"))
   {