Re: [PATCH] add -zip extension for php

2012-06-04 Thread Marc Espie
On Mon, Jun 04, 2012 at 03:15:20PM +0100, Stuart Henderson wrote:
> On 2012/06/01 22:31, wen heping wrote:
> > +@conflict archivers/pecl-zip
> 
> @conflict takes a package name, not a path. If you think about it,
> it has to be this way, because it can record a conflict with something
> which may no longer be in ports, so there's no way the build
> infrastructure can work out a reasonable package name from the path.

There's also the fact that, in the end, it will be a binary package,
and binary packages know squat about the build infrastructure *without
looking* within packages, so having a 'first line of defense' that actually
only cares about the package names is the only efficient way to do things...



Re: [PATCH] add -zip extension for php

2012-06-04 Thread Stuart Henderson
On 2012/06/01 22:31, wen heping wrote:
> +@conflict archivers/pecl-zip

@conflict takes a package name, not a path. If you think about it,
it has to be this way, because it can record a conflict with something
which may no longer be in ports, so there's no way the build
infrastructure can work out a reasonable package name from the path.



Re: [PATCH] add -zip extension for php

2012-06-04 Thread Rodolfo Gouveia
On Sat, May 26, 2012 at 09:46:00PM +0800, wen heping wrote:
> But pecl-zip in portstree is in version 1.10.2 which was released about 3
> years ago, and there are some bug fixed after that:
> https://github.com/php/php-src/tree/master/ext/zip
> 
> So for me I would prefer php-zip than pecl-zip.

I would prefer php-zip too. I have had some software in the past that needed 
this.

Cheers,
--rodolfo



Re: [PATCH] add -zip extension for php

2012-06-01 Thread wen heping
2012/5/28 Stuart Henderson 

> On 2012/05/27 22:34, wen heping wrote:
> > 2012/5/27 Antoine Jacoutot 
> >
> > > On Sun, May 27, 2012 at 09:35:13PM +0800, wen heping wrote:
> > > > I found no ports depends on pecl-zip in portstree. But I suggest add
> > >
> > > There are at least photoshow and owncloud that depend on it.
> > >
> >
> > You are right.
> > And now I am sure only photoshow and owncloud that depend on it :)
> > Thanks!
> >
> > I attached revised patch.
> >
> > wen
>
> Nearly done, but there are still a couple of issues:
>

Thanks.

I attached revised patch.

wen





