]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Add libcups component name, localization bundle support for iOS.
authorMichael R Sweet <michael.r.sweet@gmail.com>
Mon, 29 Oct 2018 20:36:11 +0000 (16:36 -0400)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Mon, 29 Oct 2018 20:36:11 +0000 (16:36 -0400)
Makefile
config-scripts/cups-common.m4
config-scripts/cups-defaults.m4
configure
xcode/config.h

index 5ba0de332633dc31c05abdc1d0c291cad407e415..df8d6c3949b2e6b5d1915cf699ee028d6eebca9d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,11 @@
 #
 # Top-level Makefile for CUPS.
 #
-# Copyright 2007-2016 by Apple Inc.
-# Copyright 1997-2007 by Easy Software Products, all rights reserved.
+# Copyright © 2007-2018 by Apple Inc.
+# Copyright © 1997-2007 by Easy Software Products, all rights reserved.
 #
-# 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.
 #
 
 include Makedefs
@@ -14,7 +15,7 @@ include Makedefs
 # Directories to make...
 #
 
-DIRS   =       cups test $(BUILDDIRS)
+DIRS   =       cups $(BUILDDIRS)
 
 
 #
index 0da303e8f59adaa4b2f3a12612c0db696d40b9fe..df1b1549a907e1f8a89b29898181a13e94325875 100644 (file)
@@ -1,8 +1,8 @@
 dnl
 dnl Common configuration stuff for CUPS.
 dnl
-dnl Copyright 2007-2018 by Apple Inc.
-dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
+dnl Copyright © 2007-2018 by Apple Inc.
+dnl Copyright © 1997-2007 by Easy Software Products, all rights reserved.
 dnl
 dnl Licensed under Apache License v2.0.  See the file "LICENSE" for more
 dnl information.
@@ -433,16 +433,21 @@ COMPONENTS="all"
 
 AC_ARG_WITH(components, [  --with-components       set components to build:
                            - "all" (default) builds everything
-                           - "core" builds libcups and ipptool],
+                           - "core" builds libcups and ipptool
+                           - "libcups" builds just libcups],
        COMPONENTS="$withval")
 
 case "$COMPONENTS" in
        all)
-               BUILDDIRS="filter backend berkeley cgi-bin monitor notifier ppdc scheduler systemv conf data desktop locale man doc examples templates"
+               BUILDDIRS="test filter backend berkeley cgi-bin monitor notifier ppdc scheduler systemv conf data desktop locale man doc examples templates"
                ;;
 
        core)
-               BUILDDIRS="data locale"
+               BUILDDIRS="test locale"
+               ;;
+
+       libcups)
+               BUILDDIRS="locale"
                ;;
 
        *)
