Skip to content
Merged
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
15 changes: 15 additions & 0 deletions ports/calceph/disable-gnu-source.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a1cb297..9448623 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -147,8 +147,10 @@ IF ("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel")
MESSAGE(STATUS "Add the option '-fp-model precise' for the Intel compilers")
string(APPEND CMAKE_C_FLAGS " -fp-model precise ")
ENDIF ()
+if(NOT ANDROID)
# Define for the function strod_l
string(APPEND CMAKE_C_FLAGS " -D_GNU_SOURCE=1 ")
+endif()
# Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2).
string(APPEND CMAKE_C_FLAGS " -D_LARGEFILE_SOURCE=1 ")
string(APPEND CMAKE_C_FLAGS " -D_LARGE_FILES=1 ")
16 changes: 11 additions & 5 deletions ports/calceph/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
set(CALCEPH_HASH 81cddae9fa0d06758dbbb5fae486bd64eb087dc2ebf2d7b17fa89b6689b86e0e84d1412e6852e980ebed00a4c84a3b1b4ac00b89021f6d0bb2f370a98a6dad25)

vcpkg_download_distfile(ARCHIVE
URLS "https://www.imcce.fr/content/medias/recherche/equipes/asd/calceph/calceph-${VERSION}.tar.gz"
FILENAME "calceph-${VERSION}.tar.gz"
SHA512 ${CALCEPH_HASH}
SHA512 81cddae9fa0d06758dbbb5fae486bd64eb087dc2ebf2d7b17fa89b6689b86e0e84d1412e6852e980ebed00a4c84a3b1b4ac00b89021f6d0bb2f370a98a6dad25
)

vcpkg_extract_source_archive(
SOURCE_PATH
ARCHIVE ${ARCHIVE}
ARCHIVE "${ARCHIVE}"
PATCHES
disable-gnu-source.diff
)