>
> > Index: archivers/pecl-zip/Makefile
>
> This needs unhooking from archivers/Makefile too
>
> > --- /dev/null 1 Jan 1970 00:00:00 -
> > +++ lang/php/5.2/pkg/PLIST-zip27 May 2012 12:53:48 -
> > @@ -0,0 +1,7 @@
> > +@comment $OpenBSD$
> > +@option no-default-conflict
> > +@conflict php-zip->=5.2,<5.3
> > +@pkgpath www/php5/extensions,-zip
>
> @pkgpath should be on archivers/pecl-zip, and it requires an
> @conflict marker on pecl-zip as well as the one you've already added.
>
> > +++ lang/php/5.3/pkg/PLIST-zip27 May 2012 12:53:48 -
> > @@ -0,0 +1,6 @@
> > +@comment $OpenBSD$
> > +@option no-default-conflict
> > +@conflict php-zip->=5.3,<5.4
> > +lib/php-${PV}/modules/zip.so
> > +share/examples/php-${PV}/zip.ini
> > +@sample ${SYSCONFDIR}/php-${PV}.sample/zip.ini
>
> Missing @pkgpath, and it requires an @conflict marker on
> pecl-zip as well as the one you've already added.
>
> > --- www/owncloud/Makefile 3 May 2012 07:20:42 -   1.5
> > +++ www/owncloud/Makefile 27 May 2012 14:28:26 -
> > @@ -38,7 +38,7 @@
> >  TINSTDIR=${TRUEPREFIX}/owncloud
> >  SUBST_VARS=  INSTDIR TINSTDIR
> >
> > -RUN_DEPENDS= archivers/pecl-zip \
> > +RUN_DEPENDS= lang/php/${MODPHP_VERSION},-zip \
> >   lang/php/${MODPHP_VERSION},-curl \
> >   lang/php/${MODPHP_VERSION},-gd
>
> Missing REVISION bump
>
> > Index: www/photoshow/Makefile
> > ===
> > RCS file: /cvs/ports/www/photoshow/Makefile,v
> > retrieving revision 1.3
> > diff -u -r1.3 Makefile
> > --- www/photoshow/Makefile15 Mar 2012 13:38:33 -  1.3
> > +++ www/photoshow/Makefile27 May 2012 14:30:42 -
> > @@ -27,7 +27,7 @@
> >  TINSTDIR=${TRUEPREFIX}/photoshow
> >  SUBST_VARS=  INSTDIR TINSTDIR
> >
> > -RUN_DEPENDS= archivers/pecl-zip
> > +RUN_DEPENDS= lang/php/${MODPHP_VERSION},-zip
> >
> >  do-install:
> >   cp -R ${WRKSRC} ${INSTDIR}
>
> Also missing REVISION bump
>
>
>
Index: archivers/pecl-zip/Makefile
===
RCS file: archivers/pecl-zip/Makefile
diff -N archivers/pecl-zip/Makefile
--- archivers/pecl-zip/Makefile 19 Apr 2012 21:30:26 -  1.9
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,19 +0,0 @@
-# $OpenBSD: Makefile,v 1.9 2012/04/19 21:30:26 sthen Exp $
-
-COMMENT=   PHP support for zip archives
-DISTNAME=  zip-1.10.2
-REVISION=  5
-CATEGORIES=archivers
-
-# PHP
-PERMIT_PACKAGE_CDROM=  Yes
-PERMIT_PACKAGE_FTP=Yes
-PERMIT_DISTFILES_CDROM=Yes
-PERMIT_DISTFILES_FTP=  Yes
-
-WANTLIB=   z
-
-MODULES=   lang/php/pecl
-CONFIGURE_STYLE= gnu
-
-.include 
Index: archivers/pecl-zip/distinfo
===
RCS file: archivers/pecl-zip/distinfo
diff -N archivers/pecl-zip/distinfo
--- archivers/pecl-zip/distinfo 16 Aug 2009 06:39:51 -  1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,5 +0,0 @@
-MD5 (zip-1.10.2.tgz) = CneSVTiPp8nqSz/OrVXMaQ==
-RMD160 (zip-1.10.2.tgz) = hnbs1N7TCCuNIs9zgQGa07eXhPs=
-SHA1 (zip-1.10.2.tgz) = GVl1H23sTqHkPxAjDD/KDPIGlrU=
-SHA256 (zip-1.10.2.tgz) = 1L1VrhmADr4gjivSM63NSr9RbUwFMCA92Le+hL4i35g=
-SIZE (zip-1.10.2.tgz) = 236912
Index: archivers/pecl-zip/pkg/DESCR
===
RCS file: archivers/pecl-zip/pkg/DESCR
diff -N archivers/pecl-zip/pkg/DESCR
--- archivers/pecl-zip/pkg/DESCR16 Aug 2009 06:39:51 -  1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,5 +0,0 @@
-pecl-zip is a PHP extension for reading zip archives.
-
-Documentation is available online at:
-
-http://php.net/zip/
Index: archivers/pecl-zip/pkg/PLIST
===
RCS file: archivers/pecl-zip/pkg/PLIST
diff -N archivers/pecl-zip/pkg/PLIST
--- archivers/pecl-zip/pkg/PLIST8 Jul 2011 18:25:40 -   1.3
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,4 +0,0 @@
-@comment $OpenBSD: PLIST,v 1.3 2011/07/08 18:25:40 robert Exp $
-lib/php-${MODPHP_VERSION}/modules/${MODULE_NAME}.so
-share/examples/php-${MODPHP_VERSION}/${MODULE_NAME}.ini
-@sample ${SYSCONFDIR}/php-${MODPHP_VERSION}.sample/${MODULE_NAME}.ini
Index: archivers/Makefile
===
RCS file: /cvs/ports/archivers/Makefile,v
retrieving revi

Re: [PATCH] add -zip extension for php

2012-05-28 Thread Stuart Henderson
On 2012/05/27 22:34, wen heping wrote:
> 2012/5/27 Antoine Jacoutot 
> 
> > On Sun, May 27, 2012 at 09:35:13PM +0800, wen heping wrote:
> > > I found no ports depends on pecl-zip in portstree. But I suggest add
> >
> > There are at least photoshow and owncloud that depend on it.
> >
> 
> You are right.
> And now I am sure only photoshow and owncloud that depend on it :)
> Thanks!
> 
> I attached revised patch.
> 
> wen

Nearly done, but there are still a couple of issues:

> Index: archivers/pecl-zip/Makefile

This needs unhooking from archivers/Makefile too

