mail[Wesnoth-commits] r33343 - /trunk/packaging/Gentoo/wesnoth-1.5.12.ebuild


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by loonycyborg on March 04, 2009 - 22:43:
Author: loonycyborg
Date: Wed Mar  4 22:43:15 2009
New Revision: 33343

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33343&view=rev
Log:
Refactored the Gentoo ebuild and removed smallgui USE-flag.

Modified:
    trunk/packaging/Gentoo/wesnoth-1.5.12.ebuild

Modified: trunk/packaging/Gentoo/wesnoth-1.5.12.ebuild
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/packaging/Gentoo/wesnoth-1.5.12.ebuild?rev=33343&r1=33342&r2=33343&view=diff
==============================================================================
--- trunk/packaging/Gentoo/wesnoth-1.5.12.ebuild (original)
+++ trunk/packaging/Gentoo/wesnoth-1.5.12.ebuild Wed Mar  4 22:43:15 2009
@@ -9,7 +9,7 @@
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
-IUSE="dedicated +editor lite nls server smallgui tinygui tools"
+IUSE="dedicated +editor lite nls server tinygui tools"
 
 RDEPEND=">=media-libs/libsdl-1.2.7
        media-libs/sdl-net
@@ -33,12 +33,15 @@
 
 S=${WORKDIR}/${PN}-${MY_PV}
 
+use_target() {
+       use $1 && echo $2
+}
+
+use_variable() {
+       echo ${2:-$1}=$(use $1 && echo ${3:-yes} || echo ${4:-no})
+}
+
 pkg_setup() {
-       if use !dedicated && use smallgui && use tinygui ; then
-               ewarn "USE=tinygui overrides USE=smallgui"
-               ebeep
-               epause 10
-       fi
        games_pkg_setup
 }
 
@@ -79,28 +82,6 @@
                myconf="${myconf} server_uid=${GAMES_USER_DED}"
                myconf="${myconf} server_gid=${GAMES_GROUP}"
        fi
-       if use !dedicated ; then
-               myconf="${myconf} wesnoth"
-       fi
-       use tools && myconf="${myconf} cutter exploder"
-       if use editor; then
-               myconf="${myconf} editor=yes"
-       else
-               myconf="${myconf} editor=no"
-       fi
-       if use tinygui ; then
-               myconf="${myconf} gui=tiny"
-       elif use smallgui ; then
-               myconf="${myconf} gui=small"
-       fi
-       if use lite ; then
-               myconf="${myconf} lowmem=true"
-       fi
-       if use nls ; then
-               myconf="${myconf} nls=true"
-       else
-               myconf="${myconf} nls=false"
-       fi
 
        if has ccache $FEATURES; then
                myconf="${myconf} ccache=yes"
@@ -110,6 +91,13 @@
 
        scons $myconf \
                ${SCONSOPTS/-l[0-9]} \
+               $(use_target !dedicated wesnoth) \
+               $(use_target tools cutter) \
+               $(use_target tools exploder) \
+               $(use_variable editor) \
+               $(use_variable tinygui gui tiny normal) \
+               $(use_variable lite lowmem) \
+               $(use_variable nls) \
                localedirname=/usr/share/locale \
                prefix=/usr/games \
                prefsdir=.wesnoth-1.5 \




Related Messages


Powered by MHonArc, Updated Wed Mar 04 23:00:13 2009