Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test with android NDK r28 beta #41293

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ports/argtable2/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ vcpkg_from_sourceforge(
0001-fix-install-dirs.patch
0002-include-correct-headers.patch
0003-add-dependence-getopt.patch
undef-eoverflow.diff
)

set(HAVE_GETOPT_H "")
Expand Down
14 changes: 14 additions & 0 deletions ports/argtable2/undef-eoverflow.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/src/arg_int.c b/src/arg_int.c
index bc10012..ffcd408 100644
--- a/src/arg_int.c
+++ b/src/arg_int.c
@@ -33,6 +33,9 @@ USA.
#include <ctype.h>

/* local error codes */
+#ifdef EOVERFLOW
+#undef EOVERFLOW
+#endif
enum {EMINCOUNT=1,EMAXCOUNT,EBADINT,EOVERFLOW};

static void resetfn(struct arg_int *parent)
2 changes: 1 addition & 1 deletion ports/argtable2/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "argtable2",
"version": "2.13",
"port-version": 10,
"port-version": 11,
"description": "Argtable is an ANSI C library for parsing GNU style command line options with a minimum of fuss.",
"homepage": "http://argtable.sourceforge.net",
"license": "LGPL-2.0-only",
Expand Down
2 changes: 2 additions & 0 deletions ports/hidapi/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ vcpkg_from_github(
REF hidapi-${VERSION}
SHA512 66a045144f90b41438898b82f0398e80223323ebfe6e4f197d2713696bb3ae60f36aea5a37a9999b34b12294783fd7e4c28c6e785462559cbe21276009da1eac
HEAD_REF master
PATCHES
rename-pthread-polyfill.diff
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
Expand Down
12 changes: 12 additions & 0 deletions ports/hidapi/rename-pthread-polyfill.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/libusb/hid.c b/libusb/hid.c
index 188e536..910966e 100644
--- a/libusb/hid.c
+++ b/libusb/hid.c
@@ -53,6 +53,7 @@

#if defined(__ANDROID__) && __ANDROID_API__ < __ANDROID_API_N__

+#define pthread_barrier_t hidapi_pthread_barrier_t
/* Barrier implementation because Android/Bionic don't have pthread_barrier.
This implementation came from Brent Priddy and was posted on
StackOverflow. It is used with his permission. */
2 changes: 1 addition & 1 deletion ports/hidapi/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "hidapi",
"version-semver": "0.14.0",
"port-version": 1,
"port-version": 2,
"description": "A Simple library for communicating with USB and Bluetooth HID devices on Linux, Mac and Windows.",
"homepage": "https://github.com/libusb/hidapi",
"license": "BSD-3-Clause-Clear",
Expand Down
1 change: 1 addition & 0 deletions ports/libpq/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ vcpkg_extract_source_archive(
windows/msbuild.patch
windows/spin_delay.patch
android/unversioned_so.patch
rename-pthread-polyfill.diff
)

file(GLOB _py3_include_path "${CURRENT_HOST_INSTALLED_DIR}/include/python3*")
Expand Down
13 changes: 13 additions & 0 deletions ports/libpq/rename-pthread-polyfill.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/include/port/pg_pthread.h b/src/include/port/pg_pthread.h
index d102ce9..9adb1d0 100644
--- a/src/include/port/pg_pthread.h
+++ b/src/include/port/pg_pthread.h
@@ -21,6 +21,8 @@
#define PTHREAD_BARRIER_SERIAL_THREAD (-1)
#endif

+#define pthread_barrier_t pg_pthread_barrier_t
+
typedef struct pg_pthread_barrier
{
bool sense; /* we only need a one bit phase */
1 change: 1 addition & 0 deletions ports/libpq/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "libpq",
"version": "16.4",
"port-version": 1,
"description": "The official database access API of postgresql",
"homepage": "https://www.postgresql.org/",
"license": "PostgreSQL",
Expand Down
2 changes: 1 addition & 1 deletion scripts/azure-pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ parameters:
- name: tripletPattern
displayName: 'Enable triplets which contain this substring'
type: string
default: '-'
default: 'android'

jobs:
- template: windows/azure-pipelines.yml
Expand Down
19 changes: 19 additions & 0 deletions scripts/azure-pipelines/test-modified-ports.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,25 @@ if ($IsWindows) {
rmdir empty
}

if ($IsLinux -and $Triplet -match 'android' -and $true)
{
$override_ndk = 'r29-canary'
$override_ndk_url = 'https://androidbuildinternal.googleapis.com/android/internal/build/v3/builds/12591196/linux/attempts/latest/artifacts/android-ndk-12591196-linux-x86_64.zip/url'
$override_ndk_sha512 = '911e1e4522535e7ef7125966830ef5cfdf323384900424966855f5c75587823eb167862484ea5b6ac426b23423dc796ad533ae1f93e65540f3415225641b5b7a'
Write-Host "Downloading Android NDK $override_ndk"
& "./vcpkg" x-download android-ndk-$override_ndk-linux.zip "--sha512=$override_ndk_sha512" "--url=$override_ndk_url" @cachingArgs
Write-Host "Unpacking"
& unzip -q android-ndk-$override_ndk-linux.zip
$env:ANDROID_NDK_HOME = Join-Path $Pwd "android-ndk-$override_ndk"
$NoParentHashes = $true

# https://android-review.googlesource.com/c/platform/bionic/+/3343442/1/libc/include/ctype.h
$ndk_ctype_path = "$env:ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/ctype.h"
$ndk_ctype = Get-Content $ndk_ctype_path -Raw
$ndk_ctype = $ndk_ctype.Replace('static inline int __bionic_ctype_in_range', '__BIONIC_CTYPE_INLINE int __bionic_ctype_in_range')
Set-Content -Path $ndk_ctype_path -Value $ndk_ctype
}

& "./vcpkg$executableExtension" x-ci-clean @commonArgs
$lastLastExitCode = $LASTEXITCODE
if ($lastLastExitCode -ne 0)
Expand Down
5 changes: 5 additions & 0 deletions versions/a-/argtable2.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "cd58801d3074f08b7d3145cd25d63ad72cbdbf6b",
"version": "2.13",
"port-version": 11
},
{
"git-tree": "931507f46135a9267c3d15ed5064235aac6154f4",
"version": "2.13",
Expand Down
6 changes: 3 additions & 3 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
},
"argtable2": {
"baseline": "2.13",
"port-version": 10
"port-version": 11
},
"argtable3": {
"baseline": "3.2.2.f25c624",
Expand Down Expand Up @@ -3466,7 +3466,7 @@
},
"hidapi": {
"baseline": "0.14.0",
"port-version": 1
"port-version": 2
},
"highfive": {
"baseline": "2.10.0",
Expand Down Expand Up @@ -4942,7 +4942,7 @@
},
"libpq": {
"baseline": "16.4",
"port-version": 0
"port-version": 1
},
"libpqxx": {
"baseline": "7.9.2",
Expand Down
5 changes: 5 additions & 0 deletions versions/h-/hidapi.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "3a032b90b0b2b6fa14a7335a15d9f55e1a151702",
"version-semver": "0.14.0",
"port-version": 2
},
{
"git-tree": "92cd0a67a5ca42dd33ec36fb8d9a41b24b5b1909",
"version-semver": "0.14.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libpq.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "804532b695717e46f5fce56f9495d632849d23fb",
"version": "16.4",
"port-version": 1
},
{
"git-tree": "dcaa1ec8552b8ef987d6d80f708b8828bcd795eb",
"version": "16.4",
Expand Down
Loading