pmt: fix all build issues etc (ndk)
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
########
|
########
|
||||||
# 2.9.0
|
# 2.9.1
|
||||||
########
|
########
|
||||||
|
|
||||||
LOCAL_PATH := $(call my-dir)
|
LOCAL_PATH := $(call my-dir)
|
||||||
@@ -32,7 +32,7 @@ PMT_CXXFLAGS = \
|
|||||||
-Wno-nullability-extension \
|
-Wno-nullability-extension \
|
||||||
-Wno-reorder-init-list \
|
-Wno-reorder-init-list \
|
||||||
-Wno-gnu-zero-variadic-macro-arguments \
|
-Wno-gnu-zero-variadic-macro-arguments \
|
||||||
-D__NDK_BUILD \
|
-static \
|
||||||
$(PMT_EXTRA_CXXFLAGS)
|
$(PMT_EXTRA_CXXFLAGS)
|
||||||
E2FSPROGS_DEFAULT_CFLAGS = \
|
E2FSPROGS_DEFAULT_CFLAGS = \
|
||||||
-Werror \
|
-Werror \
|
||||||
@@ -258,6 +258,7 @@ include $(CLEAR_VARS)
|
|||||||
|
|
||||||
LOCAL_MODULE := libext2_quota
|
LOCAL_MODULE := libext2_quota
|
||||||
LOCAL_SRC_FILES := \
|
LOCAL_SRC_FILES := \
|
||||||
|
$(LIBEXT2_QUOTA)/devname.c \
|
||||||
$(LIBEXT2_QUOTA)/dict.c \
|
$(LIBEXT2_QUOTA)/dict.c \
|
||||||
$(LIBEXT2_QUOTA)/mkquota.c \
|
$(LIBEXT2_QUOTA)/mkquota.c \
|
||||||
$(LIBEXT2_QUOTA)/parse_qtype.c \
|
$(LIBEXT2_QUOTA)/parse_qtype.c \
|
||||||
@@ -340,8 +341,5 @@ LOCAL_STATIC_LIBRARIES := \
|
|||||||
libext2_quota \
|
libext2_quota \
|
||||||
libext2_misc \
|
libext2_misc \
|
||||||
libext2_com_err
|
libext2_com_err
|
||||||
LOCAL_SHARED_LIBRARIES := \
|
|
||||||
liblog \
|
|
||||||
libcutils
|
|
||||||
|
|
||||||
include $(BUILD_EXECUTABLE)
|
include $(BUILD_EXECUTABLE)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
########
|
########
|
||||||
# 2.9.0
|
# 2.9.1
|
||||||
########
|
########
|
||||||
|
|
||||||
# architecture
|
# architecture
|
||||||
@@ -23,9 +23,8 @@ APP_ABI := \
|
|||||||
arm64-v8a \
|
arm64-v8a \
|
||||||
armeabi-v7a
|
armeabi-v7a
|
||||||
|
|
||||||
APP_PLATFORM := android-21
|
APP_PLATFORM := android-29
|
||||||
APP_OPTIM := release
|
APP_OPTIM := release
|
||||||
APP_STL := c++_static
|
APP_STL := c++_static
|
||||||
APP_ALLOW_MISSING_DEPS := true
|
|
||||||
|
|
||||||
# end
|
# end
|
||||||
|
|||||||
@@ -265,7 +265,11 @@ int Functions::Start(ushort_t progress_code)
|
|||||||
/* generate mke2fs argument list */
|
/* generate mke2fs argument list */
|
||||||
VLOGD("PartitionManager: generating mke2fs argument list...\n");
|
VLOGD("PartitionManager: generating mke2fs argument list...\n");
|
||||||
char bsize[25] = "";
|
char bsize[25] = "";
|
||||||
|
#ifdef __LP64__
|
||||||
sprintf(bsize, "%lu", file_sys_inf.f_bsize);
|
sprintf(bsize, "%lu", file_sys_inf.f_bsize);
|
||||||
|
#else
|
||||||
|
sprintf(bsize, "%u", file_sys_inf.f_bsize);
|
||||||
|
#endif
|
||||||
char* arguments[] = {
|
char* arguments[] = {
|
||||||
"mke2fs-static",
|
"mke2fs-static",
|
||||||
"-Fq",
|
"-Fq",
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
LOCAL_VERSION="2.9.1"
|
LOCAL_VERSION="2.9.1"
|
||||||
LOCAL_RELDATE="20241002"
|
LOCAL_RELDATE="20241003"
|
||||||
LOCAL_OWNER="ShawkTeam"
|
LOCAL_OWNER="ShawkTeam"
|
||||||
LOCAL_REPO="pmt"
|
LOCAL_REPO="pmt"
|
||||||
LOCAL_RELEASE_TAG="${LOCAL_VERSION}"
|
LOCAL_RELEASE_TAG="${LOCAL_VERSION}"
|
||||||
@@ -12,6 +12,7 @@ LOCAL_PREFIX="${PREFIX}"
|
|||||||
[ -d "${LOCAL_PREFIX}" ] \
|
[ -d "${LOCAL_PREFIX}" ] \
|
||||||
|| LOCAL_PREFIX="/data/data/com.termux/files/usr"
|
|| LOCAL_PREFIX="/data/data/com.termux/files/usr"
|
||||||
LOCAL_TMPDIR="${LOCAL_PREFIX}/tmp/pmt-termux-helper"
|
LOCAL_TMPDIR="${LOCAL_PREFIX}/tmp/pmt-termux-helper"
|
||||||
|
SILENT=false
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
RESET="\033[0m"
|
RESET="\033[0m"
|
||||||
@@ -20,13 +21,13 @@ GREEN="\033[0;32m"
|
|||||||
YELLOW="\033[0;33m"
|
YELLOW="\033[0;33m"
|
||||||
|
|
||||||
# Printer functions
|
# Printer functions
|
||||||
function printc() { echo -e "$*" >&2; }
|
function printc() { ${SILENT} || echo -e "$*" >&2; }
|
||||||
function print()
|
function print()
|
||||||
{
|
{
|
||||||
if echo "$*" | grep "Success" &>/dev/null; then
|
if echo "$*" | grep "Success" &>/dev/null; then
|
||||||
echo -e " - ${GREEN}${1:0:7}${RESET}." >&2
|
${SILENT} || echo -e " - ${GREEN}${1:0:7}${RESET}." >&2
|
||||||
else
|
else
|
||||||
echo -e " - $*" >&2
|
${SILENT} || echo -e " - $*" >&2
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,7 +48,7 @@ function script_head() { printc " --- Partition Manager Termux Helper Script ---
|
|||||||
# For display help message
|
# For display help message
|
||||||
function view_help()
|
function view_help()
|
||||||
{
|
{
|
||||||
echo -n "Usage: "
|
echo ${SILENT} -n "Usage: "
|
||||||
if echo "${0}" | grep "./" >&/dev/null; then
|
if echo "${0}" | grep "./" >&/dev/null; then
|
||||||
printc "${0} [OPTIONS]..."
|
printc "${0} [OPTIONS]..."
|
||||||
else
|
else
|
||||||
@@ -59,11 +60,10 @@ function view_help()
|
|||||||
printc " install, -i [OPTS] Download and install Partition Manager."
|
printc " install, -i [OPTS] Download and install Partition Manager."
|
||||||
printc " uninstall, -u Uninstall Partition Manager."
|
printc " uninstall, -u Uninstall Partition Manager."
|
||||||
printc " status, -s Display install/uninstall status."
|
printc " status, -s Display install/uninstall status."
|
||||||
|
printc " --quiet, -q Silent mode. No output."
|
||||||
printc " --setup, -S Setup required packages."
|
printc " --setup, -S Setup required packages."
|
||||||
printc " --package <FILE> If you already have a pmt package, make\n setup by specifying this way."
|
printc " --package <FILE> If you already have a pmt package, make\n setup by specifying this way."
|
||||||
printc "Report bugs to <t.me/ShawkTeam | Topics | pmt>"
|
printc "Report bugs to <t.me/ShawkTeam | Topics | pmt>"
|
||||||
|
|
||||||
exit 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Script really operated termux proclamation?
|
# Script really operated termux proclamation?
|
||||||
@@ -246,6 +246,9 @@ while (($# >= 1)); do
|
|||||||
script_head
|
script_head
|
||||||
check_status y
|
check_status y
|
||||||
;;
|
;;
|
||||||
|
--quiet|-q)
|
||||||
|
SILENT=true
|
||||||
|
;;
|
||||||
--setup|-S)
|
--setup|-S)
|
||||||
script_head
|
script_head
|
||||||
print "Starting package setupper..."
|
print "Starting package setupper..."
|
||||||
@@ -261,11 +264,12 @@ while (($# >= 1)); do
|
|||||||
;;
|
;;
|
||||||
--help)
|
--help)
|
||||||
view_help
|
view_help
|
||||||
|
exit 0
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if echo ${1} | grep "-" &>/dev/null; then
|
if echo ${1} | grep "-" &>/dev/null; then
|
||||||
if ! echo ${1} | grep ".xz" &>/dev/null; then
|
if ! echo ${1} | grep ".xz" &>/dev/null; then
|
||||||
printc "Unknown option: ${1}" \
|
printc "Unknown option: ${1}"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
@@ -280,11 +284,13 @@ while (($# >= 1)); do
|
|||||||
done
|
done
|
||||||
|
|
||||||
### Main ###
|
### Main ###
|
||||||
[ -z "${1}" -a "${SOME_SPEC}" != 1 ] && view_help
|
[ -z "${1}" -a "${SOME_SPEC}" != 1 ] && view_help && exit 1
|
||||||
|
|
||||||
script_head
|
if [ "${PROCESS}" -le 2 ]; then
|
||||||
really_termux
|
script_head
|
||||||
gen_tempdir
|
really_termux
|
||||||
|
gen_tempdir
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "${PROCESS}" = 1 ]; then
|
if [ "${PROCESS}" = 1 ]; then
|
||||||
[ -f "${LOCAL_PREFIX}/bin/pmt" ] \
|
[ -f "${LOCAL_PREFIX}/bin/pmt" ] \
|
||||||
|
|||||||
Reference in New Issue
Block a user