> --- /dev/null 1 Jan 1970 00:00:00 -
> +++ lang/php/5.2/pkg/PLIST-zip27 May 2012 12:53:48 -
> @@ -0,0 +1,7 @@
> +@comment $OpenBSD$
> +@option no-default-conflict
> +@conflict php-zip->=5.2,<5.3
> +@pkgpath www/php5/extensions,-zip

@pkgpath should be on archivers/pecl-zip, and it requires an
@conflict marker on pecl-zip as well as the one you've already added.

> +++ lang/php/5.3/pkg/PLIST-zip27 May 2012 12:53:48 -
> @@ -0,0 +1,6 @@
> +@comment $OpenBSD$
> +@option no-default-conflict
> +@conflict php-zip->=5.3,<5.4
> +lib/php-${PV}/modules/zip.so
> +share/examples/php-${PV}/zip.ini
> +@sample ${SYSCONFDIR}/php-${PV}.sample/zip.ini

Missing @pkgpath, and it requires an @conflict marker on
pecl-zip as well as the one you've already added.

> --- www/owncloud/Makefile 3 May 2012 07:20:42 -   1.5
> +++ www/owncloud/Makefile 27 May 2012 14:28:26 -
> @@ -38,7 +38,7 @@
>  TINSTDIR=${TRUEPREFIX}/owncloud
>  SUBST_VARS=  INSTDIR TINSTDIR
>  
> -RUN_DEPENDS= archivers/pecl-zip \
> +RUN_DEPENDS= lang/php/${MODPHP_VERSION},-zip \
>   lang/php/${MODPHP_VERSION},-curl \
>   lang/php/${MODPHP_VERSION},-gd

Missing REVISION bump

> Index: www/photoshow/Makefile
> ===
> RCS file: /cvs/ports/www/photoshow/Makefile,v
> retrieving revision 1.3
> diff -u -r1.3 Makefile
> --- www/photoshow/Makefile15 Mar 2012 13:38:33 -  1.3
> +++ www/photoshow/Makefile27 May 2012 14:30:42 -
> @@ -27,7 +27,7 @@
>  TINSTDIR=${TRUEPREFIX}/photoshow
>  SUBST_VARS=  INSTDIR TINSTDIR
>  
> -RUN_DEPENDS= archivers/pecl-zip
> +RUN_DEPENDS= lang/php/${MODPHP_VERSION},-zip
>  
>  do-install:
>   cp -R ${WRKSRC} ${INSTDIR}

Also missing REVISION bump




Re: [PATCH] add -zip extension for php

2012-05-27 Thread wen heping
2012/5/27 Antoine Jacoutot 

> On Sun, May 27, 2012 at 09:35:13PM +0800, wen heping wrote:
> > I found no ports depends on pecl-zip in portstree. But I suggest add
>
> There are at least photoshow and owncloud that depend on it.
>

You are right.
And now I am sure only photoshow and owncloud that depend on it :)
Thanks!

I attached revised patch.

