Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Aug 2014 17:16:19 +0000 (UTC)
From:      William Grzybowski <wg@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r363825 - head/textproc/py-xml
Message-ID:  <201408021716.s72HGJpK072889@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: wg
Date: Sat Aug  2 17:16:19 2014
New Revision: 363825
URL: http://svnweb.freebsd.org/changeset/ports/363825
QAT: https://qat.redports.org/buildarchive/r363825/

Log:
  textproc/py-xml: support stage [1]
  
  - Convert to options
  - Use auto plist
  
  PR:		192322
  Submitted by:	christian.mangin gmail com

Deleted:
  head/textproc/py-xml/pkg-plist
Modified:
  head/textproc/py-xml/Makefile

Modified: head/textproc/py-xml/Makefile
==============================================================================
--- head/textproc/py-xml/Makefile	Sat Aug  2 16:45:09 2014	(r363824)
+++ head/textproc/py-xml/Makefile	Sat Aug  2 17:16:19 2014	(r363825)
@@ -9,65 +9,50 @@ MASTER_SITES=		SF/py${PORTNAME}/py${PORT
 PKGNAMEPREFIX=		${PYTHON_PKGNAMEPREFIX}
 DISTNAME=		PyXML-${PORTVERSION}
 
-MAINTAINER=	ports@FreeBSD.org
-COMMENT=		PyXML: Python XML library enhancements
+MAINTAINER=		ports@FreeBSD.org
+COMMENT=		Python XML library enhancements
 
 USE_PYTHON=		yes
 USE_PYDISTUTILS=	yes
-PYDISTUTILS_PKGNAME=	PyXML
+PYDISTUTILS_AUTOPLIST=	yes
+
+OPTIONS_DEFINE=	DOCS XSLT XPATH
+OPTIONS_DEFAULT=XPATH
 
-NO_STAGE=	yes
 .include <bsd.port.pre.mk>
 
 CPIOARGS=		--quiet -pdum -R
 DOCSDIR=		${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
 EXAMPLESDIR=		${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME}
 PLIST_SUB+=		PACKAGE_DIR=_xmlplus
+PORTEXAMPLES=	*
+PORTDOCS=	*
 
-# PyXML's XPath support for minidom (xml.xpath) is functional and is
-# installed by default, unless WITHOUT_XPATH is defined.
-#
-# PyXML's XSLT support for minidom (xml.xslt) is experimental, and may
-# render PyXML incompatible with modern versions of 4Suite. Therefore,
-# this port will not install it by default, unless WITH_XSLT is defined.
-# These defaults are the same as when PyXML is installed independently.
-#
-# WITHOUT_XPATH is ignored if WITH_XSLT is defined.
-#
-# There are no mature XSLT processors that can operate directly on
-# minidom documents, but such documents can be converted to formats
-# that are supported. 4Suite, for example, can convert a DOM directly
-# to a Domlette, and other processors can make use of the serialized
-# form of the document.
-#
-.if defined(WITH_XSLT)
-PYDISTUTILS_BUILDARGS+=	--with-xslt
+.if ${PORT_OPTIONS:MXSLT}
+PYDISTUTILS_BUILDARGS+=		--with-xslt
 PYDISTUTILS_INSTALLARGS+=	--with-xslt
-PLIST_SUB+=	XPATH=""
-PLIST_SUB+=	XSLT=""
-.elif defined(WITHOUT_XPATH)
-PYDISTUTILS_BUILDARGS+=	--without-xpath --without-xslt
-PYDISTUTILS_INSTALLARGS+=	--without-xpath --without-xslt
-PLIST_SUB+=	XPATH="@comment "
-PLIST_SUB+=	XSLT="@comment "
 .else
-PYDISTUTILS_BUILDARGS+=	--with-xpath --without-xslt
-PYDISTUTILS_INSTALLARGS+=	--with-xpath --without-xslt
-PLIST_SUB+=	XPATH=""
-PLIST_SUB+=	XSLT="@comment "
+PYDISTUTILS_BUILDARGS+=		--without-xslt
+PYDISTUTILS_INSTALLARGS+=	--without-xslt
+.endif
+.if ${PORT_OPTIONS:MXPATH}
+PYDISTUTILS_BUILDARGS+=		--with-xpath
+PYDISTUTILS_INSTALLARGS+=	--with-xpath
+.else
+PYDISTUTILS_BUILDARGS+=		--without-xpath
+PYDISTUTILS_INSTALLARGS+=	--without-xpath
 .endif
 
 post-install:
-.if !defined(NOPORTDOCS)
-	@ ${MKDIR} ${DOCSDIR}
+	${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR}/${PACKAGE_DIR} -name '*.so' | ${XARGS} ${STRIP_CMD}
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 .for docfile in ANNOUNCE CREDITS LICENCE README* TODO
-	@ ${INSTALL_DATA} ${WRKSRC}/${docfile} ${DOCSDIR}
+	@${INSTALL_DATA} ${WRKSRC}/${docfile} ${STAGEDIR}${DOCSDIR}
 .endfor
-	@ cd ${WRKSRC}/doc && ${FIND} * \
-	  | ${CPIO} ${CPIOARGS} ${SHAREOWN}:${SHAREGRP} ${DOCSDIR}
-	@ ${MKDIR} ${EXAMPLESDIR}
-	@ cd ${WRKSRC} && ${FIND} demo test \
-	  | ${CPIO} ${CPIOARGS} ${SHAREOWN}:${SHAREGRP} ${EXAMPLESDIR}
-.endif
+	@cd ${WRKSRC}/doc && ${FIND} * \
+	  | ${CPIO} ${CPIOARGS} ${SHAREOWN}:${SHAREGRP} ${STAGEDIR}${DOCSDIR}
+	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+	@cd ${WRKSRC} && ${FIND} demo test \
+	  | ${CPIO} ${CPIOARGS} ${SHAREOWN}:${SHAREGRP} ${STAGEDIR}${EXAMPLESDIR}
 
 .include <bsd.port.post.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408021716.s72HGJpK072889>