diff options
author | Samuel FORGIONE | 2015-07-07 07:19:51 +0200 |
---|---|---|
committer | Samuel FORGIONE | 2015-07-07 07:19:51 +0200 |
commit | 1f521ed4da3f75b595491c606e64838bbd55844e (patch) | |
tree | 943bdad336257d632723f3ff69b92369d6271f17 | |
download | aur-1f521ed4da3f75b595491c606e64838bbd55844e.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 33 | ||||
-rw-r--r-- | PKGBUILD | 38 | ||||
-rw-r--r-- | README | 64 | ||||
-rwxr-xr-x | cocos2d-x.csh | 6 | ||||
-rwxr-xr-x | cocos2d-x.sh | 6 |
5 files changed, 147 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..da0a887911c4 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,33 @@ +pkgbase = cocos2d-x-src + pkgdesc = Cocos2D-X is a game engine that supports multiple platforms such as iOS, Android, WinXP/7/8, WP8, BlackBerry, MeeGo, Marmelade, WebOS, Mac OS X + pkgver = 3.6 + pkgrel = 2 + url = http://www.cocos2d-x.org/filedown/ + arch = i686 + arch = x86_64 + license = MIT License + makedepends = python2 + depends = glew + depends = glfw + depends = glibc + depends = fontconfig + depends = libgl + depends = curl + depends = libx11 + depends = zlib + depends = libpng + depends = freetype2 + options = !buildflags + options = !strip + options = staticlibs + source = http://www.cocos2d-x.org/filedown/cocos2d-x-3.6.zip + source = README + source = cocos2d-x.sh + source = cocos2d-x.csh + sha1sums = d9f52a3bda96948e1b491d75a2c3c3a3fa1c9e98 + sha1sums = 56aac03c4af0df8fcb371f1ae9a3b9f3f6983f72 + sha1sums = 353bdefe07bdb6eb7f53aff20d20e83b488c1c05 + sha1sums = 49b7919fc38803c1dd2f5b1d47fb0c75fde1fec6 + +pkgname = cocos2d-x-src + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..63e18558fa3f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,38 @@ +# Mantainer: samuel.forgione@gmail.com + +_appname=cocos2d-x +pkgname=cocos2d-x-src +pkgver=3.6 +pkgrel=2 +pkgdesc="Cocos2D-X is a game engine that supports multiple platforms such as iOS, Android, WinXP/7/8, WP8, +BlackBerry, MeeGo, Marmelade, WebOS, Mac OS X" +arch=('i686' 'x86_64') +url="http://www.cocos2d-x.org/filedown/" +license=('MIT License') +depends=('glew' 'glfw' 'glibc' 'fontconfig' 'libgl' 'curl' 'libx11' 'zlib' 'libpng' 'freetype2') +#depends=('openssl' 'sqlite3') +makedepends=('python2') +options=('!buildflags' '!strip' 'staticlibs') +source=("${url}${_appname}-${pkgver}.zip" + "README" + "$_appname.sh" + "$_appname.csh" +) +sha1sums=('d9f52a3bda96948e1b491d75a2c3c3a3fa1c9e98' + '56aac03c4af0df8fcb371f1ae9a3b9f3f6983f72' + '353bdefe07bdb6eb7f53aff20d20e83b488c1c05' + '49b7919fc38803c1dd2f5b1d47fb0c75fde1fec6' +) + +prepare() { + chmod +x ${_appname}-${pkgver}/download-deps.py + python2 ${_appname}-${pkgver}/download-deps.py +} + +package() { + install -d "$pkgdir/opt/" + mv "$_appname-$pkgver" "$pkgdir/opt/$_appname" + install -Dm644 "README" "$pkgdir/opt/$_appname/" + install -Dm755 "$_appname.sh" "$pkgdir/etc/profile.d/$_appname.sh" + install -Dm755 "$_appname.csh" "$pkgdir/etc/profile.d/$_appname.csh" +} diff --git a/README b/README new file mode 100644 index 000000000000..4121a012bd06 --- /dev/null +++ b/README @@ -0,0 +1,64 @@ +Very important point to have a full functionnal cocos2d-x install: + +******************* +** WARNING ** +******************* + * All cocos2d scripts use python2. Calling "python2 script" is not enough + as other submodule will be called with "env python" (which could point to python3). + cocos2d scripts will failed if called with python3. + + In order to use cocos2d wrapper correctly without forcing symlink python to be python2, + you can use this : https://wiki.archlinux.org/index.php/python#Dealing_with_version_problem_in_build_scripts + A first pattern I suggest is "/opt/cocos2d-x/*" + + +************************ +** CONFIGURATION ** +************************ + * In order to use android, you should define in your bashrc, zshrc, whateverrc : +export NDK_ROOT=/opt/android-ndk +export ANDROID_SDK_ROOT=/opt/android-sdk +export ANT_ROOT=/usr/bin + (Each path came with package aur/android-ndk aur/android-sdk and extra/apache-ant) + + + * Use "cocos" wrapper to create, compile, run your project... + "cocos" will echo you basic command + "cocos command" will echo you basic parameter for "command" + + Basic setup : + cocos new -l cpp -p com.firm.app myapp + cd myapp + cocos run -p android -j3 + cocos run -p linux -j3 + + Alternative 1 : + cocos new -l cpp -p com.firm.app myapp + mkdir linux-build && cd linux-build + cmake .. + ../bin/debug/linux/MyGame + + Alternative 2 (howewer compile failed near 70% on unfound malloc/free): + export CC=/usr/bin/clang + export CXX=/usr/bin/clang++ + cocos new -l cpp -p com.firm.app myapp + mkdir linux-build && cd linux-build + cmake -G Ninja -DCLANG=ON .. + ../bin/debug/linux/MyGame + + + * Personnal preference : + You can edit myapp/CMakeLists.txt to adjust personnal preference + (and speed up compile time, avoiding unnecessary things) + Here my personnal customisation : +set(DEBUG_MODE OFF CACHE BOOL "Debug or release? Release!") +set(BUILD_EXTENSIONS OFF CACHE BOOL "Turn off build extension library") +set(BUILD_EDITOR_SPINE OFF CACHE BOOL "Turn off build editor support for spine") +set(BUILD_EDITOR_COCOSTUDIO OFF CACHE BOOL "Turn off build editor support for cocostudio") +set(BUILD_EDITOR_COCOSBUILDER OFF CACHE BOOL "Turn off build editor support for cocosbuilder") +set(BUILD_CPP_TESTS OFF CACHE BOOL "Turn off build TestCpp samples") +set(BUILD_LUA_LIBS OFF CACHE BOOL "Turn off build lua libraries") +set(BUILD_LUA_TESTS OFF CACHE BOOL "Turn off build TestLua samples") + +I think that's all for the moment. +I hope you'll enjoy as mush as I am ! diff --git a/cocos2d-x.csh b/cocos2d-x.csh new file mode 100755 index 000000000000..e876e57d6ec8 --- /dev/null +++ b/cocos2d-x.csh @@ -0,0 +1,6 @@ +setenv COCOS_X_ROOT /opt/cocos2d-x +setenv COCOS_CONSOLE_ROOT ${COCOS_X_ROOT}/tools/cocos2d-console/bin +setenv COCOS_TEMPLATES_ROOT ${COCOS_X_ROOT}/templates +setenv PATH ${PATH}:${COCOS_X_ROOT} +setenv PATH ${PATH}:${COCOS_CONSOLE_ROOT} +setenv PATH ${PATH}:${COCOS_TEMPLATES_ROOT} diff --git a/cocos2d-x.sh b/cocos2d-x.sh new file mode 100755 index 000000000000..0d1dd4bd161d --- /dev/null +++ b/cocos2d-x.sh @@ -0,0 +1,6 @@ +export COCOS_X_ROOT=/opt/cocos2d-x +export COCOS_CONSOLE_ROOT=${COCOS_X_ROOT}/tools/cocos2d-console/bin +export COCOS_TEMPLATES_ROOT=${COCOS_X_ROOT}/templates +export PATH=${PATH}:${COCOS_X_ROOT} +export PATH=${PATH}:${COCOS_CONSOLE_ROOT} +export PATH=${PATH}:${COCOS_TEMPLATES_ROOT} |