vcpkg_cmake_configure(
Expand All @@ -28,4 +28,10 @@ endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")

file(INSTALL "${SOURCE_PATH}/README.rst" DESTINATION "${CURRENT_PACKAGES_DIR}/share/calceph" RENAME readme.rst)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING_CECILL_B.LIB")
vcpkg_install_copyright(
COMMENT "The CALCEPH library is triple-licensed (CECILL-2.1 OR CECILL-B OR CECILL-C)."
FILE_LIST
"${SOURCE_PATH}/COPYING_CECILL_V2.1.LIB"
"${SOURCE_PATH}/COPYING_CECILL_B.LIB"
"${SOURCE_PATH}/COPYING_CECILL_C.LIB"
)
1 change: 1 addition & 0 deletions ports/calceph/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "calceph",
"version": "4.0.4",
"port-version": 1,
"description": "C library to access the binary planetary ephemeris files.",
"homepage": "https://www.imcce.fr/inpop/calceph/",
"documentation": "https://calceph.imcce.fr/docs/latest/html/c/index.html",
Expand Down
39 changes: 39 additions & 0 deletions ports/freexl/android-builtin-iconv.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
diff --git a/src/freexl.c b/src/freexl.c
index f73021d..cc76d63 100644
--- a/src/freexl.c
+++ b/src/freexl.c
@@ -61,7 +61,7 @@ extern const char *locale_charset (void);
#include <localcharset.h>
#endif /* end localcharset */
#else /* not WINDOWS */
-#if defined(__APPLE__) || defined(__ANDROID__)
+#if defined(__APPLE__) || (defined(__ANDROID__) && __ANDROID_API__ < 28)
#include <iconv.h>
#include <localcharset.h>
#else /* neither Mac OsX nor Android */
diff --git a/src/freexl_ods.c b/src/freexl_ods.c
index 07265eb..ec29b51 100644
--- a/src/freexl_ods.c
+++ b/src/freexl_ods.c
@@ -61,7 +61,7 @@ extern const char *locale_charset (void);
#include <localcharset.h>
#endif /* end localcharset */
#else /* not WINDOWS */
-#if defined(__APPLE__) || defined(__ANDROID__)
+#if defined(__APPLE__) || (defined(__ANDROID__) && __ANDROID_API__ < 28)
#include <iconv.h>
#include <localcharset.h>
#else /* neither Mac OsX nor Android */
diff --git a/src/freexl_xlsx.c b/src/freexl_xlsx.c
index dc8891d..de56436 100644
--- a/src/freexl_xlsx.c
+++ b/src/freexl_xlsx.c
@@ -62,7 +62,7 @@ extern const char *locale_charset (void);
#include <localcharset.h>
#endif /* end localcharset */
#else /* not WINDOWS */
-#if defined(__APPLE__) || defined(__ANDROID__)
+#if defined(__APPLE__) || (defined(__ANDROID__) && __ANDROID_API__ < 28)
#include <iconv.h>
#include <localcharset.h>
#else /* neither Mac OsX nor Android */
1 change: 1 addition & 0 deletions ports/freexl/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ vcpkg_extract_source_archive(
PATCHES
dependencies.patch
subdirs.patch
android-builtin-iconv.diff
)

vcpkg_configure_make(
Expand Down
1 change: 1 addition & 0 deletions ports/freexl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "freexl",
"version": "2.0.0",
"port-version": 1,
"description": "FreeXL is an open source library to extract valid data from within an Excel (.xls) spreadsheet",
"homepage": "https://www.gaia-gis.it/gaia-sins/freexl-sources",
"license": "MPL-1.1 OR GPL-2.0-or-later OR LGPL-2.1-or-later",
Expand Down
16 changes: 15 additions & 1 deletion ports/libiconv/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
if(NOT VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_ANDROID AND NOT VCPKG_TARGET_IS_IOS AND NOT VCPKG_TARGET_IS_FREEBSD AND NOT VCPKG_TARGET_IS_OPENBSD)
if(NOT DEFINED X_VCPKG_BUILD_GNU_LIBICONV)
set(X_VCPKG_BUILD_GNU_LIBICONV 0)
if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_IOS OR VCPKG_TARGET_IS_FREEBSD OR VCPKG_TARGET_IS_OPENBSD)
set(X_VCPKG_BUILD_GNU_LIBICONV 1)
elseif(VCPKG_TARGET_IS_ANDROID)
vcpkg_cmake_get_vars(cmake_vars_file)
include("${cmake_vars_file}")
if(VCPKG_DETECTED_CMAKE_SYSTEM_VERSION VERSION_LESS "28")
set(X_VCPKG_BUILD_GNU_LIBICONV 1)
endif()
endif()
endif()

if(NOT X_VCPKG_BUILD_GNU_LIBICONV)
message(STATUS "Not building GNU libiconv.")
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/iconv")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/iconv")
Expand Down
6 changes: 3 additions & 3 deletions ports/libiconv/usage
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The package libiconv provides CMake targets:
libiconv provides CMake targets:

