Skip to content

Commit

Permalink
Merge pull request #174 from uyjulian/libarchive
Browse files Browse the repository at this point in the history
Add libarchive
  • Loading branch information
rickgaiser authored Dec 16, 2024
2 parents b0a9cd2 + b0cd9c6 commit 2109a08
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions build-cmakelibs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ $FETCH v1.7.3 https://github.com/hyperrealm/libconfig.git &

$FETCH R_2_6_2 https://github.com/libexpat/libexpat.git &

$FETCH v3.7.7 https://github.com/libarchive/libarchive.git &

# wait for fetch jobs to finish
wait

Expand All @@ -144,6 +146,16 @@ pushd build/jsoncpp
sed -i -e 's/std::snprintf/snprintf/' include/json/config.h
popd

# NOTE: libarchive
pushd build/libarchive
# _timezone used for newlib
sed -i -e 's/defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__)/1 || \0/' libarchive/archive_write_set_format_iso9660.c
# 32-bit integer "unsigned long int" prototype not compatible with "unsigned int"
sed -i -e 's/defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L/0 \&\& \0/' libarchive/xxhash.c
# "getline" fallback polyfill not defined (patch already upstream)
sed -i -e 's/getline(path, &alen, stdin)/0/' unzip/bsdunzip.c
popd

###
### Change to the build folder
###
Expand Down Expand Up @@ -201,6 +213,7 @@ build_iop libsmb2
CFLAGS="-DHAVE_NEWLOCALE -DHAVE_USELOCALE -DHAVE_FREELOCALE" build_ee libconfig -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF

CFLAGS="-Darc4random_buf=random -DHAVE_GETRANDOM" build_ee libexpat/expat -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_SHARED_LIBS=OFF -DEXPAT_BUILD_TOOLS=OFF
build_ee libarchive -DBUILD_SHARED_LIBS=OFF -DENABLE_WERROR=OFF

# Finish
cd ..

0 comments on commit 2109a08

Please sign in to comment.