ports/70945: New port: devel/pear-Validate Validation class

Antônio Carlos Venâncio Júnior antonio at php.net
Wed Aug 25 22:40:26 UTC 2004


The following reply was made to PR ports/70945; it has been noted by GNATS.

From: =?ISO-8859-1?Q?Ant=F4nio_Carlos_Ven=E2ncio_J=FAnior?= <antonio at php.net>
To: Thierry Thomas <thierry at pompo.net>
Cc: freebsd-gnats-submit at FreeBSD.org
Subject: Re: ports/70945: New port: devel/pear-Validate Validation class
Date: Wed, 25 Aug 2004 19:33:19 -0300

 This is a multi-part message in MIME format.
 --------------090103040708070108010709
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 8bit
 
 Thierry,
 
 Thierry Thomas wrote:
 > Hello,
 > 
 > Le Mer 25 aoû 04 à 17:01:53 +0200, Antônio Carlos Venâncio Júnior <antonio at php.net>
 >  écrivait :
 > 
 >>>Number:         70945
 >>>Category:       ports
 >>>Synopsis:       New port: devel/pear-Validate Validation class
 > 
 > 
 > The files Validate/AT.php and Validate/CH.php contain a string
 > @DATADIR@, to be replaced by data_dir; then, the files AT_postcodes.txt
 > and CH_postcodes.txt should be installed in this data directory.
 
 	shar attached. I'll send the @DATADIR@ part tomorrow, ok?! ;)
 
 > data does not exist in pear-PEAR/Makefile.common: I think it should be
 > defined, like you have proposed for sql in PR ports/70915. Could you add
 > it, please?
 
 	Diff attached.
 
 > Regards,
 
 
 -- 
 Cya
 
 Antônio
 echo antonio php net | sed 's/ /@/;s/ /./g'
 FreeBSD/OpenBSD | PHP/MySQL/Python | PGP Key ID 0x5BBEB073
 "Can't buy what I want because its FREE!" - Pearl Jam
 
 --------------090103040708070108010709
 Content-Type: text/plain;
  name="Makefile.common.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="Makefile.common.diff"
 
 --- Makefile.common.orig	Tue Aug 24 16:00:30 2004
 +++ Makefile.common	Wed Aug 25 18:47:38 2004
 @@ -21,11 +21,15 @@
  LDOCSDIR=	share/doc/pear/${PORTNAME}
  LEXAMPLESDIR=	share/examples/pear/${PORTNAME}
  LTESTSDIR=	${LPEARDIR}/tests/${PORTNAME}
 +LDATADIR=	${LPEARDIR}/data/${PORTNAME}
 +LSQLSDIR=	${LPEARDIR}/sql/${PORTNAME}
  PEARDIR=	${PHP_BASE}/${LPEARDIR}
  PKGREGDIR=	${PHP_BASE}/${LPKGREGDIR}
  DOCSDIR=	${PHP_BASE}/${LDOCSDIR}
  EXAMPLESDIR=	${PHP_BASE}/${LEXAMPLESDIR}
  TESTSDIR=	${PHP_BASE}/${LTESTSDIR}
 +DATADIR=	${PHP_BASE}/${LDATADIR}
 +SQLSDIR=	${PHP_BASE}/${LSQLSDIR}
  .if defined(CATEGORY) && !empty(CATEGORY)
  LINSTDIR=	${LPEARDIR}/${CATEGORY}
  .else
 @@ -38,7 +42,8 @@
  .endif
  PLIST_SUB=	PEARDIR=${LPEARDIR} PKGREGDIR=${LPKGREGDIR} \
  		TESTSDIR=${LTESTSDIR} EXAMPLESDIR=${LEXAMPLESDIR} \
 -		INSTDIR=${LINSTDIR}
 +		INSTDIR=${LINSTDIR} SQLSDIR=${LSQLSDIR} \
 +		DATADIR=${LDATADIR}
  
  PKGINSTALL=	${PORTSDIR}/devel/pear-PEAR/pkg-install
  PKGDEINSTALL=	${PORTSDIR}/devel/pear-PEAR/pkg-deinstall
 @@ -46,15 +51,19 @@
  FILES?=
  DOCS?=
  TESTS?=
 +DATA?=
 +SQLS?=
  EXAMPLES?=
  _TESTSDIR?=	tests
 +_DATADIR?=	data
 +_SQLSDIR?=	sql
  _DOCSDIR?=	docs
  _EXAMPLESDIR?=	examples
  
  # this is an easy way to eliminate duplicate entries in a variable :)
  # if someone knows how to achieve the result without this terrible
  # hack, please tell me!
 -.for v in FILES DOCS TESTS EXAMPLES
 +.for v in FILES DOCS TESTS EXAMPLES SQLS DATA
  X${v}DIRS=	${${v}:M*/*:C;/[^/]+$;;}
  . for XD in ${X${v}DIRS}
  ALREADYTHERE=	0
 @@ -90,6 +99,8 @@
  	@${ECHO_MSG} "===>   Generating packing list"; \
  	(for file in ${FILES}; do echo "${LINSTDIR}/$${file}"; done; \
  	for file in ${TESTS}; do echo "${LTESTSDIR}/$${file}"; done; \
 +	for file in ${DATA}; do echo "${LDATADIR}/$${file}"; done; \
 +	for file in ${SQLS}; do echo "${LSQLSDIR}/$${file}"; done; \
  	for file in ${DOCS}; do echo "%%PORTDOCS%%${LDOCSDIR}/$${file}"; done; \
  	for file in ${EXAMPLES}; do echo "%%PORTDOCS%%${LEXAMPLESDIR}/$${file}"; done; \
  	echo "${LPKGREGDIR}/package.xml"; \
 @@ -97,11 +108,17 @@
  	    while read dir; do echo "@dirrm ${LINSTDIR}/$${dir}"; done; \
  	for d in ${TESTS}; do echo $${d}; done | ${DIRFILTER} | \
  	    while read dir; do echo "@dirrm ${LTESTSDIR}/$${dir}"; done; \
 +	for d in ${DATA}; do echo $${d}; done | ${DIRFILTER} | \
 +	    while read dir; do echo "@dirrm ${LDATADIR}/$${dir}"; done; \
 +	for d in ${SQLS}; do echo $${d}; done | ${DIRFILTER} | \
 +	    while read dir; do echo "@dirrm ${LSQLSDIR}/$${dir}"; done; \
  	for d in ${DOCS}; do echo $${d}; done | ${DIRFILTER} | \
  	    while read dir; do echo "%%PORTDOCS%%@dirrm ${LDOCSDIR}/$${dir}"; done; \
  	for d in ${EXAMPLES}; do echo $${d}; done | ${DIRFILTER} | \
  	    while read dir; do echo "%%PORTDOCS%%@dirrm ${LEXAMPLESDIR}/$${dir}"; done; \
  	if [ -n "${TESTS}" ]; then echo "@dirrm ${LTESTSDIR}"; fi; \
 +	if [ -n "${DATA}" ]; then echo "@dirrm ${LDATADIR}"; fi; \
 +	if [ -n "${SQLS}" ]; then echo "@dirrm ${LSQLSDIR}"; fi; \
  	if [ -n "${DOCS}" ]; then echo "%%PORTDOCS%%@dirrm ${LDOCSDIR}"; fi; \
  	if [ -n "${EXAMPLES}" ]; then echo "%%PORTDOCS%%@dirrm ${LEXAMPLESDIR}"; fi; \
  	echo "@dirrm ${LPKGREGDIR}"; \
 @@ -111,17 +128,20 @@
  	echo "@unexec rmdir %D/${LPEARDIR} 2> /dev/null || true"; \
  	echo "@unexec rmdir %D/${LDOCSDIR:H} 2> /dev/null || true"; \
  	echo "@unexec rmdir %D/${LEXAMPLESDIR:H} 2> /dev/null || true"; \
 -	echo "@unexec rmdir %D/${LTESTSDIR:H} 2> /dev/null || true") > ${PLIST}
 +	echo "@unexec rmdir %D/${LTESTSDIR:H} 2> /dev/null || true"; \
 +	echo "@unexec rmdir %D/${LDATADIR:H} 2> /dev/null || true"; \
 +	echo "@unexec rmdir %D/${LSQLSDIR:H} 2> /dev/null || true") > ${PLIST}
  . endif
  
 -. for t in files docs tests examples
 +. for t in files docs tests sqls examples data
  .  if !target(do-install-${t}-msg)
  do-install-${t}-msg: .USE
  .  endif
  . endfor
  
 -pre-install: do-generate-plist
 -do-install: do-install-files do-install-docs do-install-tests do-install-examples
 +pre-install: 	do-generate-plist
 +do-install: 	do-install-files do-install-docs do-install-tests do-install-sqls \
 +		do-install-examples do-install-data
  
  do-install-files: do-install-files-msg
  	@${MKDIR} ${INSTDIR}
 @@ -153,6 +173,30 @@
  .  endfor
  .  for file in ${TESTS}
  	@${INSTALL_DATA} ${WRKSRC}/${_TESTSDIR}/${file} ${TESTSDIR}/${file}
 +.  endfor
 +. endif
 +
 +do-install-data: do-install-data-msg
 +. if !empty(DATA)
 +	@${ECHO_MSG} "===> Installing data in ${DATADIR}."
 +	@${MKDIR} ${DATADIR}
 +.  for dir in ${DATADIRS}
 +	@${MKDIR} ${DATADIR}/${dir}
 +.  endfor
 +.  for file in ${DATA}
 +	@${INSTALL_DATA} ${WRKSRC}/${_DATADIR}/${file} ${DATADIR}/${file}
 +.  endfor
 +. endif
 +
 +do-install-sqls: do-install-sqls-msg
 +. if !empty(SQLS)
 +	@${ECHO_MSG} "===> Installing sqls in ${SQLSDIR}."
 +	@${MKDIR} ${SQLSDIR}
 +.  for dir in ${SQLSDIRS}
 +	@${MKDIR} ${SQLSDIR}/${dir}
 +.  endfor
 +.  for file in ${SQLS}
 +	@${INSTALL_DATA} ${WRKSRC}/${_SQLSDIR}/${file} ${SQLSDIR}/${file}
  .  endfor
  . endif
  
 
 --------------090103040708070108010709
 Content-Type: text/plain;
  name="pear-Validate.shar"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="pear-Validate.shar"
 
 # 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:
 #
 #	pear-Validate
 #	pear-Validate/Makefile
 #	pear-Validate/distinfo
 #	pear-Validate/pkg-descr
 #
 echo c - pear-Validate
 mkdir -p pear-Validate > /dev/null 2>&1
 echo x - pear-Validate/Makefile
 sed 's/^X//' >pear-Validate/Makefile << 'END-of-pear-Validate/Makefile'
 X# Ports collection makefile for:  pear-Validate
 X# Date created:			  25 August 2004
 X# Whom:				  Antonio Carlos Venancio Junior (<antonio at php.net>)
 X#
 X# $FreeBSD$
 X#
 X
 XPORTNAME=	Validate
 XPORTVERSION=	0.4.1
 XCATEGORIES=	devel www pear
 X
 XMAINTAINER=	antonio at php.net
 XCOMMENT=	Validation class
 X
 XBUILD_DEPENDS=	${PEARDIR}/PEAR.php:${PORTSDIR}/devel/pear-PEAR
 XRUN_DEPENDS=	${BUILD_DEPENDS}
 X
 XFILES=		Validate.php Validate/Finance.php \
 X		Validate/Finance/IBAN.php Validate/AT.php Validate/CH.php \
 X		Validate/DE.php Validate/ES.php Validate/FR.php \
 X		Validate/NL.php Validate/PL.php Validate/ptBR.php \
 X		Validate/UK.php Validate/US.php
 X
 XTESTS=		number.php date.php credit_card.php validate_AT.php \
 X		validate_CH.php validate_DE.php validate_NL.php \
 X		validate_UK.php validate_Finance.php
 X
 XDOCS=		sample_multiple.php
 X
 XDATA=		AT_postcodes.txt CH_postcodes.txt
 X
 X.include <bsd.port.pre.mk>
 X.include "${PORTSDIR}/devel/pear-PEAR/Makefile.common"
 X.include <bsd.port.post.mk>
 END-of-pear-Validate/Makefile
 echo x - pear-Validate/distinfo
 sed 's/^X//' >pear-Validate/distinfo << 'END-of-pear-Validate/distinfo'
 XMD5 (PEAR/Validate-0.4.1.tgz) = 6203c4285dc8ff0736b823fa6e991de4
 XSIZE (PEAR/Validate-0.4.1.tgz) = 37615
 END-of-pear-Validate/distinfo
 echo x - pear-Validate/pkg-descr
 sed 's/^X//' >pear-Validate/pkg-descr << 'END-of-pear-Validate/pkg-descr'
 XPackage to validate various datas. It includes:
 X* numbers (min/max, decimal or not)
 X* email (syntax, domain check)
 X* string (predifined type alpha upper and/or lowercase, numeric,...)
 X* date (min, max)
 X* Credit cards
 X* uri (RFC2396)
 X* possibility valid multiple data with a single method call (::multiple)
 X* Locale validation for AT, CH, DE, ES, FR, NL, PL, ptBR, UK, US
 X* Finance (e.g. IBAN)
 X
 XWWW: http://pear.php.net/package/Validate
 END-of-pear-Validate/pkg-descr
 exit
 
 
 --------------090103040708070108010709--
 



More information about the freebsd-ports-bugs mailing list