Attached is a diff for libxslt that compiles the python bindings in the same way libxml does. Prompted by Brandon Mercer over irc.
-- James Turner BSD Group Consulting http://www.bsdgroup.org
Index: Makefile =================================================================== RCS file: /cvs/ports/textproc/libxslt/Makefile,v retrieving revision 1.57 diff -u -p -r1.57 Makefile --- Makefile 22 May 2008 16:14:26 -0000 1.57 +++ Makefile 11 Sep 2008 20:45:23 -0000 @@ -1,8 +1,13 @@ # $OpenBSD: Makefile,v 1.57 2008/05/22 16:14:26 jasper Exp $ -COMMENT= XSLT C Library for GNOME +COMMENT-main= XSLT C Library for GNOME +COMMENT-python= Python bindings for libxslt + +VERSION= 1.1.24 +DISTNAME= libxslt-${VERSION} +PKGNAME-main= ${DISTNAME}p0 +PKGNAME-python= py-libxslt-${VERSION} -DISTNAME= libxslt-1.1.24 SHARED_LIBS= exslt 9.7 \ xslt 3.7 @@ -18,7 +23,7 @@ PERMIT_PACKAGE_CDROM= Yes PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes -WANTLIB= c gpg-error m z +WANTLIB= gpg-error m z MODULES= devel/gettext LIB_DEPENDS= xml2.>=9:libxml->=2.6.27:textproc/libxml \ @@ -29,6 +34,31 @@ USE_GMAKE= Yes CONFIGURE_STYLE= gnu CONFIGURE_ARGS+= ${CONFIGURE_SHARED} CONFIGURE_ARGS+= --with-libxml-include-prefix='${LOCALBASE}/include/' -CONFIGURE_ARGS+= --without-python + +PSEUDO_FLAVORS= no_python +FLAVOR?= + +MULTI_PACKAGES= -main + +WANTLIB-main= ${WANTLIB} c +RUN_DEPENDS-main= + +.if !${FLAVOR:L:Mno_python} +MULTI_PACKAGES+= -python +MODULES+= lang/python +WANTLIB-python= ${WANTLIB} gcrypt iconv intl xml2 +LIB_DEPENDS-python= xslt.>=3,exslt.>=9::textproc/libxslt +CONFIGURE_ENV+= PYTHON=${MODPY_BIN} +FAKE_FLAGS= EXAMPLE_DIR=${PREFIX}/share/examples/libxslt/ +.endif + +post-install: +.if !${FLAVOR:Mno_python} + ${MODPY_BIN} ${MODPY_LIBDIR}/compileall.py ${WRKINST}${MODPY_SITEPKG} +.endif .include <bsd.port.mk> + +.if ${FLAVOR:L:Mno_python} || ${NO_SHARED_LIBS:L} == "yes" +CONFIGURE_ARGS+= --without-python +.endif Index: pkg/DESCR =================================================================== RCS file: pkg/DESCR diff -N pkg/DESCR --- pkg/DESCR 15 Dec 2003 06:48:37 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,2 +0,0 @@ -libXSLT is a C language implementation of the XSLT Library, based -on libxml. Index: pkg/DESCR-main =================================================================== RCS file: pkg/DESCR-main diff -N pkg/DESCR-main --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg/DESCR-main 11 Sep 2008 20:45:23 -0000 @@ -0,0 +1,2 @@ +libXSLT is a C language implementation of the XSLT Library, based +on libxml. Index: pkg/DESCR-python =================================================================== RCS file: pkg/DESCR-python diff -N pkg/DESCR-python --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg/DESCR-python 11 Sep 2008 20:45:23 -0000 @@ -0,0 +1 @@ +This package contains Python bindings for libxslt. Index: pkg/PFRAG.shared =================================================================== RCS file: pkg/PFRAG.shared diff -N pkg/PFRAG.shared --- pkg/PFRAG.shared 25 Dec 2005 11:44:54 -0000 1.31 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,3 +0,0 @@ [EMAIL PROTECTED] $OpenBSD: PFRAG.shared,v 1.31 2005/12/25 11:44:54 steven Exp $ [EMAIL PROTECTED] lib/libexslt.so.${LIBexslt_VERSION} [EMAIL PROTECTED] lib/libxslt.so.${LIBxslt_VERSION} Index: pkg/PFRAG.shared-main =================================================================== RCS file: pkg/PFRAG.shared-main diff -N pkg/PFRAG.shared-main --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg/PFRAG.shared-main 11 Sep 2008 20:45:23 -0000 @@ -0,0 +1,3 @@ [EMAIL PROTECTED] $OpenBSD$ [EMAIL PROTECTED] lib/libexslt.so.${LIBexslt_VERSION} [EMAIL PROTECTED] lib/libxslt.so.${LIBxslt_VERSION} Index: pkg/PFRAG.shared-python =================================================================== RCS file: pkg/PFRAG.shared-python diff -N pkg/PFRAG.shared-python --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg/PFRAG.shared-python 11 Sep 2008 20:45:23 -0000 @@ -0,0 +1,16 @@ [EMAIL PROTECTED] $OpenBSD$ +lib/python${MODPY_VERSION}/ +lib/python${MODPY_VERSION}/site-packages/ +lib/python${MODPY_VERSION}/site-packages/libxslt.py +lib/python${MODPY_VERSION}/site-packages/libxslt.pyc +lib/python${MODPY_VERSION}/site-packages/libxsltmod.a +lib/python${MODPY_VERSION}/site-packages/libxsltmod.la +lib/python${MODPY_VERSION}/site-packages/libxsltmod.so +share/examples/libxslt/ +share/examples/libxslt/basic.py +share/examples/libxslt/exslt.py +share/examples/libxslt/extelem.py +share/examples/libxslt/extfunc.py +share/examples/libxslt/pyxsltproc.py +share/examples/libxslt/test.xml +share/examples/libxslt/test.xsl Index: pkg/PLIST =================================================================== RCS file: pkg/PLIST diff -N pkg/PLIST --- pkg/PLIST 22 May 2008 16:14:26 -0000 1.26 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,136 +0,0 @@ [EMAIL PROTECTED] $OpenBSD: PLIST,v 1.26 2008/05/22 16:14:26 jasper Exp $ -bin/xslt-config -bin/xsltproc -include/libexslt/ -include/libexslt/exslt.h -include/libexslt/exsltconfig.h -include/libexslt/exsltexports.h -include/libxslt/ -include/libxslt/attributes.h -include/libxslt/documents.h -include/libxslt/extensions.h -include/libxslt/extra.h -include/libxslt/functions.h -include/libxslt/imports.h -include/libxslt/keys.h -include/libxslt/namespaces.h -include/libxslt/numbersInternals.h -include/libxslt/pattern.h -include/libxslt/preproc.h -include/libxslt/security.h -include/libxslt/templates.h -include/libxslt/transform.h -include/libxslt/variables.h -include/libxslt/xslt.h -include/libxslt/xsltInternals.h -include/libxslt/xsltconfig.h -include/libxslt/xsltexports.h -include/libxslt/xsltutils.h -lib/libexslt.a -lib/libexslt.la -lib/libxslt.a -lib/libxslt.la -lib/pkgconfig/ -lib/pkgconfig/libexslt.pc -lib/pkgconfig/libxslt.pc -lib/xsltConf.sh [EMAIL PROTECTED] man/man1/xsltproc.1 [EMAIL PROTECTED] man/man3/libexslt.3 [EMAIL PROTECTED] man/man3/libxslt.3 -share/aclocal/libxslt.m4 -share/doc/libxslt/ -share/doc/libxslt/html/ -share/doc/libxslt/html/API.html -share/doc/libxslt/html/APIchunk0.html -share/doc/libxslt/html/APIchunk1.html -share/doc/libxslt/html/APIchunk10.html -share/doc/libxslt/html/APIchunk11.html -share/doc/libxslt/html/APIchunk12.html -share/doc/libxslt/html/APIchunk13.html -share/doc/libxslt/html/APIchunk2.html -share/doc/libxslt/html/APIchunk3.html -share/doc/libxslt/html/APIchunk4.html -share/doc/libxslt/html/APIchunk5.html -share/doc/libxslt/html/APIchunk6.html -share/doc/libxslt/html/APIchunk7.html -share/doc/libxslt/html/APIchunk8.html -share/doc/libxslt/html/APIchunk9.html -share/doc/libxslt/html/APIconstructors.html -share/doc/libxslt/html/APIfiles.html -share/doc/libxslt/html/APIfunctions.html -share/doc/libxslt/html/APIsymbols.html -share/doc/libxslt/html/EXSLT/ -share/doc/libxslt/html/EXSLT/APIchunk0.html -share/doc/libxslt/html/EXSLT/APIconstructors.html -share/doc/libxslt/html/EXSLT/APIfiles.html -share/doc/libxslt/html/EXSLT/APIfunctions.html -share/doc/libxslt/html/EXSLT/APIsymbols.html -share/doc/libxslt/html/EXSLT/bugs.html -share/doc/libxslt/html/EXSLT/docs.html -share/doc/libxslt/html/EXSLT/downloads.html -share/doc/libxslt/html/EXSLT/exslt.html -share/doc/libxslt/html/EXSLT/help.html -share/doc/libxslt/html/EXSLT/index.html -share/doc/libxslt/html/EXSLT/intro.html -share/doc/libxslt/html/FAQ.html -share/doc/libxslt/html/Libxslt-Logo-180x168.gif -share/doc/libxslt/html/Libxslt-Logo-90x34.gif -share/doc/libxslt/html/bugs.html -share/doc/libxslt/html/contexts.gif -share/doc/libxslt/html/contribs.html -share/doc/libxslt/html/docbook.html -share/doc/libxslt/html/docs.html -share/doc/libxslt/html/downloads.html -share/doc/libxslt/html/extensions.html -share/doc/libxslt/html/help.html -share/doc/libxslt/html/html/ -share/doc/libxslt/html/html/book1.html -share/doc/libxslt/html/html/home.png -share/doc/libxslt/html/html/index.html -share/doc/libxslt/html/html/left.png -share/doc/libxslt/html/html/libxslt-attributes.html -share/doc/libxslt/html/html/libxslt-documents.html -share/doc/libxslt/html/html/libxslt-extensions.html -share/doc/libxslt/html/html/libxslt-extra.html -share/doc/libxslt/html/html/libxslt-functions.html -share/doc/libxslt/html/html/libxslt-imports.html -share/doc/libxslt/html/html/libxslt-keys.html -share/doc/libxslt/html/html/libxslt-lib.html -share/doc/libxslt/html/html/libxslt-namespaces.html -share/doc/libxslt/html/html/libxslt-numbersInternals.html -share/doc/libxslt/html/html/libxslt-pattern.html -share/doc/libxslt/html/html/libxslt-preproc.html -share/doc/libxslt/html/html/libxslt-security.html -share/doc/libxslt/html/html/libxslt-templates.html -share/doc/libxslt/html/html/libxslt-transform.html -share/doc/libxslt/html/html/libxslt-variables.html -share/doc/libxslt/html/html/libxslt-xslt.html -share/doc/libxslt/html/html/libxslt-xsltInternals.html -share/doc/libxslt/html/html/libxslt-xsltexports.html -share/doc/libxslt/html/html/libxslt-xsltutils.html -share/doc/libxslt/html/html/right.png -share/doc/libxslt/html/html/up.png -share/doc/libxslt/html/index.html -share/doc/libxslt/html/internals.html -share/doc/libxslt/html/intro.html -share/doc/libxslt/html/news.html -share/doc/libxslt/html/node.gif -share/doc/libxslt/html/object.gif -share/doc/libxslt/html/processing.gif -share/doc/libxslt/html/python.html -share/doc/libxslt/html/redhat.gif -share/doc/libxslt/html/smallfootonly.gif -share/doc/libxslt/html/stylesheet.gif -share/doc/libxslt/html/templates.gif -share/doc/libxslt/html/tutorial/ -share/doc/libxslt/html/tutorial/libxslt_tutorial.c -share/doc/libxslt/html/tutorial/libxslttutorial.html -share/doc/libxslt/html/tutorial/libxslttutorial.xml -share/doc/libxslt/html/tutorial2/ -share/doc/libxslt/html/tutorial2/libxslt_pipes.c -share/doc/libxslt/html/tutorial2/libxslt_pipes.html -share/doc/libxslt/html/tutorial2/libxslt_pipes.xml -share/doc/libxslt/html/xslt.html -share/doc/libxslt/html/xsltproc.html -share/doc/libxslt/html/xsltproc2.html -%%SHARED%% Index: pkg/PLIST-main =================================================================== RCS file: pkg/PLIST-main diff -N pkg/PLIST-main --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg/PLIST-main 11 Sep 2008 20:45:23 -0000 @@ -0,0 +1,135 @@ [EMAIL PROTECTED] $OpenBSD$ +%%SHARED%% +bin/xslt-config [EMAIL PROTECTED] bin/xsltproc +include/libexslt/ +include/libexslt/exslt.h +include/libexslt/exsltconfig.h +include/libexslt/exsltexports.h +include/libxslt/ +include/libxslt/attributes.h +include/libxslt/documents.h +include/libxslt/extensions.h +include/libxslt/extra.h +include/libxslt/functions.h +include/libxslt/imports.h +include/libxslt/keys.h +include/libxslt/namespaces.h +include/libxslt/numbersInternals.h +include/libxslt/pattern.h +include/libxslt/preproc.h +include/libxslt/security.h +include/libxslt/templates.h +include/libxslt/transform.h +include/libxslt/variables.h +include/libxslt/xslt.h +include/libxslt/xsltInternals.h +include/libxslt/xsltconfig.h +include/libxslt/xsltexports.h +include/libxslt/xsltutils.h +lib/libexslt.a +lib/libexslt.la +lib/libxslt.a +lib/libxslt.la +lib/pkgconfig/libexslt.pc +lib/pkgconfig/libxslt.pc +lib/xsltConf.sh [EMAIL PROTECTED] man/man1/xsltproc.1 [EMAIL PROTECTED] man/man3/libexslt.3 [EMAIL PROTECTED] man/man3/libxslt.3 +share/aclocal/libxslt.m4 +share/doc/libxslt/ +share/doc/libxslt/html/ +share/doc/libxslt/html/API.html +share/doc/libxslt/html/APIchunk0.html +share/doc/libxslt/html/APIchunk1.html +share/doc/libxslt/html/APIchunk10.html +share/doc/libxslt/html/APIchunk11.html +share/doc/libxslt/html/APIchunk12.html +share/doc/libxslt/html/APIchunk13.html +share/doc/libxslt/html/APIchunk2.html +share/doc/libxslt/html/APIchunk3.html +share/doc/libxslt/html/APIchunk4.html +share/doc/libxslt/html/APIchunk5.html +share/doc/libxslt/html/APIchunk6.html +share/doc/libxslt/html/APIchunk7.html +share/doc/libxslt/html/APIchunk8.html +share/doc/libxslt/html/APIchunk9.html +share/doc/libxslt/html/APIconstructors.html +share/doc/libxslt/html/APIfiles.html +share/doc/libxslt/html/APIfunctions.html +share/doc/libxslt/html/APIsymbols.html +share/doc/libxslt/html/EXSLT/ +share/doc/libxslt/html/EXSLT/APIchunk0.html +share/doc/libxslt/html/EXSLT/APIconstructors.html +share/doc/libxslt/html/EXSLT/APIfiles.html +share/doc/libxslt/html/EXSLT/APIfunctions.html +share/doc/libxslt/html/EXSLT/APIsymbols.html +share/doc/libxslt/html/EXSLT/bugs.html +share/doc/libxslt/html/EXSLT/docs.html +share/doc/libxslt/html/EXSLT/downloads.html +share/doc/libxslt/html/EXSLT/exslt.html +share/doc/libxslt/html/EXSLT/help.html +share/doc/libxslt/html/EXSLT/index.html +share/doc/libxslt/html/EXSLT/intro.html +share/doc/libxslt/html/FAQ.html +share/doc/libxslt/html/Libxslt-Logo-180x168.gif +share/doc/libxslt/html/Libxslt-Logo-90x34.gif +share/doc/libxslt/html/bugs.html +share/doc/libxslt/html/contexts.gif +share/doc/libxslt/html/contribs.html +share/doc/libxslt/html/docbook.html +share/doc/libxslt/html/docs.html +share/doc/libxslt/html/downloads.html +share/doc/libxslt/html/extensions.html +share/doc/libxslt/html/help.html +share/doc/libxslt/html/html/ +share/doc/libxslt/html/html/book1.html +share/doc/libxslt/html/html/home.png +share/doc/libxslt/html/html/index.html +share/doc/libxslt/html/html/left.png +share/doc/libxslt/html/html/libxslt-attributes.html +share/doc/libxslt/html/html/libxslt-documents.html +share/doc/libxslt/html/html/libxslt-extensions.html +share/doc/libxslt/html/html/libxslt-extra.html +share/doc/libxslt/html/html/libxslt-functions.html +share/doc/libxslt/html/html/libxslt-imports.html +share/doc/libxslt/html/html/libxslt-keys.html +share/doc/libxslt/html/html/libxslt-lib.html +share/doc/libxslt/html/html/libxslt-namespaces.html +share/doc/libxslt/html/html/libxslt-numbersInternals.html +share/doc/libxslt/html/html/libxslt-pattern.html +share/doc/libxslt/html/html/libxslt-preproc.html +share/doc/libxslt/html/html/libxslt-security.html +share/doc/libxslt/html/html/libxslt-templates.html +share/doc/libxslt/html/html/libxslt-transform.html +share/doc/libxslt/html/html/libxslt-variables.html +share/doc/libxslt/html/html/libxslt-xslt.html +share/doc/libxslt/html/html/libxslt-xsltInternals.html +share/doc/libxslt/html/html/libxslt-xsltexports.html +share/doc/libxslt/html/html/libxslt-xsltutils.html +share/doc/libxslt/html/html/right.png +share/doc/libxslt/html/html/up.png +share/doc/libxslt/html/index.html +share/doc/libxslt/html/internals.html +share/doc/libxslt/html/intro.html +share/doc/libxslt/html/news.html +share/doc/libxslt/html/node.gif +share/doc/libxslt/html/object.gif +share/doc/libxslt/html/processing.gif +share/doc/libxslt/html/python.html +share/doc/libxslt/html/redhat.gif +share/doc/libxslt/html/smallfootonly.gif +share/doc/libxslt/html/stylesheet.gif +share/doc/libxslt/html/templates.gif +share/doc/libxslt/html/tutorial/ +share/doc/libxslt/html/tutorial/libxslt_tutorial.c +share/doc/libxslt/html/tutorial/libxslttutorial.html +share/doc/libxslt/html/tutorial/libxslttutorial.xml +share/doc/libxslt/html/tutorial2/ +share/doc/libxslt/html/tutorial2/libxslt_pipes.c +share/doc/libxslt/html/tutorial2/libxslt_pipes.html +share/doc/libxslt/html/tutorial2/libxslt_pipes.xml +share/doc/libxslt/html/xslt.html +share/doc/libxslt/html/xsltproc.html +share/doc/libxslt/html/xsltproc2.html Index: pkg/PLIST-python =================================================================== RCS file: pkg/PLIST-python diff -N pkg/PLIST-python --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg/PLIST-python 11 Sep 2008 20:45:23 -0000 @@ -0,0 +1,2 @@ [EMAIL PROTECTED] $OpenBSD$ +%%SHARED%%