Sisyphus repositório
Última atualização: 18 setembro 2019 | SRPMs: 17444 | Visitas: 15115116
en ru br
ALT Linux repositórios
S:1.25.5-alt1

Group :: Sistema/Servidores
RPM: cups-filters

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: cups-filters-alt.patch
Download


diff --git a/cups-filters/Makefile.am b/cups-filters/Makefile.am
index bf680e1..2a2b6fb 100644
--- a/cups-filters/Makefile.am
+++ b/cups-filters/Makefile.am
@@ -456,6 +456,7 @@ imagetopdf_CFLAGS = \
 	$(TIFF_CFLAGS) \
 	-I$(srcdir)/cupsfilters/
 imagetopdf_LDADD = \
+	-lm \
 	$(CUPS_LIBS) \
 	$(LIBJPEG_LIBS) \
 	$(LIBPNG_LIBS) \
@@ -472,6 +473,7 @@ imagetoraster_CFLAGS = \
 	$(CUPS_CFLAGS) \
 	-I$(srcdir)/cupsfilters/
 imagetoraster_LDADD = \
+	-lm \
 	$(CUPS_LIBS) \
 	libcupsfilters.la
 
@@ -613,7 +615,7 @@ libphpcups_la_SOURCES = \
 	scripting/php/phpcups.c \
 	scripting/php/phpcups.h
 libphpcups_la_LIBADD = $(CUPS_LIBS)
-libphpcups_la_CFLAGS = $(CUPS_CFLAGS)
+libphpcups_la_CFLAGS = $(CUPS_CFLAGS) -I$(PHPINCLUDEDIR)/main -I$(PHPINCLUDEDIR)/Zend -I$(PHPINCLUDEDIR)/TSRM -I$(PHPINCLUDEDIR)
 libphpcups_la_LDFLAGS = -no-undefined
 endif # WITH_PHP
 
diff --git a/cups-filters/configure.ac b/cups-filters/configure.ac
index e0a1972..1e89588 100644
--- a/cups-filters/configure.ac
+++ b/cups-filters/configure.ac
@@ -350,7 +350,9 @@ AS_IF([test x"$with_php" = "xyes"], [
 		])
 	])
 	PHPDIR="`$PHPCONFIG --extension-dir`"
+	PHPINCLUDEDIR="`$PHPCONFIG --include-dir`"
 	AC_SUBST(PHPDIR)
+	AC_SUBST(PHPINCLUDEDIR)
 ])
 
 # =========
diff --git a/cups-filters/scripting/php/config.m4 b/cups-filters/scripting/php/config.m4
new file mode 100644
index 0000000..144edc2
--- /dev/null
+++ b/cups-filters/scripting/php/config.m4
@@ -0,0 +1,24 @@
+PHP_ARG_WITH(cups, whether to enable the cups extension,
+[  --with-cups[=DIR]	Enables the cups extension. DIR is the prefix to CUPS installation directory.], no)
+
+if test $PHP_CUPS != "no"; then
+
+		AC_MSG_CHECKING(CUPS configuration program)
+		for i in $PHP_CUPS /usr/local /usr;
+		do
+			test -r $i/bin/cups-config && CUPS_BINARY=$i/bin/cups-config && break
+		done	
+		
+		if test -z "$CUPS_BINARY"; then
+			AC_MSG_ERROR(not found. Please provide a path to cups-config program.)
+		fi
+		
+		AC_MSG_RESULT(found in $CUPS_BINARY)
+		
+		PHP_CHECK_LIBRARY(cups, cupsGetDests, [ PHP_ADD_LIBRARY(cups,, CUPS_SHARED_LIBADD) ])
+
+		PHP_NEW_EXTENSION(cups, phpcups.c,  $ext_shared)
+
+		PHP_SUBST(CUPS_SHARED_LIBADD)	
+		AC_DEFINE(HAVE_CUPS,1,[ ])
+fi
diff --git a/cups-filters/scripting/php/php-cups-params.sh b/cups-filters/scripting/php/php-cups-params.sh
new file mode 100644
index 0000000..65e70ff
--- /dev/null
+++ b/cups-filters/scripting/php/php-cups-params.sh
@@ -0,0 +1,2 @@
+exceptions=
+file_ini=cups.ini
diff --git a/cups-filters/scripting/php/php-cups.ini b/cups-filters/scripting/php/php-cups.ini
new file mode 100644
index 0000000..8a98151
--- /dev/null
+++ b/cups-filters/scripting/php/php-cups.ini
@@ -0,0 +1 @@
+extension=cups.so
diff --git a/cups-filters/scripting/php/phpcups.c b/cups-filters/scripting/php/phpcups.c
index 563bd63..4bb3a6a 100644
--- a/cups-filters/scripting/php/phpcups.c
+++ b/cups-filters/scripting/php/phpcups.c
@@ -29,7 +29,6 @@
  * Include necessary headers...
  */
 
-#include <cups/string-private.h>
 #include "php.h"
 #include "php_ini.h"
 #include "ext/standard/info.h"
@@ -67,7 +66,7 @@ zend_module_entry phpcups_module_entry =
   NULL,
   NULL,
   NULL,
-  CUPS_SVERSION,
+  "2.2.2",
   STANDARD_MODULE_PROPERTIES
 };
 
diff --git a/cups-filters/scripting/php/phpcups.h b/cups-filters/scripting/php/phpcups.h
index e4cefae..8df8e92 100644
--- a/cups-filters/scripting/php/phpcups.h
+++ b/cups-filters/scripting/php/phpcups.h
@@ -22,7 +22,6 @@
 
 #  include <cups/cups.h>
 #  include <cups/language.h>
-#  include <cups/debug-private.h>
 #  include <fcntl.h>
 #  include <sys/stat.h>
 #  if defined(WIN32) || defined(__EMX__)
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009