summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyan <cyjan@mrcyjanek.net>2024-11-15 15:33:07 +0000
committercyan <cyjan@mrcyjanek.net>2024-11-15 15:33:07 +0000
commit24eb7ea455b80b564453aa5f4be7a5eee603bb96 (patch)
tree789c1cc76e4fac1823da0761420451a645e10646
parentd8fdddcc3f96eaaf3216b65e36b940b0bbcb7d10 (diff)
fixes to darwin
-rw-r--r--.github/workflows/dependencies_matches.yaml15
-rw-r--r--contrib/depends/packages/boost.mk2
-rw-r--r--contrib/depends/packages/darwin_sdk.mk5
-rw-r--r--contrib/depends/patches/boost/fix_io_control_hpp.patch11
-rw-r--r--contrib/depends/patches/darwin_sdk/fix_missing_definitions.patch18
5 files changed, 39 insertions, 12 deletions
diff --git a/.github/workflows/dependencies_matches.yaml b/.github/workflows/dependencies_matches.yaml
index 5552539..84b9ad5 100644
--- a/.github/workflows/dependencies_matches.yaml
+++ b/.github/workflows/dependencies_matches.yaml
@@ -39,25 +39,16 @@ jobs:
exit 1
fi
polyseed:
- strategy:
- matrix:
- coin: [monero, wownero]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- - name: Patch sources
- run: |
- git config --global --add safe.directory '*'
- git config --global user.email "ci@mrcyjanek.net"
- git config --global user.name "CI mrcyjanek.net"
- ./apply_patches.sh ${{ matrix.coin }}
- name: prepare
run: |
set -x
- pushd ${{ matrix.coin }}/contrib/depends
+ pushd contrib/depends
make download # sorry, this is the easiest way
mkdir sources/polyseed
pushd sources/polyseed
@@ -66,9 +57,9 @@ jobs:
popd
- name: diff
run: |
- OUTPUT=$(diff -ra external/polyseed ${{ matrix.coin }}/contrib/depends/sources/polyseed/* | grep -v .git | wc -l)
+ OUTPUT=$(diff -ra external/polyseed contrib/depends/sources/polyseed/* | grep -v .git | wc -l)
if [[ ! "x$OUTPUT" == "x0" ]];
then
- diff -ra external/polyseed ${{ matrix.coin }}/contrib/depends/sources/polyseed/*
+ diff -ra external/polyseed contrib/depends/sources/polyseed/*
exit 1
fi
diff --git a/contrib/depends/packages/boost.mk b/contrib/depends/packages/boost.mk
index e2ee239..e5e45ff 100644
--- a/contrib/depends/packages/boost.mk
+++ b/contrib/depends/packages/boost.mk
@@ -4,6 +4,7 @@ $(package)_download_path=https://downloads.sourceforge.net/project/boost/boost/1
$(package)_file_name=$(package)_$($(package)_version).tar.bz2
$(package)_sha256_hash=cc4b893acf645c9d4b698e9a0f08ca8846aa5d6c68275c14c3e7949c24109454
$(package)_dependencies=libiconv
+$(package)_patches=fix_io_control_hpp.patch
define $(package)_set_vars
$(package)_config_opts_release=variant=release
@@ -29,6 +30,7 @@ $(package)_cxxflags_android=-fPIC
endef
define $(package)_preprocess_cmds
+ patch -p1 < $($(package)_patch_dir)/fix_io_control_hpp.patch &&\
echo "using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$(boost_archiver_$(host_os))\" <arflags>\"$($(package)_arflags)\" <striper>\"$(host_STRIP)\" <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam
endef
diff --git a/contrib/depends/packages/darwin_sdk.mk b/contrib/depends/packages/darwin_sdk.mk
index d639c42..6812179 100644
--- a/contrib/depends/packages/darwin_sdk.mk
+++ b/contrib/depends/packages/darwin_sdk.mk
@@ -3,6 +3,11 @@ $(package)_version=11.1
$(package)_download_path=https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/
$(package)_file_name=MacOSX$($(package)_version).sdk.tar.xz
$(package)_sha256_hash=68797baaacb52f56f713400de306a58a7ca00b05c3dc6d58f0a8283bcac721f8
+$(package)_patches=fix_missing_definitions.patch
+
+define $(package)_preprocess_cmds
+ patch -p1 < $($(package)_patch_dir)/fix_missing_definitions.patch
+endef
define $(package)_stage_cmds
mkdir -p $($(package)_staging_dir)/$(host_prefix)/native/SDK &&\
diff --git a/contrib/depends/patches/boost/fix_io_control_hpp.patch b/contrib/depends/patches/boost/fix_io_control_hpp.patch
new file mode 100644
index 0000000..259a565
--- /dev/null
+++ b/contrib/depends/patches/boost/fix_io_control_hpp.patch
@@ -0,0 +1,11 @@
+--- boost_1_84_0/boost/asio/detail/io_control.hpp.O 2017-04-17 03:22:26.000000000 +0100
++++ boost_1_84_0/boost/asio/detail/io_control.hpp 2019-11-15 15:46:16.957937137 +0000
+@@ -243,6 +243,9 @@
+ # pragma once
+ #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
++#ifdef APPLE
++#include <netinet/in.h>
++#endif
+ #include <boost/asio/detail/config.hpp>
+ #include <cstddef>
diff --git a/contrib/depends/patches/darwin_sdk/fix_missing_definitions.patch b/contrib/depends/patches/darwin_sdk/fix_missing_definitions.patch
new file mode 100644
index 0000000..6a346ca
--- /dev/null
+++ b/contrib/depends/patches/darwin_sdk/fix_missing_definitions.patch
@@ -0,0 +1,18 @@
+--- a/usr/include/sys/ucred.h 2024-11-15 15:03:31.037756112 +0000
++++ b/usr/include/sys/ucred.h 2024-11-15 15:03:35.337755945 +0000
+@@ -70,6 +70,15 @@
+ #ifndef _SYS_UCRED_H_
+ #define _SYS_UCRED_H_
+
++#ifndef u_int
++typedef unsigned int u_int;
++#endif
++#ifndef u_char
++typedef unsigned char u_char;
++#endif
++#ifndef u_short
++typedef unsigned short u_short;
++#endif
+ #include <sys/appleapiopts.h>
+ #include <sys/cdefs.h>
+ #include <sys/param.h> \ No newline at end of file