Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

full path in 'configure --with-pdftops=...' #3278

Closed
michaelrsweet opened this issue Aug 4, 2009 · 5 comments
Closed

full path in 'configure --with-pdftops=...' #3278

michaelrsweet opened this issue Aug 4, 2009 · 5 comments
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

@michaelrsweet michaelrsweet commented Aug 4, 2009

Version: 1.4rc1
CUPS.org User: jsmeix.suse

Currently e.g. 'configure --with-pdftops=pdftops'
does a test if the specified binary exists
during compile time via
'AC_PATH_PROG(CUPS_PDFTOPS, pdftops)' in cups-pdf.m4

When we build our cups RPMs we install a build-system
in a chroot environment to make sure the RPM gets
built in a known clean environmnmt.

To satify the test I could install xpdf-tools
which contains /usr/bin/pdftops in the build-system
but this would be only needed to satisfy the test.
As far as I see the actual /usr/bin/pdftops is not
needed to perform the build.

Therefore I would like to specify the full path via
'configure --with-pdftops=/usr/bin/pdftops'
but without the need to actualy install xpdf-tools
to avoid that the build-system gets bloated because
installing whatever applications in the build-system
may pull in huge amounts of other packages which
are required by the application.

The attached patch adds support to specify a full path
as follows 'configure --with-pdftops=/usr/bin/pdftops'
or 'configure --with-pdftops=/usr/bin/gs'
but e.g. 'configure --with-pdftops=/usr/bin/myfilter'
is currently not supported.

Furthermore the patch lets configure abort if
an unsupported value was specified.

In particular the latter is very important
because without the patch one could specify
'configure --with-pdftops=/usr/bin/myfilter'
but then this would be silently ignored and
CUPS would be built without any pdftops filter.

@michaelrsweet
Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Aug 5, 2009

CUPS.org User: mike

Will pick up for 1.4.0.

@michaelrsweet
Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Aug 7, 2009

CUPS.org User: jsmeix.suse

The replacement patch
cups-1.4-full_path_to_configure_with-pdftops.patch
has support for 'with_pdftops=none'
which was missing in my initial patch
full_path_to_configure_with-pdftops.patch

@michaelrsweet
Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Aug 7, 2009

CUPS.org User: mike

Fixed in Subversion repository.

@michaelrsweet
Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Aug 7, 2009

"full_path_to_configure_with-pdftops.patch":

--- config-scripts/cups-pdf.m4.orig 2009-03-12 22:50:44.000000000 +0100
+++ config-scripts/cups-pdf.m4 2009-08-04 12:43:12.000000000 +0200
@@ -13,7 +13,7 @@ dnl which should have been included wi
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl

-AC_ARG_WITH(pdftops, [ --with-pdftops set pdftops filter (gs,pdftops,none), default=pdftops ])
+AC_ARG_WITH(pdftops, [ --with-pdftops set pdftops filter (gs,/path/to/gs,pdftops,/path/to/pdftops,none), default=pdftops ])

PDFTOPS=""
CUPS_PDFTOPS=""
@@ -47,6 +47,12 @@ case "x$with_pdftops" in
fi
;;

  • x/*/gs) # Use /path/to/gs without any check:
  • CUPS_GHOSTSCRIPT="$with_pdftops"
  • AC_DEFINE(HAVE_GHOSTSCRIPT)
  • PDFTOPS="pdftops"
  • ;;

xpdftops)
AC_PATH_PROG(CUPS_PDFTOPS, pdftops)
if test "x$CUPS_PDFTOPS" != x; then
@@ -57,6 +63,17 @@ case "x$with_pdftops" in
exit 1
fi
;;
+

  • x/*/pdftops) # Use /path/to/pdftops without any check:
  • CUPS_PDFTOPS="$with_pdftops"
  • AC_DEFINE(HAVE_PDFTOPS)
  • PDFTOPS="pdftops"
  • ;;
  • *) # Invalid with_pdftops value:
  • AC_MSG_ERROR(Invalid with_pdftops value!)
  • exit 1
  • ;;
    esac

AC_DEFINE_UNQUOTED(CUPS_PDFTOPS, "$CUPS_PDFTOPS")

@michaelrsweet
Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Aug 7, 2009

"cups-1.4-full_path_to_configure_with-pdftops.patch":

--- config-scripts/cups-pdf.m4.orig 2009-03-12 22:50:44.000000000 +0100
+++ config-scripts/cups-pdf.m4 2009-08-07 12:35:38.000000000 +0200
@@ -13,7 +13,7 @@ dnl which should have been included wi
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl

-AC_ARG_WITH(pdftops, [ --with-pdftops set pdftops filter (gs,pdftops,none), default=pdftops ])
+AC_ARG_WITH(pdftops, [ --with-pdftops set pdftops filter (gs,/path/to/gs,pdftops,/path/to/pdftops,none), default=pdftops ])

PDFTOPS=""
CUPS_PDFTOPS=""
@@ -47,6 +47,12 @@ case "x$with_pdftops" in
fi
;;

  • x/*/gs) # Use /path/to/gs without any check:
  • CUPS_GHOSTSCRIPT="$with_pdftops"
  • AC_DEFINE(HAVE_GHOSTSCRIPT)
  • PDFTOPS="pdftops"
  • ;;

xpdftops)
AC_PATH_PROG(CUPS_PDFTOPS, pdftops)
if test "x$CUPS_PDFTOPS" != x; then
@@ -57,6 +63,20 @@ case "x$with_pdftops" in
exit 1
fi
;;
+

  • x/*/pdftops) # Use /path/to/pdftops without any check:
  • CUPS_PDFTOPS="$with_pdftops"
  • AC_DEFINE(HAVE_PDFTOPS)
  • PDFTOPS="pdftops"
  • ;;
  • xnone) # Make no pdftops filter if with_pdftops=none:
  • ;;
  • *) # Invalid with_pdftops value:
  • AC_MSG_ERROR(Invalid with_pdftops value!)
  • exit 1
  • ;;
    esac

AC_DEFINE_UNQUOTED(CUPS_PDFTOPS, "$CUPS_PDFTOPS")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant