pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc Update py-libxslt to 1.1.5.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8bc96008538e
branches:  trunk
changeset: 472416:8bc96008538e
user:      minskim <minskim%pkgsrc.org@localhost>
date:      Sat Apr 10 09:02:06 2004 +0000

description:
Update py-libxslt to 1.1.5.

Changes since 1.1.2:
  - patch for OS-X
  - enums export

diffstat:

 doc/CHANGES                          |    3 +-
 textproc/py-libxslt/Makefile         |   26 ++-
 textproc/py-libxslt/distinfo         |    7 +-
 textproc/py-libxslt/files/setup.py   |  214 +++++++++++++++++++++++++++++++++++
 textproc/py-libxslt/patches/patch-aa |   55 --------
 5 files changed, 235 insertions(+), 70 deletions(-)

diffs (truncated from 358 to 300 lines):

diff -r 52cfc9dcf238 -r 8bc96008538e doc/CHANGES
--- a/doc/CHANGES       Sat Apr 10 08:58:44 2004 +0000
+++ b/doc/CHANGES       Sat Apr 10 09:02:06 2004 +0000
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES,v 1.5502 2004/04/10 08:58:44 minskim Exp $
+$NetBSD: CHANGES,v 1.5503 2004/04/10 09:02:06 minskim Exp $
 
 Changes to the packages collection and infrastructure in 2004:
 
@@ -1872,3 +1872,4 @@
        Updated qmail to 1.03nb5 [schmonz 2004-04-10]
        Updated abcde to 2.1.19 [snj 2004-04-10]
        Updated py-libxml2 to 2.6.8 [minskim 2004-04-10]
+       Updated py-libxslt to 1.1.5 [minskim 2004-04-10]
diff -r 52cfc9dcf238 -r 8bc96008538e textproc/py-libxslt/Makefile
--- a/textproc/py-libxslt/Makefile      Sat Apr 10 08:58:44 2004 +0000
+++ b/textproc/py-libxslt/Makefile      Sat Apr 10 09:02:06 2004 +0000
@@ -1,30 +1,32 @@
-# $NetBSD: Makefile,v 1.4 2004/02/12 16:22:51 minskim Exp $
+# $NetBSD: Makefile,v 1.5 2004/04/10 09:02:06 minskim Exp $
 
-DISTNAME=      libxml2-python-${LIBXML_VERSION}
-PKGNAME=       ${PYPKGPREFIX}-libxslt-1.1.2
-PKGREVISION=   1
+DISTNAME=      libxslt-1.1.5
+PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    textproc
-MASTER_SITES=  ftp://xmlsoft.org/python/
+MASTER_SITES=  ${MASTER_SITE_GNOME:=sources/libxslt/1.1/}
+EXTRACT_SUFX=  .tar.bz2
 
 MAINTAINER=    minskim%NetBSD.org@localhost
 HOMEPAGE=      http://xmlsoft.org/XSLT/
 COMMENT=       Python wrapper for libxslt
 
-DEPENDS+=      ${PYPKGPREFIX}-libxml2>=${LIBXML_VERSION}:../../textproc/py-libxml2
+DEPENDS+=      ${PYPKGPREFIX}-libxml2>=2.6.8:../../textproc/py-libxml2
 
+WRKSRC=                ${WRKDIR}/${DISTNAME}/python
 PYDISTUTILSPKG=        YES
+PYBINMODULE=   YES
 USE_BUILDLINK3=        YES
 NO_CONFIGURE=  YES
 
-LIBXML_VERSION=        2.6.4
-
-MAKE_ENV+=     PYLIBXSLTVERSION=${PKGVERSION}
+MAKE_ENV+=             PYLIBXSLTVERSION=${PKGVERSION}
 
 SUBST_CLASSES+=                setup
 SUBST_MESSAGE.setup=   "Fixing hardcoded paths."
 SUBST_STAGE.setup=     pre-build
 SUBST_FILES.setup=     setup.py
-SUBST_SED.setup=       -e "s,'/usr','${BUILDLINK_PREFIX.libxslt}',g"
+SUBST_SED.setup=       -e "s,@LIBICONVDIR@,${BUILDLINK_PREFIX.iconv},g" \
+                       -e "s,@LIBXML2DIR@,${BUILDLINK_PREFIX.libxml2},g" \
+                       -e "s,@LIBXSLTDIR@,${BUILDLINK_PREFIX.libxslt},g" \
 
 BUILDLINK_DEPENDS.libxslt=     libxslt>=${PKGVERSION}
 .include "../../textproc/libxslt/buildlink3.mk"
