From: Michael R Sweet Date: Wed, 7 May 2025 15:17:42 +0000 (-0400) Subject: Bump version to 2.4.13. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8e942ede6b3773b4bc28f00711774b555ce0ad1;p=thirdparty%2Fcups.git Bump version to 2.4.13. Drop macOS language bundle support since they don't match CUPS 2.4.x strings. --- diff --git a/Makedefs.in b/Makedefs.in index a2342d5c0b..6158e61d91 100644 --- a/Makedefs.in +++ b/Makedefs.in @@ -1,7 +1,7 @@ # # Common makefile definitions for CUPS. # -# Copyright © 2020-2024 by OpenPrinting. +# Copyright © 2020-2025 by OpenPrinting. # Copyright © 2007-2019 by Apple Inc. # Copyright © 1997-2007 by Easy Software Products, all rights reserved. # @@ -77,8 +77,6 @@ CUPS_LOG_FILE_PERM = @CUPS_LOG_FILE_PERM@ # LANGUAGES = @LANGUAGES@ -INSTALL_LANGUAGES = @INSTALL_LANGUAGES@ -UNINSTALL_LANGUAGES = @UNINSTALL_LANGUAGES@ # # Cross-compilation support: "local" target is used for any tools that are @@ -223,7 +221,6 @@ top_srcdir = @top_srcdir@ BUILDROOT = $(DSTROOT)$(DESTDIR) BINDIR = $(BUILDROOT)@bindir@ -BUNDLEDIR = @CUPS_BUNDLEDIR@ CACHEDIR = $(BUILDROOT)@CUPS_CACHEDIR@ DATADIR = $(BUILDROOT)@CUPS_DATADIR@ DOCDIR = $(BUILDROOT)@CUPS_DOCROOT@ @@ -239,7 +236,6 @@ RCLEVELS = @RCLEVELS@ RCSTART = @RCSTART@ RCSTOP = @RCSTOP@ REQUESTS = $(BUILDROOT)@CUPS_REQUESTS@ -RESOURCEDIR = @CUPS_RESOURCEDIR@ SBINDIR = $(BUILDROOT)@sbindir@ SERVERBIN = $(BUILDROOT)@CUPS_SERVERBIN@ SERVERROOT = $(BUILDROOT)@CUPS_SERVERROOT@ diff --git a/config-scripts/cups-defaults.m4 b/config-scripts/cups-defaults.m4 index 27e5bc4727..999a8849de 100644 --- a/config-scripts/cups-defaults.m4 +++ b/config-scripts/cups-defaults.m4 @@ -1,7 +1,7 @@ dnl dnl Default cupsd configuration settings for CUPS. dnl -dnl Copyright © 2020-2024 by OpenPrinting. +dnl Copyright © 2020-2025 by OpenPrinting. dnl Copyright © 2007-2018 by Apple Inc. dnl Copyright © 2006-2007 by Easy Software Products, all rights reserved. dnl @@ -25,40 +25,6 @@ AC_ARG_WITH([languages], AS_HELP_STRING([--with-languages], [set installed langu ]) AC_SUBST([LANGUAGES]) -dnl macOS bundle-based localization support -AC_ARG_WITH([bundledir], AS_HELP_STRING([--with-bundledir], [set localization bundle directory]), [ - CUPS_BUNDLEDIR="$withval" -], [ - AS_IF([test "x$host_os_name" = xdarwin -a $host_os_version -ge 100], [ - CUPS_BUNDLEDIR="/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A" - LANGUAGES="" - ], [ - CUPS_BUNDLEDIR="" - ]) -]) - -AC_SUBST([CUPS_BUNDLEDIR]) -AS_IF([test "x$CUPS_BUNDLEDIR" != x], [ - AC_DEFINE_UNQUOTED([CUPS_BUNDLEDIR], ["$CUPS_BUNDLEDIR"], [macOS bundle directory.]) -]) - -AC_ARG_WITH([bundlelang], AS_HELP_STRING([--with-bundlelang], [set localization bundle base language (English or en)]), [ - cups_bundlelang="$withval" -], [ - AS_IF([test $host_os_version -ge 190], [ - cups_bundlelang="en" - ], [ - cups_bundlelang="English" - ]) -]) - -AS_IF([test "x$cups_bundlelang" != x -a "x$CUPS_BUNDLEDIR" != x], [ - CUPS_RESOURCEDIR="$CUPS_BUNDLEDIR/Resources/$cups_bundlelang.lproj" -], [ - CUPS_RESOURCEDIR="" -]) -AC_SUBST([CUPS_RESOURCEDIR]) - dnl Default executable file permissions AC_ARG_WITH([exe_file_perm], AS_HELP_STRING([--with-exe-file-perm], [set default executable permissions value, default=0755]), [ CUPS_EXE_FILE_PERM="$withval" diff --git a/config.h.in b/config.h.in index 7d655dd15c..207df66a79 100644 --- a/config.h.in +++ b/config.h.in @@ -659,13 +659,6 @@ #undef HAVE_SYS_VFS_H -/* - * Location of macOS localization bundle, if any. - */ - -#undef CUPS_BUNDLEDIR - - /* * Do we have XPC? */ diff --git a/configure b/configure index 2fb1229526..80c62dff02 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for CUPS 2.4.12. +# Generated by GNU Autoconf 2.71 for CUPS 2.4.13. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='CUPS' PACKAGE_TARNAME='cups' -PACKAGE_VERSION='2.4.12' -PACKAGE_STRING='CUPS 2.4.12' +PACKAGE_VERSION='2.4.13' +PACKAGE_STRING='CUPS 2.4.13' PACKAGE_BUGREPORT='https://github.com/openprinting/cups/issues' PACKAGE_URL='https://openprinting.github.io/cups' @@ -650,8 +650,6 @@ ac_header_c_list= ac_default_prefix=/ ac_subst_vars='LTLIBOBJS LIBOBJS -UNINSTALL_LANGUAGES -INSTALL_LANGUAGES TIMEOUTSTARTSEC EXIT_TIMEOUT SYSTEMD_WANTED_BY @@ -680,8 +678,6 @@ CUPS_LOG_FILE_PERM CUPS_CUPSD_FILE_PERM CUPS_CONFIG_FILE_PERM CUPS_EXE_FILE_PERM -CUPS_RESOURCEDIR -CUPS_BUNDLEDIR LANGUAGES XINETD RCSTOP @@ -915,8 +911,6 @@ with_rcstart with_rcstop with_xinetd with_languages -with_bundledir -with_bundlelang with_exe_file_perm with_config_file_perm with_cupsd_file_perm @@ -1504,7 +1498,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures CUPS 2.4.12 to adapt to many kinds of systems. +\`configure' configures CUPS 2.4.13 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1570,7 +1564,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of CUPS 2.4.12:";; + short | recursive ) echo "Configuration of CUPS 2.4.13:";; esac cat <<\_ACEOF @@ -1649,9 +1643,6 @@ Optional Packages: --with-rcstop set stop number for rc scripts --with-xinetd set path for xinetd config files --with-languages set installed languages, default=all - --with-bundledir set localization bundle directory - --with-bundlelang set localization bundle base language (English or - en) --with-exe-file-perm set default executable permissions value, default=0755 --with-config-file-perm set default ConfigFilePerm value, default=0640 @@ -1758,7 +1749,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -CUPS configure 2.4.12 +CUPS configure 2.4.13 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2113,7 +2104,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by CUPS $as_me 2.4.12, which was +It was created by CUPS $as_me 2.4.13, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3244,8 +3235,8 @@ done ac_config_headers="$ac_config_headers config.h" -CUPS_VERSION="2.4.12" -CUPS_API_VERSION="$(echo 2.4.12 | awk -F. '{print $1 "." $2}')" +CUPS_VERSION="2.4.13" +CUPS_API_VERSION="$(echo 2.4.13 | awk -F. '{print $1 "." $2}')" CUPS_BUILD="cups-$CUPS_VERSION" @@ -11522,75 +11513,6 @@ fi -# Check whether --with-bundledir was given. -if test ${with_bundledir+y} -then : - withval=$with_bundledir; - CUPS_BUNDLEDIR="$withval" - -else $as_nop - - if test "x$host_os_name" = xdarwin -a $host_os_version -ge 100 -then : - - CUPS_BUNDLEDIR="/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A" - LANGUAGES="" - -else $as_nop - - CUPS_BUNDLEDIR="" - -fi - -fi - - - -if test "x$CUPS_BUNDLEDIR" != x -then : - - -printf "%s\n" "#define CUPS_BUNDLEDIR \"$CUPS_BUNDLEDIR\"" >>confdefs.h - - -fi - - -# Check whether --with-bundlelang was given. -if test ${with_bundlelang+y} -then : - withval=$with_bundlelang; - cups_bundlelang="$withval" - -else $as_nop - - if test $host_os_version -ge 190 -then : - - cups_bundlelang="en" - -else $as_nop - - cups_bundlelang="English" - -fi - -fi - - -if test "x$cups_bundlelang" != x -a "x$CUPS_BUNDLEDIR" != x -then : - - CUPS_RESOURCEDIR="$CUPS_BUNDLEDIR/Resources/$cups_bundlelang.lproj" - -else $as_nop - - CUPS_RESOURCEDIR="" - -fi - - - # Check whether --with-exe_file_perm was given. if test ${with_exe_file_perm+y} then : @@ -12369,14 +12291,10 @@ fi -INSTALL_LANGUAGES="" -UNINSTALL_LANGUAGES="" LANGFILES="" if test "x$LANGUAGES" != x then : - INSTALL_LANGUAGES="install-languages" - UNINSTALL_LANGUAGES="uninstall-languages" for lang in $LANGUAGES; do if test -f doc/$lang/index.html.in then : @@ -12393,17 +12311,8 @@ then : fi done -elif test "x$CUPS_BUNDLEDIR" != x -then : - - INSTALL_LANGUAGES="install-langbundle" - UNINSTALL_LANGUAGES="uninstall-langbundle" - fi - - - ac_config_files="$ac_config_files Makedefs conf/cups-files.conf conf/cupsd.conf conf/mime.convs conf/pam.std conf/snmp.conf cups.pc cups-config desktop/cups.desktop doc/index.html scheduler/cups-lpd.xinetd scheduler/cups.sh scheduler/cups.xml scheduler/org.cups.cups-lpd.plist scheduler/cups-lpdAT.service scheduler/cups.path scheduler/cups.service scheduler/cups.socket templates/header.tmpl packaging/cups.list $LANGFILES" cat >confcache <<\_ACEOF @@ -12905,7 +12814,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by CUPS $as_me 2.4.12, which was +This file was extended by CUPS $as_me 2.4.13, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12970,7 +12879,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -CUPS config.status 2.4.12 +CUPS config.status 2.4.13 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 2d67548f1b..cfdfc7f9d0 100644 --- a/configure.ac +++ b/configure.ac @@ -13,7 +13,7 @@ dnl We need at least autoconf 2.71... AC_PREREQ([2.71]) dnl Package name and version... -AC_INIT([CUPS],[2.4.12],[https://github.com/openprinting/cups/issues],[cups],[https://openprinting.github.io/cups]) +AC_INIT([CUPS],[2.4.13],[https://github.com/openprinting/cups/issues],[cups],[https://openprinting.github.io/cups]) dnl This line is provided to ensure that you don't run the autoheader program dnl against this project. Doing so is completely unsupported and WILL cause @@ -42,12 +42,8 @@ sinclude(config-scripts/cups-defaults.m4) dnl See what languages are available and make sure we generate the localization dnl files as needed... -INSTALL_LANGUAGES="" -UNINSTALL_LANGUAGES="" LANGFILES="" AS_IF([test "x$LANGUAGES" != x], [ - INSTALL_LANGUAGES="install-languages" - UNINSTALL_LANGUAGES="uninstall-languages" for lang in $LANGUAGES; do AS_IF([test -f doc/$lang/index.html.in], [ LANGFILES="$LANGFILES doc/$lang/index.html" @@ -57,14 +53,8 @@ AS_IF([test "x$LANGUAGES" != x], [ LANGFILES="$LANGFILES templates/$lang/header.tmpl" ]) done -], [test "x$CUPS_BUNDLEDIR" != x], [ - INSTALL_LANGUAGES="install-langbundle" - UNINSTALL_LANGUAGES="uninstall-langbundle" ]) -AC_SUBST([INSTALL_LANGUAGES]) -AC_SUBST([UNINSTALL_LANGUAGES]) - dnl Provide autoconf with a list of files to generate and output them... AC_CONFIG_FILES([ Makedefs diff --git a/cups/language.c b/cups/language.c index 6d9474e661..ccc639b6a8 100644 --- a/cups/language.c +++ b/cups/language.c @@ -1,11 +1,12 @@ /* * I18N/language support for CUPS. * - * Copyright © 2020-2024 by OpenPrinting. - * Copyright 2007-2017 by Apple Inc. - * Copyright 1997-2007 by Easy Software Products. + * Copyright © 2020-2025 by OpenPrinting. + * Copyright © 2007-2017 by Apple Inc. + * Copyright © 1997-2007 by Easy Software Products. * - * Licensed under Apache License v2.0. See the file "LICENSE" for more information. + * Licensed under Apache License v2.0. See the file "LICENSE" for more + * information. */ /* @@ -134,16 +135,6 @@ static const _apple_language_locale_t apple_language_locale[] = #ifdef __APPLE__ static const char *appleLangDefault(void); -# ifdef CUPS_BUNDLEDIR -# ifndef CF_RETURNS_RETAINED -# if __has_feature(attribute_cf_returns_retained) -# define CF_RETURNS_RETAINED __attribute__((cf_returns_retained)) -# else -# define CF_RETURNS_RETAINED -# endif /* __has_feature(attribute_cf_returns_retained) */ -# endif /* !CF_RETURNED_RETAINED */ -static cups_array_t *appleMessageLoad(const char *locale) CF_RETURNS_RETAINED; -# endif /* CUPS_BUNDLEDIR */ #endif /* __APPLE__ */ static cups_lang_t *cups_cache_lookup(const char *name, cups_encoding_t encoding); static int cups_message_compare(_cups_message_t *m1, _cups_message_t *m2); @@ -889,15 +880,6 @@ _cupsLangString(cups_lang_t *lang, /* I - Language */ void _cupsMessageFree(cups_array_t *a) /* I - Message array */ { -#if defined(__APPLE__) && defined(CUPS_BUNDLEDIR) - /* - * Release the cups.strings dictionary as needed... - */ - - if (cupsArrayUserData(a)) - CFRelease((CFDictionaryRef)cupsArrayUserData(a)); -#endif /* __APPLE__ && CUPS_BUNDLEDIR */ - /* * Free the array... */ @@ -1167,46 +1149,6 @@ _cupsMessageLookup(cups_array_t *a, /* I - Message array */ key.msg = (char *)m; match = (_cups_message_t *)cupsArrayFind(a, &key); -#if defined(__APPLE__) && defined(CUPS_BUNDLEDIR) - if (!match && cupsArrayUserData(a)) - { - /* - * Try looking the string up in the cups.strings dictionary... - */ - - CFDictionaryRef dict; /* cups.strings dictionary */ - CFStringRef cfm, /* Message as a CF string */ - cfstr; /* Localized text as a CF string */ - - dict = (CFDictionaryRef)cupsArrayUserData(a); - cfm = CFStringCreateWithCString(kCFAllocatorDefault, m, kCFStringEncodingUTF8); - match = calloc(1, sizeof(_cups_message_t)); - match->msg = strdup(m); - cfstr = cfm ? CFDictionaryGetValue(dict, cfm) : NULL; - - if (cfstr) - { - char buffer[1024]; /* Message buffer */ - - CFStringGetCString(cfstr, buffer, sizeof(buffer), kCFStringEncodingUTF8); - match->str = strdup(buffer); - - DEBUG_printf(("1_cupsMessageLookup: Found \"%s\" as \"%s\"...", m, buffer)); - } - else - { - match->str = strdup(m); - - DEBUG_printf(("1_cupsMessageLookup: Did not find \"%s\"...", m)); - } - - cupsArrayAdd(a, match); - - if (cfm) - CFRelease(cfm); - } -#endif /* __APPLE__ && CUPS_BUNDLEDIR */ - if (match && match->str) return (match->str); else @@ -1406,197 +1348,6 @@ appleLangDefault(void) return (cg->language); } - - -# ifdef CUPS_BUNDLEDIR -/* - * 'appleMessageLoad()' - Load a message catalog from a localizable bundle. - */ - -static cups_array_t * /* O - Message catalog */ -appleMessageLoad(const char *locale) /* I - Locale ID */ -{ - char filename[1024], /* Path to cups.strings file */ - applelang[256], /* Apple language ID */ - baselang[4]; /* Base language */ - CFURLRef url; /* URL to cups.strings file */ - CFReadStreamRef stream = NULL; /* File stream */ - CFPropertyListRef plist = NULL; /* Localization file */ -#ifdef DEBUG - const char *cups_strings = getenv("CUPS_STRINGS"); - /* Test strings file */ - CFErrorRef error = NULL; /* Error when opening file */ -#endif /* DEBUG */ - - - DEBUG_printf(("appleMessageLoad(locale=\"%s\")", locale)); - - /* - * Load the cups.strings file... - */ - -#ifdef DEBUG - if (cups_strings) - { - DEBUG_puts("1appleMessageLoad: Using debug CUPS_STRINGS file."); - strlcpy(filename, cups_strings, sizeof(filename)); - } - else -#endif /* DEBUG */ - - snprintf(filename, sizeof(filename), - CUPS_BUNDLEDIR "/Resources/%s.lproj/cups.strings", - _cupsAppleLanguage(locale, applelang, sizeof(applelang))); - - if (access(filename, 0)) - { - /* - * - * - * Try with original locale string... - */ - - DEBUG_printf(("1appleMessageLoad: \"%s\": %s", filename, strerror(errno))); - snprintf(filename, sizeof(filename), CUPS_BUNDLEDIR "/Resources/%s.lproj/cups.strings", locale); - } - - if (access(filename, 0)) - { - /* - * - * - * Try with just the language code... - */ - - DEBUG_printf(("1appleMessageLoad: \"%s\": %s", filename, strerror(errno))); - - strlcpy(baselang, locale, sizeof(baselang)); - if (baselang[3] == '-' || baselang[3] == '_') - baselang[3] = '\0'; - - snprintf(filename, sizeof(filename), CUPS_BUNDLEDIR "/Resources/%s.lproj/cups.strings", baselang); - } - - if (access(filename, 0)) - { - /* - * Try alternate lproj directory names... - */ - - DEBUG_printf(("1appleMessageLoad: \"%s\": %s", filename, strerror(errno))); - - if (!strncmp(locale, "en", 2)) - locale = "English"; - else if (!strncmp(locale, "nb", 2)) - locale = "no"; - else if (!strncmp(locale, "nl", 2)) - locale = "Dutch"; - else if (!strncmp(locale, "fr", 2)) - locale = "French"; - else if (!strncmp(locale, "de", 2)) - locale = "German"; - else if (!strncmp(locale, "it", 2)) - locale = "Italian"; - else if (!strncmp(locale, "ja", 2)) - locale = "Japanese"; - else if (!strncmp(locale, "es", 2)) - locale = "Spanish"; - else if (!strcmp(locale, "zh_HK") || !strncasecmp(locale, "zh-Hant", 7) || !strncasecmp(locale, "zh_Hant", 7)) - { - /* - * - * - * - * Try zh_TW first, then zh... Sigh... - */ - - if (!access(CUPS_BUNDLEDIR "/Resources/zh_TW.lproj/cups.strings", 0)) - locale = "zh_TW"; - else - locale = "zh"; - } - else if (strstr(locale, "_") != NULL || strstr(locale, "-") != NULL) - { - /* - * Drop country code, just try language... - */ - - strlcpy(baselang, locale, sizeof(baselang)); - if (baselang[2] == '-' || baselang[2] == '_') - baselang[2] = '\0'; - - locale = baselang; - } - - snprintf(filename, sizeof(filename), - CUPS_BUNDLEDIR "/Resources/%s.lproj/cups.strings", locale); - } - - DEBUG_printf(("1appleMessageLoad: filename=\"%s\"", filename)); - - url = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, - (UInt8 *)filename, - (CFIndex)strlen(filename), false); - if (url) - { - stream = CFReadStreamCreateWithFile(kCFAllocatorDefault, url); - if (stream) - { - /* - * Read the property list containing the localization data. - * - * NOTE: This code currently generates a clang "potential leak" - * warning, but the object is released in _cupsMessageFree(). - */ - - CFReadStreamOpen(stream); - -#ifdef DEBUG - plist = CFPropertyListCreateWithStream(kCFAllocatorDefault, stream, 0, - kCFPropertyListImmutable, NULL, - &error); - if (error) - { - CFStringRef msg = CFErrorCopyDescription(error); - /* Error message */ - - CFStringGetCString(msg, filename, sizeof(filename), - kCFStringEncodingUTF8); - DEBUG_printf(("1appleMessageLoad: %s", filename)); - - CFRelease(msg); - CFRelease(error); - } - -#else - plist = CFPropertyListCreateWithStream(kCFAllocatorDefault, stream, 0, - kCFPropertyListImmutable, NULL, - NULL); -#endif /* DEBUG */ - - if (plist && CFGetTypeID(plist) != CFDictionaryGetTypeID()) - { - CFRelease(plist); - plist = NULL; - } - - CFRelease(stream); - } - - CFRelease(url); - } - - DEBUG_printf(("1appleMessageLoad: url=%p, stream=%p, plist=%p", url, stream, - plist)); - - /* - * Create and return an empty array to act as a cache for messages, passing the - * plist as the user data. - */ - - return (_cupsMessageNew((void *)plist)); -} -# endif /* CUPS_BUNDLEDIR */ #endif /* __APPLE__ */ @@ -1680,10 +1431,6 @@ cups_message_free(_cups_message_t *m) /* I - Message */ static void cups_message_load(cups_lang_t *lang) /* I - Language */ { -#if defined(__APPLE__) && defined(CUPS_BUNDLEDIR) - lang->strings = appleMessageLoad(lang->language); - -#else char filename[1024]; /* Filename for language locale file */ _cups_globals_t *cg = _cupsGlobals(); /* Pointer to library globals */ @@ -1719,7 +1466,6 @@ cups_message_load(cups_lang_t *lang) /* I - Language */ */ lang->strings = _cupsMessageLoad(filename, _CUPS_MESSAGE_UNQUOTE); -#endif /* __APPLE__ && CUPS_BUNDLEDIR */ } diff --git a/cups/testlang.c b/cups/testlang.c index 92f274bc73..2fd9d987f0 100644 --- a/cups/testlang.c +++ b/cups/testlang.c @@ -19,9 +19,6 @@ #include "cups-private.h" #include "ppd-private.h" -#ifdef __APPLE__ -# include -#endif /* __APPLE__ */ #include @@ -30,9 +27,6 @@ */ static int show_ppd(const char *filename); -#ifdef __APPLE__ -static int test_apple(void); -#endif // __APPLE__ static int test_language(const char *locale); static int test_string(cups_lang_t *language, const char *msgid); static void usage(void); @@ -147,10 +141,6 @@ main(int argc, /* I - Number of command-line arguments */ cupsDirClose(dir); } -#ifdef __APPLE__ - errors += test_apple(); -#endif // __APPLE__ - if (!errors) puts("ALL TESTS PASSED"); } @@ -210,101 +200,6 @@ show_ppd(const char *filename) /* I - Filename */ } -#ifdef __APPLE__ -/* - * 'test_apple()' - Test macOS locale handing... - */ - -static int /* O - Number of errors */ -test_apple(void) -{ - int errors = 0; /* Number of errors */ - CFIndex i, /* Looping var */ - num_locales; /* Number of locales */ - CFArrayRef locales; /* Locales */ - CFStringRef locale_id, /* Current locale ID */ - language_id; /* Current language ID */ - cups_lang_t *language = NULL; /* Message catalog */ - char locale_str[256], /* Locale ID C string */ - language_str[256], /* Language ID C string */ - buffer[1024], /* String buffer */ - *bufptr; /* Pointer to ".UTF-8" in POSIX locale */ - size_t buflen; /* Length of POSIX locale */ - - - /* - * Test all possible language IDs for compatibility with _cupsAppleLocale... - */ - - locales = CFLocaleCopyAvailableLocaleIdentifiers(); - num_locales = CFArrayGetCount(locales); - - printf("CFLocaleCopyAvailableLocaleIdentifiers: %d locales\n", (int)num_locales); - - for (i = 0; i < num_locales; i ++) - { - locale_id = CFArrayGetValueAtIndex(locales, i); - language_id = CFLocaleCreateCanonicalLanguageIdentifierFromString(kCFAllocatorDefault, locale_id); - - printf("CFStringGetCString(locale_id %d): ", (int)i); - if (!locale_id || !CFStringGetCString(locale_id, locale_str, (CFIndex)sizeof(locale_str), kCFStringEncodingASCII)) - { - puts("FAIL"); - errors ++; - continue; - } - else - printf("PASS (\"%s\")\n", locale_str); - - printf("CFStringGetCString(language_id %d): ", (int)i); - if (!language_id || !CFStringGetCString(language_id, language_str, (CFIndex)sizeof(language_str), kCFStringEncodingASCII)) - { - printf("%d %s: FAIL (unable to get language ID string)\n", (int)i + 1, locale_str); - errors ++; - continue; - } - else - printf("PASS (\"%s\")\n", language_str); - - printf("_cupsAppleLocale(\"%s\"): ", language_str); - if (!_cupsAppleLocale(language_id, buffer, sizeof(buffer))) - { - puts("FAIL"); - errors ++; - continue; - } - else - printf("PASS (\"%s\")\n", buffer); - - if ((bufptr = strstr(buffer, ".UTF-8")) != NULL) - buflen = (size_t)(bufptr - buffer); - else - buflen = strlen(buffer); - - printf("cupsLangGet(\"%s\"): ", buffer); - if ((language = cupsLangGet(buffer)) == NULL) - { - puts("FAIL"); - errors ++; - continue; - } - else if (strncasecmp(language->language, buffer, buflen)) - { - printf("FAIL (got \"%s\")\n", language->language); - errors ++; - continue; - } - else - puts("PASS"); - } - - CFRelease(locales); - - return (errors); -} -#endif // __APPLE__ - - /* * 'test_language()' - Test a specific language... */ diff --git a/locale/Makefile b/locale/Makefile index 21ce7406cf..d975a0134d 100644 --- a/locale/Makefile +++ b/locale/Makefile @@ -1,7 +1,7 @@ # # Locale file makefile for CUPS. # -# Copyright © 2020-2024 by OpenPrinting. +# Copyright © 2020-2025 by OpenPrinting. # Copyright © 2007-2019 by Apple Inc. # Copyright © 1993-2007 by Easy Software Products. # @@ -64,9 +64,7 @@ install: all install-data install-headers install-libs install-exec # Install data files... # -install-data: $(INSTALL_LANGUAGES) - -install-languages: +install-data: $(INSTALL_DIR) -m 755 $(LOCALEDIR) for loc in en $(LANGUAGES) ; do \ if test -f cups_$$loc.po; then \ @@ -75,11 +73,6 @@ install-languages: fi ; \ done -install-langbundle: - $(INSTALL_DIR) -m 755 "$(BUILDROOT)$(RESOURCEDIR)" - $(INSTALL_DATA) cups.strings "$(BUILDROOT)$(RESOURCEDIR)" - - # # Install programs... # @@ -105,16 +98,11 @@ install-libs: # Uninstall files... # -uninstall: $(UNINSTALL_LANGUAGES) - -uninstall-languages: +uninstall: -for loc in en $(LANGUAGES) ; do \ $(RM) $(LOCALEDIR)/$$loc/cups_$$loc.po ; \ done -uninstall-langbundle: - $(RM) "$(BUILDROOT)$(RESOURCEDIR)/cups.strings" - # # pot - Creates/updates the cups.pot template file, merges changes into existing diff --git a/ppdc/ppdc-catalog.cxx b/ppdc/ppdc-catalog.cxx index 185d406473..07eaeee00b 100644 --- a/ppdc/ppdc-catalog.cxx +++ b/ppdc/ppdc-catalog.cxx @@ -1,11 +1,12 @@ // // Shared message catalog class for the CUPS PPD Compiler. // -// Copyright © 2020-2024 by OpenPrinting. -// Copyright 2007-2017 by Apple Inc. -// Copyright 2002-2006 by Easy Software Products. +// Copyright © 2020-2025 by OpenPrinting. +// Copyright © 2007-2017 by Apple Inc. +// Copyright © 2002-2006 by Easy Software Products. // -// Licensed under Apache License v2.0. See the file "LICENSE" for more information. +// Licensed under Apache License v2.0. See the file "LICENSE" for more +// information. // // @@ -32,9 +33,6 @@ typedef enum // Local functions... // -#if defined(__APPLE__) && defined(CUPS_BUNDLEDIR) -static void apple_add_message(CFStringRef key, CFStringRef val, ppdcCatalog *c); -#endif /* __APPLE__ && CUPS_BUNDLEDIR */ static int get_utf8(char *&ptr); static int get_utf16(cups_file_t *fp, ppdc_cs_t &cs); static int put_utf8(int ch, char *&ptr, char *end); @@ -59,70 +57,7 @@ ppdcCatalog::ppdcCatalog(const char *l, // I - Locale { // Try loading the base messages for this locale... char pofile[1024]; // Message catalog file - - -#if defined(__APPLE__) && defined(CUPS_BUNDLEDIR) - char applelang[256]; // Apple language ID - CFURLRef url; // URL to cups.strings file - CFReadStreamRef stream = NULL; // File stream - CFPropertyListRef plist = NULL; // Localization file - - snprintf(pofile, sizeof(pofile), CUPS_BUNDLEDIR "/Resources/%s.lproj/cups.strings", _cupsAppleLanguage(l, applelang, sizeof(applelang))); - if (access(pofile, 0)) - { - // Try alternate lproj directory names... - const char *tl = l; // Temporary locale string - - if (!strncmp(l, "en", 2)) - tl = "English"; - else if (!strncmp(l, "nb", 2)) - tl = "no"; - else if (!strncmp(l, "nl", 2)) - tl = "Dutch"; - else if (!strncmp(l, "fr", 2)) - tl = "French"; - else if (!strncmp(l, "de", 2)) - tl = "German"; - else if (!strncmp(l, "it", 2)) - tl = "Italian"; - else if (!strncmp(l, "ja", 2)) - tl = "Japanese"; - else if (!strncmp(l, "es", 2)) - tl = "Spanish"; - - snprintf(pofile, sizeof(pofile), CUPS_BUNDLEDIR "/Resources/%s.lproj/cups.strings", tl); - } - - url = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, (UInt8 *)pofile, (CFIndex)strlen(pofile), false); - if (url) - { - stream = CFReadStreamCreateWithFile(kCFAllocatorDefault, url); - - if (stream) - { - /* - * Read the property list containing the localization data. - */ - - CFReadStreamOpen(stream); - - plist = CFPropertyListCreateWithStream(kCFAllocatorDefault, stream, 0, kCFPropertyListImmutable, NULL, NULL); - - if (plist) - { - if (CFGetTypeID(plist) == CFDictionaryGetTypeID()) - CFDictionaryApplyFunction((CFDictionaryRef)plist, (CFDictionaryApplierFunction)apple_add_message, this); - CFRelease(plist); - } - - CFRelease(stream); - } - - CFRelease(url); - } - -#else - _cups_globals_t *cg = _cupsGlobals(); + _cups_globals_t *cg = _cupsGlobals(); // Global information snprintf(pofile, sizeof(pofile), "%s/%s/cups_%s.po", cg->localedir, l, l); @@ -139,7 +74,6 @@ ppdcCatalog::ppdcCatalog(const char *l, // I - Locale load_messages(pofile); } -#endif /* __APPLE__ && CUPS_BUNDLEDIR */ } if (f && *f) @@ -656,27 +590,6 @@ ppdcCatalog::save_messages( } -#if defined(__APPLE__) && defined(CUPS_BUNDLEDIR) -// -// 'apple_add_message()' - Add a message from a localization dictionary. -// - -static void -apple_add_message(CFStringRef key, // I - Localization key - CFStringRef val, // I - Localized value - ppdcCatalog *c) // I - Message catalog -{ - char id[1024], // Message id - str[1024]; // Localized message - - - if (CFStringGetCString(key, id, sizeof(id), kCFStringEncodingUTF8) && - CFStringGetCString(val, str, sizeof(str), kCFStringEncodingUTF8)) - c->add_message(id, str); -} -#endif /* __APPLE__ && CUPS_BUNDLEDIR */ - - // // 'get_utf8()' - Get a UTF-8 character. // diff --git a/vcnet/config.h b/vcnet/config.h index de351cad88..f995a0b02f 100644 --- a/vcnet/config.h +++ b/vcnet/config.h @@ -100,8 +100,8 @@ typedef unsigned long useconds_t; * Version of software... */ -#define CUPS_SVERSION "CUPS v2.4.12" -#define CUPS_MINIMAL "CUPS/2.4.12" +#define CUPS_SVERSION "CUPS v2.4.13" +#define CUPS_MINIMAL "CUPS/2.4.13" /* @@ -751,13 +751,6 @@ typedef unsigned long useconds_t; /* #undef HAVE_SYS_VFS_H */ -/* - * Location of macOS localization bundle, if any. - */ - -/* #undef CUPS_BUNDLEDIR */ - - /* * Do we have XPC? */ diff --git a/vcnet/ippeveprinter.vcxproj b/vcnet/ippeveprinter.vcxproj index e4581a867c..0ff2f2e70f 100644 --- a/vcnet/ippeveprinter.vcxproj +++ b/vcnet/ippeveprinter.vcxproj @@ -61,7 +61,7 @@ Disabled - ..\vcnet;..;..\vcnet\regex;packages\libressl_native.3.7.3\build\native\include;%(AdditionalIncludeDirectories) + ..\vcnet;..;..\vcnet\regex;packages\libressl_native.4.0.0\build\native\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) false EnableFastChecks @@ -84,7 +84,7 @@ X64 - ..\vcnet;..;..\vcnet\regex;packages\libressl_native.3.7.3\build\native\include;%(AdditionalIncludeDirectories) + ..\vcnet;..;..\vcnet\regex;packages\libressl_native.4.0.0\build\native\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) MultiThreadedDLL diff --git a/vcnet/ippfind.vcxproj b/vcnet/ippfind.vcxproj index a30261b85e..c015f9244c 100644 --- a/vcnet/ippfind.vcxproj +++ b/vcnet/ippfind.vcxproj @@ -61,7 +61,7 @@ Disabled - ..\vcnet;..;..\vcnet\regex;packages\libressl_native.3.7.3\build\native\include;%(AdditionalIncludeDirectories) + ..\vcnet;..;..\vcnet\regex;packages\libressl_native.4.0.0\build\native\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) true EnableFastChecks @@ -84,7 +84,7 @@ X64 - ..\vcnet;..;..\vcnet\regex;packages\libressl_native.3.7.3\build\native\include;%(AdditionalIncludeDirectories) + ..\vcnet;..;..\vcnet\regex;packages\libressl_native.4.0.0\build\native\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) MultiThreadedDLL diff --git a/vcnet/ipptool.vcxproj b/vcnet/ipptool.vcxproj index 9fcbce4616..ff64cd772b 100644 --- a/vcnet/ipptool.vcxproj +++ b/vcnet/ipptool.vcxproj @@ -61,7 +61,7 @@ Disabled - ..\vcnet;..;..\vcnet\regex;packages\libressl_native.3.7.3\build\native\include;%(AdditionalIncludeDirectories) + ..\vcnet;..;..\vcnet\regex;packages\libressl_native.4.0.0\build\native\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) true EnableFastChecks @@ -83,7 +83,7 @@ X64 - ..\vcnet;..;..\vcnet\regex;packages\libressl_native.3.7.3\build\native\include;%(AdditionalIncludeDirectories) + ..\vcnet;..;..\vcnet\regex;packages\libressl_native.4.0.0\build\native\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) MultiThreadedDLL diff --git a/vcnet/libcups2.vcxproj b/vcnet/libcups2.vcxproj index 9ee5665ce6..c4cb615d04 100644 --- a/vcnet/libcups2.vcxproj +++ b/vcnet/libcups2.vcxproj @@ -62,7 +62,7 @@ Disabled - ..\vcnet;..;..\vcnet\regex;packages\libressl_native.3.7.3\build\native\include;%(AdditionalIncludeDirectories) + ..\vcnet;..;..\vcnet\regex;packages\libressl_native.4.0.0\build\native\include;%(AdditionalIncludeDirectories) DEBUG;_DEBUG;_WINDOWS;_USRDLL;LIBCUPS2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -72,7 +72,7 @@ ProgramDatabase - packages\libressl_native.3.7.3\build\native\lib\x64\Release\ssl.lib;packages\libressl_native.3.7.3\build\native\lib\x64\Release\crypto.lib;bcrypt.lib;ws2_32.lib;advapi32.lib;%(AdditionalDependencies) + packages\libressl_native.4.0.0\build\native\lib\x64\Release\ssl.lib;packages\libressl_native.4.0.0\build\native\lib\x64\Release\crypto.lib;bcrypt.lib;ws2_32.lib;advapi32.lib;%(AdditionalDependencies) $(OutDir)libcups2.dll ..\cups\libcups2.def true @@ -88,7 +88,7 @@ MinSpace - ..\vcnet;..;..\vcnet\regex;packages\libressl_native.3.7.3\build\native\include;%(AdditionalIncludeDirectories) + ..\vcnet;..;..\vcnet\regex;packages\libressl_native.4.0.0\build\native\include;%(AdditionalIncludeDirectories) DEBUG;NDEBUG;_WINDOWS;_USRDLL;LIBCUPS2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) MultiThreadedDLL @@ -96,7 +96,7 @@ ProgramDatabase - packages\libressl_native.3.7.3\build\native\lib\x64\Release\ssl.lib;packages\libressl_native.3.7.3\build\native\lib\x64\Release\crypto.lib;bcrypt.lib;ws2_32.lib;advapi32.lib;%(AdditionalDependencies) + packages\libressl_native.4.0.0\build\native\lib\x64\Release\ssl.lib;packages\libressl_native.4.0.0\build\native\lib\x64\Release\crypto.lib;bcrypt.lib;ws2_32.lib;advapi32.lib;%(AdditionalDependencies) $(OutDir)libcups2.dll ..\cups\libcups2.def true diff --git a/vcnet/libcups2_native.nuspec b/vcnet/libcups2_native.nuspec index 15d053caa9..e502e830ff 100644 --- a/vcnet/libcups2_native.nuspec +++ b/vcnet/libcups2_native.nuspec @@ -3,7 +3,7 @@ libcups2_native OpenPrinting CUPS Library for VS2019+ - 2.4.12.0 + 2.4.13.0 Michael R Sweet, OpenPrinting michaelrsweet https://github.com/OpenPrinting/cups @@ -13,10 +13,10 @@ false OpenPrinting CUPS is a standards-based, open source printing system for Linux® and other Unix®-like operating systems. The CUPS library provides a convenient API for communicating with Internet Printing Protocol printers. CUPS is licensed under the Apache License Version 2.0 with an exception to allow linking against GNU GPL2-only software. - Copyright © 2020-2025 by OpenPrinting, Copyright © 2007-2019 by Apple Inc., Copyright © 1997-2007 by Easy Software Products. + Copyright © 2020-2025 by OpenPrinting http ipp native - + diff --git a/vcnet/libcups2_native.redist.nuspec b/vcnet/libcups2_native.redist.nuspec index bfd725fa6b..914aa815b3 100644 --- a/vcnet/libcups2_native.redist.nuspec +++ b/vcnet/libcups2_native.redist.nuspec @@ -3,7 +3,7 @@ libcups2_native.redist OpenPrinting CUPS Library for VS2019+ Redist - 2.4.12.0 + 2.4.13.0 Michael R Sweet, OpenPrinting michaelrsweet https://github.com/OpenPrinting/cups @@ -13,10 +13,10 @@ false OpenPrinting CUPS is a standards-based, open source printing system for Linux® and other Unix®-like operating systems. This package provides the redistributable content for the CUPS library. CUPS is licensed under the Apache License Version 2.0 with an exception to allow linking against GNU GPL2-only software. - Copyright © 2020-2025 by OpenPrinting, Copyright © 2007-2019 by Apple Inc., Copyright © 1997-2007 by Easy Software Products. + Copyright © 2020-2025 by OpenPrinting http ipp native - + diff --git a/vcnet/packages.config b/vcnet/packages.config index 6d48227e9c..6850197527 100644 --- a/vcnet/packages.config +++ b/vcnet/packages.config @@ -1,7 +1,7 @@  - - + + \ No newline at end of file diff --git a/vcnet/testhttp.vcxproj b/vcnet/testhttp.vcxproj index bab15d5b2a..ada71b4a00 100644 --- a/vcnet/testhttp.vcxproj +++ b/vcnet/testhttp.vcxproj @@ -58,7 +58,7 @@ Disabled - ..\vcnet;..;packages\libressl_native.3.7.3\build\native\include;%(AdditionalIncludeDirectories) + ..\vcnet;..;packages\libressl_native.4.0.0\build\native\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug @@ -79,7 +79,7 @@ - ..\vcnet;..;packages\libressl_native.3.7.3\build\native\include;%(AdditionalIncludeDirectories) + ..\vcnet;..;packages\libressl_native.4.0.0\build\native\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) MultiThreaded diff --git a/xcode/config.h b/xcode/config.h index 0e4f3dae27..e99356c4d0 100644 --- a/xcode/config.h +++ b/xcode/config.h @@ -19,8 +19,8 @@ * Version of software... */ -#define CUPS_SVERSION "CUPS v2.4.12" -#define CUPS_MINIMAL "CUPS/2.4.12" +#define CUPS_SVERSION "CUPS v2.4.13" +#define CUPS_MINIMAL "CUPS/2.4.13" /* @@ -683,17 +683,6 @@ /* #undef HAVE_SYS_VFS_H */ -/* - * Location of localization bundle, if any. - */ - -#if TARGET_OS_OSX -# define CUPS_BUNDLEDIR "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A" -#else -# define CUPS_BUNDLEDIR "/System/Library/PrivateFrameworks/PrintKit.framework/Versions/A" -#endif /* TARGET_OS_OSX */ - - /* * Do we have XPC? */