upgpkg(gn): update to 20220502

This commit is contained in:
Yaksh Bariya 2022-05-05 17:33:48 +05:30
parent db9adaaae4
commit ca4ed956a4
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
4 changed files with 35 additions and 37 deletions

View File

@ -1,11 +1,11 @@
--- ./build/gen.py.orig 2021-08-09 14:54:18.428308993 +0530
+++ ./build/gen.py 2021-08-09 14:55:03.628308976 +0530
@@ -785,6 +785,8 @@
--- ./build/gen.py.orig 2022-05-05 17:13:19.709381636 +0530
+++ ./build/gen.py 2022-05-05 17:13:56.479381622 +0530
@@ -893,6 +893,8 @@
executables['gn']['libs'].extend(static_libraries.keys())
executables['gn_unittests']['libs'].extend(static_libraries.keys())
+ del executables['gn_unittests']
+
WriteGenericNinja(path, static_libraries, executables, cxx, ar, ld,
platform, host, options, cflags, ldflags,
libflags, include_dirs, libs)
platform, host, options, args_list,
cflags, ldflags, libflags, include_dirs, libs)

View File

@ -2,42 +2,29 @@ TERMUX_PKG_HOMEPAGE=https://gn.googlesource.com/gn
TERMUX_PKG_DESCRIPTION="Meta-build system that generates build files for Ninja"
TERMUX_PKG_LICENSE="BSD 3-Clause"
TERMUX_PKG_MAINTAINER="Yaksh Bariya <yakshbari4@gmail.com>"
# While updating commit hash here also update it in
# termux_setup_gn
_COMMIT=e0afadf7a743d5b14737bd454df45d5f1caf0d23
TERMUX_PKG_VERSION=20211203
TERMUX_PKG_SRCURL=https://gn.googlesource.com/gn.git
_COMMIT=53ef169800760fdc09f0773bf380fe99eaeab339
_COMMIT_DATE=2022.05.02
TERMUX_PKG_VERSION=${_COMMIT_DATE//./}
TERMUX_PKG_GIT_BRANCH=main
TERMUX_PKG_RECOMMENDS="ninja"
TERMUX_PKG_SKIP_SRC_EXTRACT=true
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_get_source() {
TERMUX_PKG_SRCURL=https://gn.googlesource.com/gn/+archive/$_COMMIT.tar.gz
# Prevent caching of builds
rm -rf $TERMUX_PKG_SRCDIR
# FIXME: We would like to enable checksums when downloading
# tar files, but they change each time as the tar metadata
# differs: https://github.com/google/gitiles/issues/84
GN_TARFILE=$TERMUX_PKG_CACHEDIR/gn_$_COMMIT.tar.gz
test ! -f $GN_TARFILE && termux_download \
$TERMUX_PKG_SRCURL \
$GN_TARFILE \
SKIP_CHECKSUM
mkdir -p $TERMUX_PKG_SRCDIR
tar xf $GN_TARFILE -C $TERMUX_PKG_SRCDIR
termux_step_post_get_source() {
git fetch --unshallow
git checkout $_COMMIT
local version="$(git log -1 --format=%cs | sed 's/-/./g')"
if [ "$version" != "$_COMMIT_DATE" ]; then
echo -n "ERROR: The specified commit date \"$_COMMIT_DATE\""
echo " is different from what is expected to be: \"$version\""
return 1
fi
}
termux_step_configure() {
./build/gen.py \
--no-last-commit-position \
--no-static-libstdc++
cat <<- EOF > ./out/last_commit_position.h
#ifndef OUT_LAST_COMMIT_POSITION_H_
#define OUT_LAST_COMMIT_POSITION_H_
#define LAST_COMMIT_POSITION_NUM 1953
#define LAST_COMMIT_POSITION "1953 ${_COMMIT:0:8}"
#endif // OUT_LAST_COMMIT_POSITION_H_
EOF
./build/gen.py --no-static-libstdc++
}
termux_step_make() {

View File

@ -0,0 +1,11 @@
--- ./src/util/aligned_alloc.h.orig 2022-05-05 17:25:50.859381350 +0530
+++ ./src/util/aligned_alloc.h 2022-05-05 17:25:56.879381347 +0530
@@ -18,7 +18,7 @@
#ifndef IMPL_ALIGNED_ALLOC
#ifdef _WIN32
#define IMPL_ALIGNED_ALLOC IMPL_ALIGNED_ALLOC_WIN32
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) || defined(__ANDROID__)
// Note that aligned_alloc() is only available at runtime starting from
// OSX 10.15, so use posix_memalign() instead which is more portable.
#define IMPL_ALIGNED_ALLOC IMPL_ALIGNED_ALLOC_POSIX

View File

@ -1,6 +1,6 @@
termux_setup_gn() {
termux_setup_ninja
local GN_COMMIT=e0afadf7a743d5b14737bd454df45d5f1caf0d23
local GN_COMMIT=53ef169800760fdc09f0773bf380fe99eaeab339
local GN_TARFILE=$TERMUX_COMMON_CACHEDIR/gn_$GN_COMMIT.tar.gz
local GN_SOURCE=https://gn.googlesource.com/gn/+archive/$GN_COMMIT.tar.gz
@ -31,7 +31,7 @@ termux_setup_gn() {
#ifndef OUT_LAST_COMMIT_POSITION_H_
#define OUT_LAST_COMMIT_POSITION_H_
#define LAST_COMMIT_POSITION_NUM 1953
#define LAST_COMMIT_POSITION "1953 ${GN_COMMIT:0:8}"
#define LAST_COMMIT_POSITION "2034 ${GN_COMMIT:0:8}"
#endif // OUT_LAST_COMMIT_POSITION_H_
EOF
ninja -C out/