@@ -32,4 +34,8 @@
 .include "../../lang/python/extension.mk"
 .include "../../converters/libiconv/buildlink3.mk"
 .include "../../textproc/libxml2/buildlink3.mk"
+
+post-extract:
+       ${CP} ${FILESDIR}/setup.py ${WRKSRC}
+
 .include "../../mk/bsd.pkg.mk"
diff -r 52cfc9dcf238 -r 8bc96008538e textproc/py-libxslt/distinfo
--- a/textproc/py-libxslt/distinfo      Sat Apr 10 08:58:44 2004 +0000
+++ b/textproc/py-libxslt/distinfo      Sat Apr 10 09:02:06 2004 +0000
@@ -1,5 +1,4 @@
-$NetBSD: distinfo,v 1.1.1.1 2004/01/04 11:48:30 recht Exp $
+$NetBSD: distinfo,v 1.2 2004/04/10 09:02:06 minskim Exp $
 
-SHA1 (libxml2-python-2.6.4.tar.gz) = 320f50a6dde61d157eef7c804dce2ba5bfee1470
-Size (libxml2-python-2.6.4.tar.gz) = 197009 bytes
-SHA1 (patch-aa) = b13a62a16d65bc2ed768a576a898b2fe3d03d45f
+SHA1 (libxslt-1.1.5.tar.bz2) = a9b0ad31a438c7ea838314d616db8583aab6d447
+Size (libxslt-1.1.5.tar.bz2) = 1751266 bytes
diff -r 52cfc9dcf238 -r 8bc96008538e textproc/py-libxslt/files/setup.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/py-libxslt/files/setup.py        Sat Apr 10 09:02:06 2004 +0000
@@ -0,0 +1,214 @@
+#!/usr/bin/python -u
+#
+# Setup script for libxslt
+#
+import sys, os
+from distutils.core import setup, Extension
+
+# Thread-enabled libxml2
+with_threads = 1
+
+# If this flag is set (windows only), 
+# a private copy of the dlls are included in the package.
+# If this flag is not set, the libxml2 and libxslt
+# dlls must be found somewhere in the PATH at runtime.
+WITHDLLS = 1 and sys.platform.startswith('win')
+
+def missing(file):
+    if os.access(file, os.R_OK) == 0:
+        return 1
+    return 0
+
+try:
+    HOME = os.environ['HOME']
+except:
+    HOME="C:"
+
+if sys.platform.startswith('win'):
+    libraryPrefix = 'lib'
+    platformLibs = []
+else:
+    libraryPrefix = ''
+    platformLibs = ["m","z"]
+
+# those are examined to find 
+# - libxml2/libxml/tree.h
+# - iconv.h 
+# - libxslt/xsltconfig.h
+includes_dir = [
+"@LIBICONVDIR@/include",
+"@LIBXML2DIR@/include",
+"@LIBXSLTDIR@/include"
+];
+
+xml_includes=""
+for dir in includes_dir:
+    if not missing(dir + "/libxml2/libxml/tree.h"):
+        xml_includes=dir + "/libxml2"
+       break;
+
+if xml_includes == "":
+    print "failed to find headers for libxml2: update includes_dir"
+    sys.exit(1)
+
+iconv_includes=""
+for dir in includes_dir:
+    if not missing(dir + "/iconv.h"):
+        iconv_includes=dir
+       break;
+
+if iconv_includes == "":
+    print "failed to find headers for libiconv: update includes_dir"
+    sys.exit(1)
+
+# those are added in the linker search path for libraries
+libdirs = ["@LIBXML2DIR@/lib"]
+
+xml_files = ["libxml2-api.xml", "libxml2-python-api.xml",
+             "libxml.c", "libxml.py", "libxml_wrap.h", "types.c",
+            "xmlgenerator.py", "README", "TODO", "drv_libxml2.py"]
+
+xslt_files = ["libxslt-api.xml", "libxslt-python-api.xml",
+             "libxslt.c", "libxsl.py", "libxslt_wrap.h",
+            "generator.py"]
+
+if 0:
+    try:
+       try:
+           import xmlgenerator
+       except:
+           import generator
+    except:
+       print "failed to find and generate stubs for libxml2, aborting ..."
+       print sys.exc_type, sys.exc_value
+       sys.exit(1)
+
+    head = open("libxml.py", "r")
+    generated = open("libxml2class.py", "r")
+    result = open("libxml2.py", "w")
+    for line in head.readlines():
+        if WITHDLLS:
+            result.write(altImport(line))
+        else:
+            result.write(line)
+    for line in generated.readlines():
+       result.write(line)
+    head.close()
+    generated.close()
+    result.close()
+
+with_xslt=0
+if missing("libxslt-py.c") or missing("libxslt.py"):
+    if missing("generator.py") or missing("libxslt-python-api.xml"):
+        print "libxslt stub generator not found, libxslt not built"
+    else:
+       try:
+           import generator
+       except:
+           print "failed to generate stubs for libxslt, aborting ..."
+           print sys.exc_type, sys.exc_value
+       else:
+           head = open("libxsl.py", "r")
+           generated = open("libxsltclass.py", "r")
+           result = open("libxslt.py", "w")
+           for line in head.readlines():
+                if WITHDLLS:
+                    result.write(altImport(line))
+                else:
+                    result.write(line)
+           for line in generated.readlines():
+               result.write(line)
+           head.close()
+           generated.close()
+           result.close()
+           with_xslt=1
+else:
+    with_xslt=1
+
+if with_xslt == 1:
+    xslt_includes=""
+    for dir in includes_dir:
+       if not missing(dir + "/libxslt/xsltconfig.h"):
+           xslt_includes=dir + "/libxslt"
+           break;
+
+    if xslt_includes == "":
+       print "failed to find headers for libxslt: update includes_dir"
+       with_xslt = 0
+
+
+descr = "libxml2 package"
+modules = []
+c_files = []
+includes= [xml_includes, iconv_includes]
+libs    = [] + platformLibs
+macros  = []
+if with_threads:
+    macros.append(('_REENTRANT','1'))
+if with_xslt == 1:
+    descr = "libxslt package"
+    if not sys.platform.startswith('win'):
+        #
+        # We are gonna build 2 identical shared libs with merge initializing
+        # both libxml2mod and libxsltmod
+        #
+        c_files = c_files + ['libxslt-py.c', 'libxslt.c']
+        xslt_c_files = c_files
+        macros.append(('MERGED_MODULES', '1'))
+    else:
+        #
+        # On windows the MERGED_MODULE option is not needed
+        # (and does not work)
+        #
+        xslt_c_files = ['libxslt-py.c', 'libxslt.c', 'types.c']
+    libs.insert(0, libraryPrefix + 'exslt')
+    libs.insert(0, libraryPrefix + 'xslt')
+    includes.append(xslt_includes)
+    modules.append('libxslt')
+
+
+extens=[]
+if with_xslt == 1:
+    extens.append(Extension('libxsltmod', xslt_c_files, include_dirs=includes,
+                           library_dirs=libdirs, 
+                            libraries=libs, define_macros=macros))
+
+if missing("MANIFEST"):
+
+    manifest = open("MANIFEST", "w")
+    manifest.write("setup.py\n")
+    for file in xml_files:
+        manifest.write(file + "\n")
+    if with_xslt == 1:
+       for file in xslt_files:
+           manifest.write(file + "\n")
+    manifest.close()
+
+if WITHDLLS:
+    ext_package = "libxmlmods"
+    if sys.version >= "2.2":
+        base = "lib/site-packages/"
+    else:
+        base = ""
+    data_files = []
+else:
+    ext_package = None
+    data_files = []
+
+setup (name = "libxslt-python",
+       # On *nix, the version number is created from setup.py.in
+       # On windows, it is set by configure.js
+       version = os.environ['PYLIBXSLTVERSION'],
+       description = descr,
+       author = "Daniel Veillard",
+       author_email = "veillard%redhat.com@localhost",
+       url = "http://xmlsoft.org/python.html";,
+       licence="MIT Licence",
+       py_modules=modules,
+       ext_modules=extens,
+       ext_package=ext_package,
+       data_files=data_files,
+       )
+
+sys.exit(0)
+
diff -r 52cfc9dcf238 -r 8bc96008538e textproc/py-libxslt/patches/patch-aa



Home | Main Index | Thread Index | Old Index