From b31d37b787118f15b1130f5f284addc947523c92 Mon Sep 17 00:00:00 2001 From: Adriano dos Santos Fernandes Date: Wed, 23 Aug 2023 23:09:49 -0300 Subject: [PATCH] MacOS: build libicu and static libc++ using vcpkg. Also improve non-CI build automation. --- .github/workflows/main.yml | 92 ++----------------- .gitignore | 5 +- builds/posix/darwin.defaults | 3 - builds/posix/empty.vers | 2 - builds/posix/make.defaults | 10 +- builds/posix/make.rules | 1 + builds/posix/postfix.darwin | 4 - builds/posix/prefix.darwin_aarch64 | 2 +- builds/posix/prefix.darwin_x86_64 | 2 +- configure.ac | 40 ++++++++ doc/README.build.macosx.md | 48 +++++++--- vcpkg-configuration.json | 20 ++++ .../ports/libcxx/13.0.1_0/build.sh.in | 19 ++++ .../ports/libcxx/13.0.1_0/portfile.cmake | 21 +++++ .../registry/ports/libcxx/13.0.1_0/vcpkg.json | 5 + vcpkg-custom/registry/versions/baseline.json | 7 ++ vcpkg-custom/registry/versions/l-/libcxx.json | 8 ++ vcpkg-custom/triplets/fb-arm64-osx.cmake | 10 ++ vcpkg-custom/triplets/fb-x64-osx.cmake | 10 ++ vcpkg.json | 18 ++++ 20 files changed, 211 insertions(+), 116 deletions(-) create mode 100644 vcpkg-configuration.json create mode 100755 vcpkg-custom/registry/ports/libcxx/13.0.1_0/build.sh.in create mode 100644 vcpkg-custom/registry/ports/libcxx/13.0.1_0/portfile.cmake create mode 100644 vcpkg-custom/registry/ports/libcxx/13.0.1_0/vcpkg.json create mode 100644 vcpkg-custom/registry/versions/baseline.json create mode 100644 vcpkg-custom/registry/versions/l-/libcxx.json create mode 100644 vcpkg-custom/triplets/fb-arm64-osx.cmake create mode 100644 vcpkg-custom/triplets/fb-x64-osx.cmake create mode 100644 vcpkg.json diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 44b99941d8..86cbc905f6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -261,114 +261,38 @@ jobs: builds/install_images/Firebird-*-windows-*.zip build-macos: - runs-on: macos-latest + runs-on: macos-12 steps: - name: Checkout uses: actions/checkout@v3 with: fetch-depth: 10 + submodules: 'true' - name: Prepare - Install tools run: | - brew install automake cmake libtool ninja + brew install automake autoconf-archive cmake libtool ninja - - name: Cache - libc++ install - id: cache-libcxx-install-macos + - name: Cache - vcpkg uses: actions/cache@v3 with: - key: ${{ runner.os }}-libcxx-install-13.0.1 + key: ${{ runner.os }}-vcpkg path: | - extern/libcxx-macos-install - - - name: Download libc++ sources - if: steps.cache-libcxx-install-macos.outputs.cache-hit != 'true' - run: | - mkdir extern/libcxx-macos - pushd extern/libcxx-macos - curl -OL https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.1/llvm-project-13.0.1.src.tar.xz - tar xJf llvm-project-13.0.1.src.tar.xz - popd - - - name: Build libc++ - if: steps.cache-libcxx-install-macos.outputs.cache-hit != 'true' - run: | - LIBCXX_BUILD_PATH=`pwd`/extern/libcxx-macos-build - LIBCXX_INSTALL_PATH=`pwd`/extern/libcxx-macos-install - mkdir $LIBCXX_BUILD_PATH - pushd extern/libcxx-macos/llvm-project-13.0.1.src - export MACOSX_DEPLOYMENT_TARGET=10.9 - cmake -G Ninja -S llvm -B $LIBCXX_BUILD_PATH \ - -DLLVM_ENABLE_PROJECTS="libcxx;libcxxabi" \ - -DCMAKE_INSTALL_PREFIX=$LIBCXX_INSTALL_PATH \ - -DCMAKE_BUILD_TYPE=Release \ - -DLIBCXX_ENABLE_SHARED=false \ - -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=true - ninja -C $LIBCXX_BUILD_PATH cxx cxxabi - ninja -C $LIBCXX_BUILD_PATH install-cxx install-cxxabi - popd - - - name: Cache - libicu install - id: cache-libicu-install-macos - uses: actions/cache@v3 - with: - key: ${{ runner.os }}-libicu-install-63.2 - path: | - extern/libicu-macos-install - - - name: Download and patch libicu sources - if: steps.cache-libicu-install-macos.outputs.cache-hit != 'true' - run: | - mkdir extern/libicu-macos - pushd extern/libicu-macos - curl -OL https://github.com/unicode-org/icu/releases/download/release-63-2/icu4c-63_2-src.tgz - curl -OL https://github.com/unicode-org/icu/commit/24aeb9a5a5874f4ce5db912e30670ac3ae236971.patch - tar xzf icu4c-63_2-src.tgz - cd icu/source - patch -p3 < ../../24aeb9a5a5874f4ce5db912e30670ac3ae236971.patch - popd - - - name: Build libicu - if: steps.cache-libicu-install-macos.outputs.cache-hit != 'true' - run: | - export LIBTOOLIZE=glibtoolize - export LIBTOOL=glibtool - - LIBICU_INSTALL_PATH=`pwd`/extern/libicu-macos-install - pushd extern/libicu-macos/icu/source - ./runConfigureICU MacOSX --prefix=$LIBICU_INSTALL_PATH - make -j4 - make install - install_name_tool -id @rpath/lib/libicuuc.dylib $LIBICU_INSTALL_PATH/lib/libicuuc.dylib - install_name_tool -id @rpath/lib/libicui18n.dylib $LIBICU_INSTALL_PATH/lib/libicui18n.dylib - install_name_tool -id @rpath/lib/libicudata.dylib $LIBICU_INSTALL_PATH/lib/libicudata.dylib - install_name_tool -change libicudata.63.dylib @loader_path/libicudata.63.dylib $LIBICU_INSTALL_PATH/lib/libicuuc.63.dylib - install_name_tool -change libicudata.63.dylib @loader_path/libicudata.63.dylib $LIBICU_INSTALL_PATH/lib/libicui18n.63.dylib - install_name_tool -change libicuuc.63.dylib @loader_path/libicuuc.63.dylib $LIBICU_INSTALL_PATH/lib/libicui18n.63.dylib - popd + $HOME/.cache/vcpkg/archives - name: Build run: | export LIBTOOLIZE=glibtoolize export LIBTOOL=glibtool - LIBCXX_INSTALL_PATH=`pwd`/extern/libcxx-macos-install - LIBICU_INSTALL_PATH=`pwd`/extern/libicu-macos-install - - mkdir -p gen/Release/firebird/lib - cp -R $LIBICU_INSTALL_PATH/lib/libicu{data,i18n,uc}.*dylib gen/Release/firebird/lib/ - - export C_INCLUDE_PATH="$LIBICU_INSTALL_PATH/include:`xcrun --show-sdk-path`/usr/include" - export CPLUS_INCLUDE_PATH="$LIBCXX_INSTALL_PATH/include/c++/v1:$LIBICU_INSTALL_PATH/include:`xcrun --show-sdk-path`/usr/include" - export LIBRARY_PATH="$LIBCXX_INSTALL_PATH/lib:$LIBICU_INSTALL_PATH/lib:$LIBRARY_PATH" - ./autogen.sh --with-builtin-tommath --with-builtin-tomcrypt make -j4 make tests -j4 make run_tests - (cd gen; make -B -f make.platform.postfix ICU_LOC="$LIBICU_INSTALL_PATH/lib/") - (cd gen; make -B -f Makefile.install) + make -C gen -B -f make.platform.postfix + make -C gen -B -f Makefile.install # Rename directory to make sure the build is relocatable. mv gen gen2 diff --git a/.gitignore b/.gitignore index 4a18069207..87fe2b6f3c 100644 --- a/.gitignore +++ b/.gitignore @@ -8,8 +8,8 @@ m4/ autom4te.cache/ builds/install_images aclocal.m4 -*.patch -*.diff +/*.patch +/*.diff config.status configure config*~ @@ -29,3 +29,4 @@ extern/ttmath/release/ /src/include/gen/autoconfig.auto /src/include/gen/autoconfig.h extern/libcds/lib/ +/vcpkg_installed/ diff --git a/builds/posix/darwin.defaults b/builds/posix/darwin.defaults index 6caf4f6685..94723450c4 100644 --- a/builds/posix/darwin.defaults +++ b/builds/posix/darwin.defaults @@ -24,9 +24,6 @@ LIB_LINK_OPTIONS=$(LD_FLAGS) -dynamiclib -flat_namespace LIB_LINK_SONAME:=-current_version @FIREBIRD_VERSION@ -compatibility_version @FIREBIRD_VERSION@ -seg1addr 0x30000000 LIB_LINK_MAPFILE=-Wl,-exported_symbols_list,$(1) -#EXE_LINK_OPTIONS+=-dylib_file /Library/Frameworks/Firebird.framework/Versions/A/Firebird ../gen/Release/firebird/lib/libfbclient.dylib -#LIB_LINK_RPATH:=-dylib_file /Library/Frameworks/Firebird.framework/Versions/A/Firebird ../gen/Release/firebird/lib/libfbclient.dylib - ADD_LIBS:=-lobjc -framework Foundation -framework Security LINK_LIBS += $(ADD_LIBS) STATICLINK_LIBS += $(ADD_LIBS) diff --git a/builds/posix/empty.vers b/builds/posix/empty.vers index c635cc310e..a98968a16b 100644 --- a/builds/posix/empty.vers +++ b/builds/posix/empty.vers @@ -19,5 +19,3 @@ # # All Rights Reserved. # Contributor(s): ______________________________________. - -main diff --git a/builds/posix/make.defaults b/builds/posix/make.defaults index 156fdbda6f..2bbf905236 100755 --- a/builds/posix/make.defaults +++ b/builds/posix/make.defaults @@ -199,16 +199,16 @@ READELF = @READELF@ AC_CFLAGS = @CFLAGS@ AC_CXXFLAGS = @CXXFLAGS@ +AC_LDFLAGS = @LDFLAGS@ # LINKER COMMANDS -# FIXME: -static-libstdc++ in MacOS ifeq ($(PLATFORM),DARWIN) -LIB_LINK = $(CXX) $(GLOB_OPTIONS) $(CXXFLAGS) -EXE_LINK = $(CXX) $(GLOB_OPTIONS) $(CXXFLAGS) +LIB_LINK = $(CXX) $(GLOB_OPTIONS) $(CXXFLAGS) $(WLDFLAGS) +EXE_LINK = $(CXX) $(GLOB_OPTIONS) $(CXXFLAGS) $(WLDFLAGS) else -LIB_LINK = $(CXX) $(GLOB_OPTIONS) $(CXXFLAGS) -static-libstdc++ -EXE_LINK = $(CXX) $(GLOB_OPTIONS) $(CXXFLAGS) -static-libstdc++ +LIB_LINK = $(CXX) $(GLOB_OPTIONS) $(CXXFLAGS) $(WLDFLAGS) -static-libstdc++ +EXE_LINK = $(CXX) $(GLOB_OPTIONS) $(CXXFLAGS) $(WLDFLAGS) -static-libstdc++ endif STATICLIB_LINK = $(AR) crus diff --git a/builds/posix/make.rules b/builds/posix/make.rules index 69b40e6411..659830d11a 100644 --- a/builds/posix/make.rules +++ b/builds/posix/make.rules @@ -68,6 +68,7 @@ endif WCFLAGS = $(WFLAGS) $(CFLAGS) $(AC_CFLAGS) $(GLOB_OPTIONS) WCXXFLAGS = $(WFLAGS) $(PLUSPLUS_FLAGS) $(PLATFORM_PLUSPLUS_FLAGS) $(CXXFLAGS) $(AC_CXXFLAGS) $(GLOB_OPTIONS) +WLDFLAGS = $(LDFLAGS) $(AC_LDFLAGS) # Here we have definitions for using the preprocessor. diff --git a/builds/posix/postfix.darwin b/builds/posix/postfix.darwin index 84338ab92d..a311a65fe8 100644 --- a/builds/posix/postfix.darwin +++ b/builds/posix/postfix.darwin @@ -19,8 +19,6 @@ # 2 Oct 2002, Nickolay Samofatov - Major Cleanup TARGET ?= Release -ICU_VERS = icu54 -ICU_LOC ?= $(HOME)/$(ICU_VERS)/icu/source/lib/ FB_FW = ../gen/$(TARGET)/frameworks/Firebird5.framework all: framework @@ -29,8 +27,6 @@ framework: -$(RM) -rf $(FB_FW) mkdir -p $(FB_FW)/Versions/A/Libraries - cp $(ICU_LOC)*.dylib ../gen/$(TARGET)/firebird/lib/ - ln -s Versions/Current/Firebird $(FB_FW)/Firebird ln -s Versions/Current/Headers $(FB_FW)/Headers ln -s Versions/Current/Resources $(FB_FW)/Resources diff --git a/builds/posix/prefix.darwin_aarch64 b/builds/posix/prefix.darwin_aarch64 index 897d120b6a..7f2da73ccb 100644 --- a/builds/posix/prefix.darwin_aarch64 +++ b/builds/posix/prefix.darwin_aarch64 @@ -38,7 +38,7 @@ export MACOSX_DEPLOYMENT_TARGET PROD_FLAGS=-DDARWIN -DARM64 -pipe -O2 -MMD -fPIC -fno-common -mmacosx-version-min=11.0 DEV_FLAGS=-ggdb -DDARWIN -DARM64 -pipe -MMD -fPIC -fno-omit-frame-pointer -fno-common -Wall -fno-optimize-sibling-calls -mmacosx-version-min=11.0 -Wno-non-virtual-dtor -CXXFLAGS:=$(CXXFLAGS) -fvisibility-inlines-hidden -fvisibility=hidden -stdlib=libc++ +CXXFLAGS:=$(CXXFLAGS) -fvisibility-inlines-hidden -fvisibility=hidden UNDEF_PLATFORM= diff --git a/builds/posix/prefix.darwin_x86_64 b/builds/posix/prefix.darwin_x86_64 index 7e7b30f729..e4640893da 100644 --- a/builds/posix/prefix.darwin_x86_64 +++ b/builds/posix/prefix.darwin_x86_64 @@ -33,7 +33,7 @@ export MACOSX_DEPLOYMENT_TARGET PROD_FLAGS=-O1 -DDARWIN -pipe -MMD -fPIC -fno-common -mmacosx-version-min=10.7 DEV_FLAGS=-ggdb -DDARWIN -pipe -MMD -fPIC -fno-omit-frame-pointer -fno-common -Werror=delete-incomplete -Wall -fno-optimize-sibling-calls -mmacosx-version-min=10.7 -Wno-non-virtual-dtor -CXXFLAGS:=$(CXXFLAGS) -fvisibility-inlines-hidden -fvisibility=hidden -stdlib=libc++ -msse4 +CXXFLAGS:=$(CXXFLAGS) -fvisibility-inlines-hidden -fvisibility=hidden -msse4 LD_FLAGS+=-liconv FIREBIRD_LIBRARY_LINK+=-liconv diff --git a/configure.ac b/configure.ac index 1f860a748e..7534ba5bfe 100644 --- a/configure.ac +++ b/configure.ac @@ -67,6 +67,26 @@ AC_CANONICAL_BUILD CPU_TYPE=$build_cpu AC_SUBST(CPU_TYPE) +case "$build" in + aarch64-*-darwin*) + VCPKG_TRIPLET=fb-arm64-osx + ;; + + x*64-*-darwin*) + VCPKG_TRIPLET=fb-x64-osx + ;; +esac + +if test "x$VCPKG_TRIPLET" != "x" ; then + if ! test -f ./vcpkg/vcpkg; then + ./vcpkg/bootstrap-vcpkg.sh -disableMetrics + fi + + ./vcpkg/vcpkg install --triplet=$VCPKG_TRIPLET + + VCPKG_INSTALLED=`pwd`/vcpkg_installed/$VCPKG_TRIPLET + AC_SUBST(VCPKG_INSTALLED) +fi dnl EKU: set appropiate defaults for each platform dnl EDITLINE_FLG : support fancy command line editing in isql @@ -669,6 +689,14 @@ CFLAGS="$CFLAGS $PTHREAD_CFLAGS" CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS" LIBS="$LIBS $PTHREAD_LIBS" +case "$build" in + *-*-darwin*) + CFLAGS="$CFLAGS -I${VCPKG_INSTALLED}/include" + CXXFLAGS="$CXXFLAGS -nostdinc++ -isystem ${VCPKG_INSTALLED}/include/c++/v1 -I${VCPKG_INSTALLED}/include" + LDFLAGS="$LDFLAGS -nostdlib++ -stdlib=libc++ -L${VCPKG_INSTALLED}/lib -lc++" + ;; +esac + AC_ARG_ENABLE(raw-devices, [ --enable-raw-devices enable databases on raw devices (default on POSIX)], [case "$enableval" in @@ -1397,6 +1425,18 @@ dnl # output fi fi + case "$build" in + *-*-darwin*) + cp -a $VCPKG_INSTALLED/lib/libicu* gen/\$fb_tgt/firebird/lib/ + install_name_tool -id @rpath/lib/libicuuc.dylib gen/\$fb_tgt/firebird/lib/libicuuc.dylib + install_name_tool -id @rpath/lib/libicui18n.dylib gen/\$fb_tgt/firebird/lib/libicui18n.dylib + install_name_tool -id @rpath/lib/libicudata.dylib gen/\$fb_tgt/firebird/lib/libicudata.dylib + install_name_tool -change @rpath/libicudata.71.dylib @loader_path/libicudata.71.dylib gen/\$fb_tgt/firebird/lib/libicuuc.71.dylib + install_name_tool -change @rpath/libicudata.71.dylib @loader_path/libicudata.71.dylib gen/\$fb_tgt/firebird/lib/libicui18n.71.dylib + install_name_tool -change @rpath/libicuuc.71.dylib @loader_path/libicuuc.71.dylib gen/\$fb_tgt/firebird/lib/libicui18n.71.dylib + ;; + esac + dnl ### TEMP ### directories for generated .cpp, .o and .d by module name for src_dir in `cd src; ls -R -1 * | grep : | tr -d : | tr "\n" " "; cd ..`; do mkdir -p temp/\$fb_tgt/\$src_dir diff --git a/doc/README.build.macosx.md b/doc/README.build.macosx.md index eb055f3272..ee51ec3cc3 100644 --- a/doc/README.build.macosx.md +++ b/doc/README.build.macosx.md @@ -1,36 +1,56 @@ -# Building Firebird on MacOSX using brew +# Building Firebird on MacOSX ## Preparing -- Install XCode - +MacOS build uses `vcpkg` installed as git submodule: + +```bash +git submodule update --init +``` + +Install XCode and dependencies with `homebrew`: + +```bash +brew install automake autoconf-archive cmake libtool ninja +``` + +## Configuring + +Set necessary environment variables: ```bash -brew install automake libtool icu4c -export CFLAGS=-I/usr/local/opt/icu4c/include -export LDFLAGS=-L/usr/local/opt/icu4c/lib -export CXXFLAGS=-I/usr/local/opt/icu4c/include -export LD_LIBRARY_PATH="/usr/local/opt/icu4c/lib:$LD_LIBRARY_PATH" export LIBTOOLIZE=glibtoolize export LIBTOOL=glibtool ``` -## Configuring +In order to get Release build: ```bash ./autogen.sh --with-builtin-tommath --with-builtin-tomcrypt ``` -## Building +In order to get Debug build: -In order to get Release build +```bash +./autogen.sh --with-builtin-tommath --with-builtin-tomcrypt --enable-developer +``` + +## Building ```bash make -j4 ``` -In order to get Debug build +## Testing ```bash -make -j4 Debug -``` \ No newline at end of file +make tests -j4 +make run_tests +``` + +## Packaging + +```bash +make -C gen -B -f make.platform.postfix +make -C gen -B -f Makefile.install +``` diff --git a/vcpkg-configuration.json b/vcpkg-configuration.json new file mode 100644 index 0000000000..12f1e20ba6 --- /dev/null +++ b/vcpkg-configuration.json @@ -0,0 +1,20 @@ +{ + "default-registry": { + "kind": "git", + "repository": "https://github.com/Microsoft/vcpkg", + "baseline": "417119555f155f6044dec7a379cd25466e339873" + }, + "registries": [ + { + "kind": "filesystem", + "path": "vcpkg-custom/registry", + "baseline": "2023-08-23", + "packages": [ + "libcxx" + ] + } + ], + "overlay-triplets": [ + "vcpkg-custom/triplets" + ] +} diff --git a/vcpkg-custom/registry/ports/libcxx/13.0.1_0/build.sh.in b/vcpkg-custom/registry/ports/libcxx/13.0.1_0/build.sh.in new file mode 100755 index 0000000000..5c3af6a170 --- /dev/null +++ b/vcpkg-custom/registry/ports/libcxx/13.0.1_0/build.sh.in @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +set -e + +SOURCE_PATH=@SOURCE_PATH@ +INSTALL_PREFIX=@INSTALL_PREFIX@ + +export MACOSX_DEPLOYMENT_TARGET=10.9 + +cmake -G Ninja -S $SOURCE_PATH/llvm \ + -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX \ + -DLLVM_ENABLE_PROJECTS="libcxx;libcxxabi" \ + -DCMAKE_BUILD_TYPE=Release \ + -DLIBCXX_ENABLE_SHARED=false \ + -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=true + +ninja cxx cxxabi + +ninja install-cxx install-cxxabi diff --git a/vcpkg-custom/registry/ports/libcxx/13.0.1_0/portfile.cmake b/vcpkg-custom/registry/ports/libcxx/13.0.1_0/portfile.cmake new file mode 100644 index 0000000000..28632efede --- /dev/null +++ b/vcpkg-custom/registry/ports/libcxx/13.0.1_0/portfile.cmake @@ -0,0 +1,21 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO llvm/llvm-project + REF 75e33f71c2dae584b13a7d1186ae0a038ba98838 + HEAD_REF llvmorg-13.0.1 + SHA512 8bd80efe88160f615a9dc6fbcdab693d1459ca483410cf990f25169079e46726429f24ad042d287bfcfef8fd54a8a7264a67a710edaa24ebbf1e815a62b1f812 +) + +file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +set(BUILD_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +set(INSTALL_PREFIX "${CURRENT_PACKAGES_DIR}") + +configure_file("${CMAKE_CURRENT_LIST_DIR}/build.sh.in" "${BUILD_DIR}/build.sh" @ONLY) + +vcpkg_execute_required_process( + COMMAND "${SHELL}" ./build.sh + WORKING_DIRECTORY "${BUILD_DIR}" + LOGNAME "build-${TARGET_TRIPLET}-rel" +) diff --git a/vcpkg-custom/registry/ports/libcxx/13.0.1_0/vcpkg.json b/vcpkg-custom/registry/ports/libcxx/13.0.1_0/vcpkg.json new file mode 100644 index 0000000000..3045ceaeff --- /dev/null +++ b/vcpkg-custom/registry/ports/libcxx/13.0.1_0/vcpkg.json @@ -0,0 +1,5 @@ +{ + "name": "libcxx", + "version-string": "13.0.1", + "description": "LLVM libc++" +} diff --git a/vcpkg-custom/registry/versions/baseline.json b/vcpkg-custom/registry/versions/baseline.json new file mode 100644 index 0000000000..2ef56176b8 --- /dev/null +++ b/vcpkg-custom/registry/versions/baseline.json @@ -0,0 +1,7 @@ +{ + "2023-08-23": { + "libcxx": { + "baseline": "13.0.1" + } + } +} diff --git a/vcpkg-custom/registry/versions/l-/libcxx.json b/vcpkg-custom/registry/versions/l-/libcxx.json new file mode 100644 index 0000000000..803468b733 --- /dev/null +++ b/vcpkg-custom/registry/versions/l-/libcxx.json @@ -0,0 +1,8 @@ +{ + "versions": [ + { + "version": "13.0.1", + "path": "$/ports/libcxx/13.0.1_0" + } + ] +} diff --git a/vcpkg-custom/triplets/fb-arm64-osx.cmake b/vcpkg-custom/triplets/fb-arm64-osx.cmake new file mode 100644 index 0000000000..aa4d2e7484 --- /dev/null +++ b/vcpkg-custom/triplets/fb-arm64-osx.cmake @@ -0,0 +1,10 @@ +set(VCPKG_TARGET_ARCHITECTURE arm64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) + +set(VCPKG_CMAKE_SYSTEM_NAME Darwin) +set(VCPKG_OSX_ARCHITECTURES arm64) + +if(PORT STREQUAL "icu") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() diff --git a/vcpkg-custom/triplets/fb-x64-osx.cmake b/vcpkg-custom/triplets/fb-x64-osx.cmake new file mode 100644 index 0000000000..278f144408 --- /dev/null +++ b/vcpkg-custom/triplets/fb-x64-osx.cmake @@ -0,0 +1,10 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) + +set(VCPKG_CMAKE_SYSTEM_NAME Darwin) +set(VCPKG_OSX_ARCHITECTURES x86_64) + +if(PORT STREQUAL "icu") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 0000000000..a395f577e1 --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "firebird", + "version-string": "5.0.0", + "dependencies": [ + "icu", + "libcxx" + ], + "overrides": [ + { + "name": "icu", + "version": "71.1" + }, + { + "name": "libcxx", + "version": "13.0.1" + } + ] +}