Index: devel/kpathsea/pkg-descr
===================================================================
--- devel/kpathsea/pkg-descr	(revision 0)
+++ devel/kpathsea/pkg-descr	(working copy)
@@ -0,0 +1,5 @@
+Kpathsea is a library to do path searching.  It is used in the Web2C
+implementation of TeX and friends.  The library's fundamental purpose
+is to return a filename from a list of directories specified by the
+user, similar to what shells do when looking up program names to
+execute.
Index: devel/kpathsea/distinfo
===================================================================
--- devel/kpathsea/distinfo	(revision 0)
+++ devel/kpathsea/distinfo	(working copy)
@@ -0,0 +1,2 @@
+SHA256 (texlive-20120701-source.tar.xz) = 9666617d5dac3e82578e696835cc9f251ee0a56d162d86dff08659ac5dcb6c81
+SIZE (texlive-20120701-source.tar.xz) = 131904044
Index: devel/kpathsea/files/patch-texmf.cnf
===================================================================
--- devel/kpathsea/files/patch-texmf.cnf	(revision 0)
+++ devel/kpathsea/files/patch-texmf.cnf	(working copy)
@@ -0,0 +1,38 @@
+--- texmf.cnf.orig	2012-05-13 08:34:52.000000000 +0900
++++ texmf.cnf	2013-02-25 03:15:33.000000000 +0900
+@@ -51,7 +51,7 @@
+ % Redistributors will probably want $SELFAUTODIR/share, i.e., /usr/share.
+ % Kpathsea sets SELFAUTOLOC (the directory with the binary),
+ % SELFAUTODIR (its parent), and SELFAUTOPARENT (its grandparent).
+-TEXMFROOT = $SELFAUTOPARENT
++TEXMFROOT = $SELFAUTODIR/share
+ 
+ % The tree containing runtime files related to the specific
+ % distribution and version.
+@@ -698,7 +698,7 @@
+ pool_size = 3250000
+ % Minimum pool space after TeX's own strings; must be at least
+ % 25000 less than pool_size, but doesn't need to be nearly that large.
+-string_vacancies = 90000
++string_vacancies = 150000
+ % Maximum number of strings.
+ max_strings = 500000
+ % min pool space left after loading .fmt
+@@ -708,7 +708,7 @@
+ % expansion works by writing material into the buffer and reparsing the
+ % line.  As a consequence, certain constructs require the buffer to be
+ % very large, even though most documents can be handled with a small value.
+-buf_size = 200000
++buf_size = 300000
+ 
+ % Hyphenation trie.  The maximum possible is 4194303 (ssup_trie_size in
+ % the sources), but we don't need that much.  The value here suffices
+@@ -719,7 +719,7 @@
+ 
+ hyph_size = 8191        % prime number of hyphenation exceptions, >610, <32767.
+                         % http://primes.utm.edu/curios/page.php/8191.html
+-nest_size = 500         % simultaneous semantic levels (e.g., groups)
++nest_size = 2500        % simultaneous semantic levels (e.g., groups)
+ max_in_open = 15        % simultaneous input files and error insertions, 
+                         % also applies to MetaPost
+ param_size = 10000      % simultaneous macro parameters, also applies to MP
Index: devel/kpathsea/pkg-plist
===================================================================
--- devel/kpathsea/pkg-plist	(revision 0)
+++ devel/kpathsea/pkg-plist	(working copy)
@@ -0,0 +1,69 @@
+@comment $FreeBSD$
+bin/kpseaccess
+bin/kpsereadlink
+bin/kpsestat
+bin/kpsewhich
+bin/mktexlsr
+bin/mktexmf
+bin/mktexpk
+bin/mktextfm
+bin/texhash
+include/kpathsea/absolute.h
+include/kpathsea/c-auto.h
+include/kpathsea/c-ctype.h
+include/kpathsea/c-dir.h
+include/kpathsea/c-errno.h
+include/kpathsea/c-fopen.h
+include/kpathsea/c-limits.h
+include/kpathsea/c-memstr.h
+include/kpathsea/c-minmax.h
+include/kpathsea/c-namemx.h
+include/kpathsea/c-pathch.h
+include/kpathsea/c-pathmx.h
+include/kpathsea/c-proto.h
+include/kpathsea/c-stat.h
+include/kpathsea/c-std.h
+include/kpathsea/c-unistd.h
+include/kpathsea/cnf.h
+include/kpathsea/concatn.h
+include/kpathsea/config.h
+include/kpathsea/debug.h
+include/kpathsea/expand.h
+include/kpathsea/getopt.h
+include/kpathsea/hash.h
+include/kpathsea/knj.h
+include/kpathsea/kpathsea.h
+include/kpathsea/lib.h
+include/kpathsea/line.h
+include/kpathsea/magstep.h
+include/kpathsea/mingw32.h
+include/kpathsea/paths.h
+include/kpathsea/pathsearch.h
+include/kpathsea/proginit.h
+include/kpathsea/progname.h
+include/kpathsea/readable.h
+include/kpathsea/str-list.h
+include/kpathsea/str-llist.h
+include/kpathsea/systypes.h
+include/kpathsea/tex-file.h
+include/kpathsea/tex-glyph.h
+include/kpathsea/tex-hush.h
+include/kpathsea/tex-make.h
+include/kpathsea/types.h
+include/kpathsea/variable.h
+include/kpathsea/version.h
+include/kpathsea/win32lib.h
+@dirrm include/kpathsea
+lib/libkpathsea.a
+lib/libkpathsea.la
+lib/libkpathsea.so
+lib/libkpathsea.so.7
+%%TEXMFDIR%%/web2c/mktex.opt
+%%TEXMFDIR%%/web2c/mktexdir
+%%TEXMFDIR%%/web2c/mktexdir.opt
+%%TEXMFDIR%%/web2c/mktexnam
+%%TEXMFDIR%%/web2c/mktexnam.opt
+%%TEXMFDIR%%/web2c/mktexupd
+%%TEXMFDIR%%/web2c/texmf.cnf
+@dirrmtry %%TEXMFDIR%%/web2c
+@dirrmtry %%TEXMFDIR%%
Index: devel/kpathsea/Makefile
===================================================================
--- devel/kpathsea/Makefile	(revision 0)
+++ devel/kpathsea/Makefile	(working copy)
@@ -0,0 +1,27 @@
+# $FreeBSD$
+
+PORTNAME=	kpathsea
+PORTVERSION=	6.1.0
+CATEGORIES=	devel
+MASTER_SITES=	ftp://tug.org/historic/systems/texlive/2012/
+PKGNAMEPREFIX=	tex-
+DISTNAME=	texlive-20120701-source
+
+MAINTAINER=	hrs@FreeBSD.org
+COMMENT=	Path searching library for TeX
+
+USE_XZ=		yes
+USE_TEX=	yes
+USE_GMAKE=	yes
+USE_LDCONFIG=	yes
+EXTRACT_AFTER_ARGS=	| tar -xf - ${EXTRACT_FILES}
+EXTRACT_FILES=	${DISTNAME}/build-aux \
+		${DISTNAME}/texk/kpathsea
+WRKSRC=		${WRKDIR}/${DISTNAME}/texk/kpathsea
+GNU_CONFIGURE=	yes
+
+INFO=	kpathsea
+MAN1=	kpseaccess.1 kpsereadlink.1 kpsestat.1 kpsewhich.1 mktexlsr.1 \
+	mktexmf.1 mktexpk.1 mktextfm.1 texhash.1
+
+.include <bsd.port.mk>
