--- /dev/null
+AUX completion.bash-2 1538 RMD160 f6812016ca7deab23c84cab39988e6555bd6f76a SHA1 b708bcc9e3d52c6967d9cda3cb8c6787d06dcc56 SHA256 f6949d450638d1be147bf5ece9488fd9445ffe47244c27643ff2a5df42aa1905
+DIST latexmk-430.zip 348721 RMD160 d9ab8b556335a61272626457bca95307225bae84 SHA1 e0f30e961f8c218015c071d3c809e8aa70a56916 SHA256 f5a2980cb81973e0b72ac629f9c8e2dd1761a13cddb44c06eeaf5113344864a8
+EBUILD latexmk-430.ebuild 922 RMD160 7963a094a7396cb8dd28e26f9cdc83eed5330d67 SHA1 7c7529c0b1e720bf4800bcdafdd2dc7a4c30bd30 SHA256 346fe7a8c3d3befe79394e5aee164b13263b97d50fab5041ace83cdc19353ca0
--- /dev/null
+#! /bin/bash
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# bash_completion for latexmk
+#
+#
+# Author: Christoph Junghans
+# ottxor@gentoo.org
+#
+# Revision history:
+# 0.1 26-05-10 --- initial version
+# 0.2 15-02-11 --- clean up
+#
+# HOWTO:
+# source this file to enable it
+
+_latexmk()
+{
+ local cur output aopts opts prev
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ output=$( $1 -help 2> /dev/null)
+ #options with args ,pattern: ^ (-XXX) <YYYY>.*$
+ aopts=" $( echo " $output" | sed -n 's/^[[:space:]]\+\(-[^[:space:]]\+\)[[:space:]]\+<[^>]\+>.*$/\1/p' | sort -u | tr '\n' ' ')"
+ #if previous option in in $aopts
+ if [[ -n "$prev" ]] && [[ -z "${aopts//* $prev *}" ]]; then
+ #argument of $prev ,pattern: ^ -XXX (<YYYY>).*$
+ opts=$(echo "$output" | sed -n "s/^[[:space:]]\+$prev[[:space:]]\+\(<[^>]\+>\).*\$/\1/p")
+ COMPREPLY=( $( compgen -W '$opts' -- $cur ) )
+ elif [[ "$cur" == -* ]]; then
+ #all options, pattern: ^ (-XXX).*$
+ opts=$( echo "$output" | sed -n 's/^[[:space:]]\+\(-[^[:space:]]\+\).*$/\1/p'| sort -u )
+ COMPREPLY=( $( compgen -W '$opts' -- $cur ) )
+ else
+ #filenames *.tex and dirs, rest is done by '-o filenames' below
+ COMPREPLY=( $( eval compgen -f -X "!*.tex" -- ${cur} ) $( compgen -d -- $cur ) )
+ fi
+}
+
+complete -F _latexmk -o filenames latexmk
--- /dev/null
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-tex/latexmk/latexmk-427a.ebuild,v 1.2 2011/11/02 15:33:18 aballier Exp $
+
+EAPI=4
+
+inherit bash-completion-r1
+
+DESCRIPTION="Perl script for automatically building LaTeX documents."
+HOMEPAGE="http://www.phys.psu.edu/~collins/software/latexmk/"
+SRC_URI="http://www.phys.psu.edu/~collins/software/latexmk/${P}.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos"
+IUSE=""
+
+RDEPEND="virtual/latex-base
+ dev-lang/perl"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+src_install() {
+ newbin latexmk.pl latexmk
+ doman latexmk.1
+ dodoc CHANGES README latexmk.pdf latexmk.ps latexmk.txt
+ dodoc -r example_rcfiles extra-scripts
+ newbashcomp "${FILESDIR}"/completion.bash-2 ${PN}
+}