- Update to the latest release (2.4).
- Include i18n support.
ok? comments?
Ciao,
Kili
Index: textproc/txt2tags/Makefile
===================================================================
RCS file: /cvs/ports/textproc/txt2tags/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- textproc/txt2tags/Makefile 29 Nov 2006 19:12:04 -0000 1.3
+++ textproc/txt2tags/Makefile 28 Dec 2006 13:40:43 -0000
@@ -2,13 +2,7 @@
COMMENT= "utility to turn simply formatted text into markup"
-# Packaging nightmare: roll out tarballs for major releases but update
-# only the python script for minor releases...
-DISTNAME= txt2tags-2.3.2
-MAJORNAME= ${DISTNAME:C,\.[0-9]$,,}
-EXTRACT_ONLY= ${MAJORNAME}.tgz
-DISTFILES= ${EXTRACT_ONLY} ${DISTNAME}.py:0
-WRKDIST= ${WRKDIR}/${MAJORNAME}
+DISTNAME= txt2tags-2.4
CATEGORIES= textproc
HOMEPAGE= http://txt2tags.sourceforge.net/
@@ -22,37 +16,49 @@
PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=txt2tags/}
-MASTER_SITES0= ${HOMEPAGE}/src/
+EXTRACT_SUFX= .tgz
-MODULES= lang/python
+MODULES= lang/python devel/gettext
PKG_ARCH= *
-NO_BUILD= Yes
-
DOCDIR= ${PREFIX}/share/doc/txt2tags
EXAMPLESDIR= ${PREFIX}/share/examples/txt2tags
+LOCALEDIR= ${PREFIX}/share/locale
-
-post-extract:
- cp -p ${FULLDISTDIR}/${DISTNAME}.py ${WRKSRC}/${DISTNAME:C,-.*,,}
+LANGUAGES= de es fr hu it pt_BR zh_CN
pre-configure:
@perl -pi -e "s,^#!/usr/bin/env python,#!${MODPY_BIN}," \
- ${WRKSRC}/{txt2tags,extras/t2tconv,test/run.py}
+ ${WRKSRC}/{txt2tags,extras/t2tconv,test/run.py} \
+ ${WRKSRC}/samples/module/module-{body,full}.py
+ @perl -pi -e "s,/usr/share/locale/,${LOCALBASE}/share/locale," \
+ ${WRKSRC}/txt2tags
+
+do-build:
+.for l in ${LANGUAGES}
+ cd ${WRKSRC}/po && msgfmt -o ${l}.mo ${l}.po
+.endfor
do-install:
- ${INSTALL_DATA_DIR} ${DOCDIR} ${EXAMPLESDIR}{,/img,/css}
- ${INSTALL_SCRIPT} ${WRKSRC}/{txt2tags,extras/t2tconv} ${PREFIX}/bin
- ${INSTALL_DATA} ${WRKSRC}/doc/{*.*,txt2tagsrc} ${DOCDIR}
+ ${INSTALL_DATA_DIR} ${DOCDIR} ${EXAMPLESDIR}{,/img,/css,/module}
+ ${INSTALL_SCRIPT} ${WRKSRC}/txt2tags ${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKSRC}/extras/t2tconv ${PREFIX}/bin
+ ${INSTALL_DATA} ${WRKSRC}/extras/txt2tagsrc ${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README ${DOCDIR}
${INSTALL_DATA} ${WRKSRC}/samples/*.* ${EXAMPLESDIR}
- ${INSTALL_DATA} ${WRKSRC}/samples/img/*.* ${EXAMPLESDIR}/img
- ${INSTALL_DATA} ${WRKSRC}/samples/css/*.* ${EXAMPLESDIR}/css
+ ${INSTALL_DATA} ${WRKSRC}/samples/img/* ${EXAMPLESDIR}/img
+ ${INSTALL_DATA} ${WRKSRC}/samples/css/* ${EXAMPLESDIR}/css
+ ${INSTALL_DATA} ${WRKSRC}/samples/module/* ${EXAMPLESDIR}/module
${INSTALL_MAN} ${WRKSRC}/doc/manpage.man ${PREFIX}/man/man1/txt2tags.1
+.for l in ${LANGUAGES}
+ ${INSTALL_DATA_DIR} ${LOCALEDIR}/${l}/LC_MESSAGES
+ ${INSTALL_DATA} ${WRKSRC}/po/${l}.mo \
+ ${LOCALEDIR}/${l}/LC_MESSAGES/txt2tags.mo
+.endfor
do-regress:
- @echo Note: there are 6 tests that will fail.
- chmod +x ${WRKSRC}/txt2tags
PATH=${WRKSRC}:$$PATH ${WRKSRC}/test/run.py
.include <bsd.port.mk>
Index: textproc/txt2tags/distinfo
===================================================================
RCS file: /cvs/ports/textproc/txt2tags/distinfo,v
retrieving revision 1.2
diff -u -r1.2 distinfo
--- textproc/txt2tags/distinfo 29 Nov 2006 19:12:04 -0000 1.2
+++ textproc/txt2tags/distinfo 28 Dec 2006 13:40:43 -0000
@@ -1,8 +1,4 @@
-MD5 (txt2tags-2.3.2.py) = 8dc8087c0076155ceaea631e88122962
-MD5 (txt2tags-2.3.tgz) = 0514bb01161183808dc8be105c032677
-RMD160 (txt2tags-2.3.2.py) = 3ce75a506095d3437b29ebb44e8ea2c68a06d29c
-RMD160 (txt2tags-2.3.tgz) = 320abbee12eb8be5e35d02068c0ff8db17734d6c
-SHA1 (txt2tags-2.3.2.py) = 0b721b278d25e6f0c8316021a6fa06ff4cc6145c
-SHA1 (txt2tags-2.3.tgz) = ee64c96a3a4b7c35f0e7546dfeb471b9592f16ef
-SIZE (txt2tags-2.3.2.py) = 157308
-SIZE (txt2tags-2.3.tgz) = 880164
+MD5 (txt2tags-2.4.tgz) = 198ce2962a57650b8032c0d59dc1eeae
+RMD160 (txt2tags-2.4.tgz) = e794aec277da440548527eb7be9ca9ba7139af24
+SHA1 (txt2tags-2.4.tgz) = 72a6292abf5c16cc2da4fc937893969e6f3cf14f
+SIZE (txt2tags-2.4.tgz) = 495974
Index: textproc/txt2tags/pkg/PLIST
===================================================================
RCS file: /cvs/ports/textproc/txt2tags/pkg/PLIST,v
retrieving revision 1.2
diff -u -r1.2 PLIST
--- textproc/txt2tags/pkg/PLIST 29 Nov 2006 19:12:04 -0000 1.2
+++ textproc/txt2tags/pkg/PLIST 28 Dec 2006 13:40:43 -0000
@@ -3,14 +3,16 @@
bin/txt2tags
@man man/man1/txt2tags.1
share/doc/txt2tags/
+share/doc/txt2tags/README
[EMAIL PROTECTED] share/doc/txt2tags/manpage-ca.man
[EMAIL PROTECTED] share/doc/txt2tags/manpage-es.man
[EMAIL PROTECTED] share/doc/txt2tags/manpage-fr.man
[EMAIL PROTECTED] share/doc/txt2tags/manpage-it.man
[EMAIL PROTECTED] share/doc/txt2tags/manpage-pt.man
@comment share/doc/txt2tags/manpage.man
@comment share/doc/txt2tags/manpage.t2t
-share/doc/txt2tags/markup.html
-share/doc/txt2tags/rules.html
-share/doc/txt2tags/rules.t2t
-share/doc/txt2tags/txt2tagsrc
+share/doc/txt2tags/txt2tags-quickref.pdf
share/doc/txt2tags/userguide.pdf
-share/doc/txt2tags/writing-book.html
share/examples/txt2tags/
share/examples/txt2tags/css/
share/examples/txt2tags/css/color.css
@@ -25,10 +27,16 @@
share/examples/txt2tags/img/old-poweredby-2.png
share/examples/txt2tags/img/photo.jpg
share/examples/txt2tags/img/t2tbutton.png
+share/examples/txt2tags/img/t2tpowered-black.png
+share/examples/txt2tags/img/t2tpowered-white.png
share/examples/txt2tags/img/t2tpowered.png
share/examples/txt2tags/img/valid-css.png
share/examples/txt2tags/img/valid-html.png
share/examples/txt2tags/img/valid-xhtml.png
+share/examples/txt2tags/module/
+share/examples/txt2tags/module/README
+share/examples/txt2tags/module/module-body.py
+share/examples/txt2tags/module/module-full.py
share/examples/txt2tags/sample.html
share/examples/txt2tags/sample.lout
share/examples/txt2tags/sample.man
@@ -40,3 +48,11 @@
share/examples/txt2tags/sample.tex
share/examples/txt2tags/sample.txt
share/examples/txt2tags/sample.xhtml
+share/examples/txt2tags/txt2tagsrc
+share/locale/de/LC_MESSAGES/txt2tags.mo
+share/locale/es/LC_MESSAGES/txt2tags.mo
+share/locale/fr/LC_MESSAGES/txt2tags.mo
+share/locale/hu/LC_MESSAGES/txt2tags.mo
+share/locale/it/LC_MESSAGES/txt2tags.mo
+share/locale/pt_BR/LC_MESSAGES/txt2tags.mo
+share/locale/zh_CN/LC_MESSAGES/txt2tags.mo