Browse Source
I put almost 3 hours on this! It ships with a lot of makefiles for various platforms, notably one for android_arm. I patched it a bit because Termux already gives many of the goodies. Probably it could be simplified. Most of the time went on tinkering with flags and waiting for the Docker container to reload the new files...there must be a better way! p7zip doesn't seem to honor $prefix, instead it uses $DEST_HOME.android-5
Francisco Demartino
9 years ago
2 changed files with 96 additions and 0 deletions
@ -0,0 +1,26 @@ |
|||
# adapted from archlinux PKGBUILD |
|||
pkgname=p7zip |
|||
pkgver=15.09 |
|||
TERMUX_PKG_VERSION=$pkgver |
|||
TERMUX_PKG_HOMEPAGE=http://p7zip.sourceforge.net/ |
|||
TERMUX_PKG_DESCRIPTION="Command-line version of the 7zip compressed file archiver" |
|||
TERMUX_PKG_SRCURL="http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/${pkgname}_${pkgver}_src_all.tar.bz2" |
|||
TERMUX_PKG_BUILD_IN_SRC=yes |
|||
TERMUX_PKG_FOLDERNAME=${pkgname}_${pkgver} |
|||
|
|||
termux_step_configure () { |
|||
cp makefile.android_arm makefile.machine |
|||
|
|||
rm GUI/kde4/p7zip_compress.desktop |
|||
|
|||
sed -i 's/wx-config/wx-config-2.8/g' CPP/7zip/TEST/TestUI/makefile \ |
|||
CPP/7zip/UI/{FileManager,GUI,P7ZIP}/makefile |
|||
} |
|||
|
|||
termux_step_make () { |
|||
LD="$CC $LDFLAGS" CC="$CC $CFLAGS $CPPFLAGS $LDFLAGS" make -j $TERMUX_MAKE_PROCESSES all3 OPTFLAGS="${CXXFLAGS}" DEST_HOME=$TERMUX_PREFIX |
|||
} |
|||
|
|||
termux_step_make_install () { |
|||
make install DEST_HOME=$TERMUX_PREFIX |
|||
} |
@ -0,0 +1,70 @@ |
|||
diff -u -r orig/makefile.android_arm p7zip_15.09/makefile.android_arm
|
|||
--- orig/makefile.android_arm 2015-09-13 15:15:17.000000000 -0300
|
|||
+++ p7zip_15.09/makefile.android_arm 2015-12-21 13:50:55.895794056 -0300
|
|||
@@ -1,12 +1,7 @@
|
|||
# |
|||
-# makefile for ANDROID (generic ARM)
|
|||
+# makefile for Android with Termux
|
|||
# |
|||
|
|||
-ANDROID_NDK_HOME=$(HOME)/ANDROID/android-ndk-r5c
|
|||
-ANDROID_NDK_BIN=$(ANDROID_NDK_HOME)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin
|
|||
-
|
|||
-# -fpic -Os
|
|||
-# -fstack-protector
|
|||
ANDROID_FLAGS=\ |
|||
-ffunction-sections \ |
|||
-funwind-tables \ |
|||
@@ -16,27 +11,18 @@
|
|||
-D__ARM_ARCH_5TE__ \ |
|||
-DANDROID \ |
|||
-DANDROID_NDK \ |
|||
+ -D_UNICODE \
|
|||
+ -DUNICODE \
|
|||
-Wno-psabi \ |
|||
- -march=armv5te \
|
|||
- -mtune=xscale \
|
|||
- -msoft-float \
|
|||
-mthumb \ |
|||
-fomit-frame-pointer \ |
|||
-fno-strict-aliasing -finline-limit=64 \ |
|||
- -I$(ANDROID_NDK_HOME)/sources/cxx-stl/system/include \
|
|||
- -I$(ANDROID_NDK_HOME)/platforms/android-3/arch-arm/usr/include \
|
|||
- -Wa,--noexecstack
|
|||
+ -Wa,--noexecstack
|
|||
|
|||
ANDROID_LINK=-v \ |
|||
-Wl,--gc-sections -Wl,-z,nocopyreloc \ |
|||
- --sysroot=$(ANDROID_NDK_HOME)/platforms/android-3/arch-arm \
|
|||
- $(ANDROID_NDK_HOME)/platforms/android-3/arch-arm/usr/lib/libc.so \
|
|||
- $(ANDROID_NDK_HOME)/platforms/android-3/arch-arm/usr/lib/libstdc++.so \
|
|||
- $(ANDROID_NDK_HOME)/platforms/android-3/arch-arm/usr/lib/libm.so \
|
|||
-Wl,--no-undefined -Wl,-z,noexecstack \ |
|||
- -L$(ANDROID_NDK_HOME)/platforms/android-3/arch-arm/usr/lib \
|
|||
- -lstdc++ -Wl,-rpath-link=$(ANDROID_NDK_HOME)/platforms/android-3/arch-arm/usr/lib \
|
|||
- -lsupc++
|
|||
+ -lstdc++ -lsupc++
|
|||
|
|||
OPTFLAGS=-O3 -s |
|||
|
|||
@@ -45,14 +31,14 @@
|
|||
$(ANDROID_FLAGS) \ |
|||
$(LOCAL_FLAGS) |
|||
|
|||
-CXX=$(ANDROID_NDK_BIN)/arm-linux-androideabi-g++ -fexceptions -frtti
|
|||
-CC=$(ANDROID_NDK_BIN)/arm-linux-androideabi-gcc
|
|||
-CC_SHARED= -fpic
|
|||
-LINK_SHARED=-fpic -shared
|
|||
+CXX=arm-linux-androideabi-g++ -fexceptions -frtti
|
|||
+CC=arm-linux-androideabi-gcc
|
|||
+
|
|||
+CC_SHARED=-fPIC
|
|||
+LINK_SHARED=-fPIC -shared
|
|||
|
|||
LOCAL_LIBS=$(ANDROID_LINK) |
|||
-LOCAL_LIBS_DLL=$(LOCAL_LIBS) # -ldl
|
|||
+LOCAL_LIBS_DLL=$(LOCAL_LIBS)
|
|||
|
|||
OBJ_CRC32=$(OBJ_CRC32_C) |
|||
OBJ_AES= |
|||
-
|
Loading…
Reference in new issue