mirror of
https://github.com/php/php-src.git
synced 2026-04-24 00:18:23 +02:00
move ext/cpdf to PECL
This commit is contained in:
@@ -7,6 +7,7 @@ PHP NEWS
|
||||
. ext/dio (Jani, Derick)
|
||||
. ext/yp (Jani, Derick)
|
||||
. ext/w32api (Jani, Derick)
|
||||
. ext/cpdf (Tony, Derick)
|
||||
- Changed stream_filter_(ap|pre)pend() to return resource. (Sara)
|
||||
- Changed mysqli_exception and sqlite_exception to use RuntimeException as base
|
||||
if SPL extension is present. (Georg, Marcus)
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
cpdf
|
||||
Uwe Steinmann
|
||||
@@ -1,84 +0,0 @@
|
||||
dnl $Id$
|
||||
|
||||
AC_DEFUN([CPDF_JPEG_TEST],[
|
||||
AC_ARG_WITH(jpeg-dir,
|
||||
[ --with-jpeg-dir[=DIR] CPDF: Set the path to libjpeg install prefix.],[
|
||||
for i in $withval /usr/local /usr; do
|
||||
if test -f "$i/$PHP_LIBDIR/libjpeg.$SHLIB_SUFFIX_NAME" -o -f "$i/$PHP_LIBDIR/libjpeg.a"; then
|
||||
CPDF_JPEG_DIR=$i
|
||||
break;
|
||||
fi
|
||||
done
|
||||
if test -z "$CPDF_JPEG_DIR"; then
|
||||
AC_MSG_ERROR([libjpeg.(a|so) not found.])
|
||||
fi
|
||||
PHP_CHECK_LIBRARY(jpeg, jpeg_read_header, [
|
||||
PHP_ADD_LIBRARY_WITH_PATH(jpeg, $CPDF_JPEG_DIR/lib, CPDF_SHARED_LIBADD)
|
||||
] ,[
|
||||
AC_MSG_ERROR([CPDF: Problem with libjpeg.(a|so). Please check config.log for more information.])
|
||||
], [
|
||||
-L$CPDF_JPEG_DIR/lib
|
||||
])
|
||||
],)
|
||||
])
|
||||
|
||||
AC_DEFUN([CPDF_TIFF_TEST],[
|
||||
AC_ARG_WITH(tiff-dir,
|
||||
[ --with-tiff-dir[=DIR] CPDF: Set the path to libtiff install prefix.],[
|
||||
for i in $withval /usr/local /usr; do
|
||||
if test -f "$i/$PHP_LIBDIR/libtiff.$SHLIB_SUFFIX_NAME" -o -f "$i/$PHP_LIBDIR/libtiff.a"; then
|
||||
CPDF_TIFF_DIR=$i
|
||||
break;
|
||||
fi
|
||||
done
|
||||
if test -z "$CPDF_TIFF_DIR"; then
|
||||
AC_MSG_ERROR([libtiff.(a|so) not found.])
|
||||
fi
|
||||
PHP_CHECK_LIBRARY(tiff, TIFFOpen, [
|
||||
PHP_ADD_LIBRARY_WITH_PATH(tiff, $CPDF_TIFF_DIR/lib, CPDF_SHARED_LIBADD)
|
||||
] ,[
|
||||
AC_MSG_ERROR([CPDF: Problem with libtiff.(a|so). Please check config.log for more information.])
|
||||
], [
|
||||
-L$CPDF_TIFF_DIR/lib
|
||||
])
|
||||
],)
|
||||
])
|
||||
|
||||
PHP_ARG_WITH(cpdflib, for cpdflib support,
|
||||
[ --with-cpdflib[=DIR] Include cpdflib support (requires cpdflib >= 2).])
|
||||
|
||||
if test "$PHP_CPDFLIB" != "no"; then
|
||||
PHP_NEW_EXTENSION(cpdf, cpdf.c, $ext_shared,, \\$(GDLIB_CFLAGS))
|
||||
PHP_SUBST(CPDF_SHARED_LIBADD)
|
||||
CPDF_JPEG_TEST
|
||||
CPDF_TIFF_TEST
|
||||
|
||||
for i in $PHP_CPDFLIB /usr/local /usr; do
|
||||
if test -f "$i/include/cpdflib.h"; then
|
||||
CPDFLIB_INCLUDE=$i/include
|
||||
|
||||
PHP_CHECK_LIBRARY(cpdf, cpdf_open, [
|
||||
cpdf_libname=cpdf
|
||||
], [
|
||||
PHP_CHECK_LIBRARY(cpdfm, cpdf_open, [
|
||||
cpdf_libname=cpdfm
|
||||
], [
|
||||
AC_MSG_ERROR([Cpdflib module requires cpdflib >= 2.])
|
||||
], [
|
||||
-L$i/$PHP_LIBDIR $CPDF_SHARED_LIBADD
|
||||
])
|
||||
], [
|
||||
-L$i/$PHP_LIBDIR $CPDF_SHARED_LIBADD
|
||||
])
|
||||
|
||||
PHP_ADD_LIBRARY_WITH_PATH($cpdf_libname, $i/$PHP_LIBDIR, CPDF_SHARED_LIBADD)
|
||||
PHP_ADD_INCLUDE($CPDFLIB_INCLUDE)
|
||||
AC_DEFINE(HAVE_CPDFLIB,1,[Whether you have cpdflib])
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if test -z "$CPDFLIB_INCLUDE"; then
|
||||
AC_MSG_ERROR([cpdflib.h not found])
|
||||
fi
|
||||
fi
|
||||
@@ -1,14 +0,0 @@
|
||||
// $Id$
|
||||
// vim:ft=javascript
|
||||
|
||||
ARG_WITH("cpdflib", "cpdflib >= 2", "no");
|
||||
|
||||
if (PHP_CPDFLIB != "no") {
|
||||
if (CHECK_LIB("cpdf.lib", "cpdf", PHP_CPDFLIB) &&
|
||||
CHECK_HEADER_ADD_INCLUDE("cpdflib.h", "CFLAGS_CPDF")) {
|
||||
EXTENSION("cpdf", "cpdf.c", PHP_CPDFLIB_SHARED);
|
||||
AC_DEFINE('HAVE_CPDFLIB', 1, 'Have CPDF library');
|
||||
} else {
|
||||
WARNING("cpdf not enabled; libraries and headers not found");
|
||||
}
|
||||
}
|
||||
-2267
File diff suppressed because it is too large
Load Diff
@@ -1,111 +0,0 @@
|
||||
# Microsoft Developer Studio Project File - Name="cpdf" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=cpdf - Win32 Release_TS
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "cpdf.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "cpdf.mak" CFG="cpdf - Win32 Release_TS"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "cpdf - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "cpdf - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "cpdf - Win32 Release_TS"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release_TS"
|
||||
# PROP BASE Intermediate_Dir "Release_TS"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_TS"
|
||||
# PROP Intermediate_Dir "Release_TS"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_CPDF" /D ZTS=1 /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\..\bindlib_w32" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPDF_EXPORTS" /D "COMPILE_DL_CPDF" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_CPDFLIB=1 /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x406 /d "NDEBUG"
|
||||
# ADD RSC /l 0x406 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib cpdfi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts.lib /nologo /dll /machine:I386
|
||||
# ADD LINK32 php5ts.lib cpdf.lib user32.lib winspool.lib kernel32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_cpdf.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "cpdf - Win32 Debug_TS"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Debug_TS"
|
||||
# PROP BASE Intermediate_Dir "Debug_TS"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Debug_TS"
|
||||
# PROP Intermediate_Dir "Debug_TS"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_CPDF" /D ZTS=1 /D MSSQL70=1 /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\..\bindlib_w32" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPDF_EXPORTS" /D "COMPILE_DL_CPDF" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_CPDFLIB=1 /FR /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x406 /d "NDEBUG"
|
||||
# ADD RSC /l 0x406 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib cpdfi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php5ts.lib /nologo /dll /machine:I386
|
||||
# ADD LINK32 cpdf.lib php5ts_debug.lib user32.lib winspool.lib kernel32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /debug /machine:I386 /out:"..\..\Debug_TS/php_cpdf.dll" /libpath:"..\..\Debug_TS"
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "cpdf - Win32 Release_TS"
|
||||
# Name "cpdf - Win32 Debug_TS"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cpdf.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\php_cpdf.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
@@ -1,44 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<!DOCTYPE package SYSTEM "../pear/package.dtd">
|
||||
<package>
|
||||
<name>cpdf</name>
|
||||
<summary>Clib PDF functions</summary>
|
||||
<maintainers>
|
||||
<maintainer>
|
||||
<user>steinm</user>
|
||||
<name>Uwe Steinmann</name>
|
||||
<email>steinm@php.net</email>
|
||||
<role>lead</role>
|
||||
</maintainer>
|
||||
</maintainers>
|
||||
<description>
|
||||
ClibPDF lets you create PDF documents with PHP.
|
||||
ClibPDF functionality and API are similar to PDFlib.
|
||||
</description>
|
||||
<license>PHP</license>
|
||||
<release>
|
||||
<state>beta</state>
|
||||
<version>5.0rc1</version>
|
||||
<date>2004-03-19</date>
|
||||
<notes>
|
||||
package.xml added to support intallation using pear installer
|
||||
</notes>
|
||||
<configureoptions>
|
||||
<configureoption name="with-cpdf" default="autodetect" prompt="path to cpdf installation?"/>
|
||||
</configureoptions>
|
||||
<filelist>
|
||||
<file role="doc" name="CREDITS"/>
|
||||
<file role="src" name="config.m4"/>
|
||||
<file role="src" name="config.mw32"/>
|
||||
<file role="src" name="cpdf.dsp"/>
|
||||
<file role="src" name="cpdf.c"/>
|
||||
<file role="src" name="php_cpdf.h"/>
|
||||
</filelist>
|
||||
<deps>
|
||||
<dep type="php" rel="ge" version="5" />
|
||||
</deps>
|
||||
</release>
|
||||
</package>
|
||||
<!--
|
||||
vim:et:ts=1:sw=1
|
||||
-->
|
||||
@@ -1,119 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2004 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.0 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_0.txt. |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Author: Uwe Steinmann <Uwe.Steinmann@fernuni-hagen.de> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
/* $Id$ */
|
||||
|
||||
#ifndef PHP_CPDF_H
|
||||
#define PHP_CPDF_H
|
||||
|
||||
#if HAVE_CPDFLIB
|
||||
|
||||
/* The macro T is defined in the IMAP headers and clashes with a function
|
||||
declaration here. Get rid of it. */
|
||||
|
||||
#ifdef T
|
||||
#undef T
|
||||
#endif
|
||||
|
||||
extern zend_module_entry cpdf_module_entry;
|
||||
#define cpdf_module_ptr &cpdf_module_entry
|
||||
|
||||
PHP_MINFO_FUNCTION(cpdf);
|
||||
PHP_MINIT_FUNCTION(cpdf);
|
||||
PHP_RINIT_FUNCTION(cpdf);
|
||||
PHP_MSHUTDOWN_FUNCTION(cpdf);
|
||||
PHP_FUNCTION(cpdf_global_set_document_limits);
|
||||
PHP_FUNCTION(cpdf_set_creator);
|
||||
PHP_FUNCTION(cpdf_set_title);
|
||||
PHP_FUNCTION(cpdf_set_subject);
|
||||
PHP_FUNCTION(cpdf_set_keywords);
|
||||
PHP_FUNCTION(cpdf_set_viewer_preferences);
|
||||
PHP_FUNCTION(cpdf_open);
|
||||
PHP_FUNCTION(cpdf_close);
|
||||
PHP_FUNCTION(cpdf_page_init);
|
||||
PHP_FUNCTION(cpdf_finalize_page);
|
||||
PHP_FUNCTION(cpdf_set_current_page);
|
||||
PHP_FUNCTION(cpdf_begin_text);
|
||||
PHP_FUNCTION(cpdf_end_text);
|
||||
PHP_FUNCTION(cpdf_show);
|
||||
PHP_FUNCTION(cpdf_show_xy);
|
||||
PHP_FUNCTION(cpdf_continue_text);
|
||||
PHP_FUNCTION(cpdf_text);
|
||||
PHP_FUNCTION(cpdf_set_font);
|
||||
PHP_FUNCTION(cpdf_set_font_directories);
|
||||
PHP_FUNCTION(cpdf_set_font_map_file);
|
||||
PHP_FUNCTION(cpdf_set_leading);
|
||||
PHP_FUNCTION(cpdf_set_text_rendering);
|
||||
PHP_FUNCTION(cpdf_set_horiz_scaling);
|
||||
PHP_FUNCTION(cpdf_set_text_rise);
|
||||
PHP_FUNCTION(cpdf_set_text_matrix);
|
||||
PHP_FUNCTION(cpdf_set_text_pos);
|
||||
PHP_FUNCTION(cpdf_rotate_text);
|
||||
PHP_FUNCTION(cpdf_set_char_spacing);
|
||||
PHP_FUNCTION(cpdf_set_word_spacing);
|
||||
PHP_FUNCTION(cpdf_continue_text);
|
||||
PHP_FUNCTION(cpdf_stringwidth);
|
||||
PHP_FUNCTION(cpdf_save);
|
||||
PHP_FUNCTION(cpdf_restore);
|
||||
PHP_FUNCTION(cpdf_translate);
|
||||
PHP_FUNCTION(cpdf_scale);
|
||||
PHP_FUNCTION(cpdf_rotate);
|
||||
PHP_FUNCTION(cpdf_setflat);
|
||||
PHP_FUNCTION(cpdf_setlinejoin);
|
||||
PHP_FUNCTION(cpdf_setlinecap);
|
||||
PHP_FUNCTION(cpdf_setmiterlimit);
|
||||
PHP_FUNCTION(cpdf_setlinewidth);
|
||||
PHP_FUNCTION(cpdf_setdash);
|
||||
PHP_FUNCTION(cpdf_moveto);
|
||||
PHP_FUNCTION(cpdf_rmoveto);
|
||||
PHP_FUNCTION(cpdf_curveto);
|
||||
PHP_FUNCTION(cpdf_lineto);
|
||||
PHP_FUNCTION(cpdf_rlineto);
|
||||
PHP_FUNCTION(cpdf_circle);
|
||||
PHP_FUNCTION(cpdf_arc);
|
||||
PHP_FUNCTION(cpdf_rect);
|
||||
PHP_FUNCTION(cpdf_newpath);
|
||||
PHP_FUNCTION(cpdf_closepath);
|
||||
PHP_FUNCTION(cpdf_closepath_stroke);
|
||||
PHP_FUNCTION(cpdf_stroke);
|
||||
PHP_FUNCTION(cpdf_fill);
|
||||
PHP_FUNCTION(cpdf_fill_stroke);
|
||||
PHP_FUNCTION(cpdf_closepath_fill_stroke);
|
||||
PHP_FUNCTION(cpdf_endpath);
|
||||
PHP_FUNCTION(cpdf_clip);
|
||||
PHP_FUNCTION(cpdf_setgray_fill);
|
||||
PHP_FUNCTION(cpdf_setgray_stroke);
|
||||
PHP_FUNCTION(cpdf_setgray);
|
||||
PHP_FUNCTION(cpdf_setrgbcolor_fill);
|
||||
PHP_FUNCTION(cpdf_setrgbcolor_stroke);
|
||||
PHP_FUNCTION(cpdf_setrgbcolor);
|
||||
PHP_FUNCTION(cpdf_add_outline);
|
||||
PHP_FUNCTION(cpdf_set_page_animation);
|
||||
PHP_FUNCTION(cpdf_finalize);
|
||||
PHP_FUNCTION(cpdf_output_buffer);
|
||||
PHP_FUNCTION(cpdf_save_to_file);
|
||||
PHP_FUNCTION(cpdf_add_annotation);
|
||||
PHP_FUNCTION(cpdf_import_jpeg);
|
||||
#if HAVE_LIBGD13
|
||||
PHP_FUNCTION(cpdf_place_inline_image);
|
||||
#endif
|
||||
PHP_FUNCTION(cpdf_set_action_url);
|
||||
#else
|
||||
#define cpdf_module_ptr NULL
|
||||
#endif
|
||||
#define phpext_cpdf_ptr cpdf_module_ptr
|
||||
#endif /* _PHP_PDF_H */
|
||||
Reference in New Issue
Block a user