Add additional allegro libs (compile fine, but headers are not compatible with nanox)
authorDaniel G <giri@nwrk.biz>
Sun, 27 Jan 2019 14:33:56 +0000 (15:33 +0100)
committerDaniel G <giri@nwrk.biz>
Sun, 27 Jan 2019 14:33:56 +0000 (15:33 +0100)
_template/packages/allegro5.2.0/.gitignore [new file with mode: 0644]
_template/packages/allegro5.2.0/Makefile [new file with mode: 0644]
_template/packages/allegro5.2.0/allegro-5.2.0.tar.gz [new file with mode: 0644]
_template/packages/allegro5.2.0/setenv.sh [new file with mode: 0755]
_template/packages/allegro5.2.4/.gitignore [new file with mode: 0644]
_template/packages/allegro5.2.4/Makefile [new file with mode: 0644]
_template/packages/allegro5.2.4/allegro-5.2.4.0.tar.gz [new file with mode: 0644]
_template/packages/allegro5.2.4/setenv.sh [new file with mode: 0755]
_template/packages/allegro5.2.4/setenv64.sh [new file with mode: 0755]

diff --git a/_template/packages/allegro5.2.0/.gitignore b/_template/packages/allegro5.2.0/.gitignore
new file mode 100644 (file)
index 0000000..09b3315
--- /dev/null
@@ -0,0 +1,8 @@
+# Ignore everything
+*
+
+# But not these files...
+!.gitignore
+!allegro-5.2.0.tar.gz
+!Makefile
+!setenv.sh
\ No newline at end of file
diff --git a/_template/packages/allegro5.2.0/Makefile b/_template/packages/allegro5.2.0/Makefile
new file mode 100644 (file)
index 0000000..c818da7
--- /dev/null
@@ -0,0 +1,36 @@
+############################################################################
+# Workfile: Makefile
+# Author: Daniel Giritzer, S1810567004 (daniel@giritzer.eu)
+# Date: 03.12.2018
+# Description: Universal Makefile for Unix based Operating Systems
+############################################################################
+WORKDIR = $(shell pwd)
+
+all: unpack android_arm
+
+.PHONY: unpack
+unpack:
+       tar xvzf allegro-5.2.0.tar.gz
+       sed -i -e 's/if(NOT ANDROID_TOOL)/if(ANDROID_TOOL)/g' $(WORKDIR)/allegro-5.2.0.0/cmake/AndroidApp.cmake
+
+.PHONY: android_arm
+android_arm:
+       cd $(WORKDIR)/allegro-5.2.0.0; \
+       set -e; \
+       . $(WORKDIR)/setenv.sh && \
+       mkdir -p ./buildandroid; \
+       cd ./buildandroid; \
+       cmake ..  -DANDROID_NDK_TOOLCHAIN_ROOT=../android_toolchain -DWANT_ANDROID=on -DCMAKE_BUILD_TYPE=Release -DANDROID_TARGET=android-23 -DARM_TARGETS=armeabi-v7a -DSHARED=false -DWANT_MONOLITH=ON -DWANT_EXAMPLES=false -DWANT_DEMO=false  -DWANT_TESTS=false; \
+       make -j4 -i 
+       mkdir -p $(WORKDIR)/../../include
+       mkdir -p $(WORKDIR)/../../lib/android_arm
+       mkdir -p $(WORKDIR)/../../lib/android_arm/liballeg
+       cp -rf $(WORKDIR)/allegro-5.2.0.0/include/* $(WORKDIR)/../../include
+       cp -rf $(WORKDIR)/allegro-5.2.0.0/android/allegro_activity/src/* $(WORKDIR)/../../lib/android_arm/liballeg
+       cp -rf $(WORKDIR)/allegro-5.2.0.0/buildandroid/include/* $(WORKDIR)/../../include
+       rename "s/_monolith-static//g" $(WORKDIR)/allegro-5.2.0.0/buildandroid/lib/*.a
+       cp -rf $(WORKDIR)/allegro-5.2.0.0/buildandroid/lib/*.a $(WORKDIR)/../../lib/android_arm
+
+.PHONY: clean
+clean:
+       rm -rf allegro-5.2.0.0
diff --git a/_template/packages/allegro5.2.0/allegro-5.2.0.tar.gz b/_template/packages/allegro5.2.0/allegro-5.2.0.tar.gz
new file mode 100644 (file)
index 0000000..5c14950
Binary files /dev/null and b/_template/packages/allegro5.2.0/allegro-5.2.0.tar.gz differ
diff --git a/_template/packages/allegro5.2.0/setenv.sh b/_template/packages/allegro5.2.0/setenv.sh
new file mode 100755 (executable)
index 0000000..ba0aa86
--- /dev/null
@@ -0,0 +1,15 @@
+WORKDIR=$(pwd)
+#git clone https://github.com/mherod/android-sdk-licenses.git
+#sudo cp -a $WORKDIR/android-sdk-licenses/*-license /usr/lib/android-sdk/licenses
+/usr/lib/android-ndk/build/tools/make_standalone_toolchain.py --api=23 --install-dir=$WORKDIR/android_toolchain --stl=stlport --arch=arm
+export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/
+export ANDROID_HOME=/usr/lib/android-sdk/
+export ANDROID_NDK_HOME=/usr/lib/android-ndk/
+export ANDROID_SDK_HOME=/usr/lib/android-sdk/
+export ANDROID_NDK_ROOT=$ANDROID_NDK_HOME
+export ANDROID_NDK_TOOLCHAIN_ROOT=$WORKDIR/android_toolchain/
+
+# expand path
+export PATH=$PATH:$ANDROID_NDK_HOME
+export PATH=$PATH:$ANDROID_SDK_HOME/tools
+export PATH=$PATH:$ANDROID_NDK_TOOLCHAIN_ROOT/bin
diff --git a/_template/packages/allegro5.2.4/.gitignore b/_template/packages/allegro5.2.4/.gitignore
new file mode 100644 (file)
index 0000000..71e2983
--- /dev/null
@@ -0,0 +1,9 @@
+# Ignore everything
+*
+
+# But not these files...
+!.gitignore
+!allegro-5.2.4.0.tar.gz
+!Makefile
+!setenv.sh
+!setenv64.sh
\ No newline at end of file
diff --git a/_template/packages/allegro5.2.4/Makefile b/_template/packages/allegro5.2.4/Makefile
new file mode 100644 (file)
index 0000000..5d09ec8
--- /dev/null
@@ -0,0 +1,56 @@
+############################################################################
+# Workfile: Makefile
+# Author: Daniel Giritzer, S1810567004 (daniel@giritzer.eu)
+# Date: 03.12.2018
+# Description: Universal Makefile for Unix based Operating Systems
+############################################################################
+WORKDIR = $(shell pwd)
+
+all: unpack android_arm
+
+.PHONY: unpack
+unpack:
+       tar xvzf allegro-5.2.4.0.tar.gz
+       find $(WORKDIR)/allegro-5.2.4.0 -name build.gradle -exec sed -i -e '/compileSdkVersion.*/a buildToolsVersion "25.0.0"' {} \;
+       find $(WORKDIR)/allegro-5.2.4.0 -name build.gradle -exec sed -i -e 's/compileSdkVersion.*/compileSdkVersion 23/g' {} \;
+       find $(WORKDIR)/allegro-5.2.4.0 -name build.gradle -exec sed -i -e 's/targetSdkVersion.*/targetSdkVersion 23/g' {} \;
+       sed -i -e 's/classpath "com.android.tools.build:gradle:.*/classpath "com.android.tools.build:gradle:2.3.3"/g' $(WORKDIR)/allegro-5.2.4.0/android/gradle_project/build.gradle
+       sed -i -e '/google()/a maven { url "file:\/\/\/usr\/share\/maven-repo" }' $(WORKDIR)/allegro-5.2.4.0/android/gradle_project/build.gradle
+
+.PHONY: android_arm
+android_arm:
+       cd $(WORKDIR)/allegro-5.2.4.0; \
+       set -e; \
+       . $(WORKDIR)/setenv.sh && \
+       mkdir -p ./buildandroid; \
+       cd ./buildandroid; \
+       cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-android.cmake -DCMAKE_BUILD_TYPE=Release -DANDROID_TARGET=android-23 -DARM_TARGETS=armeabi-v7a -DWANT_MONOLITH=ON -DSHARED=false -DWANT_EXAMPLES=false -DWANT_DEMO=false  -DWANT_TESTS=false; \
+       make -j6
+       mkdir -p $(WORKDIR)/../../include
+       mkdir -p $(WORKDIR)/../../lib/android_arm
+       cp -rf $(WORKDIR)/allegro-5.2.4.0/include/* $(WORKDIR)/../../include
+       cp -rf $(WORKDIR)/allegro-5.2.4.0/android/gradle_project/allegro/src/main/java/org/* $(WORKDIR)/../../lib/android_arm
+       cp -rf $(WORKDIR)/allegro-5.2.4.0/buildandroid/include/* $(WORKDIR)/../../include
+       rename "s/monolith-static//g" $(WORKDIR)/allegro-5.2.4.0/buildandroid/lib/*.a
+       cp -rf $(WORKDIR)/allegro-5.2.4.0/buildandroid/lib/*.a $(WORKDIR)/../../lib/android_arm
+
+.PHONY: android_arm64
+android_arm64:
+       cd $(WORKDIR)/allegro-5.2.4.0; \
+       set -e; \
+       . $(WORKDIR)/setenv64.sh && \
+       mkdir -p ./buildandroid64; \
+       cd ./buildandroid64; \
+       cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-android.cmake -DCMAKE_BUILD_TYPE=Release -DANDROID_TARGET=android-23 -DARM_TARGETS=arm64-v8a -DWANT_MONOLITH=ON -DSHARED=false  -DWANT_EXAMPLES=false -DWANT_DEMO=false  -DWANT_TESTS=false; \
+       make -j6
+       mkdir -p $(WORKDIR)/../../include
+       mkdir -p $(WORKDIR)/../../lib/android_arm64
+       cp -rf $(WORKDIR)/allegro-5.2.4.0/include/* $(WORKDIR)/../../include
+       cp -rf $(WORKDIR)/allegro-5.2.4.0/android/gradle_project/allegro/src/main/java/org/* $(WORKDIR)/../../lib/android_arm
+       cp -rf $(WORKDIR)/allegro-5.2.4.0/buildandroid64/include/* $(WORKDIR)/../../include
+       rename "s/monolith-static//g" $(WORKDIR)/allegro-5.2.4.0/buildandroid64/lib/*.a
+       cp -rf $(WORKDIR)/allegro-5.2.4.0/buildandroid64/lib/*.a $(WORKDIR)/../../lib/android_arm64
+
+.PHONY: clean
+clean:
+       rm -rf allegro-5.2.4.0
diff --git a/_template/packages/allegro5.2.4/allegro-5.2.4.0.tar.gz b/_template/packages/allegro5.2.4/allegro-5.2.4.0.tar.gz
new file mode 100644 (file)
index 0000000..bff5046
Binary files /dev/null and b/_template/packages/allegro5.2.4/allegro-5.2.4.0.tar.gz differ
diff --git a/_template/packages/allegro5.2.4/setenv.sh b/_template/packages/allegro5.2.4/setenv.sh
new file mode 100755 (executable)
index 0000000..c40c6a2
--- /dev/null
@@ -0,0 +1,8 @@
+WORKDIR=$(pwd)
+#git clone https://github.com/mherod/android-sdk-licenses.git
+#sudo cp -a $WORKDIR/android-sdk-licenses/*-license /usr/lib/android-sdk/licenses
+/usr/lib/android-ndk/build/tools/make_standalone_toolchain.py --api=21 --install-dir=$WORKDIR/android_toolchain --arch=arm
+export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/
+export ANDROID_HOME=/usr/lib/android-sdk/
+export ANDROID_NDK_HOME=/usr/lib/android-ndk/
+export ANDROID_NDK_TOOLCHAIN_ROOT=$WORKDIR/android_toolchain/
diff --git a/_template/packages/allegro5.2.4/setenv64.sh b/_template/packages/allegro5.2.4/setenv64.sh
new file mode 100755 (executable)
index 0000000..bccd770
--- /dev/null
@@ -0,0 +1,8 @@
+WORKDIR=$(pwd)
+#git clone https://github.com/mherod/android-sdk-licenses.git
+#sudo cp -a $WORKDIR/android-sdk-licenses/*-license /usr/lib/android-sdk/licenses
+/usr/lib/android-ndk/build/tools/make_standalone_toolchain.py --api=21 --install-dir=$WORKDIR/android_toolchain64 --arch=arm64
+export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/
+export ANDROID_HOME=/usr/lib/android-sdk/
+export ANDROID_NDK_HOME=/usr/lib/android-ndk/
+export ANDROID_NDK_TOOLCHAIN_ROOT=$WORKDIR/android_toolchain64/