commit cf755be0ec3c5ee31fa5a0634f3ef197f6cd6847 Author: MSVSphere Packaging Team Date: Fri Oct 25 14:07:08 2024 +0300 import c2esp-2.7-33.el10 diff --git a/.c2esp.metadata b/.c2esp.metadata new file mode 100644 index 0000000..202e2d3 --- /dev/null +++ b/.c2esp.metadata @@ -0,0 +1 @@ +628f76dd61d81b6fcabb458644f0426f4ed34c34 SOURCES/c2esp-27.tar.gz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5aea36e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/c2esp-27.tar.gz diff --git a/SOURCES/c2esp-c99.patch b/SOURCES/c2esp-c99.patch new file mode 100644 index 0000000..70d145b --- /dev/null +++ b/SOURCES/c2esp-c99.patch @@ -0,0 +1,14 @@ +Include for the strncasecmp function. + +diff --git a/src/command2esp.c b/src/command2esp.c +index 529342c99c5c5f52..c1acdb16a1ec2f1c 100644 +--- a/src/command2esp.c ++++ b/src/command2esp.c +@@ -44,6 +44,7 @@ Maintenance=003? + #include + #include //FlushBackChannel, and the side channel functions and constants + #include "string.h" ++#include + #include + #include //files + #include //time functions used for debugging diff --git a/SOURCES/c2esp-ftbfs-gcc7.patch b/SOURCES/c2esp-ftbfs-gcc7.patch new file mode 100644 index 0000000..8b65eaa --- /dev/null +++ b/SOURCES/c2esp-ftbfs-gcc7.patch @@ -0,0 +1,23 @@ +diff -up c2esp-27/src/c2espC.c.ftbfs-gcc7 c2esp-27/src/c2espC.c +diff -up c2esp-27/src/c2espcommon.c.ftbfs-gcc7 c2esp-27/src/c2espcommon.c +--- c2esp-27/src/c2espcommon.c.ftbfs-gcc7 2017-03-03 14:10:28.018395128 +0100 ++++ c2esp-27/src/c2espcommon.c 2017-03-03 14:19:26.967383931 +0100 +@@ -24,6 +24,7 @@ + #include //files + #include //for chmod + #include //time functions used for debugging ++#include + + #if HAVE_CUPSFILTERS_DRIVER_H == 1 + #include //has the dither functions +diff -up c2esp-27/src/c2espcommon.h.ftbfs-gcc7 c2esp-27/src/c2espcommon.h +--- c2esp-27/src/c2espcommon.h.ftbfs-gcc7 2017-03-03 14:25:54.186413550 +0100 ++++ c2esp-27/src/c2espcommon.h 2017-03-03 14:26:53.105961575 +0100 +@@ -21,6 +21,7 @@ + #include //FlushBackChannel, and the side channel functions and constants + #include //files + #include //time functions used for debugging ++#include //library for stderr, stdout, stdin - because of gcc7, it needed to be included + + /* + * Constants... diff --git a/SOURCES/c2esp-gcc10.patch b/SOURCES/c2esp-gcc10.patch new file mode 100644 index 0000000..18dff75 --- /dev/null +++ b/SOURCES/c2esp-gcc10.patch @@ -0,0 +1,33 @@ +diff --git a/src/c2espcommon.c b/src/c2espcommon.c +index 51291f7..409e7f6 100644 +--- a/src/c2espcommon.c ++++ b/src/c2espcommon.c +@@ -43,11 +43,11 @@ + * Globals... + */ + char CallerName[50]; /* String that identifies the calling program */ +-int DoBack; /* Enables the back channel comms */ ++extern int DoBack; /* Enables the back channel comms */ + char BackBuf[32000]; //for the back channel replies from the printer + int BackBufLen=sizeof(BackBuf)-1; + FILE *LogFile = NULL; //file descriptor for log file +-time_t StartTime; ++extern time_t StartTime; + int BlackPercent, ColourPercent; + + time_t KeepAwake(time_t Start, int Interval, FILE *PrintFile) +diff --git a/src/c2espcommon.h b/src/c2espcommon.h +index b726204..967e9ce 100644 +--- a/src/c2espcommon.h ++++ b/src/c2espcommon.h +@@ -35,8 +35,8 @@ + /* + * Globals... + */ +-char BackBuf[32000]; //for the back channel replies from the printer +-int ColourPercent, BlackPercent; //to store the detected marker levels ++extern char BackBuf[32000]; //for the back channel replies from the printer ++extern int ColourPercent, BlackPercent; //to store the detected marker levels + + + time_t KeepAwake(time_t Start, int Interval, FILE *PrintFile); diff --git a/SOURCES/c2esp-use-libcupsfilters.patch b/SOURCES/c2esp-use-libcupsfilters.patch new file mode 100644 index 0000000..39fd051 --- /dev/null +++ b/SOURCES/c2esp-use-libcupsfilters.patch @@ -0,0 +1,152 @@ +diff --git a/configure.ac b/configure.ac +index bdec0ec..ec9c8ae 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -19,11 +19,11 @@ AC_CHECK_PROG(HAVE_CUPSCONFIG, cups-config, 1) + AC_CHECK_LIB(cups, ppdOpenFile) + + #-lcupsdriver for cups < ver 1.6 +-AC_SEARCH_LIBS(cupsDitherNew, cupsdriver cupsfilters) +-if test "$ac_cv_search_cupsDitherNew" = "-lcupsdriver"; then : ++AC_SEARCH_LIBS(cfDitherNew, cupsdriver cupsfilters) ++if test "$ac_cv_search_cfDitherNew" = "-lcupsdriver"; then : + HAVE_LIBCUPSDRIVER="1" + fi +-if test "$ac_cv_search_cupsDitherNew" = "-lcupsfilters"; then : ++if test "$ac_cv_search_cfDitherNew" = "-lcupsfilters"; then : + HAVE_LIBCUPSFILTERS="1" + fi + +@@ -40,6 +40,8 @@ fi + AC_SEARCH_LIBS(jbg85_enc_init, jbig85 jbig) + JBIG85LIB=$ac_cv_search_jbg85_enc_init + ++AC_SEARCH_LIBS(ppdCMYKLoad, ppd) ++ + # Checks for header files. + AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h cups/raster.h cups/sidechannel.h]) + AC_CHECK_HEADERS([cups/image.h cups/driver.h]) +diff --git a/src/c2esp.c b/src/c2esp.c +index 2e73310..cc614bf 100644 +--- a/src/c2esp.c ++++ b/src/c2esp.c +@@ -44,6 +44,7 @@ If you want to compile with the DEBUGFILES or TESTING options, they should be se + + #if HAVE_CUPSFILTERS_DRIVER_H == 1 + #include //has the dither functions ++#include //has ppdCMYKLoad() + #else + #include //has the dither functions + #endif +@@ -522,7 +523,7 @@ void PrintOneStripe (unsigned char *buf, int Stripe, int StripeHeight, cups_page + } //end of stripe with print + } + +-void SetUpDither(cups_lut_t *Lut[], cups_dither_t *DitherState[], int LineWidth, int OutBits) ++void SetUpDither(cf_lut_t *Lut[], cf_dither_t *DitherState[], int LineWidth, int OutBits) + { + //Creates Luts and DitherStates for dithering + +@@ -530,14 +531,14 @@ void SetUpDither(cups_lut_t *Lut[], cups_dither_t *DitherState[], int LineWidth, + for(Col=0;Col<3;++Col) + { + //For CMY or RGB +- if(OutBits == 2) Lut[Col] = cupsLutNew(3, default_lut3); +- else Lut[Col] = cupsLutNew(2, default_lut2); +- DitherState[Col] = cupsDitherNew(LineWidth); ++ if(OutBits == 2) Lut[Col] = cfLutNew(3, default_lut3, NULL, NULL); ++ else Lut[Col] = cfLutNew(2, default_lut2, NULL, NULL); ++ DitherState[Col] = cfDitherNew(LineWidth); + } + //For Kk +- if(OutBits == 2) Lut[3] = cupsLutNew(5, default_lut5); +- else Lut[3] = cupsLutNew(3, default_lut3); +- DitherState[3] = cupsDitherNew(LineWidth); ++ if(OutBits == 2) Lut[3] = cfLutNew(5, default_lut5, NULL, NULL); ++ else Lut[3] = cfLutNew(3, default_lut3, NULL, NULL); ++ DitherState[3] = cfDitherNew(LineWidth); + } + + unsigned char Dithered8ToPrint(unsigned char *Buffer, int x, int Level) +@@ -672,7 +673,7 @@ void LetAllRead(char *Fname) + + + void +-Terminate(cups_raster_t *ras,int fd,cups_dither_t **DitherState,cups_lut_t **Lut) ++Terminate(cups_raster_t *ras,int fd,cf_dither_t **DitherState,cf_lut_t **Lut) + { + int CloseError, Col; + +@@ -691,8 +692,8 @@ int CloseError, Col; + //free the dither states + for(Col = 0; Col < 4 ;++Col) + { +- cupsDitherDelete(DitherState[Col]); +- cupsLutDelete(Lut[Col]); ++ cfDitherDelete(DitherState[Col]); ++ cfLutDelete(Lut[Col]); + } + /* + * Termination, send an error message if required... +@@ -782,7 +783,7 @@ SaveDitherOut(cups_page_header2_t *header, int Col, int BlankColour,FILE *Dither + } + } + +-void DitherProcess(cups_lut_t **Lut, cups_dither_t **DitherState, cups_page_header2_t *header, int Col, int *BlankColour) ++void DitherProcess(cf_lut_t **Lut, cf_dither_t **DitherState, cups_page_header2_t *header, int Col, int *BlankColour) + { + //convert the bits in CupsLineBuffer to short ints in DitherInputBuffer for the current colour + //checking if it's blank as we go +@@ -833,7 +834,7 @@ void DitherProcess(cups_lut_t **Lut, cups_dither_t **DitherState, cups_page_head + //if(y == 0) DoLog("Dither stage colour %d line %d\n", Col, y); + if(*BlankColour==0) + { +- cupsDitherLine(DitherState[Col], Lut[Col], DitherInputBuffer, 1, DitherOutputBuffer); ++ cfDitherLine(DitherState[Col], Lut[Col], DitherInputBuffer, 1, DitherOutputBuffer); + // full scale input is 4095. output is the index in the lut. + } + if(Col == MonitorColour) //0=cyan 1=mag 2=yellow 3=black +@@ -944,8 +945,8 @@ main(int argc, char *argv[]) /* I - Number of command-line arguments, Command- + ppd_file_t *ppd; /* PPD file */ + cups_raster_t *ras; /* Raster stream from cups */ + cups_page_header2_t header; /* Page header from cups */ +- cups_cmyk_t *cmykTrans300; /* cmyk transform for cups 300dpi*/ +- cups_cmyk_t *cmykTrans600; /* cmyk transform for cups 600dpi*/ ++ cf_cmyk_t *cmykTrans300; /* cmyk transform for cups 300dpi*/ ++ cf_cmyk_t *cmykTrans600; /* cmyk transform for cups 600dpi*/ + int RemainingPixels; + int Stripe, y; + int StripeEnd; //index of last byte in current stripe +@@ -953,8 +954,8 @@ main(int argc, char *argv[]) /* I - Number of command-line arguments, Command- + int Col,i,x; + int BlankColour; //boolean to record if the line is blank to save time + int argi; +- cups_lut_t *Lut[4]; /* Dither lookup tables */ +- cups_dither_t *DitherState[4]; /* Dither states */ ++ cf_lut_t *Lut[4]; /* Dither lookup tables */ ++ cf_dither_t *DitherState[4]; /* Dither states */ + long RasForCompHeight; + + StartTime = time(NULL); +@@ -1042,8 +1043,8 @@ main(int argc, char *argv[]) /* I - Number of command-line arguments, Command- + if(ppd) + { + DoLog("Opened ppd OK. Reading from ppd\n",0,0); +- cmykTrans300 = cupsCMYKLoad(ppd, "RGB", "", "300x1200dpi"); +- cmykTrans600 = cupsCMYKLoad(ppd, "RGB", "", "600x1200dpi"); ++ cmykTrans300 = ppdCMYKLoad(ppd, "RGB", "", "300x1200dpi", NULL, NULL); ++ cmykTrans600 = ppdCMYKLoad(ppd, "RGB", "", "600x1200dpi", NULL, NULL); + ppdClose(ppd); + DoLog("InkChannels 300dpi=%d 600dpi=%d\n",cmykTrans300->num_channels,cmykTrans600->num_channels); + } +@@ -1233,8 +1234,8 @@ main(int argc, char *argv[]) /* I - Number of command-line arguments, Command- + if (header.cupsColorSpace == CUPS_CSPACE_RGB) + { + if(y == 0) DoLog("Doing transform & dither (CMYK) stripe %d line %d\n", Stripe, y); +- if(header.HWResolution[0] == 300) cupsCMYKDoRGB(cmykTrans300, CupsLineBuffer, TransformedBuffer, RemainingPixels); +- else cupsCMYKDoRGB(cmykTrans600, CupsLineBuffer, TransformedBuffer, RemainingPixels); ++ if(header.HWResolution[0] == 300) cfCMYKDoRGB(cmykTrans300, CupsLineBuffer, TransformedBuffer, RemainingPixels); ++ else cfCMYKDoRGB(cmykTrans600, CupsLineBuffer, TransformedBuffer, RemainingPixels); + // cupsDoRGB scales up to 4096 a short int from the unsigned char input 255 + for(Col = 0; Col<4; ++Col) + { diff --git a/SPECS/c2esp.spec b/SPECS/c2esp.spec new file mode 100644 index 0000000..1562062 --- /dev/null +++ b/SPECS/c2esp.spec @@ -0,0 +1,177 @@ +%global version_no_dot 27 + +Name: c2esp +Version: 2.7 +Release: 33%{?dist} +Summary: CUPS driver for Kodak AiO printers + +License: GPL-2.0-or-later +URL: http://sourceforge.net/projects/cupsdriverkodak/ +Source0: http://downloads.sourceforge.net/cupsdriverkodak/c2esp-%{version_no_dot}.tar.gz + +Patch01: c2esp-ftbfs-gcc7.patch +Patch02: c2esp-gcc10.patch +Patch03: c2esp-c99.patch +Patch04: c2esp-use-libcupsfilters.patch + + +# for autoreconf +BuildRequires: autoconf +BuildRequires: automake +# _cups_serverbin macro +BuildRequires: cups-devel +# Needs gcc for compilation +BuildRequires: gcc +# for autosetup +BuildRequires: git-core +# JBIG1 lossless image compression +BuildRequires: jbigkit-devel +# cupsfilters/image.h +BuildRequires: libcupsfilters-devel +# for ppdCMYKLoad() +BuildRequires: libppd-devel +# uses make +BuildRequires: make +# postscriptdriver tags +BuildRequires: python3-cups + +# directory structure +Requires: cups-filesystem + +%description +CUPS filters and drivers for Kodak ESP and Hero all in one printers. + +%prep +%autosetup -n c2esp-%{version_no_dot} -S git + + +%build +# c2esp-use-libcupsfilters.patch changes configure.ac, regenerate configure script +autoreconf -vfi + +%configure +make %{_smp_mflags} -C src/ + +%install +# do not install doc/ or scripts/ +make -C src/ install DESTDIR=%{buildroot} + +%files +%license doc/COPYING +%doc doc/README +%{_cups_serverbin}/filter/c2esp +%{_cups_serverbin}/filter/c2espC +%{_cups_serverbin}/filter/command2esp +%{_datadir}/cups/drv/c2esp + +%changelog +* Fri Oct 25 2024 MSVSphere Packaging Team - 2.7-33 +- Rebuilt for MSVSphere 10 + +* Mon Jun 24 2024 Troy Dawson - 2.7-33 +- Bump release for June 2024 mass rebuild + +* Tue Jan 23 2024 Fedora Release Engineering - 2.7-32 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 2.7-31 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Jul 26 2023 Zdenek Dohnal - 2.7-30 +- SPDX migration + +* Wed Jul 19 2023 Fedora Release Engineering - 2.7-29 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Feb 15 2023 Zdenek Dohnal - 2.7-28 +- move to libcupsfilters-devel and libppd-devel + +* Wed Jan 18 2023 Fedora Release Engineering - 2.7-27 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sun Dec 11 2022 Florian Weimer - 2.7-26 +- Port to C99 (#2152430) + +* Wed Jul 20 2022 Fedora Release Engineering - 2.7-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Wed Jan 19 2022 Fedora Release Engineering - 2.7-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Jul 21 2021 Fedora Release Engineering - 2.7-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jan 26 2021 Fedora Release Engineering - 2.7-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Thu Nov 05 2020 Zdenek Dohnal - 2.7-21 +- make is no more in buildroot by default + +* Mon Jul 27 2020 Fedora Release Engineering - 2.7-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Feb 03 2020 Zdenek Dohnal - 2.7-19 +- FTBFS with GCC 10 + +* Tue Jan 28 2020 Fedora Release Engineering - 2.7-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Jul 24 2019 Fedora Release Engineering - 2.7-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu Jan 31 2019 Fedora Release Engineering - 2.7-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Thu Jul 12 2018 Fedora Release Engineering - 2.7-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Mon Feb 19 2018 Zdenek Dohnal - 2.7-14 +- gcc is no longer in buildroot by default + +* Wed Feb 07 2018 Fedora Release Engineering - 2.7-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Aug 02 2017 Fedora Release Engineering - 2.7-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 2.7-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Mar 03 2017 Zdenek Dohnal - 2.7-10 +- 1423287 - c2esp: FTBFS in rawhide + +* Fri Feb 10 2017 Fedora Release Engineering - 2.7-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Feb 03 2016 Fedora Release Engineering - 2.7-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Nov 26 2015 Jiri Popelka - 2.7-7 +- BuildRequires: python3-cups + +* Wed Jun 17 2015 Fedora Release Engineering - 2.7-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Fri Aug 15 2014 Fedora Release Engineering - 2.7-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Wed Aug 13 2014 Jiri Popelka - 2.7-4 +- Rebuilt against jbigkit-2.1 + +* Sat Jun 07 2014 Fedora Release Engineering - 2.7-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Mon Jan 27 2014 Jiri Popelka - 2.7-2 +- upstream updated tarball + +* Sun Dec 29 2013 Jiri Popelka - 2.7-1 +- 2.7 + +* Thu Dec 19 2013 Jiri Popelka - 2.7-0.1.rc1 +- 2.7~rc1 + +* Sat Aug 03 2013 Fedora Release Engineering - 2.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu May 09 2013 Jiri Popelka - 2.6-1 +- initial build