wen
Index: archivers/pecl-zip/Makefile
===
RCS file: archivers/pecl-zip/Makefile
diff -N archivers/pecl-zip/Makefile
--- archivers/pecl-zip/Makefile 19 Apr 2012 21:30:26 -  1.9
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,19 +0,0 @@
-# $OpenBSD: Makefile,v 1.9 2012/04/19 21:30:26 sthen Exp $
-
-COMMENT=   PHP support for zip archives
-DISTNAME=  zip-1.10.2
-REVISION=  5
-CATEGORIES=archivers
-
-# PHP
-PERMIT_PACKAGE_CDROM=  Yes
-PERMIT_PACKAGE_FTP=Yes
-PERMIT_DISTFILES_CDROM=Yes
-PERMIT_DISTFILES_FTP=  Yes
-
-WANTLIB=   z
-
-MODULES=   lang/php/pecl
-CONFIGURE_STYLE= gnu
-
-.include 
Index: archivers/pecl-zip/distinfo
===
RCS file: archivers/pecl-zip/distinfo
diff -N archivers/pecl-zip/distinfo
--- archivers/pecl-zip/distinfo 16 Aug 2009 06:39:51 -  1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,5 +0,0 @@
-MD5 (zip-1.10.2.tgz) = CneSVTiPp8nqSz/OrVXMaQ==
-RMD160 (zip-1.10.2.tgz) = hnbs1N7TCCuNIs9zgQGa07eXhPs=
-SHA1 (zip-1.10.2.tgz) = GVl1H23sTqHkPxAjDD/KDPIGlrU=
-SHA256 (zip-1.10.2.tgz) = 1L1VrhmADr4gjivSM63NSr9RbUwFMCA92Le+hL4i35g=
-SIZE (zip-1.10.2.tgz) = 236912
Index: archivers/pecl-zip/pkg/DESCR
===
RCS file: archivers/pecl-zip/pkg/DESCR
diff -N archivers/pecl-zip/pkg/DESCR
--- archivers/pecl-zip/pkg/DESCR16 Aug 2009 06:39:51 -  1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,5 +0,0 @@
-pecl-zip is a PHP extension for reading zip archives.
-
-Documentation is available online at:
-
-http://php.net/zip/
Index: archivers/pecl-zip/pkg/PLIST
===
RCS file: archivers/pecl-zip/pkg/PLIST
diff -N archivers/pecl-zip/pkg/PLIST
--- archivers/pecl-zip/pkg/PLIST8 Jul 2011 18:25:40 -   1.3
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,4 +0,0 @@
-@comment $OpenBSD: PLIST,v 1.3 2011/07/08 18:25:40 robert Exp $
-lib/php-${MODPHP_VERSION}/modules/${MODULE_NAME}.so
-share/examples/php-${MODPHP_VERSION}/${MODULE_NAME}.ini
-@sample ${SYSCONFDIR}/php-${MODPHP_VERSION}.sample/${MODULE_NAME}.ini
Index: lang/php/Makefile.inc
===
RCS file: /cvs/ports/lang/php/Makefile.inc,v
retrieving revision 1.28
diff -u -r1.28 Makefile.inc
--- lang/php/Makefile.inc   28 Apr 2012 08:34:56 -  1.28
+++ lang/php/Makefile.inc   27 May 2012 12:53:44 -
@@ -300,6 +300,12 @@
 LIB_DEPENDS-xsl=   textproc/libxslt
 WANTLIB-xsl=   ${MODLIBICONV_WANTLIB} m xml2 z xslt>=3 exslt
 
+# zip
+MULTI_PACKAGES+=   -zip
+COMMENT-zip=   zip functions for php5
+CONFIGURE_ARGS+=   --enable-zip=shared,${LOCALBASE}
+WANTLIB-zip=   m z
+
 # some variables to substitute
 SUBST_VARS=MODPHP_CONFIG_PATH PV ^MODULE_NAME
 PHP_VERSION=   ${V}
Index: lang/php/5.2/pkg/PLIST-zip
===
RCS file: lang/php/5.2/pkg/PLIST-zip
diff -N lang/php/5.2/pkg/PLIST-zip
--- /dev/null   1 Jan 1970 00:00:00 -
+++ lang/php/5.2/pkg/PLIST-zip  27 May 2012 12:53:48 -
@@ -0,0 +1,7 @@
+@comment $OpenBSD$
+@option no-default-conflict
+@conflict php-zip->=5.2,<5.3
+@pkgpath www/php5/extensions,-zip
+lib/php-${PV}/modules/zip.so
+share/examples/php-${PV}/zip.ini
+@sample ${SYSCONFDIR}/php-${PV}.sample/zip.ini
Index: lang/php/5.3/pkg/PLIST-zip
===
RCS file: lang/php/5.3/pkg/PLIST-zip
diff -N lang/php/5.3/pkg/PLIST-zip
--- /dev/null   1 Jan 1970 00:00:00 -
+++ lang/php/5.3/pkg/PLIST-zip  27 May 2012 12:53:48 -
@@ -0,0 +1,6 @@
+@comment $OpenBSD$
+@option no-default-conflict
+@conflict php-zip->=5.3,<5.4
+lib/php-${PV}/modules/zip.so
+share/examples/php-${PV}/zip.ini
+@sample ${SYSCONFDIR}/php-${PV}.sample/zip.ini
Index: lang/php/files/DESCR-zip
===
RCS file: lang/php/files/DESCR-zip
diff -N lang/php/files/DESCR-zip
--- /dev/null   1 Jan 1970 00:00:00 -
+++ lang/php/files/DESCR-zip27 May 2012 12:53:48 -
@@ -0,0 +1,7 @@
+Zip is a file format used for data compression and archiving.
+A zip file contains one or more files that have been compressed,
+to reduce file size, or stored as is. The zip file format permits
+a number of compression algorithms.
+
+This PHP extension provides a processor independent API to Zip
+transformations.
Index: www/owncloud/Makefile
===

Re: [PATCH] add -zip extension for php

2012-05-27 Thread Antoine Jacoutot
On Sun, May 27, 2012 at 09:35:13PM +0800, wen heping wrote:
> I found no ports depends on pecl-zip in portstree. But I suggest add

There are at least photoshow and owncloud that depend on it.



Re: [PATCH] add -zip extension for php