index ab0322b1a20ec99acc9ca2100b61f466046ddf96..43f034d7ba6fff377a71525599579d2bdc668f0f 100644 (file)
@@ -20,7 +20,7 @@ AC_ARG_WITH(languages, [  --with-languages        set installed languages, defau
 AC_SUBST(LANGUAGES)
 
 dnl macOS bundle-based localization support
-AC_ARG_WITH(bundledir, [  --with-bundledir        set macOS localization bundle directory ],
+AC_ARG_WITH(bundledir, [  --with-bundledir        set localization bundle directory ],
        CUPS_BUNDLEDIR="$withval",[
        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"
@@ -32,12 +32,21 @@ AC_ARG_WITH(bundledir, [  --with-bundledir        set macOS localization bundle
 AC_SUBST(CUPS_BUNDLEDIR)
 if test "x$CUPS_BUNDLEDIR" != x; then
        AC_DEFINE_UNQUOTED(CUPS_BUNDLEDIR, "$CUPS_BUNDLEDIR")
+fi
 
+AC_ARG_WITH(bundlelang, [  --with-bundlelang       set localization bundle base language (English or en) ],
+       cups_bundlelang="$withval",[
        if test $host_os_version -ge 190; then
-               CUPS_RESOURCEDIR="$CUPS_BUNDLEDIR/Resources/en.lproj"
+               cups_bundlelang="en"
        else
-               CUPS_RESOURCEDIR="$CUPS_BUNDLEDIR/Resources/English.lproj"
-       fi
+               cups_bundlelang="English"
+       fi])
+else
+       cups_bundlelang=""
+fi
+
+if test "x$cups_bundlelang" != x -a "x$CUPS_BUNDLEDIR" != x; then
+       CUPS_RESOURCEDIR="$CUPS_BUNDLEDIR/Resources/$cups_bundlelang.lproj"
 else
        CUPS_RESOURCEDIR=""
 fi
index 0ad647752b4dee16439b058111eb400c70f25f86..e2ae90f877f9efed8a449dda69751ed80ab4a259 100755 (executable)
--- a/configure
+++ b/configure
@@ -876,6 +876,7 @@ with_rcstop
 with_xinetd
 with_languages
 with_bundledir
+with_bundlelang
 with_exe_file_perm
 with_config_file_perm
 with_cupsd_file_perm
@@ -1571,6 +1572,7 @@ Optional Packages:
   --with-components       set components to build:
                            - "all" (default) builds everything
                            - "core" builds libcups and ipptool
+                           - "libcups" builds just libcups
   --with-privateinclude   set path for private include files, default=none
   --with-lpdconfig        set URI for LPD config file
   --with-smbconfig        set URI for Samba config file
@@ -1597,7 +1599,8 @@ 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 macOS localization bundle directory
+  --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=0555
   --with-config-file-perm set default ConfigFilePerm value, default=0640
   --with-cupsd-file-perm  set default cupsd permissions, default=0500
@@ -6104,11 +6107,15 @@ fi
 
 case "$COMPONENTS" in
        all)
-               BUILDDIRS="filter backend berkeley cgi-bin monitor notifier ppdc scheduler systemv conf data desktop locale man doc examples templates"
+               BUILDDIRS="test filter backend berkeley cgi-bin monitor notifier ppdc scheduler systemv conf data desktop locale man doc examples templates"
                ;;
 
        core)
-               BUILDDIRS="data locale"
+               BUILDDIRS="test locale"
+               ;;
+
+       libcups)
+               BUILDDIRS="locale"
                ;;
 
        *)
@@ -9496,12 +9503,27 @@ if test "x$CUPS_BUNDLEDIR" != x; then
 #define CUPS_BUNDLEDIR "$CUPS_BUNDLEDIR"
 _ACEOF
 
+fi
+
+
+# Check whether --with-bundlelang was given.
+if test "${with_bundlelang+set}" = set; then :
+  withval=$with_bundlelang; cups_bundlelang="$withval"
+else
 
        if test $host_os_version -ge 190; then
-               CUPS_RESOURCEDIR="$CUPS_BUNDLEDIR/Resources/en.lproj"
+               cups_bundlelang="en"
        else
-               CUPS_RESOURCEDIR="$CUPS_BUNDLEDIR/Resources/English.lproj"
+               cups_bundlelang="English"
        fi
+fi
+
+else
+       cups_bundlelang=""
+fi
+
+if test "x$cups_bundlelang" != x -a "x$CUPS_BUNDLEDIR" != x; then
+       CUPS_RESOURCEDIR="$CUPS_BUNDLEDIR/Resources/$cups_bundlelang.lproj"
 else
        CUPS_RESOURCEDIR=""
 fi
index 458770de0520ae9a0e5c23e75c8a0069650ae7c5..534445ea84a607df7ffdb1cfba9c0ced98f47b0c 100644 (file)
 
 
 /*
- * Location of macOS localization bundle, if any.
+ * Location of localization bundle, if any.
  */
 
-#if !TARGET_OS_IOS
+#if TARGET_OS_IOS
+#  define CUPS_BUNDLEDIR "/System/Library/PrivateFrameworks/PrintKit.framework/Versions/A"
+#else
 #  define CUPS_BUNDLEDIR "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A"
-#endif /* !TARGET_OS_IOS */
+#endif /* TARGET_OS_IOS */
 
 
 /*