Skip to content

Commit

Permalink
new port python/py-utidylib
Browse files Browse the repository at this point in the history
a python interface to the html tidy lib

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@4621 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Markus W. Weißmann committed Jan 13, 2004
1 parent f107df6 commit 604e74d
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
48 changes: 48 additions & 0 deletions python/py-utidylib/Portfile
@@ -0,0 +1,48 @@
# $Id: Portfile,v 1.1 2004/01/13 21:08:38 mww Exp $

PortSystem 1.0

name py-utidylib
version 0.1
categories python
platforms darwin
maintainers mww@opendarwin.org
description Python interface to html tidy
long_description Python interface to html tidy, the html and xml \
cleanup tool from the w3c;

homepage http://utidylib.sourceforge.net/
master_sites sourceforge:utidylib
distname uTidylib-${version}
checksums md5 46adcf72fe9457fddc19613745073cb3
use_zip yes
patchfiles patch-lib.py.diff

depends_lib bin:python:python \
lib:libtidy:tidy \
lib:XXX:py-ctypes \
lib:XXX:py-epydoc

post-patch {
reinplace "s|LIBTIDYPATH|${prefix}/lib/libtidy.dylib|g" \
${worksrcpath}/tidylib/lib.py
}

use_configure no

build.cmd python setup.py
build.target build
post-build {
system "cd ${worksrcpath} && python gendoc.py"
file rename ${worksrcpath}/apidoc ${worksrcpath}/doc
}

destroot.cmd python setup.py
destroot.destdir --prefix=${destroot}${prefix}

post-destroot {
file mkdir ${destroot}${prefix}/share/doc/
file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name}
file copy ${worksrcpath}/INSTALL.txt ${worksrcpath}/README.path \
${worksrcpath}/README.txt ${destroot}${prefix}/share/doc/${name}
}
11 changes: 11 additions & 0 deletions python/py-utidylib/files/patch-lib.py.diff
@@ -0,0 +1,11 @@
--- tidylib/lib.py Mon Jun 30 15:09:26 2003
+++ tidylib/lib.py.new Tue Jan 13 21:52:25 2004
@@ -8,7 +8,7 @@

# search the path for libtidy using the known names
thelib=None
-for libname in ['cygtidy-0-99-0', 'libtidy', 'libtidy.so',
+for libname in ['cygtidy-0-99-0', 'libtidy', 'libtidy.so', 'LIBTIDYPATH',
'libtidy-0.99.so.0']:
try:
thelib=getattr(c.cdll, libname)

0 comments on commit 604e74d

Please sign in to comment.