summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2022-02-22 17:49:50 +0000
committerChris Liddell <chris.liddell@artifex.com>2022-02-24 15:19:30 +0000
commita33299354ce786eb7fdbee300fe64a19d154a941 (patch)
tree6476b85ace2b68df7a1d7388287273a6ca3b18e7
parent9a61e40fd90af6ce091005b3f34cef48c6a1e5a9 (diff)
downloadghostpdl-a33299354ce786eb7fdbee300fe64a19d154a941.tar.gz
Fix building with "local" cups sources
Also cups device: Ignore deprecated function warnings Using gcc pragmas
-rw-r--r--Makefile.in3
-rw-r--r--base/lcups.mak14
-rw-r--r--base/unix-gcc.mak1
-rw-r--r--configure.ac3
-rw-r--r--cups/gdevcups.c9
-rw-r--r--devices/devs.mak8
-rw-r--r--psi/msvc.mak4
7 files changed, 30 insertions, 12 deletions
diff --git a/Makefile.in b/Makefile.in
index bb6554333..ff786e2bc 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2021 Artifex Software, Inc.
+# Copyright (C) 2001-2022 Artifex Software, Inc.
# All Rights Reserved.
#
# This software is provided AS-IS with no warranty, either express or
@@ -381,6 +381,7 @@ CUPSPDFTORASTER=@CUPSPDFTORASTER@
SHARE_LCUPS=@SHARELCUPS@
LCUPS_NAME=cups
LCUPSSRCDIR=@CUPS_DIR@
+LIBCUPSSRCDIR=@LIB_CUPS_DIR@
LCUPSBUILDTYPE=@LCUPSBUILDTYPE@
CUPS_CC=$(CC)
diff --git a/base/lcups.mak b/base/lcups.mak
index 001b538c4..43a25d461 100644
--- a/base/lcups.mak
+++ b/base/lcups.mak
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2021 Artifex Software, Inc.
+# Copyright (C) 2001-2022 Artifex Software, Inc.
# All Rights Reserved.
#
# This software is provided AS-IS with no warranty, either express or
@@ -16,21 +16,21 @@
# makefile for libcups as part of the monolithic gs build.
#
# Users of this makefile must define the following:
-# LCUPSSRCDIR - the source directory
+# LIBCUPSSRCDIR - the source directory
# LCUPSGENDIR - the generated intermediate file directory
# LCUPSOBJDIR - the object file directory
# SHARE_LCUPS - 0 to compile in libcups, 1 to link a shared library
# LCUPS_LIBS - if SHARE_CUPS=1, the link options for the shared library
# (Rename directories.)
-LIBCUPSSRC=$(LCUPSSRCDIR)$(D)libs$(D)cups$(D)
+LIBCUPSSRC=$(LIBCUPSSRCDIR)$(D)libs$(D)cups$(D)
LIBCUPSGEN=$(LCUPSGENDIR)$(D)
LIBCUPSOBJ=$(LCUPSOBJDIR)$(D)
LCUPSO_=$(O_)$(LIBCUPSOBJ)
# NB: we can't use the normal $(CC_) here because msvccmd.mak
# adds /Za which conflicts with the cups source.
-LCUPS_CC=$(CUPS_CC) $(CUPSCFLAGS) $(I_)$(LIBCUPSSRC) $(I_)$(LIBCUPSGEN)$(D)cups $(I_)$(LCUPSSRCDIR)$(D)libs
+LCUPS_CC=$(CUPS_CC) $(CUPSCFLAGS) $(I_)$(LIBCUPSSRC)$(_I) $(I_)$(LIBCUPSGEN)$(D)cups$(_I) $(I_)$(LIBCUPSSRCDIR)$(D)libs$(_I)
# Define the name of this makefile.
LCUPS_MAK=$(GLSRC)lcups.mak $(TOP_MAKEFILES)
@@ -106,7 +106,7 @@ LIBCUPS_DEPS = \
libcups.clean : libcups.config-clean libcups.clean-not-config-clean
libcups.clean-not-config-clean :
- $(EXP)$(ECHOGS_XE) $(LCUPSSRCDIR) $(LCUPSOBJDIR)
+ $(EXP)$(ECHOGS_XE) $(LIBCUPSSRCDIR) $(LCUPSOBJDIR)
$(RM_) $(LIBCUPSOBJ)*.$(OBJ)
libcups.config-clean :
@@ -135,8 +135,8 @@ $(LIBCUPSGEN)lcups_0.dev : $(ECHOGS_XE) $(LIBCUPS_OBJS) $(LIBCUPS_DEPS)
# explicit rules for building the source files
# for simplicity we have every source file depend on all headers
-$(LIBCUPSGEN)$(D)cups$(D)config.h : $(LCUPSSRCDIR)$(D)libs$(D)config$(LCUPSBUILDTYPE).h $(LIBCUPS_DEPS)
- $(CP_) $(LCUPSSRCDIR)$(D)libs$(D)config$(LCUPSBUILDTYPE).h $(LIBCUPSGEN)$(D)cups$(D)config.h
+$(LIBCUPSGEN)$(D)cups$(D)config.h : $(LIBCUPSSRCDIR)$(D)libs$(D)config$(LCUPSBUILDTYPE).h $(LIBCUPS_DEPS)
+ $(CP_) $(LIBCUPSSRCDIR)$(D)libs$(D)config$(LCUPSBUILDTYPE).h $(LIBCUPSGEN)$(D)cups$(D)config.h
$(LIBCUPSOBJ)adminutil.$(OBJ) : $(LIBCUPSSRC)adminutil.c $(LIBCUPSGEN)$(D)cups$(D)config.h $(LIBCUPS_DEPS)
$(LCUPS_CC) $(LCUPSO_)adminutil.$(OBJ) $(C_) $(LIBCUPSSRC)adminutil.c
diff --git a/base/unix-gcc.mak b/base/unix-gcc.mak
index 2abc0223c..04ebcff8a 100644
--- a/base/unix-gcc.mak
+++ b/base/unix-gcc.mak
@@ -328,6 +328,7 @@ CUPSPDFTORASTER=0
SHARE_LCUPS=1
LCUPS_NAME=cups
LCUPSSRCDIR=./cups
+LIBCUPSSRCDIR=./cups
LCUPSBUILDTYPE=
CUPS_CC=$(CC)
diff --git a/configure.ac b/configure.ac
index e752bdd0b..86d5eff34 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1763,6 +1763,7 @@ CUPSDATA=""
CUPSVERSION="0"
CUPSPDFTORASTER="0"
CUPS_DIR=""
+LIB_CUPS_DIR="src"
cups_hard_fail=0
@@ -1875,6 +1876,7 @@ if ( test -f $srcdir/cups/gdevcups.c ); then
LCUPSINCLUDE="include \$(GLSRCDIR)/lcups.mak"
LCUPSIINCLUDE="include \$(GLSRCDIR)/lcupsi.mak"
CUPSDEV="cups pwgraster"
+ LIB_CUPS_DIR=$CUPS_DIR
fi
fi
fi
@@ -1889,6 +1891,7 @@ AC_SUBST(CUPSSERVERROOT)
AC_SUBST(CUPSDATA)
AC_SUBST(CUPSINSTALL)
AC_SUBST(CUPS_DIR)
+AC_SUBST(LIB_CUPS_DIR)
AC_SUBST(SHARELCUPS)
AC_SUBST(SHARELCUPSI)
diff --git a/cups/gdevcups.c b/cups/gdevcups.c
index e3c3c46c3..eb20ed201 100644
--- a/cups/gdevcups.c
+++ b/cups/gdevcups.c
@@ -76,6 +76,12 @@
#include <stdlib.h>
#include <ctype.h>
+
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
#include <cups/raster.h>
#include <cups/ppd.h>
#include <math.h>
@@ -6093,5 +6099,8 @@ cups_spec_op(gx_device *dev_, int op, void *data, int datasize)
return gx_default_dev_spec_op(dev_, op, data, datasize);
}
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
/*
*/
diff --git a/devices/devs.mak b/devices/devs.mak
index 9097e943f..6124af47c 100644
--- a/devices/devs.mak
+++ b/devices/devs.mak
@@ -1916,10 +1916,10 @@ $(DD)urf.dev : $(lcups_dev) $(lcupsi_dev) $(cups_) $(GDEV) $(GLD)page.dev \
$(DEVOBJ)gdevcups.$(OBJ) : $(LCUPSSRCDIR)$(D)gdevcups.c $(std_h) $(gxdevsop_h) $(DEVS_MAK) $(MAKEDIRS)
$(CUPS_CC) $(DEVO_)gdevcups.$(OBJ) $(C_) $(CFLAGS) $(CUPSCFLAGS) \
- $(I_)$(GLSRC) \
- $(I_)$(DEVSRC) \
- $(I_)$(DEVOBJ) \
- $(LCUPSSRCDIR)$(D)gdevcups.c
+ $(I_)$(GLSRC)$(_I) \
+ $(I_)$(DEVSRC)$(_I) $(I_)$(LIBCUPSSRCDIR)$(D)libs$(_I) \
+ $(I_)$(DEVOBJ)$(_I) \
+ $(LCUPSSRCDIR)$(D)gdevcups.c
### ---------------------------- Tracing -------------------------------- ###
diff --git a/psi/msvc.mak b/psi/msvc.mak
index bbc9a9ca6..58d8221df 100644
--- a/psi/msvc.mak
+++ b/psi/msvc.mak
@@ -829,6 +829,10 @@ LCUPSBUILDTYPE=win
CUPS_CC=$(CC) $(CFLAGS) -DWIN32
!endif
+!ifndef LIBCUPSSRCDIR
+LIBCUPSSRCDIR=cups
+!endif
+
!ifndef LCUPSISRCDIR
SHARE_LCUPSI=0
LCUPSI_NAME=