From 6331b83108290815a51dee8fe25e557ae560c376 Mon Sep 17 00:00:00 2001 From: milisbir Date: Mon, 22 Jan 2018 08:47:00 +0200 Subject: [PATCH] 0ad --- talimatname/genel/0/0ad-data/talimat | 15 +++ talimatname/genel/0/0ad/talimat | 50 ++++++++ talimatname/genel/0/0ad/update-workspaces.sh | 122 +++++++++++++++++++ 3 files changed, 187 insertions(+) create mode 100644 talimatname/genel/0/0ad-data/talimat create mode 100644 talimatname/genel/0/0ad/talimat create mode 100644 talimatname/genel/0/0ad/update-workspaces.sh diff --git a/talimatname/genel/0/0ad-data/talimat b/talimatname/genel/0/0ad-data/talimat new file mode 100644 index 000000000..bb674cfa6 --- /dev/null +++ b/talimatname/genel/0/0ad-data/talimat @@ -0,0 +1,15 @@ +# Tanım: Çapraz platform, üç boyutlu ve tarihsel temelli gerçek zamanlı strateji oyunu (veri dosyaları) +# URL: http://play0ad.com/ +# Paketçi: Cihan_Alkan +# Gerekler: +# Grup: oyunlar + +isim=0ad-data +surum=a22 +devir=1 +kaynak=(https://sourceforge.net/projects/zero-ad/files/releases/0ad-0.0.22-alpha-unix-data.tar.xz) + +derle() { + install -d ${PKG}/usr/share/0ad/data + cp -r ${SRC}/0ad-0.0.22-alpha/binaries/data ${PKG}/usr/share/0ad +} diff --git a/talimatname/genel/0/0ad/talimat b/talimatname/genel/0/0ad/talimat new file mode 100644 index 000000000..30c7d48eb --- /dev/null +++ b/talimatname/genel/0/0ad/talimat @@ -0,0 +1,50 @@ +# Tanım: Çapraz platform, üç boyutlu ve tarihsel temelli gerçek zamanlı strateji oyunu +# URL: http://play0ad.com/ +# Paketçi: Cihan_Alkan +# Gerekler: binutils boost curl 0ad-data libogg libpng libvorbis libxml2 openal sdl2 wxgtk zlib xorg-glu miniupnpc icu nspr cmake xorg-mesa python xorg-libsm gloox enet +# Grup: oyun + +isim=0ad +surum=a22 +devir=1 +kaynak=(https://sourceforge.net/projects/zero-ad/files/releases/0ad-0.0.22-alpha-unix-build.tar.xz + update-workspaces.sh) + +derle() { + +cp update-workspaces.sh $SRC/$isim-0.0.22-alpha/build/workspaces/ + + cd "$SRC/$isim-0.0.22-alpha/" + sed -i "s/env python/env python2/g" libraries/source/cxxtest-4.4/bin/cxxtestgen + + cd build/workspaces + + unset CPPFLAGS # for le spidermonkey + + # sed "/^2/,/13$/d" update-workspaces.sh + + ./update-workspaces.sh \ + --bindir=/usr/bin \ + --libdir=/usr/lib/0ad \ + --datadir=/usr/share/${isim}/data + + cd gcc + + make + + cd $SRC + + install -d "${PKG}"/usr/{bin,lib/0ad,share/"${isim}"/data} + cd "$SRC/$isim-0.0.22-alpha" + + install -Dm755 binaries/system/pyrogenesis "${PKG}/usr/bin" + install -Dm755 binaries/system/*.so "${PKG}/usr/lib/0ad" + + cp -r binaries/data/l10n/ ${PKG}/usr/share/${isim}/data/ + + install -Dm755 build/resources/${isim}.sh "${PKG}/usr/bin/${isim}" + install -Dm644 build/resources/${isim}.desktop \ + "${PKG}/usr/share/applications/${isim}.desktop" + install -Dm644 build/resources/${isim}.png \ + "${PKG}/usr/share/pixmaps/${isim}.png" +} diff --git a/talimatname/genel/0/0ad/update-workspaces.sh b/talimatname/genel/0/0ad/update-workspaces.sh new file mode 100644 index 000000000..4270836a0 --- /dev/null +++ b/talimatname/genel/0/0ad/update-workspaces.sh @@ -0,0 +1,122 @@ +#!/bin/sh +# Check for whitespace in absolute path; this will cause problems in the +# SpiderMonkey build (https://bugzilla.mozilla.org/show_bug.cgi?id=459089) +# and maybe elsewhere, so we just forbid it +# Use perl as an alternative to readlink -f, which isn't available on BSD or OS X +SCRIPTPATH=`perl -MCwd -e 'print Cwd::abs_path shift' "$0"` +case "$SCRIPTPATH" in + *\ * ) + die "Absolute path contains whitespace, which will break the build - move the game to a path without spaces" ;; +esac + +JOBS=${JOBS:="-j2"} + +# Some of our makefiles depend on GNU make, so we set some sane defaults if MAKE +# is not set. +case "`uname -s`" in + "FreeBSD" | "OpenBSD" ) + MAKE=${MAKE:="gmake"} + ;; + * ) + MAKE=${MAKE:="make"} + ;; +esac + +# Parse command-line options: + +premake_args="" + +without_nvtt=false +with_system_nvtt=false +with_system_mozjs38=false +enable_atlas=true + +for i in "$@" +do + case $i in + --without-nvtt ) without_nvtt=true; premake_args="${premake_args} --without-nvtt" ;; + --with-system-nvtt ) with_system_nvtt=true; premake_args="${premake_args} --with-system-nvtt" ;; + --with-system-mozjs38 ) with_system_mozjs38=true; premake_args="${premake_args} --with-system-mozjs38" ;; + --enable-atlas ) enable_atlas=true ;; + --disable-atlas ) enable_atlas=false ;; + -j* ) JOBS=$i ;; + # Assume any other --options are for Premake + --* ) premake_args="${premake_args} $i" ;; + esac +done + +premake_args="${premake_args} --collada" +if [ "$enable_atlas" = "true" ]; then + premake_args="${premake_args} --atlas" +fi + +cd "$(dirname $0)" +# Now in build/workspaces/ (where we assume this script resides) + +if [ "`uname -s`" = "Darwin" ]; then + # Set *_CONFIG variables on OS X, to override the path to e.g. sdl2-config + export GLOOX_CONFIG=${GLOOX_CONFIG:="$(pwd)/../../libraries/osx/gloox/bin/gloox-config"} + export ICU_CONFIG=${ICU_CONFIG:="$(pwd)/../../libraries/osx/icu/bin/icu-config"} + export SDL2_CONFIG=${SDL2_CONFIG:="$(pwd)/../../libraries/osx/sdl2/bin/sdl2-config"} + export WX_CONFIG=${WX_CONFIG:="$(pwd)/../../libraries/osx/wxwidgets/bin/wx-config"} + export XML2_CONFIG=${XML2_CONFIG:="$(pwd)/../../libraries/osx/libxml2/bin/xml2-config"} +fi + +# Don't want to build bundled libs on OS X +# (build-osx-libs.sh is used instead) +if [ "`uname -s`" != "Darwin" ]; then + echo "Updating bundled third-party dependencies..." + echo + + # Build/update bundled external libraries + (cd ../../libraries/source/fcollada/src && ${MAKE} ${JOBS}) || die "FCollada build failed" + echo + if [ "$with_system_mozjs38" = "false" ]; then + (cd ../../libraries/source/spidermonkey && MAKE=${MAKE} JOBS=${JOBS} ./build.sh) || die "SpiderMonkey build failed" + fi + echo + if [ "$with_system_nvtt" = "false" ] && [ "$without_nvtt" = "false" ]; then + (cd ../../libraries/source/nvtt && MAKE=${MAKE} JOBS=${JOBS} ./build.sh) || die "NVTT build failed" + fi + echo +fi + +# Now build premake and run it to create the makefiles +cd ../premake/premake4 +PREMAKE_BUILD_DIR=build/gmake.unix +# BSD and OS X need different Makefiles +case "`uname -s`" in + "GNU/kFreeBSD" ) + # use default gmake.unix (needs -ldl as we have a GNU userland and libc) + ;; + *"BSD" ) + PREMAKE_BUILD_DIR=build/gmake.bsd + ;; + "Darwin" ) + PREMAKE_BUILD_DIR=build/gmake.macosx + ;; +esac +${MAKE} -C $PREMAKE_BUILD_DIR ${JOBS} || die "Premake build failed" + +echo + +cd .. + +# If we're in bash then make HOSTTYPE available to Premake, for primitive arch-detection +export HOSTTYPE="$HOSTTYPE" + +echo "Premake args: ${premake_args}" + +premake4/bin/release/premake4 --file="premake4.lua" --outpath="../workspaces/gcc/" ${premake_args} gmake || die "Premake failed" +premake4/bin/release/premake4 --file="premake4.lua" --outpath="../workspaces/codeblocks/" ${premake_args} codeblocks || die "Premake failed" + +# Also generate xcode workspaces if on OS X +if [ "`uname -s`" = "Darwin" ]; then + premake4/bin/release/premake4 --file="premake4.lua" --outpath="../workspaces/xcode3" ${premake_args} xcode3 || die "Premake failed" + premake4/bin/release/premake4 --file="premake4.lua" --outpath="../workspaces/xcode4" ${premake_args} xcode4 || die "Premake failed" +fi + +# test_root.cpp gets generated by cxxtestgen and passing different arguments to premake could require a regeneration of this file. +# It doesn't depend on anything in the makefiles, so make won't notice that the prebuild command for creating test_root.cpp needs to be triggered. +# We force this by deleting the file. +rm -f ../../source/test_root.cpp