Skip site navigation (1)Skip section navigation (2)
Date:      17 Nov 2003 21:06:02 -0000
From:      Rui Lopes <rui@ruilopes.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/59383: [PATCH] textproc/libxml2 Compile installed .py files
Message-ID:  <20031117210602.53487.qmail@ns.webtt.biz>
Resent-Message-ID: <200311172110.hAHLAEfs032834@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         59383
>Category:       ports
>Synopsis:       [PATCH] textproc/libxml2 Compile installed .py files
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 17 13:10:13 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Rui Lopes
>Release:        FreeBSD 5.1-RELEASE-p10 i386
>Organization:
>Environment:
System: FreeBSD cheetah 5.1-RELEASE-p10 FreeBSD 5.1-RELEASE-p10 #3: Sat Oct 11 19:39:45 WEST 2003 root@cheetah:/usr/obj/usr/src/sys/DEBUGGER i386


	
>Description:
Compile python files on installation.
	
>How-To-Repeat:
	
>Fix:

	

--- libxml2.patch begins here ---
# * Compile python files on installation.
# -- Rui Lopes <rui@ruilopes.com>
diff -u libxml2.orig/Makefile libxml2/Makefile
--- libxml2.orig/Makefile	Mon Nov 17 20:19:59 2003
+++ libxml2/Makefile	Mon Nov 17 20:45:04 2003
@@ -79,4 +79,10 @@
 	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
 		${WRKSRC}/catalog.c ${WRKSRC}/xmlcatalog.c
 
+.if !defined(WITHOUT_PYTHON)
+post-install:
+	@${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py -l ${PYTHON_SITELIBDIR}
+	@${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py -l ${PYTHON_SITELIBDIR}
+.endif
+
 .include <bsd.port.mk>
Common subdirectories: libxml2.orig/files and libxml2/files
diff -u libxml2.orig/pkg-plist libxml2/pkg-plist
--- libxml2.orig/pkg-plist	Mon Nov 17 20:19:59 2003
+++ libxml2/pkg-plist	Mon Nov 17 20:31:54 2003
@@ -48,7 +48,11 @@
 lib/libxml2.so
 lib/libxml2.so.5
 %%PYTHON:%%lib/%%PYTHON_VERSION%%/site-packages/drv_libxml2.py
+%%PYTHON:%%lib/%%PYTHON_VERSION%%/site-packages/drv_libxml2.pyc
+%%PYTHON:%%lib/%%PYTHON_VERSION%%/site-packages/drv_libxml2.pyo
 %%PYTHON:%%lib/%%PYTHON_VERSION%%/site-packages/libxml2.py
+%%PYTHON:%%lib/%%PYTHON_VERSION%%/site-packages/libxml2.pyc
+%%PYTHON:%%lib/%%PYTHON_VERSION%%/site-packages/libxml2.pyo
 %%PYTHON:%%lib/%%PYTHON_VERSION%%/site-packages/libxml2mod.so
 libdata/pkgconfig/libxml-2.0.pc
 share/aclocal/libxml.m4
--- libxml2.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



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