mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2025-12-22 11:40:18 +00:00
Update repo
This commit is contained in:
40
disabled-packages/protobuf-static/build.sh
Normal file
40
disabled-packages/protobuf-static/build.sh
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
TERMUX_PKG_HOMEPAGE=https://github.com/protocolbuffers/protobuf
|
||||||
|
TERMUX_PKG_DESCRIPTION="Protocol buffers C++ library (static)"
|
||||||
|
# utf8_range is licensed under MIT
|
||||||
|
TERMUX_PKG_LICENSE="BSD 3-Clause, MIT"
|
||||||
|
TERMUX_PKG_LICENSE_FILE="
|
||||||
|
LICENSE
|
||||||
|
third_party/utf8_range/LICENSE
|
||||||
|
"
|
||||||
|
TERMUX_PKG_MAINTAINER="@termux"
|
||||||
|
# Please align the version and revision with `libprotobuf` package.
|
||||||
|
TERMUX_PKG_VERSION=33.1
|
||||||
|
TERMUX_PKG_SRCURL=https://github.com/protocolbuffers/protobuf/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
||||||
|
TERMUX_PKG_SHA256=0c98bb704ceb4e68c92f93907951ca3c36130bc73f87264e8c0771a80362ac97
|
||||||
|
TERMUX_PKG_AUTO_UPDATE=false
|
||||||
|
TERMUX_PKG_DEPENDS="abseil-cpp, libc++, zlib"
|
||||||
|
TERMUX_PKG_BREAKS="libprotobuf"
|
||||||
|
TERMUX_PKG_CONFLICTS="libprotobuf, protobuf-dev"
|
||||||
|
TERMUX_PKG_NO_STATICSPLIT=true
|
||||||
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||||
|
-Dprotobuf_ABSL_PROVIDER=package
|
||||||
|
-Dprotobuf_BUILD_TESTS=OFF
|
||||||
|
-DBUILD_SHARED_LIBS=OFF
|
||||||
|
-DCMAKE_INSTALL_LIBDIR=lib
|
||||||
|
"
|
||||||
|
|
||||||
|
termux_step_post_get_source() {
|
||||||
|
# Version guard
|
||||||
|
local ver_e=${TERMUX_PKG_VERSION#*:}
|
||||||
|
local ver_x=$(. $TERMUX_SCRIPTDIR/packages/libprotobuf/build.sh; echo ${TERMUX_PKG_VERSION#*:})
|
||||||
|
if [ "${ver_e}" != "${ver_x}" ]; then
|
||||||
|
termux_error_exit "Version mismatch between libprotobuf and protobuf-static."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
termux_step_post_make_install() {
|
||||||
|
# Copy lib/*.cmake to opt/protobuf-cmake/static for future use
|
||||||
|
mkdir -p $TERMUX_PREFIX/opt/protobuf-cmake/static
|
||||||
|
cp $TERMUX_PREFIX/lib/cmake/protobuf/protobuf-targets{,-release}.cmake \
|
||||||
|
$TERMUX_PREFIX/opt/protobuf-cmake/static/
|
||||||
|
}
|
||||||
1
disabled-packages/protobuf-static/retain-linker-array.patch
Symbolic link
1
disabled-packages/protobuf-static/retain-linker-array.patch
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../libprotobuf/retain-linker-array.patch
|
||||||
@@ -41,13 +41,4 @@ termux_step_override_config_scripts() {
|
|||||||
> "$TERMUX_PREFIX/bin/pg_config"
|
> "$TERMUX_PREFIX/bin/pg_config"
|
||||||
chmod 755 "$TERMUX_PREFIX/bin/pg_config"
|
chmod 755 "$TERMUX_PREFIX/bin/pg_config"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Does this package or its build depend on 'libprotobuf' or 'protobuf-static'?
|
|
||||||
if [[ "$TERMUX_PKG_DEPENDS" != "${TERMUX_PKG_DEPENDS/libprotobuf/}" ]]; then
|
|
||||||
rm -f "$TERMUX_PREFIX/lib/cmake/protobuf"/protobuf-targets{,-release}.cmake
|
|
||||||
cp "$TERMUX_PREFIX/opt/protobuf-cmake/shared"/protobuf-targets{,-release}.cmake "$TERMUX_PREFIX/lib/cmake/protobuf/"
|
|
||||||
elif [[ "$TERMUX_PKG_BUILD_DEPENDS" != "${TERMUX_PKG_BUILD_DEPENDS/protobuf-static/}" ]]; then
|
|
||||||
rm -f "$TERMUX_PREFIX/lib/cmake/protobuf"/protobuf-targets{,-release}.cmake
|
|
||||||
cp "$TERMUX_PREFIX/opt/protobuf-cmake/static"/protobuf-targets{,-release}.cmake "$TERMUX_PREFIX/lib/cmake/protobuf/"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user