find_package(Iconv)
target_link_libraries(main PRIVATE Iconv::Iconv)
find_package(Iconv REQUIRED)
target_link_libraries(main PRIVATE Iconv::Iconv)
15 changes: 13 additions & 2 deletions ports/libiconv/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
{
"name": "libiconv",
"version": "1.18",
"description": "GNU Unicode text conversion",
"port-version": 1,
"description": [
"iconv() text conversion.",
"This port installs GNU libiconv if the system C runtime doesn't provide a suitable iconv() implementation."
],
"homepage": "https://www.gnu.org/software/libiconv/",
"license": null
"license": null,
"dependencies": [
{
"name": "vcpkg-cmake-get-vars",
"host": true,
"platform": "android"
}
]
}
35 changes: 35 additions & 0 deletions ports/libspatialite/android-builtin-iconv.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
diff --git a/src/gaiaaux/gg_utf8.c b/src/gaiaaux/gg_utf8.c
index f11e604..620696e 100644
--- a/src/gaiaaux/gg_utf8.c
+++ b/src/gaiaaux/gg_utf8.c
@@ -73,7 +73,7 @@ extern const char *locale_charset (void);
#include <localcharset.h>
#endif /* end localcharset */
#else /* not MINGW32 - WIN32 */
-#if defined(__APPLE__) || defined(__ANDROID__)
+#if defined(__APPLE__) || (defined(__ANDROID__) && __ANDROID_API__ < 28)
#include <iconv.h>
#include <localcharset.h>
#else /* neither Mac OsX nor Android */
@@ -89,7 +89,7 @@ gaiaGetLocaleCharset ()
#if defined(__MINGW32__) || defined(_WIN32)
return locale_charset ();
#else /* not MINGW32 - WIN32 */
-#if defined(__APPLE__) || defined(__ANDROID__)
+#if defined(__APPLE__) || (defined(__ANDROID__) && __ANDROID_API__ < 28)
return locale_charset ();
#else /* neither Mac OsX nor Android */
return nl_langinfo (CODESET);
diff --git a/src/gaiageo/gg_shape.c b/src/gaiageo/gg_shape.c
index 8917535..e5e0240 100644
--- a/src/gaiageo/gg_shape.c
+++ b/src/gaiageo/gg_shape.c
@@ -75,7 +75,7 @@ extern const char *locale_charset (void);
#include <localcharset.h>
#endif /* end localcharset */
#else /* not MINGW32 */
-#if defined(__APPLE__) || defined(__ANDROID__)
+#if defined(__APPLE__) || (defined(__ANDROID__) && __ANDROID_API__ < 28)
#include <iconv.h>
#include <localcharset.h>
#else /* neither Mac OsX nor Android */
1 change: 1 addition & 0 deletions ports/libspatialite/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ vcpkg_extract_source_archive(
gaiaconfig-msvc.patch
fix-mingw.patch
fix-utf8-source.patch
android-builtin-iconv.diff
)

