Skip to content

Commit

Permalink
update boost submodule, add exit code check
Browse files Browse the repository at this point in the history
Signed-off-by: r4sas <r4sas@i2pmail.org>
  • Loading branch information
r4sas committed Jan 9, 2025
1 parent 99ee7d7 commit d634732
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 29 deletions.
24 changes: 0 additions & 24 deletions binary/jni/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ LOCAL_MODULE := i2pd
LOCAL_CPP_FEATURES := rtti exceptions
LOCAL_C_INCLUDES += $(IFADDRS_PATH) $(LIB_SRC_PATH) $(LIB_CLIENT_SRC_PATH) $(LANG_SRC_PATH) $(DAEMON_SRC_PATH)
LOCAL_STATIC_LIBRARIES := \
boost_system \
boost_date_time \
boost_filesystem \
boost_program_options \
crypto \
ssl \
Expand All @@ -29,27 +26,6 @@ LOCAL_SRC_FILES := \

include $(BUILD_EXECUTABLE)

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := boost_system
LOCAL_SRC_FILES := $(BOOST_PATH)/build/out/$(TARGET_ARCH_ABI)/lib/libboost_system.a
LOCAL_EXPORT_C_INCLUDES := $(BOOST_PATH)/build/out/$(TARGET_ARCH_ABI)/include
include $(PREBUILT_STATIC_LIBRARY)

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := boost_date_time
LOCAL_SRC_FILES := $(BOOST_PATH)/build/out/$(TARGET_ARCH_ABI)/lib/libboost_date_time.a
LOCAL_EXPORT_C_INCLUDES := $(BOOST_PATH)/build/out/$(TARGET_ARCH_ABI)/include
include $(PREBUILT_STATIC_LIBRARY)

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := boost_filesystem
LOCAL_SRC_FILES := $(BOOST_PATH)/build/out/$(TARGET_ARCH_ABI)/lib/libboost_filesystem.a
LOCAL_EXPORT_C_INCLUDES := $(BOOST_PATH)/build/out/$(TARGET_ARCH_ABI)/include
include $(PREBUILT_STATIC_LIBRARY)

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := boost_program_options
Expand Down
2 changes: 1 addition & 1 deletion binary/jni/boost
Submodule boost updated 3 files
+21 −0 LICENSE
+1 −0 README.md
+3 −3 build-android.sh
13 changes: 11 additions & 2 deletions binary/jni/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fi

_NDK_OPTS="-j `nproc` NDK_MODULE_PATH=$DIR"

help()
_help()
{
echo "Syntax: $(basename "$SOURCE") [-m|d|s|h|v]"
echo "Options:"
Expand All @@ -36,6 +36,12 @@ help()
echo
}

_failed()
{
echo "Compilation failed";
exit 1;
}

while getopts ":dbsvxh" option; do
case $option in
d) # debug build
Expand All @@ -54,7 +60,7 @@ while getopts ":dbsvxh" option; do
_NDK_OPTS="$_NDK_OPTS V=1 NDK_LOG=1"
;;
h) # display help
help
_help
exit;;
\?) # Invalid option
echo "Error: Invalid option. Use $(basename "$SOURCE") -h for help"
Expand All @@ -66,12 +72,15 @@ done
if [ -z "$_SKIP_LIBS" ]; then
echo "Building boost..."
./build_boost.sh
[ $? -ne 0 ] && _failed

echo "Building openssl..."
./build_openssl.sh
[ $? -ne 0 ] && _failed

echo "Building miniupnpc..."
./build_miniupnpc.sh
[ $? -ne 0 ] && _failed
fi

if [ ! -z "$_BINARY" ]; then
Expand Down
4 changes: 2 additions & 2 deletions binary/jni/build_boost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

set -e

BOOST_VERSION=1.78.0
BOOST_LIBS=date_time,filesystem,program_options,system
BOOST_VERSION=1.84.0
BOOST_LIBS=program_options

function build_one {
echo "Configuring and building..."
Expand Down

0 comments on commit d634732

Please sign in to comment.