diff options
-rw-r--r-- | app-office/lyx/Manifest | 4 | ||||
-rw-r--r-- | app-office/lyx/lyx-2.1.0_beta1.ebuild | 2 | ||||
-rw-r--r-- | eclass/tla.eclass | 204 |
3 files changed, 207 insertions, 3 deletions
diff --git a/app-office/lyx/Manifest b/app-office/lyx/Manifest index f5b50fc..e1fd62e 100644 --- a/app-office/lyx/Manifest +++ b/app-office/lyx/Manifest @@ -2,6 +2,6 @@ AUX 1.6.7-python.patch 906 SHA256 ad4ebb8d3837536eea869e15b3759840a1153d64d74b74 AUX 2.0-python.patch 1036 SHA256 954f96dab553024fb128924c7ba3d70a91946f6909d203ee0902d6ec8740ded8 SHA512 81bf78b837d9a4621a230d3d1d4e45c306598b4047227b88e83054268571a496a71babdfe5152b47370a3dbf91767aed366984555225c3900bf6d55dc0e43d31 WHIRLPOOL e47a40db707b68c923bce136c72742242a974fe17c8a167fa0ca6f428bf2937feba3122737417e0902f320c0a8df1d4da72702eea4e4d4fe699b5176bbe5ed19 AUX 2.0.3-python.patch 1036 SHA256 954f96dab553024fb128924c7ba3d70a91946f6909d203ee0902d6ec8740ded8 SHA512 81bf78b837d9a4621a230d3d1d4e45c306598b4047227b88e83054268571a496a71babdfe5152b47370a3dbf91767aed366984555225c3900bf6d55dc0e43d31 WHIRLPOOL e47a40db707b68c923bce136c72742242a974fe17c8a167fa0ca6f428bf2937feba3122737417e0902f320c0a8df1d4da72702eea4e4d4fe699b5176bbe5ed19 AUX 2.0.patches 9724 SHA256 9bf26943ce4f27b4cdbfa924f3097aa1bfba6e23a10d8db494148066e9bf8a39 SHA512 99bdb8204d2f2d40adbb6280e8273b6d974ad6db5575388bedb6ed913a2afa17f693c6f35d600cc7d35d637f3426dcc485237be3548f47055588a5c199fb66db WHIRLPOOL b5c1555147329388d4bb1911712a38256c518a4d17cadba3911d125313a607e9eabd5b2f81c4831b6b9b8ae38c05ce0d9c37305b31286a0773fa3288e7c37a08 -DIST lyx-2.1.0beta1.tar.xz 10318976 SHA256 a512208da1c0884858170c77e36db499c0119e0cfff5616a1524a4c5b5e63c69 SHA512 d19c5aca1fc7718adce14eebd770a9bbb63a9920fc330abc57820189c66b1bc1ed2cd40fd406bca20560fd3b348e5d47e3100e005be2028b29f65b8188ad154c WHIRLPOOL 25c703cea20f8754dde4d032c62655ff27f2fd36437e6a1b624174d422e1925b0bbefddb29c320ca29fd278788c5e1d5a87cd17eb1e472d3086cf3b2c3c803ab +DIST lyx-2.1.0beta1.tar.xz 10314988 SHA256 5d38caa23e156669da6ebfff8fb80125db24704d9733648eb21be7a2b01f6203 SHA512 77191e569f91ff9b993eb3ce867f45e66924cc293565c9d3bb4d75ce2e98ca3de254528e6f183b7f5fa2bf34b0cd1ba9c3f2d8d4e5daa7b08967365a6b722b01 WHIRLPOOL 79ef55f9a28c0eb9934a14dcda329c456c7f31d505c43adf260fd77db9727f08160236d8104ca1df255cc343608a9f3a8255b27227a275749643f136fbde1a82 EBUILD lyx-2.0.9999.ebuild 4385 SHA256 95b7b8253e553148055d20e18c723d3f6599045f95a5cdcb027f14dfab653aac SHA512 7d01fad672584bf94c282ed5ddc30546373013ed8c531269a47cdab1eeebde837fb5796e692e2bb2ffd7b3d711227e5193a27777b88352b7892966a92fe0d7d5 WHIRLPOOL 5cbc722f032dc4232ee02a84383513ea065880dd2fa024b8a95201fd910f757bd017d2b600781bce048ce11b55db065310ee975a3cd1ddd07dccc6ed142e37dc -EBUILD lyx-2.1.0_beta1.ebuild 4463 SHA256 239aeb2b83af7e2e9fc0168676e525caaec82b827c5f7d07eb7144e08c7058e9 SHA512 f5b7031ae2018d817f98d663f64c7fbb2319ee200be7ab857ec8ee90db7ce13399b8a44ee7cad42825ec539fedf75a96b2d6e3cd2f93adee18e88ee61eeee3c1 WHIRLPOOL d095f796a25c8260f21d87b766a39bcb17bc4b2d42d259c066bd9d61f1564fbb6fd05d9e7fe4be4b9a9a49edad0513a950d17e4b69be4b326aa27c9de5d417a4 +EBUILD lyx-2.1.0_beta1.ebuild 4471 SHA256 e2a993537b8223ba42f7aacc71abad5bb29feeeb35a3f01b77b832013f562b67 SHA512 d64c05af4f4a1da15e367894159a8b09ca6a9240faa8968c9829fef2ed7d603a012f7b760a2d79f5442662944f21ee06faa6a170cb5c8c9dafdecef087b340ef WHIRLPOOL f95ff85b3f2b00cc4cfab1f04a92c8f37cccb37ff6a2ec423c483c968b6125b7624a9b9b744f1c33354aeb6673ccc5851dcc2165cb80e0ceb7badbeecb32d622 diff --git a/app-office/lyx/lyx-2.1.0_beta1.ebuild b/app-office/lyx/lyx-2.1.0_beta1.ebuild index 396e7ba..e59134b 100644 --- a/app-office/lyx/lyx-2.1.0_beta1.ebuild +++ b/app-office/lyx/lyx-2.1.0_beta1.ebuild @@ -16,7 +16,7 @@ FONT_SUFFIX="ttf" DESCRIPTION="WYSIWYM frontend for LaTeX, DocBook, etc." HOMEPAGE="http://www.lyx.org/" #SRC_URI="ftp://ftp.lyx.org/pub/lyx/stable/2.0.x/${P}.tar.xz" -SRC_URI="ftp://ftp.lyx.org/pub/lyx/devel/lyx-2.1/${MY_P}.tar.xz" +SRC_URI="ftp://ftp.lyx.org/pub/lyx/devel/lyx-2.1/${MY_P}/${MY_P}.tar.xz" RESTRICT="test" LICENSE="GPL-2" diff --git a/eclass/tla.eclass b/eclass/tla.eclass new file mode 100644 index 0000000..e6cee2f --- /dev/null +++ b/eclass/tla.eclass @@ -0,0 +1,204 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/eclass/tla.eclass,v 1.12 2012/02/26 16:13:38 pacho Exp $ +# +# Original Author: Jeffrey Yasskin <jyasskin@mail.utexas.edu> +# +# Originally derived from the cvs eclass. +# +# This eclass provides the generic tla fetching functions. +# to use from an ebuild, set the 'ebuild-configurable settings' below in your +# ebuild before inheriting. then either leave the default src_unpack or extend +# over tla_src_unpack. + +# Most of the time, you will define only $ETLA_VERSION and $ETLA_ARCHIVES in +# your ebuild. + +# TODO: +# Make it support particular revisions. + +inherit eutils + +# Don't download anything other than the tla archive +SRC_URI="" + +# You shouldn't change these settings yourself! The ebuild/eclass inheriting +# this eclass will take care of that. + +# --- begin ebuild-configurable settings + +# tla command to run. Theoretically, substituting any arch derivative should be +# relatively easy. +[ -z "$ETLA_TLA_CMD" ] && ETLA_TLA_CMD="tla" + +# tla commands with options +[ -z "$ETLA_GET_CMD" ] && ETLA_GET_CMD="get" +[ -z "$ETLA_UPDATE_CMD" ] && ETLA_UPDATE_CMD="replay" + +# Where the tla modules are stored/accessed +[ -z "$ETLA_TOP_DIR" ] && ETLA_TOP_DIR="${DISTDIR}/tla-src" + +# Name of tla version in the format +# user@example.com--archive-name/category--branch--version +# (in other words, an argument to tla get, update, or replay) +[ -z "$ETLA_VERSION" ] && ETLA_VERSION="" + +# A space-separated list of significant archive URLs. You should definitely +# include the URL for the archive your version is stored in, and if it refers +# to any other archives, also list them. +[ -z "$ETLA_ARCHIVES" ] && ETLA_ARCHIVES="" + +# The location in which to cache the version, relative to $ETLA_TOP_DIR. +[ -z "$ETLA_CACHE_DIR" ] && ETLA_CACHE_DIR="${ETLA_VERSION}" + +# ETLA_CLEAN: set this to something to get a clean copy when updating (removes +# the working directory, then uses $ETLA_GET_CMD to re-download it.) + +# --- end ebuild-configurable settings --- + +# add tla to deps +DEPEND="dev-util/tla" + +# registers archives mentioned in $ETLA_ARCHIVES +tla_register_archives() { + debug-print-function $FUNCNAME $* $ETLA_ARCHIVES + + for archive in $ETLA_ARCHIVES; do + $ETLA_TLA_CMD register-archive -f $archive || die "Could not register archive $archive" + done +} + +# checks that configuration variables have rational values. +tla_check_vars() { + [ -z "$ETLA_VERSION" ] && die "ETLA_VERSION must be set by the ebuild. Please fix this ebuild." + $ETLA_TLA_CMD valid-package-name --archive --vsn $ETLA_VERSION || \ + die "ETLA_VERSION has an invalid format. Please fix this ebuild." +} + +# is called from tla_src_unpack +tla_fetch() { + + debug-print-function $FUNCNAME $* + + if [ -n "$ETLA_CLEAN" ]; then + rm -rf $ETLA_TOP_DIR/$ETLA_CACHE_DIR + fi + + # create the top dir if needed + if [ ! -d "$ETLA_TOP_DIR" ]; then + # note that the addwrite statements in this block are only there to allow creating ETLA_TOP_DIR; + # we've already allowed writing inside it + # this is because it's simpler than trying to find out the parent path of the directory, which + # would need to be the real path and not a symlink for things to work (so we can't just remove + # the last path element in the string) + debug-print "$FUNCNAME: checkout mode. creating tla directory" + addwrite /foobar + addwrite / + mkdir -p "$ETLA_TOP_DIR" + export SANDBOX_WRITE="${SANDBOX_WRITE//:\/foobar:\/}" + fi + + # in case ETLA_TOP_DIR is a symlink to a dir, get the real dir's path, + # otherwise addwrite() doesn't work. + cd -P "$ETLA_TOP_DIR" > /dev/null + ETLA_TOP_DIR="`/bin/pwd`" + + # disable the sandbox for this dir + addwrite "$ETLA_TOP_DIR" + + # break $ETLA_VERSION into pieces + local tla_archive=`$ETLA_TLA_CMD parse-package-name --arch $ETLA_VERSION` + local tla_version=`$ETLA_TLA_CMD parse-package-name --package-version $ETLA_VERSION` + #local tla_revision=`$ETLA_TLA_CMD parse-package-name --lvl $ETLA_VERSION` + + # determine checkout or update mode and change to the right directory. + if [ ! -d "$ETLA_TOP_DIR/$ETLA_CACHE_DIR/{arch}" ]; then + mode=get + mkdir -p "$ETLA_TOP_DIR/$ETLA_CACHE_DIR" + cd "$ETLA_TOP_DIR/$ETLA_CACHE_DIR/.." + rmdir "`basename "$ETLA_CACHE_DIR"`" + else + mode=update + cd "$ETLA_TOP_DIR/$ETLA_CACHE_DIR" + fi + + # switch versions automagically if needed + if [ "$mode" == "update" ]; then + local oldversion="`$ETLA_TLA_CMD tree-version`" + if [ "$tla_archive/$tla_version" != "$oldversion" ]; then + + einfo "Changing TLA version from $oldversion to $tla_archive/$tla_version:" + debug-print "$FUNCNAME: Changing TLA version from $oldversion to $tla_archive/$tla_version:" + + $ETLA_TLA_CMD set-tree-version $tla_archive/$tla_version + + fi + fi + + # commands to run + local cmdget="${ETLA_TLA_CMD} ${ETLA_GET_CMD} ${ETLA_VERSION} `basename $ETLA_CACHE_DIR`" + local cmdupdate="${ETLA_TLA_CMD} ${ETLA_UPDATE_CMD} ${ETLA_VERSION}" + + if [ "${mode}" == "get" ]; then + einfo "Running $cmdget" + eval $cmdget || die "tla get command failed" + elif [ "${mode}" == "update" ]; then + einfo "Running $cmdupdate" + eval $cmdupdate || die "tla update command failed" + fi + +} + + +tla_src_unpack() { + + debug-print-function $FUNCNAME $* + + debug-print "$FUNCNAME: init: + ETLA_TLA_CMD=$ETLA_TLA_CMD + ETLA_GET_CMD=$ETLA_GET_CMD + ETLA_UPDATE_CMD=$ETLA_UPDATE_CMD + ETLA_TOP_DIR=$ETLA_TOP_DIR + ETLA_VERSION=$ETLA_VERSION + ETLA_ARCHIVES=$ETLA_ARCHIVES + ETLA_CACHE_DIR=$ETLA_CACHE_DIR + ETLA_CLEAN=$ETLA_CLEAN" + + einfo "Registering Archives ..." + tla_register_archives + + einfo "Checking that passed-in variables are rational ..." + tla_check_vars + + einfo "Fetching tla version $ETLA_VERSION into $ETLA_TOP_DIR ..." + tla_fetch + + einfo "Copying $ETLA_CACHE_DIR from $ETLA_TOP_DIR ..." + debug-print "Copying $ETLA_CACHE_DIR from $ETLA_TOP_DIR ..." + + # probably redundant, but best to make sure + # Use ${WORKDIR}/${P} rather than ${S} so user can point ${S} to something inside. + mkdir -p "${WORKDIR}/${P}" + + eshopts_push -s dotglob # get any dotfiles too. + cp -Rf "$ETLA_TOP_DIR/$ETLA_CACHE_DIR"/* "${WORKDIR}/${P}" + eshopts_pop + + # implement some of base_src_unpack's functionality; + # note however that base.eclass may not have been inherited! + #if [ -n "$PATCHES" ]; then + # debug-print "$FUNCNAME: PATCHES=$PATCHES, S=$S, autopatching" + # cd "$S" + # for x in $PATCHES; do + # debug-print "patching from $x" + # patch -p0 < "$x" + # done + # # make sure we don't try to apply patches more than once, since + # # tla_src_unpack may be called several times + # export PATCHES="" + #fi + + einfo "Version ${ETLA_VERSION} is now in ${WORKDIR}/${P}" +} + +EXPORT_FUNCTIONS src_unpack |