2012-05-27 Thread wen heping
2012/5/27 Stuart Henderson 

> On 2012/05/26 21:46, wen heping wrote:
> > 2012/5/26 Stuart Henderson 
> >
> > > If this is added then there's no point in keeping pecl-zip.
> > >
> > > But then, is there any point in adding this when we have pecl-zip
> already?
> > >
> >
> > Actually pecl-zip and php-zip have the same upstream source coder and
> > almost share the same code.
>
> Yes, exactly.
>
> > But pecl-zip in portstree is in version 1.10.2 which was released about 3
> > years ago, and there are some bug fixed after that:
> > https://github.com/php/php-src/tree/master/ext/zip
> >
> > So for me I would prefer php-zip than pecl-zip.
>
> Okay - if the copy in the main php tree is actively developed then that's
> the better
> version to have, and I don't see why this shouldn't replace pecl-zip. But
> you'll need to
> finish the port: remove pecl-zip to avoid the conflict your diff
> generates, adjust the
> ports which depend on it, add the PLIST markers to PLIST-zip, add a quirk,
> and check
> that pkg_add updates work.
>

I attached the revised patch which include:
   1) remove pecl-zip
   2) add -zip for lang/php

I found no ports depends on pecl-zip in portstree. But I suggest add
php-zip as depends to wordpress and phpmyadmin. With php-zip these ports
could work better.

OK? Comments?

wen






>
> > > > +@conflict php5-zip->=5.2
>
> this line isn't needed as this package never existed.
>
>
Index: archivers/pecl-zip/Makefile
===
RCS file: archivers/pecl-zip/Makefile
diff -N archivers/pecl-zip/Makefile
--- archivers/pecl-zip/Makefile 19 Apr 2012 21:30:26 -  1.9
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,19 +0,0 @@
-# $OpenBSD: Makefile,v 1.9 2012/04/19 21:30:26 sthen Exp $
-
-COMMENT=   PHP support for zip archives
-DISTNAME=  zip-1.10.2
-REVISION=  5
-CATEGORIES=archivers
-
-# PHP
-PERMIT_PACKAGE_CDROM=  Yes
-PERMIT_PACKAGE_FTP=Yes
-PERMIT_DISTFILES_CDROM=Yes
-PERMIT_DISTFILES_FTP=  Yes
-
-WANTLIB=   z
-
-MODULES=   lang/php/pecl
-CONFIGURE_STYLE= gnu
-
-.include 
Index: archivers/pecl-zip/distinfo
===
RCS file: archivers/pecl-zip/distinfo
diff -N archivers/pecl-zip/distinfo
--- archivers/pecl-zip/distinfo 16 Aug 2009 06:39:51 -  1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,5 +0,0 @@
-MD5 (zip-1.10.2.tgz) = CneSVTiPp8nqSz/OrVXMaQ==
-RMD160 (zip-1.10.2.tgz) = hnbs1N7TCCuNIs9zgQGa07eXhPs=
-SHA1 (zip-1.10.2.tgz) = GVl1H23sTqHkPxAjDD/KDPIGlrU=
-SHA256 (zip-1.10.2.tgz) = 1L1VrhmADr4gjivSM63NSr9RbUwFMCA92Le+hL4i35g=
-SIZE (zip-1.10.2.tgz) = 236912
Index: archivers/pecl-zip/pkg/DESCR
===
RCS file: archivers/pecl-zip/pkg/DESCR
diff -N archivers/pecl-zip/pkg/DESCR
--- archivers/pecl-zip/pkg/DESCR16 Aug 2009 06:39:51 -  1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,5 +0,0 @@
-pecl-zip is a PHP extension for reading zip archives.
-
-Documentation is available online at:
-
-http://php.net/zip/
Index: archivers/pecl-zip/pkg/PLIST
===
RCS file: archivers/pecl-zip/pkg/PLIST
diff -N archivers/pecl-zip/pkg/PLIST
--- archivers/pecl-zip/pkg/PLIST8 Jul 2011 18:25:40 -   1.3
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,4 +0,0 @@
-@comment $OpenBSD: PLIST,v 1.3 2011/07/08 18:25:40 robert Exp $
-lib/php-${MODPHP_VERSION}/modules/${MODULE_NAME}.so
-share/examples/php-${MODPHP_VERSION}/${MODULE_NAME}.ini
-@sample ${SYSCONFDIR}/php-${MODPHP_VERSION}.sample/${MODULE_NAME}.ini
Index: lang/php/Makefile.inc
===
RCS file: /cvs/ports/lang/php/Makefile.inc,v
retrieving revision 1.28
diff -u -r1.28 Makefile.inc
--- lang/php/Makefile.inc   28 Apr 2012 08:34:56 -  1.28
+++ lang/php/Makefile.inc   27 May 2012 12:53:44 -
@@ -300,6 +300,12 @@
 LIB_DEPENDS-xsl=   textproc/libxslt
 WANTLIB-xsl=   ${MODLIBICONV_WANTLIB} m xml2 z xslt>=3 exslt
 
