1998-11-09 02:26:20 +01:00
|
|
|
# New ports collection makefile for: tidy
|
|
|
|
# Date created: 27 Oct 1998
|
|
|
|
# Whom: Abel Chow <achow@transoft.net>
|
|
|
|
#
|
1999-08-31 04:43:35 +02:00
|
|
|
# $FreeBSD$
|
1998-11-09 02:26:20 +01:00
|
|
|
#
|
|
|
|
|
2003-02-24 08:48:05 +01:00
|
|
|
PORTNAME?= tidy
|
2008-06-22 11:15:43 +02:00
|
|
|
DISTVERSION= 080621-cvs
|
1998-11-09 02:26:20 +01:00
|
|
|
CATEGORIES= www
|
2007-02-03 23:35:20 +01:00
|
|
|
MASTER_SITES= ${MASTER_SITE_LOCAL}
|
|
|
|
#MASTER_SITES= http://tidy.sourceforge.net/src/%SUBDIR%/ \
|
|
|
|
# http://tidy.sourceforge.net/docs/:docs
|
|
|
|
#MASTER_SITE_SUBDIR= . old
|
2007-02-04 23:32:24 +01:00
|
|
|
MASTER_SITE_SUBDIR= thierry
|
2003-02-24 08:48:05 +01:00
|
|
|
PKGNAMESUFFIX?= -devel
|
1998-11-09 02:26:20 +01:00
|
|
|
|
2004-06-05 00:25:15 +02:00
|
|
|
MAINTAINER?= thierry@FreeBSD.org
|
2003-02-24 08:48:05 +01:00
|
|
|
COMMENT?= Utility to clean up and pretty print HTML/XHTML/XML
|
1998-11-09 02:26:20 +01:00
|
|
|
|
2008-07-13 14:49:44 +02:00
|
|
|
BUILD_DEPENDS= xsltproc:${PORTSDIR}/textproc/libxslt
|
|
|
|
|
2007-02-03 23:35:20 +01:00
|
|
|
USE_BZIP2= yes
|
|
|
|
|
|
|
|
SLAVEDIRS= www/tidy-lib
|
2003-02-02 00:24:54 +01:00
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}
|
2000-02-16 01:08:36 +01:00
|
|
|
|
2003-02-24 08:48:05 +01:00
|
|
|
.if !defined(WITH_SHLIB)
|
2003-02-02 00:24:54 +01:00
|
|
|
USE_GMAKE= yes
|
2005-04-20 22:58:16 +02:00
|
|
|
PLIST_SUB= SHLIB="@comment " NSHLIB=""
|
2007-06-14 22:26:57 +02:00
|
|
|
CONFLICTS= tidy-20000804* tidy-lib-[0-9]*
|
2003-02-24 08:48:05 +01:00
|
|
|
.else
|
2008-08-20 02:57:32 +02:00
|
|
|
USE_AUTOTOOLS= automake:15 autoconf:262 libtool:15
|
2003-02-24 08:48:05 +01:00
|
|
|
AUTOMAKE_ARGS+= -a -c --foreign
|
2007-02-03 23:35:20 +01:00
|
|
|
USE_LDCONFIG= yes
|
2005-04-20 22:58:16 +02:00
|
|
|
PLIST_SUB= SHLIB="" NSHLIB="@comment "
|
2007-06-14 22:26:57 +02:00
|
|
|
CONFLICTS= tidy-20000804* tidy-devel-[0-9]*
|
2003-02-24 08:48:05 +01:00
|
|
|
.endif
|
|
|
|
|
|
|
|
DESCR= ${.CURDIR}/pkg-descr
|
|
|
|
|
|
|
|
BIN2STRIP= tidy tab2space
|
1998-11-09 02:26:20 +01:00
|
|
|
|
2003-03-23 14:46:34 +01:00
|
|
|
.if !defined(WITH_SHLIB)
|
|
|
|
MAN1= tidy.1
|
|
|
|
.endif
|
1998-11-09 02:26:20 +01:00
|
|
|
|
2003-02-02 00:24:54 +01:00
|
|
|
.if !defined(NOPORTDOCS)
|
2005-04-20 22:58:16 +02:00
|
|
|
. if !defined(WITH_SHLIB)
|
|
|
|
ALL_TARGET= all doc
|
|
|
|
DOCFILES= quickref.html
|
|
|
|
. endif
|
|
|
|
DOCFILES+= Overview.html checked_by_tidy.gif faq.html grid.gif pending.html \
|
|
|
|
release-notes.html tidy.css tidy.gif
|
2003-02-02 00:24:54 +01:00
|
|
|
.endif
|
|
|
|
|
2007-02-03 23:35:20 +01:00
|
|
|
.if defined(MAINTAINER_MODE)
|
|
|
|
|
|
|
|
CVSROOT= ":pserver:anonymous@tidy.cvs.sourceforge.net:/cvsroot/tidy"
|
|
|
|
CVS_PASSFILE= ${WRKDIR}/temp-cvs-passfile
|
|
|
|
|
|
|
|
getcvs:
|
|
|
|
${MKDIR} ${WRKDIR}/cvs
|
|
|
|
${ECHO_CMD} ${CVSROOT} A > ${CVS_PASSFILE}
|
|
|
|
cd ${WRKDIR}/cvs && \
|
|
|
|
CVSROOT=${CVSROOT} CVS_PASSFILE=${CVS_PASSFILE} cvs -z3 co -P tidy
|
|
|
|
|
|
|
|
tarball:
|
|
|
|
${RM} -rf ${WRKDIR}/cvs/tidy/CVSROOT
|
|
|
|
${FIND} ${WRKDIR}/cvs -name CVS | ${XARGS} ${RM} -rf
|
|
|
|
cd ${WRKDIR}/cvs && \
|
|
|
|
${TAR} cfj ${_DISTDIR}${DISTFILES} tidy
|
|
|
|
|
|
|
|
.endif
|
|
|
|
|
2003-02-24 08:48:05 +01:00
|
|
|
post-patch:
|
2007-02-03 23:35:20 +01:00
|
|
|
${CHMOD} a+x ${WRKSRC}/test/testxml.sh
|
2003-02-24 08:48:05 +01:00
|
|
|
.if !defined(WITH_SHLIB)
|
2007-02-03 23:35:20 +01:00
|
|
|
${CP} ${WRKSRC}/build/gmake/Makefile ${WRKSRC}
|
2003-02-24 08:48:05 +01:00
|
|
|
.else
|
2007-02-03 23:35:20 +01:00
|
|
|
${CP} -R -f ${WRKSRC}/build/gnuauto/* ${WRKSRC}
|
|
|
|
. for t in testone.sh testaccessone.sh
|
|
|
|
${REINPLACE_CMD} -e 's|../bin/tidy|../console/tidy|' \
|
|
|
|
${WRKSRC}/test/${t}
|
|
|
|
. endfor
|
2003-08-18 08:19:18 +02:00
|
|
|
.endif
|
|
|
|
|
2005-11-19 07:02:20 +01:00
|
|
|
patch-autotools::
|
2003-08-18 08:19:18 +02:00
|
|
|
.if defined(WITH_SHLIB)
|
2007-02-03 23:35:20 +01:00
|
|
|
(cd ${WRKSRC} \
|
2003-08-18 08:19:18 +02:00
|
|
|
&& ${LIBTOOLIZE} --force --copy \
|
2006-02-23 11:40:44 +01:00
|
|
|
&& ${ACLOCAL} \
|
|
|
|
&& ${REINPLACE_CMD} -e '/^_LT_AC_SHELL_INIT/d' aclocal.m4)
|
2007-02-03 23:35:20 +01:00
|
|
|
(cd ${PATCH_WRKSRC}; \
|
2004-08-12 21:37:16 +02:00
|
|
|
for ltf in ${LIBTOOLFILES}; do \
|
|
|
|
${CP} $$ltf $$ltf.tmp; \
|
2004-07-01 19:06:41 +02:00
|
|
|
${SED} -e "s^\$$ac_aux_dir/ltconfig^${LTCONFIG}^g" \
|
|
|
|
-e "/^ltmain=/!s^\$$ac_aux_dir/ltmain.sh^${LIBTOOLFLAGS} ${LTMAIN}^g" \
|
2004-08-12 21:37:16 +02:00
|
|
|
$$ltf.tmp > $$ltf; \
|
2003-08-18 08:19:18 +02:00
|
|
|
done);
|
2003-02-24 08:48:05 +01:00
|
|
|
.endif
|
2003-02-19 01:43:41 +01:00
|
|
|
|
2003-02-02 00:24:54 +01:00
|
|
|
post-install:
|
|
|
|
.for pgm in ${BIN2STRIP}
|
2007-02-03 23:35:20 +01:00
|
|
|
${STRIP_CMD} ${PREFIX}/bin/${pgm}
|
2003-02-02 00:24:54 +01:00
|
|
|
.endfor
|
2003-02-24 08:48:05 +01:00
|
|
|
.if defined(WITH_SHLIB)
|
2007-02-03 23:35:20 +01:00
|
|
|
${STRIP_CMD} ${PREFIX}/lib/libtidy-0.99.so.0
|
2003-02-24 08:48:05 +01:00
|
|
|
.endif
|
1998-11-09 02:26:20 +01:00
|
|
|
.if !defined(NOPORTDOCS)
|
1999-08-28 00:30:39 +02:00
|
|
|
@${ECHO_MSG} "===> Installing documentation for ${PKGNAME}"
|
2007-02-03 23:35:20 +01:00
|
|
|
${MKDIR} ${DOCSDIR}
|
|
|
|
${INSTALL_DATA} ${DOCFILES:S|^|${WRKSRC}/htmldoc/|} ${DOCSDIR}
|
2003-02-02 00:24:54 +01:00
|
|
|
@${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}."
|
1998-11-09 02:26:20 +01:00
|
|
|
.endif
|
|
|
|
|
2007-02-03 23:35:20 +01:00
|
|
|
regression-test:
|
|
|
|
.for t in testaccess.sh testall.sh testxml.sh
|
|
|
|
cd ${WRKSRC}/test && ./${t}
|
|
|
|
.endfor
|
|
|
|
|
2005-06-08 18:48:11 +02:00
|
|
|
.include <bsd.port.mk>
|