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

[vcpkg macos ci] Switch to using our own base boxes, to fix bringing up mac machines #13619

Merged
merged 9 commits into from
Sep 24, 2020
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
2 changes: 2 additions & 0 deletions ports/alac-decoder/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ set (SRCS

if(MSVC)
add_compile_options(/W4 -D_CRT_SECURE_NO_WARNINGS -DTARGET_OS_WIN32)
else()
add_compile_options(-Wno-error=implicit-function-declaration)
endif()

include_directories(.)
Expand Down
3 changes: 2 additions & 1 deletion ports/alac-decoder/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Source: alac-decoder
Version: 0.2-3
Version: 0.2
Port-Version: 4
Homepage: https://distfiles.macports.org/alac_decoder
Description: ALAC C implementation of a decoder, written from reverse engineering the file format
2 changes: 1 addition & 1 deletion ports/apr/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Source: apr
Version: 1.7.0
Port-Version: 2
Port-Version: 3
Homepage: https://apr.apache.org/
Description: The Apache Portable Runtime (APR) is a C library that forms a system portability layer that covers many operating systems.
Supports: !uwp
Expand Down
1 change: 1 addition & 0 deletions ports/apr/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ else()
else()
message(STATUS "Configuring apr")
endif()
set(ENV{CFLAGS} "$ENV{CFLAGS} -Wno-error=implicit-function-declaration")
vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
NO_DEBUG
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
From 6594abbd953d0e26105fd6c982990eb702f27804 Mon Sep 17 00:00:00 2001
From: Nicole Mazzuca <[email protected]>
Date: Tue, 22 Sep 2020 15:22:00 -0700
Subject: [PATCH 1/2] fix install dirs

---
src/CMakeLists.txt | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3427487..a9b8be0 100644
index 773c4c8..03e112c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,5 +1,4 @@
Expand All @@ -15,10 +24,12 @@ index 3427487..a9b8be0 100644

-INSTALL( TARGETS argtable2 ARCHIVE DESTINATION lib)
-SET_TARGET_PROPERTIES( argtable2 PROPERTIES DEBUG_POSTFIX d )
\ No newline at end of file
+INSTALL(TARGETS argtable2
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+INSTALL(TARGETS argtable2
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+INSTALL(FILES argtable2.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
--
2.24.3 (Apple Git-128)

60 changes: 60 additions & 0 deletions ports/argtable2/0002-include-correct-headers.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
From 271423adb2900c8bf4aad5d73d7ef1efbb5c35d8 Mon Sep 17 00:00:00 2001
From: Nicole Mazzuca <[email protected]>
Date: Tue, 22 Sep 2020 15:17:18 -0700
Subject: [PATCH 2/2] include correct headers

---
src/arg_date.c | 4 +++-
src/arg_int.c | 1 +
src/getopt.c | 1 +
3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/arg_date.c b/src/arg_date.c
index 22b59e2..5004b42 100644
--- a/src/arg_date.c
+++ b/src/arg_date.c
@@ -37,6 +37,8 @@ USA.
#include <strings.h>
#endif

+#include <string.h>
+
#include "argtable2.h"

/* local error codes */
@@ -112,7 +114,7 @@ static void errorfn(struct arg_date *parent, FILE *fp, int errorcode, const char
char buff[200];

fprintf(fp,"illegal timestamp format \"%s\"\n",argval);
- bzero(&tm,sizeof(tm));
+ memset(&tm, 0, sizeof(tm));
strptime("1999-12-31 23:59:59","%F %H:%M:%S",&tm);
strftime(buff, sizeof(buff), parent->format, &tm);
printf("correct format is \"%s\"\n", buff);
diff --git a/src/arg_int.c b/src/arg_int.c
index 29c20e5..bc10012 100644
--- a/src/arg_int.c
+++ b/src/arg_int.c
@@ -30,6 +30,7 @@ USA.

#include "argtable2.h"
#include <limits.h>
+#include <ctype.h>

/* local error codes */
enum {EMINCOUNT=1,EMAXCOUNT,EBADINT,EOVERFLOW};
diff --git a/src/getopt.c b/src/getopt.c
index b208529..b13acc6 100644
--- a/src/getopt.c
+++ b/src/getopt.c
@@ -47,6 +47,7 @@
#endif

#include <stdio.h>
+#include <string.h>

/* Comment out all this code if we are using the GNU C Library, and are not
actually compiling the library itself. This code is part of the GNU C
--
2.24.3 (Apple Git-128)

3 changes: 2 additions & 1 deletion ports/argtable2/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Source: argtable2
Version: 2.13-7
Version: 2.13
Port-Version: 8
Homepage: http://argtable.sourceforge.net
Description: Argtable is an ANSI C library for parsing GNU style command line options with a minimum of fuss.
4 changes: 3 additions & 1 deletion ports/argtable2/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ vcpkg_from_sourceforge(
REF argtable-2.13
FILENAME "argtable2-13.tar.gz"
SHA512 3d8303f3ba529e3241d918c0127a16402ece951efb964d14a06a3a7d29a252812ad3c44e96da28798871e9923e73a2cfe7ebc84139c1397817d632cae25c4585
PATCHES fix-install-dirs.patch
PATCHES
0001-fix-install-dirs.patch
0002-include-correct-headers.patch
)

vcpkg_configure_cmake(
Expand Down
1 change: 1 addition & 0 deletions ports/arrow/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Source: arrow
Version: 1.0.1
Port-Version: 1
Build-Depends: boost-system, boost-filesystem, boost-multiprecision, boost-algorithm, flatbuffers, rapidjson, zlib, lz4, brotli, bzip2, zstd, snappy, gflags, thrift, double-conversion, glog, uriparser, openssl, utf8proc
Homepage: https://github.com/apache/arrow
Description: Apache Arrow is a columnar in-memory analytics layer designed to accelerate big data. It houses a set of canonical in-memory representations of flat and hierarchical data along with multiple language-bindings for structure manipulation. It also provides IPC and common algorithm implementations.
Expand Down
1 change: 1 addition & 0 deletions ports/arrow/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ vcpkg_configure_cmake(
-DARROW_WITH_BROTLI=ON
-DARROW_WITH_UTF8PROC=ON
-DPARQUET_REQUIRE_ENCRYPTION=ON
-DBUILD_WARNING_LEVEL=PRODUCTION
)

vcpkg_install_cmake()
Expand Down
3 changes: 2 additions & 1 deletion ports/bde/CONTROL
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Source: bde
Version: 3.2.0.0-1
Version: 3.2.0.0
Port-Version: 2
Description: Basic Development Environment - a set of foundational C++ libraries used at Bloomberg.
6 changes: 3 additions & 3 deletions ports/bde/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
include(vcpkg_common_functions)

vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
set(CONFIGURE_COMMON_ARGS ${CONFIGURE_COMMON_ARGS} --library-type=static)

Expand Down Expand Up @@ -58,8 +56,10 @@ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
else()
message(FATAL_ERROR "Unsupported target architecture: ${VCPKG_TARGET_ARCHITECTURE}")
endif()
if(NOT VCPKG_CMAKE_SYSTEM_NAME)
if(VCPKG_TARGET_IS_WINDOWS)
set(CONFIGURE_COMMON_ARGS ${CONFIGURE_COMMON_ARGS} --msvc-runtime-type=static)
else()
set(ENV{CFLAGS} "$ENV{CFLAGS} -Wno-error=implicit-function-declaration")
endif()

# Configure debug
Expand Down
65 changes: 13 additions & 52 deletions ports/binn/0001_fix_uwp.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,68 +2,39 @@ diff --git a/src/binn.c b/src/binn.c
index ef32f35..d12d473 100644
--- a/src/binn.c
+++ b/src/binn.c
@@ -142,8 +142,8 @@ BINN_PRIVATE void copy_be64(u64 *pdest, u64 *psource) {
@@ -142,8 +142,14 @@ BINN_PRIVATE void copy_be64(u64 *pdest, u64 *psource) {
/***************************************************************************/

#ifndef WIN32
-#define stricmp strcasecmp
-#define strnicmp strncasecmp
+#define _stricmp strcasecmp
+#define _strnicmp strncasecmp
#define stricmp strcasecmp
#define strnicmp strncasecmp
+#define sprintf_s(b, n, ...) sprintf(b, __VA_ARGS__)
+#define strcpy_s(b, n, s) strcpy(b, s)
+#else
+#define stricmp _stricmp
+#define strnicmp _strnicmp
+#define strdup _strdup
#endif

BINN_PRIVATE BOOL IsValidBinnHeader(void *pbuf, int *ptype, int *pcount, int *psize, int *pheadersize);
@@ -614,7 +614,7 @@ BINN_PRIVATE unsigned char * SearchForKey(unsigned char *p, int header_size, int
if (p > plimit) break;
// Compare if the strings are equal.
if (len > 0) {
- if (strnicmp((char*)p, key, len) == 0) { // note that there is no null terminator here
+ if (_strnicmp((char*)p, key, len) == 0) { // note that there is no null terminator here
if (keylen == len) {
p += len;
return p;
@@ -1582,6 +1582,7 @@ BINN_PRIVATE BOOL binn_read_pair(int expected_type, void *ptr, int pos, int *pid
@@ -1582,6 +1588,7 @@ BINN_PRIVATE BOOL binn_read_pair(int expected_type, void *ptr, int pos, int *pid
base = p;
plimit = p + size - 1;
p += header_size;
+ key = 0;

for (i = 0; i < count; i++) {
switch (type) {
@@ -3147,15 +3148,15 @@ BINN_PRIVATE BOOL is_bool_str(char *str, BOOL *pbool) {

if (str == NULL || pbool == NULL) return FALSE;

- if (stricmp(str, "true") == 0) goto loc_true;
- if (stricmp(str, "yes") == 0) goto loc_true;
- if (stricmp(str, "on") == 0) goto loc_true;
- //if (stricmp(str, "1") == 0) goto loc_true;
+ if (_stricmp(str, "true") == 0) goto loc_true;
+ if (_stricmp(str, "yes") == 0) goto loc_true;
+ if (_stricmp(str, "on") == 0) goto loc_true;
+ //if (_stricmp(str, "1") == 0) goto loc_true;

- if (stricmp(str, "false") == 0) goto loc_false;
- if (stricmp(str, "no") == 0) goto loc_false;
- if (stricmp(str, "off") == 0) goto loc_false;
- //if (stricmp(str, "0") == 0) goto loc_false;
+ if (_stricmp(str, "false") == 0) goto loc_false;
+ if (_stricmp(str, "no") == 0) goto loc_false;
+ if (_stricmp(str, "off") == 0) goto loc_false;
+ //if (_stricmp(str, "0") == 0) goto loc_false;

if (is_integer(str)) {
vint = atoi64(str);
@@ -3333,7 +3334,7 @@ char * APIENTRY binn_get_str(binn *value) {
@@ -3333,7 +3340,7 @@ char * APIENTRY binn_get_str(binn *value) {

if (type_family(value->type) == BINN_FAMILY_INT) {
if (copy_int_value(value->ptr, &vint, value->type, BINN_INT64) == FALSE) return NULL;
- sprintf(buf, "%" INT64_FORMAT, vint);
+ sprintf_s(buf, "%" INT64_FORMAT, vint);
+ sprintf_s(buf, sizeof buf, "%" INT64_FORMAT, vint);
goto loc_convert_value;
}

@@ -3341,15 +3342,15 @@ char * APIENTRY binn_get_str(binn *value) {
@@ -3341,14 +3348,14 @@ char * APIENTRY binn_get_str(binn *value) {
case BINN_FLOAT:
value->vdouble = value->vfloat;
case BINN_DOUBLE:
Expand All @@ -81,13 +52,3 @@ index ef32f35..d12d473 100644
+ strcpy_s(buf, sizeof buf, "false");
goto loc_convert_value;
}

@@ -3358,7 +3359,7 @@ char * APIENTRY binn_get_str(binn *value) {
loc_convert_value:

//value->vint64 = 0;
- value->ptr = strdup(buf);
+ value->ptr = _strdup(buf);
if (value->ptr == NULL) return NULL;
value->freefn = free;
value->type = BINN_STRING;
3 changes: 2 additions & 1 deletion ports/binn/CONTROL
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Source: binn
Version: 2.0
Description: Binn is a binary data serialization format designed to be compact, fast and easy to use.
Port-Version: 1
Description: Binn is a binary data serialization format designed to be compact, fast and easy to use.
40 changes: 40 additions & 0 deletions ports/cfitsio/0001-correct-headers-for-getcwd.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
From 67400fcbd3ab2f7e68a8e7a60139b1b615debae2 Mon Sep 17 00:00:00 2001
From: Nicole Mazzuca <[email protected]>
Date: Wed, 23 Sep 2020 10:27:43 -0700
Subject: [PATCH] correct headers for getcwd

---
fitsio.h | 3 +++
group.c | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/fitsio.h b/fitsio.h
index ec26d9d..792bb95 100644
--- a/fitsio.h
+++ b/fitsio.h
@@ -39,6 +39,9 @@ SERVICES PROVIDED HEREUNDER."
#define CFITSIO_MAJOR 3
#define CFITSIO_SONAME 5

+/* Required for getcwd() */
+#define _POSIX_C_SOURCE 200112L
+
/* the SONAME is incremented in a new release if the binary shared */
/* library (on linux and Mac systems) is not backward compatible */
/* with the previous release of CFITSIO */
diff --git a/group.c b/group.c
index 9326c57..cec0f6a 100644
--- a/group.c
+++ b/group.c
@@ -24,7 +24,7 @@
#include <direct.h> /* defines the getcwd function on Windows PCs */
#endif

-#if defined(unix) || defined(__unix__) || defined(__unix) || defined(HAVE_UNISTD_H)
+#if defined(unix) || defined(__unix__) || defined(__unix) || defined(__APPLE__) || defined(HAVE_UNISTD_H)
#include <unistd.h> /* needed for getcwd prototype on unix machines */
#endif

--
2.24.3 (Apple Git-128)

3 changes: 2 additions & 1 deletion ports/cfitsio/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Source: cfitsio
Version: 3.410-3
Version: 3.410
Port-Version: 4
Homepage: https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c
Description: Library of C and Fortran subroutines for reading and writing data files in FITS (Flexible Image Transport System) data format
4 changes: 2 additions & 2 deletions ports/cfitsio/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
include(vcpkg_common_functions)

vcpkg_download_distfile(ARCHIVE
URLS "http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio3410.tar.gz"
FILENAME "cfitsio3410.tar.gz"
Expand All @@ -9,6 +7,8 @@ vcpkg_download_distfile(ARCHIVE
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
PATCHES
0001-correct-headers-for-getcwd.patch
)

vcpkg_configure_cmake(
Expand Down
3 changes: 2 additions & 1 deletion ports/chromium-base/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Source: chromium-base
Version: 86.0.4199.1
Port-Version: 1
Homepage: https://chromium.googlesource.com/chromium/src
Description: Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
Supports: x64 & (osx|windows|linux) & !uwp
Supports: x64 & (osx|windows|linux) & !uwp
5 changes: 3 additions & 2 deletions ports/chromium-base/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,16 @@ file(COPY "${RES}/test_fonts" DESTINATION "${SOURCE_PATH}/third_party")
set(OPTIONS "\
use_custom_libcxx=false \
clang_use_chrome_plugins=false \
forbid_non_component_debug_builds=false")
forbid_non_component_debug_builds=false \
treat_warnings_as_errors=false")
set(DEFINITIONS "")

if(WIN32)
# Windows 10 SDK >= (10.0.19041.0) is required
# https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk
SET(VCPKG_POLICY_SKIP_ARCHITECTURE_CHECK enabled)
set(ENV{DEPOT_TOOLS_WIN_TOOLCHAIN} 0)
set(OPTIONS "${OPTIONS} treat_warnings_as_errors=false use_lld=false")
set(OPTIONS "${OPTIONS} use_lld=false")
endif()

if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL Linux)
Expand Down
1 change: 1 addition & 0 deletions ports/cspice/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ elseif (UNIX)
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
target_compile_options(cspice PUBLIC -m32 -ansi -fPIC)
endif()
target_compile_options(cspice PRIVATE -Wno-error=implicit-function-declaration)
endif ()

if (NOT _SKIP_HEADERS)
Expand Down
4 changes: 2 additions & 2 deletions ports/cspice/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Source: cspice
Version: 66
Port-Version: 2
Port-Version: 3
Homepage: https://naif.jpl.nasa.gov/naif/toolkit_C.html
Description: NASA C SPICE toolkit
Supports: !uwp
Supports: !uwp
Loading