| 257 | == Building optional dependencies == |
| 258 | |
| 259 | === Libmagic === |
| 260 | Libmagic is not needed by modRana, but is required by Mieru and other ports to Android might also find it useful. |
| 261 | |
| 262 | First, get the actual sources for the File command (5.11 at the time of writing). |
| 263 | |
| 264 | Then configure and compile (don't forgett to replace all the <> quoted paths with valid ones): |
| 265 | |
| 266 | {{{ |
| 267 | # based on: http://mdqinc.com/blog/2011/09/cross-compiling-python-for-android/ |
| 268 | export ANDROID_NDK=<path to>/android-ndk |
| 269 | export PATH="$ANDROID_NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/:$ANDROID_NDK:$ANDROID_NDK/tools:/usr/local/bin:/usr/bin:/bin" |
| 270 | export ARCH="armeabi" |
| 271 | export CFLAGS="-DANDROID -mandroid -fomit-frame-pointer --sysroot $ANDROID_NDK/platforms/android-14/arch-arm" |
| 272 | export CXXFLAGS = "$CFLAGS" |
| 273 | export CC="arm-linux-androideabi-gcc $CFLAGS" |
| 274 | export CXX="arm-linux-androideabi-g++ $CXXFLAGS" |
| 275 | export AR="arm-linux-androideabi-ar" |
| 276 | export RANLIB="arm-linux-androideabi-ranlib" |
| 277 | export STRIP="arm-linux-androideabi-strip --strip-unneeded" |
| 278 | |
| 279 | cd file-5.11 |
| 280 | |
| 281 | make clean |
| 282 | |
| 283 | ./configure --prefix=<path to some folder>/out --host=arm-eabi |
| 284 | |
| 285 | read -p "Press any key to continue... " -n1 -s |
| 286 | |
| 287 | make -j5 |
| 288 | make install |
| 289 | }}} |
| 290 | |
| 291 | The result will be in the ''out'' folder, specified by the results path. Just pack them with you application and set the corresponding environmental variables accordingly. :) |