Mercurial > vanilla
changeset 795:96735a865c3e
games/wesnoth: initial import, closes #1653
author | David Demelier <markand@malikania.fr> |
---|---|
date | Mon, 12 Aug 2019 20:54:37 +0200 |
parents | 9a09b85f5ac0 |
children | e693904f5e20 |
files | Docs/uids.md games/wesnoth/wesnoth-post.sh games/wesnoth/wesnoth.sh games/wesnoth/wesnoth.sha1 |
diffstat | 4 files changed, 121 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/Docs/uids.md Mon Aug 12 17:03:47 2019 +0200 +++ b/Docs/uids.md Mon Aug 12 20:54:37 2019 +0200 @@ -8,10 +8,11 @@ The following UID/GID are defined: -| uid | gid | package(s) | -|---------------|--------------------|------------------| -| sshd (100) | sshd (100) | network/openssh | -| polkitd (101) | polkitd (101) | security/polkit | -| pulse (102) | pulse (102) | audio/pulseaudio | -| | pulse-rt (103) | audio/pulseaudio | -| | pulse-access (104) | audio/pulseaudio | +| uid | gid | package(s) | +|----------------|--------------------|------------------| +| sshd (100) | sshd (100) | network/openssh | +| polkitd (101) | polkitd (101) | security/polkit | +| pulse (102) | pulse (102) | audio/pulseaudio | +| | pulse-rt (103) | audio/pulseaudio | +| | pulse-access (104) | audio/pulseaudio | +| wesnothd (105) | wesnothd (105) | games/wesnoth |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/games/wesnoth/wesnoth-post.sh Mon Aug 12 20:54:37 2019 +0200 @@ -0,0 +1,20 @@ +#!/bin/sh +# +# Copyright (c) 2019 David Demelier <markand@malikania.fr> +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# + +if [ -x /bin/gtk-update-icon-cache ]; then + /bin/gtk-update-icon-cache -fqt /share/icons/hicolor +fi
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/games/wesnoth/wesnoth.sh Mon Aug 12 20:54:37 2019 +0200 @@ -0,0 +1,92 @@ +#!/bin/sh +# +# Copyright (c) 2019 David Demelier <markand@malikania.fr> +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# + +PKGNAME=wesnoth +PKGVERSION=1.14.7 +PKGREVISION=1 +PKGLICENSE="GPLv2" +PKGSUMMARY="turn-based strategy game in fantasy world" +PKGDOWNLOAD="https://sourceforge.net/projects/wesnoth/files/$PKGNAME-${PKGVERSION%.*}/$PKGNAME-$PKGVERSION/$PKGNAME-$PKGVERSION.tar.bz2" +PKGDEPENDS="audio/sdl2-mixer + dev/cmake:build + fonts/fontconfig + fonts/pango + fonts/sdl2-ttf + graphics/cairo + graphics/sdl2-image + lib/boost + multimedia/sdl2" +PKGOPTIONS="FRIBIDI NLS NOTIFICATIONS" + +: ${CC:=clang} +: ${CFLAGS:=-O2} +: ${CXX:=clang++} +: ${CXXFLAGS:=-O2} +: ${FRIBIDI:=yes} +: ${NLS:=yes} +: ${NOTIFICATIONS:=yes} + +if [ "$FRIBIDI" = "yes" ]; then + PKGDEPENDS="fonts/fribidi $PKGDEPENDS" + with_fribidi="-DENABLE_FRIBIDI=On" +else + with_fribidi="-DENABLE_FRIBIDI=Off" +fi + +if [ "$NLS" = "yes" ]; then + PKGDEPENDS="core/gettext:build $PKGDEPENDS" + with_nls="-DENABLE_NLS=On" +else + with_nls="-DENABLE_NLS=Off" +fi + +if [ "$NOTIFICATIONS" = "yes" ]; then + PKGDEPENDS="network/dbus $PKGDEPENDS" + with_notifications="-DENABLE_NOTIFICATIONS=On" +else + with_notifications="-DENABLE_NOTIFICATIONS=Off" +fi + +build() +{ + rm -rf $PKGNAME-$PKGVERSION + tar xvf $PKGNAME-$PKGVERSION.tar.bz2 + cd $PKGNAME-$PKGVERSION + + # -DENABLE_SERVER=Off: broken with libc++ yet. + patch -p0 < ../patch-clang.patch + patch -p0 < ../patch-boost.patch + mkdir build && cd build + cmake .. \ + -DBUILD_SHARED_LIBS=On \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_COMPILER="$CXX" \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ + -DCMAKE_C_COMPILER="$CC" \ + -DCMAKE_C_FLAGS="$CFLAGS" \ + -DCMAKE_INSTALL_PREFIX= \ + -DENABLE_SERVER=Off \ + $with_fribidi \ + $with_nls \ + $with_notifications + make -j2 + make install DESTDIR=$DESTDIR + cd .. + + cd .. + rm -rf $PKGNAME-$PKGVERSION +}