+# zip
+MULTI_PACKAGES+=   -zip
+COMMENT-zip=   zip functions for php5
+CONFIGURE_ARGS+=   --enable-zip=shared,${LOCALBASE}
+WANTLIB-zip=   m z
+
 # some variables to substitute
 SUBST_VARS=MODPHP_CONFIG_PATH PV ^MODULE_NAME
 PHP_VERSION=   ${V}
Index: lang/php/5.2/pkg/PLIST-zip
===
RCS file: lang/php/5.2/pkg/PLIST-zip
diff -N lang/php/5.2/pkg/PLIST-zip
--- /dev/null   1 Jan 1970 00:00:00 -
+++ lang/php/5.2/pkg/PLIST-zip  27 May 2012 12:53:48 -
@@ -0,0 +1,7 @@
+@comment $OpenBSD$
+@option no-default-conflict
+@conflict php-zip->=5.2,<5.3
+@pkgpath www/php5/extensions,-zip
+lib/php-${PV}/modules/zip.so
+share/examples/php-${PV}/zip.ini
+@sample ${SYSCONFDIR}/php-${PV}.sample/zip.ini
Index: lang/php/5.3/pkg/PLIST-zip
==

Re: [PATCH] add -zip extension for php

2012-05-26 Thread Stuart Henderson
On 2012/05/26 21:46, wen heping wrote:
> 2012/5/26 Stuart Henderson 
> 
> > If this is added then there's no point in keeping pecl-zip.
> >
> > But then, is there any point in adding this when we have pecl-zip already?
> >
> 
> Actually pecl-zip and php-zip have the same upstream source coder and
> almost share the same code.

Yes, exactly.

> But pecl-zip in portstree is in version 1.10.2 which was released about 3
> years ago, and there are some bug fixed after that:
> https://github.com/php/php-src/tree/master/ext/zip
> 
> So for me I would prefer php-zip than pecl-zip.

Okay - if the copy in the main php tree is actively developed then that's the 
better
version to have, and I don't see why this shouldn't replace pecl-zip. But 
you'll need to
finish the port: remove pecl-zip to avoid the conflict your diff generates, 
adjust the
ports which depend on it, add the PLIST markers to PLIST-zip, add a quirk, and 
check
that pkg_add updates work.

> > > +@conflict php5-zip->=5.2

this line isn't needed as this package never existed.



Re: [PATCH] add -zip extension for php

2012-05-26 Thread wen heping
2012/5/26 Stuart Henderson 

> If this is added then there's no point in keeping pecl-zip.
>
> But then, is there any point in adding this when we have pecl-zip already?
>

Actually pecl-zip and php-zip have the same upstream source coder and
almost share the same code.

But pecl-zip in portstree is in version 1.10.2 which was released about 3
years ago, and there are some bug fixed after that:
https://github.com/php/php-src/tree/master/ext/zip

So for me I would prefer php-zip than pecl-zip.

wen




