diff options
author | Sam James <sam@gentoo.org> | 2024-04-08 17:24:26 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-04-08 17:34:17 +0100 |
commit | fc2412c04c278b9140cdedf3b2d24ea3bbe9a415 (patch) | |
tree | 647c112a0b5e82c3d94ed3cb9a052534fffc4a86 /dev-perl | |
parent | dev-util/diffoscope: add 263 (diff) | |
download | gentoo-fc2412c04c278b9140cdedf3b2d24ea3bbe9a415.tar.gz gentoo-fc2412c04c278b9140cdedf3b2d24ea3bbe9a415.tar.bz2 gentoo-fc2412c04c278b9140cdedf3b2d24ea3bbe9a415.zip |
dev-perl/Net-CUPS: fix build w/ libcupsfilters-2
Closes: https://bugs.gentoo.org/921638
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-perl')
-rw-r--r-- | dev-perl/Net-CUPS/Net-CUPS-0.640.0-r2.ebuild | 31 | ||||
-rw-r--r-- | dev-perl/Net-CUPS/files/Net-CUPS-0.640.0-libcupsfilters-2.patch | 340 |
2 files changed, 371 insertions, 0 deletions
diff --git a/dev-perl/Net-CUPS/Net-CUPS-0.640.0-r2.ebuild b/dev-perl/Net-CUPS/Net-CUPS-0.640.0-r2.ebuild new file mode 100644 index 000000000000..eabcf205c369 --- /dev/null +++ b/dev-perl/Net-CUPS/Net-CUPS-0.640.0-r2.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DIST_AUTHOR=NINE +DIST_VERSION=0.64 +DIST_EXAMPLES=( "examples/*" ) +inherit perl-module + +DESCRIPTION="CUPS C API Interface" + +SLOT="0" +KEYWORDS="~amd64 ~x86" + +# TODO: Do we really need cups-filters here too? +RDEPEND=" + net-print/cups + net-print/cups-filters + >=net-print/libcupsfilters-2 +" +BDEPEND=" + ${RDEPEND} + virtual/perl-ExtUtils-MakeMaker + test? ( virtual/perl-Test-Simple ) +" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/Net-CUPS-0.640.0-libcupsfilters-2.patch +) diff --git a/dev-perl/Net-CUPS/files/Net-CUPS-0.640.0-libcupsfilters-2.patch b/dev-perl/Net-CUPS/files/Net-CUPS-0.640.0-libcupsfilters-2.patch new file mode 100644 index 000000000000..0d8cebd48554 --- /dev/null +++ b/dev-perl/Net-CUPS/files/Net-CUPS-0.640.0-libcupsfilters-2.patch @@ -0,0 +1,340 @@ +https://bugs.gentoo.org/921638 +https://rt.cpan.org/Public/Bug/Display.html?id=150529 +https://launchpadlibrarian.net/698897992/libnet-cups-perl_0.64-3_0.64-3ubuntu1.diff.gz +https://git.launchpad.net/ubuntu/+source/libnet-cups-perl/tree/debian/patches/cupsfilters-2.0.patch?id=a47b8df8551853c12a7f965ae60bb52333883c88 + +Description: Fix build against libcupsfilters 2.0 + With version 2.0, libcupsfilters renamed some of the constants to make the API + consistent. Update the code accordingly. + https://github.com/OpenPrinting/libcupsfilters/blob/26f9c3fb7c8eb3451f517da0fd91870534fac842/CHANGES.md +Author: Olivier Gayot <olivier.gayot@canonical.com> +Bug-Ubuntu: https://launchpad.net/bugs/2044113 +Forwarded: not-needed +Last-Update: 2023-11-21 +--- a/Makefile.PL 2016-07-21 08:49:51.595781877 +0200 ++++ b/Makefile.PL 2023-11-21 11:48:07.383851727 +0100 +@@ -82,6 +82,12 @@ + + my @names = ( + { name => "AF_LOCAL", macro => "1" }, ++ { name => "CF_IMAGE_BLACK", macro => "1" }, ++ { name => "CF_IMAGE_CMY", macro => "1" }, ++ { name => "CF_IMAGE_CMYK", macro => "1" }, ++ { name => "CF_IMAGE_RGB", macro => "1" }, ++ { name => "CF_IMAGE_RGB_CMYK", macro => "1" }, ++ { name => "CF_IMAGE_WHITE", macro => "1" }, + { name => "CUPS_ACCEPT_JOBS", macro => "1" }, + { name => "CUPS_ADD_CLASS", macro => "1" }, + { name => "CUPS_ADD_MODIFY_CLASS", macro => "1" }, +@@ -112,12 +118,6 @@ + { name => "CUPS_GET_DEVICES", macro => "1" }, + { name => "CUPS_GET_PPDS", macro => "1" }, + { name => "CUPS_GET_PRINTERS", macro => "1" }, +- { name => "CUPS_IMAGE_BLACK", macro => "1" }, +- { name => "CUPS_IMAGE_CMY", macro => "1" }, +- { name => "CUPS_IMAGE_CMYK", macro => "1" }, +- { name => "CUPS_IMAGE_RGB", macro => "1" }, +- { name => "CUPS_IMAGE_RGB_CMYK", macro => "1" }, +- { name => "CUPS_IMAGE_WHITE", macro => "1" }, + { name => "CUPS_ISO8859_1", macro => "1" }, + { name => "CUPS_ISO8859_10", macro => "1" }, + { name => "CUPS_ISO8859_11", macro => "1" }, +--- a/fallback/const-c.inc 2008-05-08 04:43:32.000000000 +0200 ++++ b/fallback/const-c.inc 2023-11-21 11:45:30.133345667 +0100 +@@ -651,7 +651,7 @@ + constant_14 (pTHX_ const char *name, IV *iv_return) { + /* When generated this function returned values for the list of names given + here. However, subsequent manual editing may have added or removed some. +- CUPS_ADD_CLASS CUPS_FILE_GZIP CUPS_FILE_NONE CUPS_IMAGE_CMY CUPS_IMAGE_RGB ++ CUPS_ADD_CLASS CUPS_FILE_GZIP CUPS_FILE_NONE CF_IMAGE_CMY CF_IMAGE_RGB + CUPS_ISO8859_1 CUPS_ISO8859_2 CUPS_ISO8859_3 CUPS_ISO8859_4 CUPS_ISO8859_5 + CUPS_ISO8859_6 CUPS_ISO8859_7 CUPS_ISO8859_8 CUPS_ISO8859_9 CUPS_MAC_ROMAN + HTTP_AUTH_NONE HTTP_FIELD_MAX HTTP_FORBIDDEN HTTP_MAX_VALUE HTTP_NOT_FOUND +@@ -725,9 +725,9 @@ + } + break; + case 'B': +- if (memEQ(name, "CUPS_IMAGE_RG", 13)) { ++ if (memEQ(name, "CF_IMAGE_RG", 13)) { + /* B */ +- *iv_return = CUPS_IMAGE_RGB; ++ *iv_return = CF_IMAGE_RGB; + return PERL_constant_ISIV; + } + if (memEQ(name, "IPP_CANCEL_JO", 13)) { +@@ -884,9 +884,9 @@ + } + break; + case 'Y': +- if (memEQ(name, "CUPS_IMAGE_CM", 13)) { ++ if (memEQ(name, "CF_IMAGE_CM", 13)) { + /* Y */ +- *iv_return = CUPS_IMAGE_CMY; ++ *iv_return = CF_IMAGE_CMY; + return PERL_constant_ISIV; + } + if (memEQ(name, "HTTP_USE_PROX", 13)) { +@@ -903,7 +903,7 @@ + constant_15 (pTHX_ const char *name, IV *iv_return) { + /* When generated this function returned values for the list of names given + here. However, subsequent manual editing may have added or removed some. +- CUPS_BACKEND_OK CUPS_IMAGE_CMYK CUPS_ISO8859_10 CUPS_ISO8859_11 ++ CUPS_BACKEND_OK CF_IMAGE_CMYK CUPS_ISO8859_10 CUPS_ISO8859_11 + CUPS_ISO8859_13 CUPS_ISO8859_14 CUPS_ISO8859_15 CUPS_ISO8859_16 + CUPS_PRINTER_BW HTTP_AUTH_BASIC HTTP_FIELD_DATE HTTP_FIELD_HOST + HTTP_FIELD_LINK HTTP_MAX_BUFFER HTTP_NO_CONTENT IPP_BAD_REQUEST +@@ -1029,9 +1029,9 @@ + *iv_return = CUPS_BACKEND_OK; + return PERL_constant_ISIV; + } +- if (memEQ(name, "CUPS_IMAGE_CMY", 14)) { ++ if (memEQ(name, "CF_IMAGE_CMY", 14)) { + /* K */ +- *iv_return = CUPS_IMAGE_CMYK; ++ *iv_return = CF_IMAGE_CMYK; + return PERL_constant_ISIV; + } + if (memEQ(name, "HTTP_FIELD_LIN", 14)) { +@@ -1136,7 +1136,7 @@ + /* When generated this function returned values for the list of names given + here. However, subsequent manual editing may have added or removed some. + CUPS_ACCEPT_JOBS CUPS_ADD_PRINTER CUPS_GET_CLASSES CUPS_GET_DEFAULT +- CUPS_GET_DEVICES CUPS_IMAGE_BLACK CUPS_IMAGE_WHITE CUPS_MAX_USTRING ++ CUPS_GET_DEVICES CF_IMAGE_BLACK CF_IMAGE_WHITE CUPS_MAX_USTRING + CUPS_PRINTER_FAX CUPS_REJECT_JOBS CUPS_SET_DEFAULT CUPS_WINDOWS_874 + CUPS_WINDOWS_932 CUPS_WINDOWS_936 CUPS_WINDOWS_949 CUPS_WINDOWS_950 + HTTP_BAD_GATEWAY HTTP_BAD_REQUEST HTTP_FIELD_RANGE HTTP_URI_BAD_URI +@@ -1176,9 +1176,9 @@ + } + break; + case 'A': +- if (memEQ(name, "CUPS_IMAGE_BLACK", 16)) { ++ if (memEQ(name, "CF_IMAGE_BLACK", 16)) { + /* ^ */ +- *iv_return = CUPS_IMAGE_BLACK; ++ *iv_return = CF_IMAGE_BLACK; + return PERL_constant_ISIV; + } + if (memEQ(name, "IPP_TAG_LANGUAGE", 16)) { +@@ -1233,9 +1233,9 @@ + } + break; + case 'I': +- if (memEQ(name, "CUPS_IMAGE_WHITE", 16)) { ++ if (memEQ(name, "CF_IMAGE_WHITE", 16)) { + /* ^ */ +- *iv_return = CUPS_IMAGE_WHITE; ++ *iv_return = CF_IMAGE_WHITE; + return PERL_constant_ISIV; + } + if (memEQ(name, "CUPS_MAX_USTRING", 16)) { +@@ -1855,7 +1855,7 @@ + /* When generated this function returned values for the list of names given + here. However, subsequent manual editing may have added or removed some. + CUPS_BACKEND_CANCEL CUPS_BACKEND_FAILED CUPS_DELETE_PRINTER +- CUPS_IMAGE_RGB_CMYK CUPS_PRINTER_COPIES CUPS_PRINTER_DELETE ++ CF_IMAGE_RGB_CMYK CUPS_PRINTER_COPIES CUPS_PRINTER_DELETE + CUPS_PRINTER_DUPLEX CUPS_PRINTER_MEDIUM CUPS_PRINTER_REMOTE + CUPS_PRINTER_STAPLE HTTP_ENCODE_CHUNKED HTTP_ENCRYPT_ALWAYS + HTTP_FIELD_LOCATION HTTP_NOT_ACCEPTABLE HTTP_URI_BAD_SCHEME +@@ -1903,9 +1903,9 @@ + } + break; + case 'C': +- if (memEQ(name, "CUPS_IMAGE_RGB_CMYK", 19)) { ++ if (memEQ(name, "CF_IMAGE_RGB_CMYK", 19)) { + /* ^ */ +- *iv_return = CUPS_IMAGE_RGB_CMYK; ++ *iv_return = CF_IMAGE_RGB_CMYK; + return PERL_constant_ISIV; + } + if (memEQ(name, "PPD_CUSTOM_PASSCODE", 19)) { +@@ -3319,6 +3319,12 @@ + my $types = {map {($_, 1)} qw(IV)}; + my @names = (qw(INET6), + {name=>"AF_LOCAL", type=>"IV", macro=>"1"}, ++ {name=>"CF_IMAGE_BLACK", type=>"IV", macro=>"1"}, ++ {name=>"CF_IMAGE_CMY", type=>"IV", macro=>"1"}, ++ {name=>"CF_IMAGE_CMYK", type=>"IV", macro=>"1"}, ++ {name=>"CF_IMAGE_RGB", type=>"IV", macro=>"1"}, ++ {name=>"CF_IMAGE_RGB_CMYK", type=>"IV", macro=>"1"}, ++ {name=>"CF_IMAGE_WHITE", type=>"IV", macro=>"1"}, + {name=>"CUPS_ACCEPT_JOBS", type=>"IV", macro=>"1"}, + {name=>"CUPS_ADD_CLASS", type=>"IV", macro=>"1"}, + {name=>"CUPS_ADD_MODIFY_CLASS", type=>"IV", macro=>"1"}, +@@ -3349,12 +3355,6 @@ + {name=>"CUPS_GET_DEVICES", type=>"IV", macro=>"1"}, + {name=>"CUPS_GET_PPDS", type=>"IV", macro=>"1"}, + {name=>"CUPS_GET_PRINTERS", type=>"IV", macro=>"1"}, +- {name=>"CUPS_IMAGE_BLACK", type=>"IV", macro=>"1"}, +- {name=>"CUPS_IMAGE_CMY", type=>"IV", macro=>"1"}, +- {name=>"CUPS_IMAGE_CMYK", type=>"IV", macro=>"1"}, +- {name=>"CUPS_IMAGE_RGB", type=>"IV", macro=>"1"}, +- {name=>"CUPS_IMAGE_RGB_CMYK", type=>"IV", macro=>"1"}, +- {name=>"CUPS_IMAGE_WHITE", type=>"IV", macro=>"1"}, + {name=>"CUPS_ISO8859_1", type=>"IV", macro=>"1"}, + {name=>"CUPS_ISO8859_10", type=>"IV", macro=>"1"}, + {name=>"CUPS_ISO8859_11", type=>"IV", macro=>"1"}, +--- a/lib/Net/CUPS.pm 2017-06-08 20:09:35.818415994 +0200 ++++ b/lib/Net/CUPS.pm 2023-11-21 11:47:36.988812502 +0100 +@@ -23,6 +23,12 @@ + # will save memory. + our %EXPORT_TAGS = ( 'all' => [ qw( + AF_LOCAL ++ CF_IMAGE_BLACK ++ CF_IMAGE_CMY ++ CF_IMAGE_CMYK ++ CF_IMAGE_RGB ++ CF_IMAGE_RGB_CMYK ++ CF_IMAGE_WHITE + CUPS_ACCEPT_JOBS + CUPS_ADD_CLASS + CUPS_ADD_MODIFY_CLASS +@@ -53,12 +59,6 @@ + CUPS_GET_DEVICES + CUPS_GET_PPDS + CUPS_GET_PRINTERS +- CUPS_IMAGE_BLACK +- CUPS_IMAGE_CMY +- CUPS_IMAGE_CMYK +- CUPS_IMAGE_RGB +- CUPS_IMAGE_RGB_CMYK +- CUPS_IMAGE_WHITE + CUPS_ISO8859_1 + CUPS_ISO8859_10 + CUPS_ISO8859_11 +@@ -493,6 +493,12 @@ + + our @EXPORT = qw( + AF_LOCAL ++ CF_IMAGE_BLACK ++ CF_IMAGE_CMY ++ CF_IMAGE_CMYK ++ CF_IMAGE_RGB ++ CF_IMAGE_RGB_CMYK ++ CF_IMAGE_WHITE + CUPS_ACCEPT_JOBS + CUPS_ADD_CLASS + CUPS_ADD_MODIFY_CLASS +@@ -523,12 +529,6 @@ + CUPS_GET_DEVICES + CUPS_GET_PPDS + CUPS_GET_PRINTERS +- CUPS_IMAGE_BLACK +- CUPS_IMAGE_CMY +- CUPS_IMAGE_CMYK +- CUPS_IMAGE_RGB +- CUPS_IMAGE_RGB_CMYK +- CUPS_IMAGE_WHITE + CUPS_ISO8859_1 + CUPS_ISO8859_10 + CUPS_ISO8859_11 +--- a/lib/Net/CUPS/Destination.pm 2017-06-08 20:06:22.597793032 +0200 ++++ b/lib/Net/CUPS/Destination.pm 2023-11-21 11:47:22.985270272 +0100 +@@ -25,6 +25,12 @@ + # will save memory. + our %EXPORT_TAGS = ( 'all' => [ qw( + AF_LOCAL ++ CF_IMAGE_BLACK ++ CF_IMAGE_CMY ++ CF_IMAGE_CMYK ++ CF_IMAGE_RGB ++ CF_IMAGE_RGB_CMYK ++ CF_IMAGE_WHITE + CUPS_ACCEPT_JOBS + CUPS_ADD_CLASS + CUPS_ADD_MODIFY_CLASS +@@ -55,12 +61,6 @@ + CUPS_GET_DEVICES + CUPS_GET_PPDS + CUPS_GET_PRINTERS +- CUPS_IMAGE_BLACK +- CUPS_IMAGE_CMY +- CUPS_IMAGE_CMYK +- CUPS_IMAGE_RGB +- CUPS_IMAGE_RGB_CMYK +- CUPS_IMAGE_WHITE + CUPS_ISO8859_1 + CUPS_ISO8859_10 + CUPS_ISO8859_11 +@@ -495,6 +495,12 @@ + + our @EXPORT = qw( + AF_LOCAL ++ CF_IMAGE_BLACK ++ CF_IMAGE_CMY ++ CF_IMAGE_CMYK ++ CF_IMAGE_RGB ++ CF_IMAGE_RGB_CMYK ++ CF_IMAGE_WHITE + CUPS_ACCEPT_JOBS + CUPS_ADD_CLASS + CUPS_ADD_MODIFY_CLASS +@@ -525,12 +531,6 @@ + CUPS_GET_DEVICES + CUPS_GET_PPDS + CUPS_GET_PRINTERS +- CUPS_IMAGE_BLACK +- CUPS_IMAGE_CMY +- CUPS_IMAGE_CMYK +- CUPS_IMAGE_RGB +- CUPS_IMAGE_RGB_CMYK +- CUPS_IMAGE_WHITE + CUPS_ISO8859_1 + CUPS_ISO8859_10 + CUPS_ISO8859_11 +--- a/lib/Net/CUPS/PPD.pm 2016-07-21 08:53:57.946509846 +0200 ++++ b/lib/Net/CUPS/PPD.pm 2023-11-21 11:47:08.169765381 +0100 +@@ -25,6 +25,12 @@ + # will save memory. + our %EXPORT_TAGS = ( 'all' => [ qw( + AF_LOCAL ++ CF_IMAGE_BLACK ++ CF_IMAGE_CMY ++ CF_IMAGE_CMYK ++ CF_IMAGE_RGB ++ CF_IMAGE_RGB_CMYK ++ CF_IMAGE_WHITE + CUPS_ACCEPT_JOBS + CUPS_ADD_CLASS + CUPS_ADD_MODIFY_CLASS +@@ -55,12 +61,6 @@ + CUPS_GET_DEVICES + CUPS_GET_PPDS + CUPS_GET_PRINTERS +- CUPS_IMAGE_BLACK +- CUPS_IMAGE_CMY +- CUPS_IMAGE_CMYK +- CUPS_IMAGE_RGB +- CUPS_IMAGE_RGB_CMYK +- CUPS_IMAGE_WHITE + CUPS_ISO8859_1 + CUPS_ISO8859_10 + CUPS_ISO8859_11 +@@ -498,6 +498,12 @@ + + our @EXPORT = qw( + AF_LOCAL ++ CF_IMAGE_BLACK ++ CF_IMAGE_CMY ++ CF_IMAGE_CMYK ++ CF_IMAGE_RGB ++ CF_IMAGE_RGB_CMYK ++ CF_IMAGE_WHITE + CUPS_ACCEPT_JOBS + CUPS_ADD_CLASS + CUPS_ADD_MODIFY_CLASS +@@ -528,12 +534,6 @@ + CUPS_GET_DEVICES + CUPS_GET_PPDS + CUPS_GET_PRINTERS +- CUPS_IMAGE_BLACK +- CUPS_IMAGE_CMY +- CUPS_IMAGE_CMYK +- CUPS_IMAGE_RGB +- CUPS_IMAGE_RGB_CMYK +- CUPS_IMAGE_WHITE + CUPS_ISO8859_1 + CUPS_ISO8859_10 + CUPS_ISO8859_11 + |