#
# 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.
#
#
LANGUAGES = @LANGUAGES@
-INSTALL_LANGUAGES = @INSTALL_LANGUAGES@
-UNINSTALL_LANGUAGES = @UNINSTALL_LANGUAGES@
#
# Cross-compilation support: "local" target is used for any tools that are
BUILDROOT = $(DSTROOT)$(DESTDIR)
BINDIR = $(BUILDROOT)@bindir@
-BUNDLEDIR = @CUPS_BUNDLEDIR@
CACHEDIR = $(BUILDROOT)@CUPS_CACHEDIR@
DATADIR = $(BUILDROOT)@CUPS_DATADIR@
DOCDIR = $(BUILDROOT)@CUPS_DOCROOT@
RCSTART = @RCSTART@
RCSTOP = @RCSTOP@
REQUESTS = $(BUILDROOT)@CUPS_REQUESTS@
-RESOURCEDIR = @CUPS_RESOURCEDIR@
SBINDIR = $(BUILDROOT)@sbindir@
SERVERBIN = $(BUILDROOT)@CUPS_SERVERBIN@
SERVERROOT = $(BUILDROOT)@CUPS_SERVERROOT@
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
])
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"
#undef HAVE_SYS_VFS_H
-/*
- * Location of macOS localization bundle, if any.
- */
-
-#undef CUPS_BUNDLEDIR
-
-
/*
* Do we have XPC?
*/
#! /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 <https://github.com/openprinting/cups/issues>.
#
# 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'
ac_default_prefix=/
ac_subst_vars='LTLIBOBJS
LIBOBJS
-UNINSTALL_LANGUAGES
-INSTALL_LANGUAGES
TIMEOUTSTARTSEC
EXIT_TIMEOUT
SYSTEMD_WANTED_BY
CUPS_CUPSD_FILE_PERM
CUPS_CONFIG_FILE_PERM
CUPS_EXE_FILE_PERM
-CUPS_RESOURCEDIR
-CUPS_BUNDLEDIR
LANGUAGES
XINETD
RCSTOP
with_rcstop
with_xinetd
with_languages
-with_bundledir
-with_bundlelang
with_exe_file_perm
with_config_file_perm
with_cupsd_file_perm
# 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]...
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
--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
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.
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
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"
-# 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 :
-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 :
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
# 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
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\\"
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
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"
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
/*
* 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.
*/
/*
#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);
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...
*/
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
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))
- {
- /*
- * <rdar://problem/22086642>
- *
- * 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))
- {
- /*
- * <rdar://problem/25292403>
- *
- * 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))
- {
- /*
- * <rdar://problem/22130168>
- * <rdar://problem/27245567>
- *
- * 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__ */
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 */
*/
lang->strings = _cupsMessageLoad(filename, _CUPS_MESSAGE_UNQUOTE);
-#endif /* __APPLE__ && CUPS_BUNDLEDIR */
}
#include "cups-private.h"
#include "ppd-private.h"
-#ifdef __APPLE__
-# include <CoreFoundation/CoreFoundation.h>
-#endif /* __APPLE__ */
#include <cups/dir.h>
*/
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);
cupsDirClose(dir);
}
-#ifdef __APPLE__
- errors += test_apple();
-#endif // __APPLE__
-
if (!errors)
puts("ALL TESTS PASSED");
}
}
-#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...
*/
#
# 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.
#
# 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 \
fi ; \
done
-install-langbundle:
- $(INSTALL_DIR) -m 755 "$(BUILDROOT)$(RESOURCEDIR)"
- $(INSTALL_DATA) cups.strings "$(BUILDROOT)$(RESOURCEDIR)"
-
-
#
# Install programs...
#
# 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
//
// 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.
//
//
// 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);
{
// 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);
load_messages(pofile);
}
-#endif /* __APPLE__ && CUPS_BUNDLEDIR */
}
if (f && *f)
}
-#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.
//
* 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"
/*
/* #undef HAVE_SYS_VFS_H */
-/*
- * Location of macOS localization bundle, if any.
- */
-
-/* #undef CUPS_BUNDLEDIR */
-
-
/*
* Do we have XPC?
*/
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\vcnet;..;..\vcnet\regex;packages\libressl_native.3.7.3\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\vcnet;..;..\vcnet\regex;packages\libressl_native.4.0.0\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
- <AdditionalIncludeDirectories>..\vcnet;..;..\vcnet\regex;packages\libressl_native.3.7.3\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\vcnet;..;..\vcnet\regex;packages\libressl_native.4.0.0\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader />
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\vcnet;..;..\vcnet\regex;packages\libressl_native.3.7.3\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\vcnet;..;..\vcnet\regex;packages\libressl_native.4.0.0\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
- <AdditionalIncludeDirectories>..\vcnet;..;..\vcnet\regex;packages\libressl_native.3.7.3\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\vcnet;..;..\vcnet\regex;packages\libressl_native.4.0.0\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader />
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\vcnet;..;..\vcnet\regex;packages\libressl_native.3.7.3\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\vcnet;..;..\vcnet\regex;packages\libressl_native.4.0.0\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
- <AdditionalIncludeDirectories>..\vcnet;..;..\vcnet\regex;packages\libressl_native.3.7.3\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\vcnet;..;..\vcnet\regex;packages\libressl_native.4.0.0\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader />
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\vcnet;..;..\vcnet\regex;packages\libressl_native.3.7.3\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\vcnet;..;..\vcnet\regex;packages\libressl_native.4.0.0\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DEBUG;_DEBUG;_WINDOWS;_USRDLL;LIBCUPS2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
- <AdditionalDependencies>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)</AdditionalDependencies>
+ <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)</AdditionalDependencies>
<OutputFile>$(OutDir)libcups2.dll</OutputFile>
<ModuleDefinitionFile>..\cups\libcups2.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Midl>
<ClCompile>
<Optimization>MinSpace</Optimization>
- <AdditionalIncludeDirectories>..\vcnet;..;..\vcnet\regex;packages\libressl_native.3.7.3\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\vcnet;..;..\vcnet\regex;packages\libressl_native.4.0.0\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>DEBUG;NDEBUG;_WINDOWS;_USRDLL;LIBCUPS2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader />
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
- <AdditionalDependencies>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)</AdditionalDependencies>
+ <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)</AdditionalDependencies>
<OutputFile>$(OutDir)libcups2.dll</OutputFile>
<ModuleDefinitionFile>..\cups\libcups2.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<metadata>
<id>libcups2_native</id>
<title>OpenPrinting CUPS Library for VS2019+</title>
- <version>2.4.12.0</version>
+ <version>2.4.13.0</version>
<authors>Michael R Sweet, OpenPrinting</authors>
<owners>michaelrsweet</owners>
<projectUrl>https://github.com/OpenPrinting/cups</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>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.</description>
- <copyright>Copyright © 2020-2025 by OpenPrinting, Copyright © 2007-2019 by Apple Inc., Copyright © 1997-2007 by Easy Software Products.</copyright>
+ <copyright>Copyright © 2020-2025 by OpenPrinting</copyright>
<tags>http ipp native</tags>
<dependencies>
- <dependency id="libcups2_native.redist" version="2.4.12.0" />
+ <dependency id="libcups2_native.redist" version="2.4.13.0" />
</dependencies>
</metadata>
<files>
<metadata>
<id>libcups2_native.redist</id>
<title>OpenPrinting CUPS Library for VS2019+ Redist</title>
- <version>2.4.12.0</version>
+ <version>2.4.13.0</version>
<authors>Michael R Sweet, OpenPrinting</authors>
<owners>michaelrsweet</owners>
<projectUrl>https://github.com/OpenPrinting/cups</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>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.</description>
- <copyright>Copyright © 2020-2025 by OpenPrinting, Copyright © 2007-2019 by Apple Inc., Copyright © 1997-2007 by Easy Software Products.</copyright>
+ <copyright>Copyright © 2020-2025 by OpenPrinting</copyright>
<tags>http ipp native</tags>
<dependencies>
- <dependency id="libressl_native.redist" version="3.7.3.0" />
+ <dependency id="libressl_native.redist" version="4.0.0" />
<dependency id="zlib_native.redist" version="1.2.11" />
</dependencies>
</metadata>
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="libressl_native" version="3.7.3.0" targetFramework="native" />
- <package id="libressl_native.redist" version="3.7.3.0" targetFramework="native" />
+ <package id="libressl_native" version="4.0.0" targetFramework="native" />
+ <package id="libressl_native.redist" version="4.0.0" targetFramework="native" />
<package id="zlib_native" version="1.2.11" targetFramework="native" />
<package id="zlib_native.redist" version="1.2.11" targetFramework="native" />
</packages>
\ No newline at end of file
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\vcnet;..;packages\libressl_native.3.7.3\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\vcnet;..;packages\libressl_native.4.0.0\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
- <AdditionalIncludeDirectories>..\vcnet;..;packages\libressl_native.3.7.3\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\vcnet;..;packages\libressl_native.4.0.0\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
* 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"
/*
/* #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?
*/