>
>
> On 2012/05/26 16:30, wen heping wrote:
> > Hi,
> >
> >Here is an patch to add -zip extension to lang/php port. php5-zip is
> > required by the update of www/moodle which I am working.
> >
> >It build well on i386.
> >
> >OK? Comments?
> >
> > wen
>
> > ? php-zip-ext.diff.txt
> > Index: Makefile.inc
> > ===
> > RCS file: /cvs/ports/lang/php/Makefile.inc,v
> > retrieving revision 1.28
> > diff -u -r1.28 Makefile.inc
> > --- Makefile.inc  28 Apr 2012 08:34:56 -  1.28
> > +++ Makefile.inc  26 May 2012 08:26:27 -
> > @@ -300,6 +300,12 @@
> >  LIB_DEPENDS-xsl= textproc/libxslt
> >  WANTLIB-xsl= ${MODLIBICONV_WANTLIB} m xml2 z xslt>=3 exslt
> >
> > +# zip
> > +MULTI_PACKAGES+= -zip
> > +COMMENT-zip= zip functions for php5
> > +CONFIGURE_ARGS+= --enable-zip=shared,${LOCALBASE}
> > +WANTLIB-zip= m z
> > +
> >  # some variables to substitute
> >  SUBST_VARS=  MODPHP_CONFIG_PATH PV ^MODULE_NAME
> >  PHP_VERSION= ${V}
> > Index: 5.2/pkg/PLIST-zip
> > ===
> > RCS file: 5.2/pkg/PLIST-zip
> > diff -N 5.2/pkg/PLIST-zip
> > --- /dev/null 1 Jan 1970 00:00:00 -
> > +++ 5.2/pkg/PLIST-zip 26 May 2012 08:26:29 -
> > @@ -0,0 +1,8 @@
> > +@comment$
> > +@option no-default-conflict
> > +@conflict php-zip->=5.2,<5.3
> > +@conflict php5-zip->=5.2
> > +@pkgpath www/php5/extensions,-zip
> > +lib/php-${PV}/modules/zip.so
> > +share/examples/php-${PV}/zip.ini
> > +@sample ${SYSCONFDIR}/php-${PV}.sample/zip.ini
> > Index: 5.3/pkg/PLIST-zip
> > ===
> > RCS file: 5.3/pkg/PLIST-zip
> > diff -N 5.3/pkg/PLIST-zip
> > --- /dev/null 1 Jan 1970 00:00:00 -
> > +++ 5.3/pkg/PLIST-zip 26 May 2012 08:26:29 -
> > @@ -0,0 +1,7 @@
> > +@comment $OpenBSD$
> > +@option no-default-conflict
> > +@conflict php-zip->=5.3,<5.4
> > +@conflict php5-zip->=5.2
> > +lib/php-${PV}/modules/zip.so
> > +share/examples/php-${PV}/zip.ini
> > +@sample ${SYSCONFDIR}/php-${PV}.sample/zip.ini
> > Index: files/DESCR-zip
> > ===
> > RCS file: files/DESCR-zip
> > diff -N files/DESCR-zip
> > --- /dev/null 1 Jan 1970 00:00:00 -
> > +++ files/DESCR-zip   26 May 2012 08:26:29 -
> > @@ -0,0 +1,7 @@
> > +Zip is a file format used for data compression and archiving.
> > +A zip file contains one or more files that have been compressed,
> > +to reduce file size, or stored as is. The zip file format permits
> > +a number of compression algorithms.
> > +
> > +This PHP extension provides a processor independent API to Zip
> > +transformations.
>
>


Re: [PATCH] add -zip extension for php

2012-05-26 Thread Stuart Henderson
If this is added then there's no point in keeping pecl-zip.

But then, is there any point in adding this when we have pecl-zip already?


On 2012/05/26 16:30, wen heping wrote:
> Hi,
> 
>Here is an patch to add -zip extension to lang/php port. php5-zip is
> required by the update of www/moodle which I am working.
> 
>It build well on i386.
> 
>OK? Comments?
> 
> wen

> ? php-zip-ext.diff.txt
> Index: Makefile.inc
> ===
> RCS file: /cvs/ports/lang/php/Makefile.inc,v
> retrieving revision 1.28
> diff -u -r1.28 Makefile.inc
> --- Makefile.inc  28 Apr 2012 08:34:56 -  1.28
> +++ Makefile.inc  26 May 2012 08:26:27 -
> @@ -300,6 +300,12 @@
>  LIB_DEPENDS-xsl= textproc/libxslt
>  WANTLIB-xsl= ${MODLIBICONV_WANTLIB} m xml2 z xslt>=3 exslt
>  
> +# zip
> +MULTI_PACKAGES+= -zip
> +COMMENT-zip= zip functions for php5
> +CONFIGURE_ARGS+= --enable-zip=shared,${LOCALBASE}
> +WANTLIB-zip= m z
> +
>  # some variables to substitute
>  SUBST_VARS=  MODPHP_CONFIG_PATH PV ^MODULE_NAME
>  PHP_VERSION= ${V}
> Index: 5.2/pkg/PLIST-zip
> ===
> RCS file: 5.2/pkg/PLIST-zip
> diff -N 5.2/pkg/PLIST-zip
> --- /dev/null 1 Jan 1970 00:00:00 -
> +++ 5.2/pkg/PLIST-zip 26 May 2012 08:26:29 -
> @@ -0,0 +1,8 @@
> +@comment$
> +@option no-default-conflict
> +@conflict php-zip->=5.2,<5.3
> +@conflict php5-zip->=5.2
> +@pkgpath www/php5/extensions,-zip
> +lib/php-${PV}/modules/zip.so
> +share/examples/php-${PV}/zip.ini
> +@sample ${SYSCONFDIR}/php-${PV}.sample/zip.ini
> Index: 5.3/pkg/PLIST-zip
> ===
> RCS file: 5.3/pkg/PLIST-zip
> diff -N 5.3/pkg/PLIST-zip
> --- /dev/null 1 Jan 1970 00:00:00 -
> +++ 5.3/pkg/PLIST-zip 26 May 2012 08:26:29 -
> @@ -0,0 +1,7 @@
> +@comment $OpenBSD$
> +@option no-default-conflict
> +@conflict php-zip->=5.3,<5.4
> +@conflict php5-zip->=5.2
> +lib/php-${PV}/modules/zip.so
> +share/examples/php-${PV}/zip.ini
> +@sample ${SYSCONFDIR}/php-${PV}.sample/zip.ini
> Index: files/DESCR-zip
> ===
> RCS file: files/DESCR-zip
> diff -N files/DESCR-zip
> --- /dev/null 1 Jan 1970 00:00:00 -
> +++ files/DESCR-zip   26 May 2012 08:26:29 -
> @@ -0,0 +1,7 @@
> +Zip is a file format used for data compression and archiving.
> +A zip file contains one or more files that have been compressed,
> +to reduce file size, or stored as is. The zip file format permits
> +a number of compression algorithms.
> +
> +This PHP extension provides a processor independent API to Zip
> +transformations.



