From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D352C13832E for ; Fri, 5 Aug 2016 21:49:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A8910E0B2C; Fri, 5 Aug 2016 21:49:20 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 26EE0E0B2C for ; Fri, 5 Aug 2016 21:49:19 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 82B85340B54 for ; Fri, 5 Aug 2016 21:49:18 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6D2677CE for ; Fri, 5 Aug 2016 21:49:16 +0000 (UTC) From: "Vadim A. Misbakh-Soloviov" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Vadim A. Misbakh-Soloviov" Message-ID: <1470433748.b1f0646fa63d741dec211cbf468739eacdaea538.mva@gentoo> Subject: [gentoo-commits] proj/gamerlay:master commit in: games-fps/xonotic-maps/ X-VCS-Repository: proj/gamerlay X-VCS-Files: games-fps/xonotic-maps/metadata.xml games-fps/xonotic-maps/xonotic-maps-9999.ebuild X-VCS-Directories: games-fps/xonotic-maps/ X-VCS-Committer: mva X-VCS-Committer-Name: Vadim A. Misbakh-Soloviov X-VCS-Revision: b1f0646fa63d741dec211cbf468739eacdaea538 X-VCS-Branch: master Date: Fri, 5 Aug 2016 21:49:16 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 5360ef7f-33d3-4440-9e13-ef2240dba76f X-Archives-Hash: bf64b4c09666079ae014d886b0c9e089 commit: b1f0646fa63d741dec211cbf468739eacdaea538 Author: Vadim A. Misbakh-Soloviov mva name> AuthorDate: Fri Aug 5 21:49:08 2016 +0000 Commit: Vadim A. Misbakh-Soloviov mva name> CommitDate: Fri Aug 5 21:49:08 2016 +0000 URL: https://gitweb.gentoo.org/proj/gamerlay.git/commit/?id=b1f0646f xonotic-maps: fix bug reported by email. TODO: ask Nikoli to KILL IT WITH FIRE and rewrite games-fps/xonotic-maps/metadata.xml | 2 +- games-fps/xonotic-maps/xonotic-maps-9999.ebuild | 55 +++++++++---------------- 2 files changed, 21 insertions(+), 36 deletions(-) diff --git a/games-fps/xonotic-maps/metadata.xml b/games-fps/xonotic-maps/metadata.xml index 0945c61..f3eb681 100644 --- a/games-fps/xonotic-maps/metadata.xml +++ b/games-fps/xonotic-maps/metadata.xml @@ -1,7 +1,7 @@ - + nikoli@lavabit.com Nikoli diff --git a/games-fps/xonotic-maps/xonotic-maps-9999.ebuild b/games-fps/xonotic-maps/xonotic-maps-9999.ebuild index 1d7d151..460d48d 100644 --- a/games-fps/xonotic-maps/xonotic-maps-9999.ebuild +++ b/games-fps/xonotic-maps/xonotic-maps-9999.ebuild @@ -1,10 +1,12 @@ -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: $ -EAPI=5 +# QA: FUCKING CRAP!!! +# TODO: ask Nikoli to rewrite if I ever find him -inherit games check-reqs +EAPI=6 + +inherit check-reqs MY_PN="${PN%-maps}" DESCRIPTION="Xonotic maps" @@ -13,6 +15,7 @@ HOMEPAGE="http://www.xonotic.org/" LICENSE="GPL-2" SLOT="0" IUSE="unofficial" +KEYWORDS="" RDEPEND="" DEPEND=" @@ -22,19 +25,18 @@ DEPEND=" S="${WORKDIR}" RESTRICT="test" -if use unofficial; then - CHECKREQS_DISK_USR="1G" -else - CHECKREQS_DISK_USR="155M" -fi - pkg_pretend() { + if use unofficial; then + CHECKREQS_DISK_USR="1G" + else + CHECKREQS_DISK_USR="155M" + fi + check-reqs_pkg_pretend } pkg_setup() { check-reqs_pkg_setup - games_pkg_setup ewarn "Downloaded pk3 files will be stored in \"xonotic-maps\" subdirectory of your DISTDIR" echo @@ -61,6 +63,7 @@ src_unpack() { # FETCHCOMMAND from make.globals is example local WGET="/usr/bin/wget -t 3 -T 60" + local SED="sed" local base_url="http://beta.xonotic.org/autobuild-bsp/" einfo "Downloading lists" @@ -70,32 +73,22 @@ src_unpack() { $WGET -O official_maps.html \ 'http://git.xonotic.org/?p=xonotic/xonotic-maps.pk3dir.git;a=tree;f=maps' || die - grep -e '\.map' official_maps.html |\ - sed -e 's,.*">\([^<]*\).map<\/a>.*,\1,' > official_maps.txt || die + grep -e '\.map' official_maps.html | ${SED} -e 's,.*">\([^<]*\).map<\/a>.*,\1,' > official_maps.txt || die [ -s official_maps.txt ] || die "List of official maps is empty" cp official_maps.txt install_maps.txt || die if use unofficial; then # For maps not in master branch we need to download fullpk3 # AllMaps - OfficialMaps = UnofficialMaps - grep all_maps.html \ - -e '' |\ - sed -e 's,.*="mapname">\([^<]*\)<.*,\1,' |\ - sort -u |\ - grep -v -x -e '' \ - -f official_maps.txt |\ - sed -e 's,$,-full,' > unofficial_maps.txt + grep all_maps.html -e '' | ${SED} -e 's,.*="mapname">\([^<]*\)<.*,\1,' |\ + sort -u | grep -v -x -e '' -f official_maps.txt | ${SED} -e 's,$,-full,' > unofficial_maps.txt [ -s unofficial_maps.txt ] || die "List of unofficial maps is empty" cat unofficial_maps.txt >> install_maps.txt fi latest_pk3_version() { # latest builds of maps are above - latest_version="$( - grep all_maps.html -m1 \ - -e "href=\"${name%-full}-.*.pk3\">bspk3<" |\ - sed -e "s,.*href=\"${name%-full}-\([^\"]*\).pk3\">bspk3<.*,\1," - )" + latest_version="$(grep all_maps.html -m1 -e "href=\"${name%-full}-.*.pk3\">bspk3<" |sed -e "s,.*href=\"${name%-full}-\([^\"]*\).pk3\">bspk3<.*,\1,")" } validate_pk3() { @@ -111,14 +104,8 @@ src_unpack() { # If map becomes official, it changes branch and git hashes in name => no need to check both fullpk3 and bsppk3 einfo "Cleaning \"${MAPS_STORE_DIR}\"" for file in "${MAPS_STORE_DIR}"/*; do - local name="$( - echo "${file}" |\ - sed -e "s,${MAPS_STORE_DIR}/\([^/]*\)-[0-9a-f]\{40\}-[0-9a-f]\{40\}.pk3$,\1," - )" - local version="$( - echo "${file}" |\ - sed -e "s,${MAPS_STORE_DIR}/${name}-\([0-9a-f]\{40\}-[0-9a-f]\{40\}\).pk3$,\1," - )" + local name="$(echo "${file}" |sed -e "s,${MAPS_STORE_DIR}/\([^/]*\)-[0-9a-f]\{40\}-[0-9a-f]\{40\}.pk3$,\1,")" + local version="$(echo "${file}"|sed -e "s,${MAPS_STORE_DIR}/${name}-\([0-9a-f]\{40\}-[0-9a-f]\{40\}\).pk3$,\1,")" latest_pk3_version if [ "${version}" != "${latest_version}" ]; then @@ -161,6 +148,4 @@ src_install() { while read file; do nonfatal doins "${MAPS_STORE_DIR}/${file}" || ewarn "installing \"${file}\" failed" done < install_files.txt - - prepgamesdirs }