Bug 93211 - [new port] databases/pecl-paradox A PHP extension to read and write Paradox files
Summary: [new port] databases/pecl-paradox A PHP extension to read and write Paradox f...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Renato Botelho
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-11 23:50 UTC by Alexander Zhuravlev
Modified: 2006-02-14 14:55 UTC (History)
0 users

See Also:


Attachments
pecl-paradox.diff (2.56 KB, patch)
2006-02-11 23:50 UTC, Alexander Zhuravlev
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Zhuravlev 2006-02-11 23:50:04 UTC

Fix: Please apply the patch provided below.

	Thank you for your efforts ;-)
Comment 1 Alexander Zhuravlev 2006-02-14 01:49:09 UTC
Below is updated shar archive (with pecl-paradox version 1.4.1)

--- pecl-paradox-1.4.1.patch begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	pecl-paradox
#	pecl-paradox/distinfo
#	pecl-paradox/Makefile
#	pecl-paradox/pkg-descr
#	pecl-paradox/files
#	pecl-paradox/files/patch-config.m4
#	pecl-paradox/files/patch-paradox.c
#
echo c - pecl-paradox
mkdir -p pecl-paradox > /dev/null 2>&1
echo x - pecl-paradox/distinfo
sed 's/^X//' >pecl-paradox/distinfo << 'END-of-pecl-paradox/distinfo'
XMD5 (PECL/paradox-1.4.1.tgz) = bc66cee698c9843fc92a0a159f1695a7
XSIZE (PECL/paradox-1.4.1.tgz) = 18956
END-of-pecl-paradox/distinfo
echo x - pecl-paradox/Makefile
sed 's/^X//' >pecl-paradox/Makefile << 'END-of-pecl-paradox/Makefile'
X# Ports collection makefile for:  pecl-paradox
X# Date created:			  2006-02-11
X# Whom:				  Alexander Zhuravlev <zaa@zaa.pp.ru>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	paradox
XDISTVERSION=	1.4.1
XCATEGORIES=	databases www
XMASTER_SITES=	http://pecl.php.net/get/
XPKGNAMEPREFIX=	pecl-
XEXTRACT_SUFX=	.tgz
XDIST_SUBDIR=	PECL
X
XMAINTAINER=	zaa@zaa.pp.ru
XCOMMENT=	An extension to read and write Paradox files
X
XLIB_DEPENDS=	px.6:${PORTSDIR}/databases/pxlib
X
XUSE_PHP=	yes
XUSE_PHPIZE=	yes
XUSE_PHPEXT=	yes
XDEFAULT_PHP_VER=5
XBROKEN_WITH_PHP=4
XPHP_MODNAME=	paradox
X
XCONFIGURE_ARGS+=	--with-paradox=${LOCALBASE}
XCONFIGURE_ENV=  CPPFLAGS=-I${LOCALBASE}/include LDFLAGS=-L${LOCALBASE}/lib
X
X.include <bsd.port.mk>
END-of-pecl-paradox/Makefile
echo x - pecl-paradox/pkg-descr
sed 's/^X//' >pecl-paradox/pkg-descr << 'END-of-pecl-paradox/pkg-descr'
XParadox is an extension to read and write Paradox .DB and .PX files.
XIt can handle almost all field types and binary large objects stored
Xin .MB files.
X
XWWW: http://pecl.php.net/package/paradox
END-of-pecl-paradox/pkg-descr
echo c - pecl-paradox/files
mkdir -p pecl-paradox/files > /dev/null 2>&1
echo x - pecl-paradox/files/patch-config.m4
sed 's/^X//' >pecl-paradox/files/patch-config.m4 << 'END-of-pecl-paradox/files/patch-config.m4'
X--- config.m4.orig	Thu Feb  9 20:26:37 2006
X+++ config.m4	Sat Feb 11 04:35:51 2006
X@@ -44,7 +44,7 @@ if test "$PHP_PARADOX" != "no"; then
X   ],[
X     AC_MSG_ERROR([wrong paradox lib version or lib not found. Need at least pxlib 0.6.0])
X   ],[
X-    -L$PARADOX_DIR/lib -lm -ldl
X+    -L$PARADOX_DIR/lib -lm -liconv -lintl
X   ])
X 
X   PHP_SUBST(PARADOX_SHARED_LIBADD)
END-of-pecl-paradox/files/patch-config.m4
echo x - pecl-paradox/files/patch-paradox.c
sed 's/^X//' >pecl-paradox/files/patch-paradox.c << 'END-of-pecl-paradox/files/patch-paradox.c'
X--- paradox.c.orig	Tue Feb 14 03:57:58 2006
X+++ paradox.c	Tue Feb 14 03:59:42 2006
X@@ -86,8 +86,10 @@
X };
X /* }}} */
X 
X-//#define PHP_ME_MAPPING(name, func_name, arg_types) \
X-//	ZEND_NAMED_FE(name, ZEND_FN(func_name), arg_types)
X+/*
X+#define PHP_ME_MAPPING(name, func_name, arg_types) \
X+	ZEND_NAMED_FE(name, ZEND_FN(func_name), arg_types)
X+*/
X 
X function_entry paradox_funcs_db[] = {
X 	PHP_ME_MAPPING(__construct, px_new, NULL)
X@@ -425,6 +427,7 @@
X 	FILE *fp = NULL;
X 	pxdoc_t *pxdoc = NULL;
X 	zval *object = getThis();
X+	php_stream *stream;
X 
X 	if (object) {
X 		if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zfp)) {
X@@ -438,8 +441,6 @@
X 		PXDOC_FROM_ZVAL(pxdoc, &zpx);
X 	}
X 
X-	php_stream *stream;
X-
X 	php_stream_from_zval(stream, &zfp);
X 	
X 	if (php_stream_cast(stream, PHP_STREAM_AS_STDIO, (void*)&fp, 1) == FAILURE)	{
X@@ -468,6 +469,7 @@
X 	pxfield_t *pxf;
X 	int numfields, i;
X 	zval *object = getThis();
X+	php_stream *stream;
X 
X 	if (object) {
X 		if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rz", &zfp, &schema)) {
X@@ -486,7 +488,6 @@
X 		RETURN_FALSE;
X 	}
X 
X-	php_stream *stream;
X 	php_stream_from_zval(stream, &zfp);
X 	
X 	if (php_stream_cast(stream, PHP_STREAM_AS_STDIO, (void*)&fp, 1) == FAILURE)	{
END-of-pecl-paradox/files/patch-paradox.c
exit
--- pecl-paradox-1.4.1.patch ends here ---

-- 
Alexander Zhuravlev
Comment 2 Renato Botelho freebsd_committer freebsd_triage 2006-02-14 10:07:19 UTC
Responsible Changed
From-To: freebsd-ports-bugs->garga

I'll take it.
Comment 3 Renato Botelho freebsd_committer freebsd_triage 2006-02-14 14:55:17 UTC
State Changed
From-To: open->closed

New port added, with some changes, the most important is that I added a 
patch-paradox.c that fix build on FreeBSD 4.x. Thanks!