Bernd Ahlers [Sat, Oct 28, 2006 at 10:07:03PM +0200] wrote:
>Steven Mestdagh [Sat, Oct 28, 2006 at 09:44:43PM +0200] wrote:
>>Oh yes, I forgot. You need to add the python flavor. Use something like
>>BUILD_DEPENDS= ::textproc/libxml,-python,python
>>
>That reminds me we have to fix this libxml/py-libxml stuff. Attached is
>a diff based on espies idea. Please test.
>
>(We have to adjust the gnome-doc-utils ports as well if this is in.)
>
>This kills the python FLAVOR and introduces a no_python FLAVOR. That
>means we don't have to build libxml twice anymore.
>
>Comments?
>
Uh, sent an old diff without py-libxml PKGNAME bump. Noticed by
steven@, thanks!
Bernd
Index: Makefile
===================================================================
RCS file: /home/OpenBSD/cvs/ports/textproc/libxml/Makefile,v
retrieving revision 1.101
diff -u -p -r1.101 Makefile
--- Makefile 3 Aug 2006 23:55:11 -0000 1.101
+++ Makefile 19 Oct 2006 00:35:03 -0000
@@ -6,7 +6,7 @@ COMMENT-python= "Python bindings for li
VERSION= 2.6.26
DISTNAME= libxml2-${VERSION}
PKGNAME= libxml-${VERSION}
-PKGNAME-python= py-libxml-${VERSION}
+PKGNAME-python= py-libxml-${VERSION}p0
SHARED_LIBS= xml2 9.3
CATEGORIES= textproc
MASTER_SITES= ftp://xmlsoft.org/libxml/ \
@@ -14,16 +14,12 @@ MASTER_SITES= ftp://xmlsoft.org/libxml/
HOMEPAGE= http://xmlsoft.org/
-#FAKE= all
# BSD-like
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
-WANTLIB= c m z
-
-PSEUDO_FLAVORS= python
-FLAVOR?=
+WANTLIB= m z
MODULES= converters/libiconv
@@ -35,41 +31,39 @@ CONFIGURE_ARGS+= --with-html-dir="${PREF
CONFIGURE_ARGS+= --with-html-subdir="libxml2/html"
CONFIGURE_ARGS+= --with-iconv="${DEPBASE}"
-.if ${FLAVOR:Mpython}
-SHARED_ONLY= Yes
+PSEUDO_FLAVORS= no_python
+FLAVOR?=
-MULTI_PACKAGES= -python
+MULTI_PACKAGES=
SUBPACKAGE?=
-. if !defined(PACKAGING) || !empty(SUBPACKAGE)
+.if !defined(PACKAGING) || ${SUBPACKAGE} == ""
+WANTLIB+= c
+.endif
+
+.if !${FLAVOR:L:Mno_python}
+MULTI_PACKAGES+= -python
+. if !defined(PACKAGING) || ${SUBPACKAGE} == "-python"
MODULES+= lang/python
+. if defined(PACKAGING)
+LIB_DEPENDS= xml2.>=9::textproc/libxml
+. endif
. endif
CONFIGURE_ENV= PYTHON=${MODPY_BIN}
-
-CONFIGURE_ARGS+= --with-python
FAKE_FLAGS= EXAMPLE_DIR=${PREFIX}/share/examples/libxml2/ \
DEVHELP_DIR=${PREFIX}/share/doc/libxml2/html/devhelp
-
-. if defined(PACKAGING) && !empty(SUBPACKAGE)
-LIB_DEPENDS= xml2.>=9::textproc/libxml
-WANTLIB= m z
-. endif
-.else
-CONFIGURE_ARGS+= --without-python
.endif
-CONFIGURE_ARGS+= --without-threads
+CONFIGURE_ARGS+= --without-threads
REGRESS_DEPENDS= ::devel/gmake
-SUBST_VARS= VERSION
-
post-configure:
sed -e 's,@PREFIX@,${PREFIX},' <${FILESDIR}/rebuild >${WRKBUILD}/rebuild
post-install:
${INSTALL_SCRIPT_DIR} ${PREFIX}/share/libxml2
${INSTALL_SCRIPT} ${WRKBUILD}/rebuild ${PREFIX}/share/libxml2/
-.if ${FLAVOR:Mpython}
+.if !${FLAVOR:Mno_python}
${MODPY_BIN} ${MODPY_LIBDIR}/compileall.py ${WRKINST}${MODPY_SITEPKG}
.endif
@@ -77,21 +71,10 @@ do-regress:
@cd ${WRKBUILD} && exec ${SETENV} ${MAKE_ENV} ${GMAKE} \
${REGRESS_FLAGS} -f ${MAKE_FILE} ${REGRESS_TARGET}
-# XXX let's cheat
-#post-configure:
-# @perl -pi.bak -e \
-# 's,${DEPBASE}/include,\$$\{includedir\},g; \
-# s,${DEPBASE}/lib,\$$\{libdir\},g; \
-# s,${DEPBASE}/,\$$\{prefix\}/,g;' \
-# ${WRKBUILD}/libxml-2.0.pc ${WRKBUILD}/xml2-config
-
-#post-install:
-# perl -pi.bak -e \
-# 'print ": \$${DEPBASE:=${LOCALBASE}}\n" if m/^dlname/; \
-# s,dependency_libs='\''(.*)'\'',dependency_libs=\"$$1\",g; \
-# s,${DEPBASE},\$$\{DEPBASE\},g; \
-# s,${TRUEPREFIX}(/lib/.*?\.la),\$$\{DEPBASE\}$$1,g;' \
-# ${PREFIX}/lib/libxml2.la
-
-
.include <bsd.port.mk>
+
+.if ${FLAVOR:L:Mno_python} || ${NO_SHARED_LIBS:L} == "yes"
+CONFIGURE_ARGS+= --without-python
+.else
+CONFIGURE_ARGS+= --with-python
+.endif
Index: patches/patch-python_Makefile_in
===================================================================
RCS file: patches/patch-python_Makefile_in
diff -N patches/patch-python_Makefile_in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-python_Makefile_in 19 Oct 2006 00:23:31 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+--- python/Makefile.in.orig Thu Oct 19 01:26:49 2006
++++ python/Makefile.in Thu Oct 19 01:27:05 2006
+@@ -732,9 +732,6 @@ uninstall-info: uninstall-info-recursive
+ @WITH_PYTHON_TRUE@ $(mkinstalldirs) $(DESTDIR)$(pythondir)
+ @WITH_PYTHON_TRUE@ @INSTALL@ -m 0644 libxml2.py $(DESTDIR)$(pythondir)
+ @WITH_PYTHON_TRUE@ @INSTALL@ -m 0644 $(srcdir)/drv_libxml2.py
$(DESTDIR)$(pythondir)
[EMAIL PROTECTED]@ $(mkinstalldirs) $(DESTDIR)$(DOCS_DIR)
[EMAIL PROTECTED]@ @(for doc in $(DOCS) ; \
[EMAIL PROTECTED]@ do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ;
done)
+
+ @[EMAIL PROTECTED](GENERATED): gen_prog
+
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 19 Oct 2006 00:23:31 -0000
@@ -0,0 +1,57 @@
[EMAIL PROTECTED] $OpenBSD: PLIST-python,v 1.4 2006/06/18 13:48:19 steven Exp $
+lib/python${MODPY_VERSION}/
+lib/python${MODPY_VERSION}/site-packages/
+lib/python${MODPY_VERSION}/site-packages/drv_libxml2.py
+lib/python${MODPY_VERSION}/site-packages/drv_libxml2.pyc
+lib/python${MODPY_VERSION}/site-packages/libxml2.py
+lib/python${MODPY_VERSION}/site-packages/libxml2.pyc
+lib/python${MODPY_VERSION}/site-packages/libxml2mod.a
+lib/python${MODPY_VERSION}/site-packages/libxml2mod.la
+lib/python${MODPY_VERSION}/site-packages/libxml2mod.so
+share/examples/libxml2/
+share/examples/libxml2/attribs.py
+share/examples/libxml2/build.py
+share/examples/libxml2/ctxterror.py
+share/examples/libxml2/cutnpaste.py
+share/examples/libxml2/dtdvalid.py
+share/examples/libxml2/error.py
+share/examples/libxml2/inbuf.py
+share/examples/libxml2/indexes.py
+share/examples/libxml2/invalid.xml
+share/examples/libxml2/nsdel.py
+share/examples/libxml2/outbuf.py
+share/examples/libxml2/push.py
+share/examples/libxml2/pushSAX.py
+share/examples/libxml2/pushSAXhtml.py
+share/examples/libxml2/reader.py
+share/examples/libxml2/reader2.py
+share/examples/libxml2/reader3.py
+share/examples/libxml2/reader4.py
+share/examples/libxml2/reader5.py
+share/examples/libxml2/reader6.py
+share/examples/libxml2/reader7.py
+share/examples/libxml2/reader8.py
+share/examples/libxml2/readererr.py
+share/examples/libxml2/readernext.py
+share/examples/libxml2/regexp.py
+share/examples/libxml2/relaxng.py
+share/examples/libxml2/resolver.py
+share/examples/libxml2/schema.py
+share/examples/libxml2/serialize.py
+share/examples/libxml2/sync.py
+share/examples/libxml2/test.dtd
+share/examples/libxml2/tst.py
+share/examples/libxml2/tst.xml
+share/examples/libxml2/tstLastError.py
+share/examples/libxml2/tstURI.py
+share/examples/libxml2/tstmem.py
+share/examples/libxml2/tstxpath.py
+share/examples/libxml2/valid.xml
+share/examples/libxml2/validDTD.py
+share/examples/libxml2/validRNG.py
+share/examples/libxml2/validSchemas.py
+share/examples/libxml2/validate.py
+share/examples/libxml2/walker.py
+share/examples/libxml2/xpath.py
+share/examples/libxml2/xpathext.py
+share/examples/libxml2/xpathret.py
Index: pkg/PLIST-python
===================================================================
RCS file: /home/OpenBSD/cvs/ports/textproc/libxml/pkg/PLIST-python,v
retrieving revision 1.4
diff -u -p -r1.4 PLIST-python
--- pkg/PLIST-python 18 Jun 2006 13:48:19 -0000 1.4
+++ pkg/PLIST-python 19 Oct 2006 00:23:31 -0000
@@ -1,61 +1,2 @@
[EMAIL PROTECTED] $OpenBSD: PLIST-python,v 1.4 2006/06/18 13:48:19 steven Exp $
-lib/python${MODPY_VERSION}/
-lib/python${MODPY_VERSION}/site-packages/
-lib/python${MODPY_VERSION}/site-packages/drv_libxml2.py
-lib/python${MODPY_VERSION}/site-packages/drv_libxml2.pyc
-lib/python${MODPY_VERSION}/site-packages/libxml2.py
-lib/python${MODPY_VERSION}/site-packages/libxml2.pyc
-lib/python${MODPY_VERSION}/site-packages/libxml2mod.a
-lib/python${MODPY_VERSION}/site-packages/libxml2mod.la
-lib/python${MODPY_VERSION}/site-packages/libxml2mod.so
[EMAIL PROTECTED] share/doc/libxml2-python-${VERSION}/
[EMAIL PROTECTED] share/doc/libxml2-python-${VERSION}/TODO
-share/examples/libxml2/
-share/examples/libxml2/attribs.py
-share/examples/libxml2/build.py
-share/examples/libxml2/ctxterror.py
-share/examples/libxml2/cutnpaste.py
-share/examples/libxml2/dtdvalid.py
-share/examples/libxml2/error.py
-share/examples/libxml2/inbuf.py
-share/examples/libxml2/indexes.py
-share/examples/libxml2/invalid.xml
-share/examples/libxml2/nsdel.py
-share/examples/libxml2/outbuf.py
-share/examples/libxml2/push.py
-share/examples/libxml2/pushSAX.py
-share/examples/libxml2/pushSAXhtml.py
-share/examples/libxml2/reader.py
-share/examples/libxml2/reader2.py
-share/examples/libxml2/reader3.py
-share/examples/libxml2/reader4.py
-share/examples/libxml2/reader5.py
-share/examples/libxml2/reader6.py
-share/examples/libxml2/reader7.py
-share/examples/libxml2/reader8.py
-share/examples/libxml2/readererr.py
-share/examples/libxml2/readernext.py
-share/examples/libxml2/regexp.py
-share/examples/libxml2/relaxng.py
-share/examples/libxml2/resolver.py
-share/examples/libxml2/schema.py
-share/examples/libxml2/serialize.py
-share/examples/libxml2/sync.py
-share/examples/libxml2/test.dtd
-share/examples/libxml2/tst.py
-share/examples/libxml2/tst.xml
-share/examples/libxml2/tstLastError.py
-share/examples/libxml2/tstURI.py
-share/examples/libxml2/tstmem.py
-share/examples/libxml2/tstxpath.py
-share/examples/libxml2/valid.xml
-share/examples/libxml2/validDTD.py
-share/examples/libxml2/validRNG.py
-share/examples/libxml2/validSchemas.py
-share/examples/libxml2/validate.py
-share/examples/libxml2/walker.py
-share/examples/libxml2/xpath.py
-share/examples/libxml2/xpathext.py
-share/examples/libxml2/xpathret.py
[EMAIL PROTECTED] share/doc/libxml2-python-${VERSION}/
[EMAIL PROTECTED] share/doc/libxml2-python-${VERSION}/TODO
[EMAIL PROTECTED] $OpenBSD$
+%%SHARED%%