pkgsrc/print/cups/patches/patch-an
jlam 75a6360ed6 The following changes only affect the build of CUPS, and the entirety
of the diffs between vanilla CUPS and pkgsrc CUPS will be sent back to
the author.

* Allow overriding the default paths for "CUPS_SERVERBIN" and
  "CUPS_LOCALEDIR" by passing values through the configure script.
  This facilitates using custom directory hierarchies as is common in
  various packaging systems.

* Allow choosing the man page extension style by passing values
  directly through the configure script.  This allows overriding the
  defaults for an operating system, which can happen in some packaging
  systems.  Leave the default behaviour unchanged if not specified.
2003-06-04 06:08:43 +00:00

122 lines
3.6 KiB
Text

$NetBSD: patch-an,v 1.4 2003/06/04 06:08:44 jlam Exp $
--- config-scripts/cups-directories.m4.orig Tue Dec 17 10:56:39 2002
+++ config-scripts/cups-directories.m4
@@ -29,4 +29,6 @@ AC_ARG_WITH(docdir, [ --with-docdir
AC_ARG_WITH(logdir, [ --with-logdir set path for log files],logdir="$withval",logdir="")
AC_ARG_WITH(rcdir, [ --with-rcdir set path for rc scripts],rcdir="$withval",rcdir="")
+AC_ARG_WITH(localedir, [ --with-localedir set path for locale files],localedir="$withval",localedir="")
+AC_ARG_WITH(serverbindir, [ --with-serverbindir set path for server helper programs],serverbindir="$withval",serverbindir="")
dnl Fix "prefix" variable if it hasn't been specified...
@@ -163,30 +165,30 @@ CUPS_SERVERROOT="$sysconfdir/cups"
CUPS_REQUESTS="$localstatedir/spool/cups"
-AC_DEFINE_UNQUOTED(CUPS_SERVERROOT, "$sysconfdir/cups")
-AC_DEFINE_UNQUOTED(CUPS_REQUESTS, "$localstatedir/spool/cups")
+AC_DEFINE_UNQUOTED(CUPS_SERVERROOT, "$CUPS_SERVERROOT")
+AC_DEFINE_UNQUOTED(CUPS_REQUESTS, "$CUPS_REQUESTS")
if test x$logdir = x; then
CUPS_LOGDIR="$localstatedir/log/cups"
- AC_DEFINE_UNQUOTED(CUPS_LOGDIR, "$localstatedir/log/cups")
else
CUPS_LOGDIR="$logdir"
- AC_DEFINE_UNQUOTED(CUPS_LOGDIR, "$logdir")
fi
+AC_DEFINE_UNQUOTED(CUPS_LOGDIR, "$CUPS_LOGDIR")
dnl See what directory to put server executables...
-case "$uname" in
- *BSD* | Darwin*)
- # *BSD and Darwin (MacOS X)
- INSTALL_SYSV=""
- CUPS_SERVERBIN="$exec_prefix/libexec/cups"
- AC_DEFINE_UNQUOTED(CUPS_SERVERBIN, "$exec_prefix/libexec/cups")
- ;;
- *)
- # All others
- INSTALL_SYSV="install-sysv"
- CUPS_SERVERBIN="$libdir/cups"
- AC_DEFINE_UNQUOTED(CUPS_SERVERBIN, "$libdir/cups")
- ;;
-esac
+if test x$serverbindir = x; then
+ case "$uname" in
+ *BSD* | Darwin*)
+ # *BSD and Darwin (MacOS X)
+ CUPS_SERVERBIN="$exec_prefix/libexec/cups"
+ ;;
+ *)
+ # All others
+ CUPS_SERVERBIN="$libdir/cups"
+ ;;
+ esac
+else
+ CUPS_SERVERBIN="$serverbindir"
+fi
+AC_DEFINE_UNQUOTED(CUPS_SERVERBIN, "$CUPS_SERVERBIN")
AC_SUBST(INSTALL_SYSV)
@@ -197,27 +199,28 @@ AC_SUBST(CUPS_REQUESTS)
dnl Set the CUPS_LOCALE directory...
-case "$uname" in
- Linux* | *BSD* | Darwin*)
- CUPS_LOCALEDIR="$datadir/locale"
- AC_DEFINE_UNQUOTED(CUPS_LOCALEDIR, "$datadir/locale")
- ;;
-
- OSF1* | AIX*)
- CUPS_LOCALEDIR="$exec_prefix/lib/nls/msg"
- AC_DEFINE_UNQUOTED(CUPS_LOCALEDIR, "$exec_prefix/lib/nls/msg")
- ;;
-
- *)
- # This is the standard System V location...
- CUPS_LOCALEDIR="$exec_prefix/lib/locale"
- AC_DEFINE_UNQUOTED(CUPS_LOCALEDIR, "$exec_prefix/lib/locale")
- ;;
-esac
+if test x$localedir = x; then
+ case "$uname" in
+ Linux* | *BSD* | Darwin*)
+ CUPS_LOCALEDIR="$datadir/locale"
+ ;;
+ OSF1* | AIX*)
+ CUPS_LOCALEDIR="$exec_prefix/lib/nls/msg"
+ ;;
+
+ *)
+ # This is the standard System V location...
+ CUPS_LOCALEDIR="$exec_prefix/lib/locale"
+ ;;
+ esac
+else
+ CUPS_LOCALEDIR="$localedir"
+fi
+AC_DEFINE_UNQUOTED(CUPS_LOCALEDIR, "$CUPS_LOCALEDIR")
AC_SUBST(CUPS_LOCALEDIR)
dnl Set the CUPS_DATADIR directory...
CUPS_DATADIR="$datadir/cups"
-AC_DEFINE_UNQUOTED(CUPS_DATADIR, "$datadir/cups")
+AC_DEFINE_UNQUOTED(CUPS_DATADIR, "$CUPS_DATADIR")
AC_SUBST(CUPS_DATADIR)
@@ -229,12 +232,11 @@ else
CUPS_DOCROOT="$docdir"
fi
-
-AC_DEFINE_UNQUOTED(CUPS_DOCROOT, "$docdir")
+AC_DEFINE_UNQUOTED(CUPS_DOCROOT, "$CUPS_DOCROOT")
AC_SUBST(CUPS_DOCROOT)
dnl Set the CUPS_FONTPATH directory...
CUPS_FONTPATH="$fontpath"
+AC_DEFINE_UNQUOTED(CUPS_FONTPATH, "$CUPS_FONTPATH")
AC_SUBST(CUPS_FONTPATH)
-AC_DEFINE_UNQUOTED(CUPS_FONTPATH, "$fontpath")
dnl