[PATCH] add -zip extension for php

2012-05-26 Thread wen heping
Hi,

   Here is an patch to add -zip extension to lang/php port. php5-zip is
required by the update of www/moodle which I am working.

   It build well on i386.

   OK? Comments?

wen
? php-zip-ext.diff.txt
Index: Makefile.inc
===
RCS file: /cvs/ports/lang/php/Makefile.inc,v
retrieving revision 1.28
diff -u -r1.28 Makefile.inc
--- Makefile.inc28 Apr 2012 08:34:56 -  1.28
+++ Makefile.inc26 May 2012 08:26:27 -
@@ -300,6 +300,12 @@
 LIB_DEPENDS-xsl=   textproc/libxslt
 WANTLIB-xsl=   ${MODLIBICONV_WANTLIB} m xml2 z xslt>=3 exslt
 
+# zip
+MULTI_PACKAGES+=   -zip
+COMMENT-zip=   zip functions for php5
+CONFIGURE_ARGS+=   --enable-zip=shared,${LOCALBASE}
+WANTLIB-zip=   m z
+
 # some variables to substitute
 SUBST_VARS=MODPHP_CONFIG_PATH PV ^MODULE_NAME
 PHP_VERSION=   ${V}
Index: 5.2/pkg/PLIST-zip
===
RCS file: 5.2/pkg/PLIST-zip
diff -N 5.2/pkg/PLIST-zip
--- /dev/null   1 Jan 1970 00:00:00 -
+++ 5.2/pkg/PLIST-zip   26 May 2012 08:26:29 -
@@ -0,0 +1,8 @@
+@comment$
+@option no-default-conflict
+@conflict php-zip->=5.2,<5.3
+@conflict php5-zip->=5.2
+@pkgpath www/php5/extensions,-zip
+lib/php-${PV}/modules/zip.so
+share/examples/php-${PV}/zip.ini
+@sample ${SYSCONFDIR}/php-${PV}.sample/zip.ini
Index: 5.3/pkg/PLIST-zip
===
RCS file: 5.3/pkg/PLIST-zip
diff -N 5.3/pkg/PLIST-zip
--- /dev/null   1 Jan 1970 00:00:00 -
+++ 5.3/pkg/PLIST-zip   26 May 2012 08:26:29 -
@@ -0,0 +1,7 @@
+@comment $OpenBSD$
+@option no-default-conflict
+@conflict php-zip->=5.3,<5.4
+@conflict php5-zip->=5.2
+lib/php-${PV}/modules/zip.so
+share/examples/php-${PV}/zip.ini
+@sample ${SYSCONFDIR}/php-${PV}.sample/zip.ini
Index: files/DESCR-zip
===
RCS file: files/DESCR-zip
diff -N files/DESCR-zip
--- /dev/null   1 Jan 1970 00:00:00 -
+++ files/DESCR-zip 26 May 2012 08:26:29 -
@@ -0,0 +1,7 @@
+Zip is a file format used for data compression and archiving.
+A zip file contains one or more files that have been compressed,
+to reduce file size, or stored as is. The zip file format permits
+a number of compression algorithms.
+
+This PHP extension provides a processor independent API to Zip
+transformations.