vcpkg_check_features(OUT_FEATURE_OPTIONS unused
Expand Down
2 changes: 1 addition & 1 deletion ports/libspatialite/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "libspatialite",
"version": "5.1.0",
"port-version": 2,
"port-version": 3,
"description": "SpatiaLite is an open source library intended to extend the SQLite core to support fully fledged Spatial SQL capabilities.",
"homepage": "https://www.gaia-gis.it/fossil/libspatialite/index",
"license": null,
Expand Down
28 changes: 28 additions & 0 deletions ports/libssh/android-glob-tilde.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/src/bind_config.c b/src/bind_config.c
index 27c42c9..9e9c5f0 100644
--- a/src/bind_config.c
+++ b/src/bind_config.c
@@ -248,6 +248,9 @@ static void local_parse_glob(ssh_bind bind,
int rt;
u_int i;

+#if defined(__ANDROID__) && !defined(GLOB_TILDE)
+ const int GLOB_TILDE = 0;
+#endif
rt = glob(fileglob, GLOB_TILDE, NULL, &globbuf);
if (rt == GLOB_NOMATCH) {
globfree(&globbuf);
diff --git a/src/config.c b/src/config.c
index c5c4012..72a9bdd 100644
--- a/src/config.c
+++ b/src/config.c
@@ -249,6 +249,9 @@ static void local_parse_glob(ssh_session session,
int rt;
size_t i;

+#if defined(__ANDROID__) && !defined(GLOB_TILDE)
+ const int GLOB_TILDE = 0;
+#endif
rt = glob(fileglob, GLOB_TILDE, NULL, &globbuf);
if (rt == GLOB_NOMATCH) {
globfree(&globbuf);
1 change: 1 addition & 0 deletions ports/libssh/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ vcpkg_extract_source_archive(SOURCE_PATH
0001-export-pkgconfig-file.patch
0003-no-source-write.patch
0004-file-permissions-constants.patch
android-glob-tilde.diff
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
Expand Down
1 change: 1 addition & 0 deletions ports/libssh/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "libssh",
"version": "0.10.6",
"port-version": 1,
"description": "libssh is a multiplatform C library implementing the SSHv2 protocol on client and server side",
"homepage": "https://www.libssh.org/",
"license": "LGPL-2.1-only",
Expand Down
13 changes: 13 additions & 0 deletions ports/sockpp/android-strerror_r.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/exception.cpp b/src/exception.cpp
index 72aae7e..7a56c60 100644
--- a/src/exception.cpp
+++ b/src/exception.cpp
@@ -66,7 +66,7 @@ string sys_error::error_str(int err)
buf, sizeof(buf), NULL);
#else
#ifdef _GNU_SOURCE
- #if !defined(__GLIBC__)
+ #if !defined(__GLIBC__) && !defined(__ANDROID__)
// use the XSI standard behavior.
int e = strerror_r(err, buf, sizeof(buf));
auto s = strerror(e);
2 changes: 2 additions & 0 deletions ports/sockpp/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ vcpkg_from_github(
REF "v${VERSION}"
SHA512 99191c9551ff345f96af9177d124c6e10f3da8e87021576058b63df82ee64461cb8fc134919fe390617200aebf222e70501e3cee43fc0a294596947669ed4f03
HEAD_REF master
PATCHES
android-strerror_r.diff
)

vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" "\${SOCKPP}-static" "\${SOCKPP}" IGNORE_UNCHANGED)
Expand Down
2 changes: 1 addition & 1 deletion ports/sockpp/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "sockpp",
"version": "1.0.0",
"port-version": 1,
"port-version": 2,
"description": "Simple, modern, C++ socket library. This is a fairly low-level C++ wrapper around the Berkeley sockets library using socket, acceptor, and connector classes that are familiar concepts from other languages.",
"homepage": "https://github.com/fpagliughi/sockpp",
"license": "BSD-3-Clause",
Expand Down
1 change: 1 addition & 0 deletions ports/suitesparse-lagraph/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ vcpkg_cmake_configure(
DISABLE_PARALLEL_CONFIGURE
OPTIONS
-DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS}
-DBUILD_TESTING=OFF
-DSUITESPARSE_USE_CUDA=OFF
-DSUITESPARSE_USE_STRICT=ON
-DSUITESPARSE_USE_FORTRAN=OFF
Expand Down
1 change: 1 addition & 0 deletions ports/suitesparse-lagraph/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"$comment": "Use scripts/update_suitesparse.py to update all SuiteSparse ports",
"name": "suitesparse-lagraph",
"version-semver": "1.1.4",
"port-version": 1,
"description": "LAGraph: Library plus test harness for collecting algorithms that use GraphBLAS",
"homepage": "https://lagraph.readthedocs.io/en/latest/",
"license": "BSD-2-Clause",
Expand Down
4 changes: 2 additions & 2 deletions ports/treehopper/fix-dependences.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ index 8537305..db3d29b 100644
- target_link_libraries(treehopper usb-1.0 pthread)
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(libusb REQUIRED IMPORTED_TARGET libusb-1.0)
+
+ target_link_libraries(treehopper PRIVATE PkgConfig::libusb pthread)
+ find_package(Threads REQUIRED)
+ target_link_libraries(treehopper PRIVATE PkgConfig::libusb ${CMAKE_THREAD_LIBS_INIT})
elseif(WIN32)
target_link_libraries(treehopper winusb setupapi)
endif(APPLE)
Expand Down
12 changes: 11 additions & 1 deletion ports/treehopper/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT)
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
Expand All @@ -10,8 +10,18 @@ vcpkg_from_github(
fix-dependences.patch
)

if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_ANDROID)
vcpkg_find_acquire_program(PKGCONFIG)
endif()

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}/C++/API/"
OPTIONS
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
-DTHREADS_PREFER_PTHREAD_FLAG=ON
MAYBE_UNUSED_VARIABLES
PKG_CONFIG_EXECUTABLE
THREADS_PREFER_PTHREAD_FLAG
)

vcpkg_cmake_install()
Expand Down
6 changes: 3 additions & 3 deletions ports/treehopper/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "treehopper",
"version": "1.11.3",
"port-version": 9,
"port-version": 10,
"description": "Treehopper connects the physical world to your computer, tablet, or smartphone.",
"homepage": "https://treehopper.io",
"supports": "!staticcrt & !uwp",
"supports": "!uwp & !(static & staticcrt)",
"dependencies": [
{
"name": "libusb",
"platform": "linux"
"platform": "android | linux"
},
{
"name": "vcpkg-cmake",
Expand Down
Loading
Loading