From c0c5db3424a810daa1eab106c200f50fc8ca3408 Mon Sep 17 00:00:00 2001 From: Akarshan Kapoor <120595108+Kappuccino111@users.noreply.github.com> Date: Fri, 29 Dec 2023 15:40:23 +0530 Subject: [PATCH 1/6] Update libcups2.c with proper function call Fixed error during make --- ppd/libcups2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ppd/libcups2.c b/ppd/libcups2.c index 63076ad2..88465062 100644 --- a/ppd/libcups2.c +++ b/ppd/libcups2.c @@ -289,10 +289,10 @@ ppd_message_file_load(const char *filename, // I - Message catalog to load // Create an array to hold the messages... // - if ((a = cupsArrayNew3((cups_array_func_t)ppd_message_compare, NULL, - (cups_ahash_func_t)NULL, 0, - (cups_acopy_func_t)NULL, - (cups_afree_func_t)ppd_message_free)) == NULL) +if ((a = cupsArrayNew3((cups_array_cb_t)ppd_message_compare, NULL, + (cups_ahash_cb_t)NULL, 0, + (cups_acopy_cb_t)NULL, + (cups_afree_cb_t)ppd_message_free)) == NULL) { DEBUG_puts("5ppd_message_file_load: Unable to allocate array!"); return (NULL); From 59a9429191441fdd50fa0920db4992f8cc7c31e6 Mon Sep 17 00:00:00 2001 From: Akarshan Kapoor <120595108+Kappuccino111@users.noreply.github.com> Date: Fri, 29 Dec 2023 15:43:00 +0530 Subject: [PATCH 2/6] Fixed indents --- ppd/libcups2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ppd/libcups2.c b/ppd/libcups2.c index 88465062..ad4f7146 100644 --- a/ppd/libcups2.c +++ b/ppd/libcups2.c @@ -289,10 +289,10 @@ ppd_message_file_load(const char *filename, // I - Message catalog to load // Create an array to hold the messages... // -if ((a = cupsArrayNew3((cups_array_cb_t)ppd_message_compare, NULL, - (cups_ahash_cb_t)NULL, 0, - (cups_acopy_cb_t)NULL, - (cups_afree_cb_t)ppd_message_free)) == NULL) + if ((a = cupsArrayNew3((cups_array_cb_t)ppd_message_compare, NULL, + (cups_ahash_cb_t)NULL, 0, + (cups_acopy_cb_t)NULL, + (cups_afree_cb_t)ppd_message_free)) == NULL) { DEBUG_puts("5ppd_message_file_load: Unable to allocate array!"); return (NULL); From b83c93b1b5be858279274d8499aaa44b3bf971bf Mon Sep 17 00:00:00 2001 From: Akarshan Kapoor <120595108+Kappuccino111@users.noreply.github.com> Date: Fri, 29 Dec 2023 20:13:18 +0530 Subject: [PATCH 3/6] Update INSTALL.md --- INSTALL | 109 ----------------------------------------------------- INSTALL.md | 74 ++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 109 deletions(-) delete mode 100644 INSTALL create mode 100644 INSTALL.md diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 56f3dbd8..00000000 --- a/INSTALL +++ /dev/null @@ -1,109 +0,0 @@ -INSTALL - OpenPrinting libppd v2.0.0 - 2023-09-22 -------------------------------------------------- - -This file describes how to compile and install OpenPrinting libppd -from source code. For more information on OpenPrinting libppd see the -file called "README.md". A complete change log can be found in -"CHANGES.md". - -BEFORE YOU BEGIN - - You'll need ANSI-compliant C and C++ compilers, plus a make - program and POSIX-compliant shell (/bin/sh). The GNU compiler - tools and Bash work well and we have tested the current CUPS code - against several versions of GCC with excellent results. - - The Makefiles used by the project should work with most versions - of make. We've tested them with GNU make as well as the make - programs shipped by Compaq, HP, SGI, and Sun. BSD users should - use GNU make (gmake) since BSD make does not support "include". - - libcups of CUPS 2.2.2 or newer and libcupsfilters 2.0.0 or newer - must be installed to be able to compile this package. As none of - the PPD-file-supporting functions in libcups are used, porting - this library to use libcups3 (of CUPS 3.x) should be easy, or - libppd will already just work with libcups3. - -COMPILING THE GIT REPOSITORY CODE - - The libppd GIT repository doesn't hold a copy of the pre-built - configure script. You'll need to run the GNU autoconf software - (2.65 or higher) to create it: - - ./autogen.sh - - -CONFIGURATION - - libppd uses GNU autoconf, so you should find the usual "configure" - script in the main libppd source directory. To configure libppd - for your system, type: - - ./configure - - The default installation will put the libppd software into the - "/usr" directory on your system. - - Use the "--prefix" option to install the libppd software into - another location: - - ./configure --prefix=/some/directory - - To see a complete list of configuration options, use the --help option: - - ./configure --help - - If any of the dependent libraries are not installed in a system default - location (typically "/usr/include" and "/usr/lib") you'll need to set the - CFLAGS, CPPFLAGS, CXXFLAGS, DSOFLAGS, and LDFLAGS environment variables - prior to running configure: - - setenv CFLAGS "-I/some/directory" - setenv CPPFLAGS "-I/some/directory" - setenv CXXFLAGS "-I/some/directory" - setenv DSOFLAGS "-L/some/directory" - setenv LDFLAGS "-L/some/directory" - ./configure ... - - or: - - CFLAGS="-I/some/directory" \ - CPPFLAGS="-I/some/directory" \ - CXXFLAGS="-I/some/directory" \ - DSOFLAGS="-L/some/directory" \ - LDFLAGS="-L/some/directory" \ - ./configure ... - - Once you have configured things, just type: - - make ENTER - - or if you have FreeBSD, NetBSD, or OpenBSD type: - - gmake ENTER - - to build the software. - - -INSTALLING THE SOFTWARE - - Once you have built the software you need to install it. The "install" - target provides a quick way to install the software on your local system: - - make install ENTER - - or for FreeBSD, NetBSD, or OpenBSD: - - gmake install ENTER - -PACKAGING THE SOFTWARE FOR OPERATING SYSTEM DISTRIBUTIONS - - libppd is only for retro-fitting legacy CUPS drivers using PPD - files. So it only needs to get packaged for and included in an OS - distribution if retro-fitting Printer Applications are installed - as classic packages (like RPM or DEB). - - If legacy printer support is only done via the Printer Application - Snaps (or other containers of the Printer Applications) or no - legacy printer support is required (only support for modern, - driverless IPP printers), libppd is not needed. diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 00000000..bd818531 --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,74 @@ + +# OpenPrinting libppd v2.0.0 Installation Guide +------------------------------------------------------------ + +## Overview + +This guide provides instructions for compiling and installing OpenPrinting libppd version 2.0.0 from source code. For more details, refer to "README.md" and for a change log, see "CHANGES.md". + +### Before You Begin + +#### Prerequisites +- ANSI-compliant C and C++ compilers (tested with several versions of GCC) +- make program and POSIX-compliant shell (/bin/sh) +- GNU make recommended (especially for BSD users) + +#### Dependencies +- libcups of CUPS 2.2.2 or newer +- libcupsfilters 2.0.0 or newer + +### Compiling the GIT Repository Code +- libppd GIT repository does not include a pre-built configure script. +- Run GNU autoconf (2.65 or higher) to create it: + ``` + ./autogen.sh + ``` + +### Configuration +- Use the "configure" script in the main directory: + ``` + ./configure + ``` +- Default installation path is "/usr". +- For custom installation path, use the "--prefix" option: + ``` + ./configure --prefix=/some/directory + ``` +- Use `./configure --help` for all configuration options. +- Set environment variables for libraries in non-default locations. + +### Building the Software +- Run `make` (or `gmake` for BSD systems) to build the software. + +### Installing the Software +- After building, install the software with: + ``` + make install + ``` +- For BSD systems: + ``` + gmake install + ``` + +### Packaging for Operating System Distributions +- libppd is for retro-fitting legacy CUPS drivers using PPD files. +- Needed if Printer Applications are installed as classic packages (RPM, DEB). +- Not required for Printer Application Snaps or for modern IPP printers only. + +## Installing Required Tools + +### For Debian/Ubuntu-based Systems +- Install C and C++ compilers, make, autoconf: + ``` + sudo apt-get install build-essential autoconf + ``` +- Install libcups and libcupsfilters + +### For Red Hat/Fedora-based Systems +- Install C and C++ compilers, make, autoconf: + ``` + sudo dnf install gcc gcc-c++ make autoconf + ``` +- Install libcups and libcupsfilters: + +Note: The above commands are for common Linux distributions. For other operating systems or distributions, refer to respective package management instructions. From eca661039faafb7b9d62f153b8e46551bf0a7892 Mon Sep 17 00:00:00 2001 From: Akarshan Kapoor <120595108+Kappuccino111@users.noreply.github.com> Date: Fri, 29 Dec 2023 21:44:13 +0530 Subject: [PATCH 4/6] Update Makefile.am --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 7aed422b..d669f610 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,7 +10,7 @@ doc_DATA = \ COPYING \ CHANGES.md \ CHANGES-1.x.md \ - INSTALL \ + INSTALL.md \ LICENSE \ NOTICE \ README.md \ From 091a46bb8d4dfc2234045680a9912fb1d0293c7d Mon Sep 17 00:00:00 2001 From: Akarshan Kapoor Date: Sat, 30 Dec 2023 00:07:35 +0530 Subject: [PATCH 5/6] Revert "Update Makefile.am" This reverts commit eca661039faafb7b9d62f153b8e46551bf0a7892. --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index d669f610..7aed422b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,7 +10,7 @@ doc_DATA = \ COPYING \ CHANGES.md \ CHANGES-1.x.md \ - INSTALL.md \ + INSTALL \ LICENSE \ NOTICE \ README.md \ From 01ce04cc24362045f0115b3b95a22e4792f69ed8 Mon Sep 17 00:00:00 2001 From: Akarshan Kapoor Date: Sat, 30 Dec 2023 00:07:39 +0530 Subject: [PATCH 6/6] Revert "Update INSTALL.md" This reverts commit b83c93b1b5be858279274d8499aaa44b3bf971bf. --- INSTALL | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++ INSTALL.md | 74 ------------------------------------ 2 files changed, 109 insertions(+), 74 deletions(-) create mode 100644 INSTALL delete mode 100644 INSTALL.md diff --git a/INSTALL b/INSTALL new file mode 100644 index 00000000..56f3dbd8 --- /dev/null +++ b/INSTALL @@ -0,0 +1,109 @@ +INSTALL - OpenPrinting libppd v2.0.0 - 2023-09-22 +------------------------------------------------- + +This file describes how to compile and install OpenPrinting libppd +from source code. For more information on OpenPrinting libppd see the +file called "README.md". A complete change log can be found in +"CHANGES.md". + +BEFORE YOU BEGIN + + You'll need ANSI-compliant C and C++ compilers, plus a make + program and POSIX-compliant shell (/bin/sh). The GNU compiler + tools and Bash work well and we have tested the current CUPS code + against several versions of GCC with excellent results. + + The Makefiles used by the project should work with most versions + of make. We've tested them with GNU make as well as the make + programs shipped by Compaq, HP, SGI, and Sun. BSD users should + use GNU make (gmake) since BSD make does not support "include". + + libcups of CUPS 2.2.2 or newer and libcupsfilters 2.0.0 or newer + must be installed to be able to compile this package. As none of + the PPD-file-supporting functions in libcups are used, porting + this library to use libcups3 (of CUPS 3.x) should be easy, or + libppd will already just work with libcups3. + +COMPILING THE GIT REPOSITORY CODE + + The libppd GIT repository doesn't hold a copy of the pre-built + configure script. You'll need to run the GNU autoconf software + (2.65 or higher) to create it: + + ./autogen.sh + + +CONFIGURATION + + libppd uses GNU autoconf, so you should find the usual "configure" + script in the main libppd source directory. To configure libppd + for your system, type: + + ./configure + + The default installation will put the libppd software into the + "/usr" directory on your system. + + Use the "--prefix" option to install the libppd software into + another location: + + ./configure --prefix=/some/directory + + To see a complete list of configuration options, use the --help option: + + ./configure --help + + If any of the dependent libraries are not installed in a system default + location (typically "/usr/include" and "/usr/lib") you'll need to set the + CFLAGS, CPPFLAGS, CXXFLAGS, DSOFLAGS, and LDFLAGS environment variables + prior to running configure: + + setenv CFLAGS "-I/some/directory" + setenv CPPFLAGS "-I/some/directory" + setenv CXXFLAGS "-I/some/directory" + setenv DSOFLAGS "-L/some/directory" + setenv LDFLAGS "-L/some/directory" + ./configure ... + + or: + + CFLAGS="-I/some/directory" \ + CPPFLAGS="-I/some/directory" \ + CXXFLAGS="-I/some/directory" \ + DSOFLAGS="-L/some/directory" \ + LDFLAGS="-L/some/directory" \ + ./configure ... + + Once you have configured things, just type: + + make ENTER + + or if you have FreeBSD, NetBSD, or OpenBSD type: + + gmake ENTER + + to build the software. + + +INSTALLING THE SOFTWARE + + Once you have built the software you need to install it. The "install" + target provides a quick way to install the software on your local system: + + make install ENTER + + or for FreeBSD, NetBSD, or OpenBSD: + + gmake install ENTER + +PACKAGING THE SOFTWARE FOR OPERATING SYSTEM DISTRIBUTIONS + + libppd is only for retro-fitting legacy CUPS drivers using PPD + files. So it only needs to get packaged for and included in an OS + distribution if retro-fitting Printer Applications are installed + as classic packages (like RPM or DEB). + + If legacy printer support is only done via the Printer Application + Snaps (or other containers of the Printer Applications) or no + legacy printer support is required (only support for modern, + driverless IPP printers), libppd is not needed. diff --git a/INSTALL.md b/INSTALL.md deleted file mode 100644 index bd818531..00000000 --- a/INSTALL.md +++ /dev/null @@ -1,74 +0,0 @@ - -# OpenPrinting libppd v2.0.0 Installation Guide ------------------------------------------------------------- - -## Overview - -This guide provides instructions for compiling and installing OpenPrinting libppd version 2.0.0 from source code. For more details, refer to "README.md" and for a change log, see "CHANGES.md". - -### Before You Begin - -#### Prerequisites -- ANSI-compliant C and C++ compilers (tested with several versions of GCC) -- make program and POSIX-compliant shell (/bin/sh) -- GNU make recommended (especially for BSD users) - -#### Dependencies -- libcups of CUPS 2.2.2 or newer -- libcupsfilters 2.0.0 or newer - -### Compiling the GIT Repository Code -- libppd GIT repository does not include a pre-built configure script. -- Run GNU autoconf (2.65 or higher) to create it: - ``` - ./autogen.sh - ``` - -### Configuration -- Use the "configure" script in the main directory: - ``` - ./configure - ``` -- Default installation path is "/usr". -- For custom installation path, use the "--prefix" option: - ``` - ./configure --prefix=/some/directory - ``` -- Use `./configure --help` for all configuration options. -- Set environment variables for libraries in non-default locations. - -### Building the Software -- Run `make` (or `gmake` for BSD systems) to build the software. - -### Installing the Software -- After building, install the software with: - ``` - make install - ``` -- For BSD systems: - ``` - gmake install - ``` - -### Packaging for Operating System Distributions -- libppd is for retro-fitting legacy CUPS drivers using PPD files. -- Needed if Printer Applications are installed as classic packages (RPM, DEB). -- Not required for Printer Application Snaps or for modern IPP printers only. - -## Installing Required Tools - -### For Debian/Ubuntu-based Systems -- Install C and C++ compilers, make, autoconf: - ``` - sudo apt-get install build-essential autoconf - ``` -- Install libcups and libcupsfilters - -### For Red Hat/Fedora-based Systems -- Install C and C++ compilers, make, autoconf: - ``` - sudo dnf install gcc gcc-c++ make autoconf - ``` -- Install libcups and libcupsfilters: - -Note: The above commands are for common Linux distributions. For other operating systems or distributions, refer to respective package management instructions.