From: "Alexis Ballier (aballier)" <aballier@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-x86 commit in eclass: texlive-module.eclass
Date: Sat, 23 Oct 2010 21:47:07 +0000 (UTC) [thread overview]
Message-ID: <20101023214707.6F63820051@flycatcher.gentoo.org> (raw)
aballier 10/10/23 21:47:07
Modified: texlive-module.eclass
Log:
Generate language.dat.lua files for TeX Live 2010
Revision Changes Path
1.38 eclass/texlive-module.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/texlive-module.eclass?rev=1.38&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/texlive-module.eclass?rev=1.38&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/texlive-module.eclass?r1=1.37&r2=1.38
Index: texlive-module.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/texlive-module.eclass,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- texlive-module.eclass 23 Oct 2010 16:38:26 -0000 1.37
+++ texlive-module.eclass 23 Oct 2010 21:47:07 -0000 1.38
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-module.eclass,v 1.37 2010/10/23 16:38:26 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-module.eclass,v 1.38 2010/10/23 21:47:07 aballier Exp $
# @ECLASS: texlive-module.eclass
# @MAINTAINER:
@@ -156,7 +156,7 @@
# It parses the AddHyphen directive of tlpobj files to create it.
texlive-module_make_language_def_lines() {
- local lefthyphenmin righthyphenmin synonyms name file file_patterns file_exceptions
+ local lefthyphenmin righthyphenmin synonyms name file file_patterns file_exceptions luaspecial
eval $@
einfo "Generating language.def entry for $@"
[ -z "$lefthyphenmin" ] && lefthyphenmin="2"
@@ -177,7 +177,7 @@
# It parses the AddHyphen directive of tlpobj files to create it.
texlive-module_make_language_dat_lines() {
- local lefthyphenmin righthyphenmin synonyms name file file_patterns file_exceptions
+ local lefthyphenmin righthyphenmin synonyms name file file_patterns file_exceptions luaspecial
eval $@
einfo "Generating language.dat entry for $@"
echo "$name $file" >> "${S}/language.${PN}.dat"
@@ -189,6 +189,40 @@
fi
}
+# @FUNCTION: texlive-module_synonyms_to_language_lua_line
+# @DESCRIPTION:
+# Helper function for texlive-module_make_language_lua_lines to generate a
+# correctly formatted synonyms entry for language.lua.dat
+
+texlive-module_synonyms_to_language_lua_line() {
+ local prev=""
+ for i in $(echo $@ | tr ',' ' ') ; do
+ printf "${prev} '%s'" $i
+ prev=","
+ done
+}
+
+# @FUNCTION: texlive-module_make_language_lua_lines
+# @DESCRIPTION:
+# Only valid for TeXLive 2010.
+# Creates a language.${PN}.dat entry to put in /etc/texmf/language.lua.d
+# It parses the AddHyphen directive of tlpobj files to create it.
+
+texlive-module_make_language_lua_lines() {
+ local lefthyphenmin righthyphenmin synonyms name file file_patterns file_exceptions luaspecial
+ local dest="${S}/language.${PN}.dat.lua"
+ eval $@
+ einfo "Generating language.lua.dat entry for $@"
+ printf "\t['%s'] = {\n" "$name" >> "$dest"
+ printf "\t\tloader = '%s',\n" "$file" >> "$dest"
+ printf "\t\tlefthyphenmin = %s,\n\t\trighthyphenmin = %s,\n" "$lefthyphenmin" "$righthyphenmin" >> "$dest"
+ printf "\t\tsynonyms = {%s },\n" "$(texlive-module_synonyms_to_language_lua_line "$synonyms")" >> "$dest"
+ [ -n "$file_patterns" ] && printf "\t\tpatterns = '%s',\n" "$file_patterns" >> "$dest"
+ [ -n "$file_exceptions" ] && printf "\t\thyphenation = '%s',\n" "$file_exceptions" >> "$dest"
+ [ -n "$luaspecial" ] && printf "\t\tspecial = '%s',\n" "$luaspecial" >> "$dest"
+ printf "\t},\n" >> "$dest"
+}
+
# @FUNCTION: texlive-module_src_compile
# @DESCRIPTION:
# exported function:
@@ -224,7 +258,9 @@
echo "f ${parameter}" >> "${S}/${PN}-config";;
AddHyphen)
texlive-module_make_language_def_lines "$parameter"
- texlive-module_make_language_dat_lines "$parameter";;
+ texlive-module_make_language_dat_lines "$parameter"
+ [ "${PV#2008}" = "${PV}" -a "${PV#2009}" = "${PV}" ] && texlive-module_make_language_lua_lines "$parameter"
+ ;;
AddFormat)
texlive-module_add_format "$parameter";;
BuildFormat)
@@ -292,6 +328,12 @@
insinto /etc/texmf/language.dat.d
doins "${S}/language.${PN}.dat"
fi
+
+ if [ -f "${S}/language.${PN}.dat.lua" ] ; then
+ insinto /etc/texmf/language.dat.lua.d
+ doins "${S}/language.${PN}.dat.lua"
+ fi
+
[ -n "${TEXLIVE_MODULE_BINSCRIPTS}" ] && dobin_texmf_scripts ${TEXLIVE_MODULE_BINSCRIPTS}
texlive-common_handle_config_files
next reply other threads:[~2010-10-23 21:47 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-23 21:47 Alexis Ballier (aballier) [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-07-30 12:59 [gentoo-commits] gentoo-x86 commit in eclass: texlive-module.eclass Alexis Ballier (aballier)
2014-11-04 10:32 Alexis Ballier (aballier)
2014-03-09 18:56 Ulrich Mueller (ulm)
2013-07-05 22:43 Alexis Ballier (aballier)
2013-06-28 12:43 Alexis Ballier (aballier)
2013-06-26 19:22 Alexis Ballier (aballier)
2012-07-26 16:40 Alexis Ballier (aballier)
2012-07-26 16:30 Alexis Ballier (aballier)
2011-02-17 13:21 Alexis Ballier (aballier)
2010-11-07 19:46 Alexis Ballier (aballier)
2010-11-07 19:24 Alexis Ballier (aballier)
2010-10-24 16:26 Alexis Ballier (aballier)
2010-10-24 0:41 Alexis Ballier (aballier)
2010-10-23 23:51 Alexis Ballier (aballier)
2010-10-23 23:51 Alexis Ballier (aballier)
2010-10-23 23:37 Alexis Ballier (aballier)
2010-10-23 23:31 Alexis Ballier (aballier)
2010-10-23 23:30 Alexis Ballier (aballier)
2010-10-23 23:28 Alexis Ballier (aballier)
2010-10-23 23:26 Alexis Ballier (aballier)
2010-10-23 23:25 Alexis Ballier (aballier)
2010-10-23 23:24 Alexis Ballier (aballier)
2010-10-23 23:22 Alexis Ballier (aballier)
2010-10-23 23:21 Alexis Ballier (aballier)
2010-10-23 23:19 Alexis Ballier (aballier)
2010-10-23 23:18 Alexis Ballier (aballier)
2010-10-23 22:41 Alexis Ballier (aballier)
2010-10-23 21:48 Alexis Ballier (aballier)
2010-10-23 16:38 Alexis Ballier (aballier)
2010-10-11 20:44 Alexis Ballier (aballier)
2010-10-11 18:26 Alexis Ballier (aballier)
2010-01-13 15:16 Christian Faulhammer (fauli)
2010-01-13 9:42 Alexis Ballier (aballier)
2010-01-07 20:36 Alexis Ballier (aballier)
2010-01-07 20:31 Alexis Ballier (aballier)
2010-01-07 19:16 Alexis Ballier (aballier)
2010-01-07 19:13 Alexis Ballier (aballier)
2010-01-07 18:42 Alexis Ballier (aballier)
2010-01-07 18:17 Alexis Ballier (aballier)
2009-11-12 19:04 Alexis Ballier (aballier)
2009-08-19 7:43 Alexis Ballier (aballier)
2009-08-14 11:52 Alexis Ballier (aballier)
2009-08-10 7:38 Alexis Ballier (aballier)
2009-06-21 10:34 Alexis Ballier (aballier)
2009-06-08 10:05 Alexis Ballier (aballier)
2008-11-06 19:02 Alexis Ballier (aballier)
2008-10-31 15:16 Alexis Ballier (aballier)
2008-09-02 10:00 Alexis Ballier (aballier)
2008-08-22 11:32 Alexis Ballier (aballier)
2008-08-22 11:31 Alexis Ballier (aballier)
2008-08-21 13:04 Alexis Ballier (aballier)
2008-07-15 10:33 Alexis Ballier (aballier)
2008-07-14 16:42 Alexis Ballier (aballier)
2008-07-03 22:36 Alexis Ballier (aballier)
2008-07-03 22:33 Alexis Ballier (aballier)
2008-07-03 21:06 Alexis Ballier (aballier)
2008-01-20 0:14 Alexis Ballier (aballier)
2007-12-02 22:47 Alexis Ballier (aballier)
2007-10-27 14:30 Alexis Ballier (aballier)
2007-10-20 17:15 Alexis Ballier (aballier)
2007-10-17 14:34 Alexis Ballier (aballier)
2007-10-14 7:47 Alexis Ballier (aballier)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101023214707.6F63820051@flycatcher.gentoo.org \
--to=aballier@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox