diff --git a/sdk_container/src/third_party/portage-stable/dev-vcs/git/files/git-2.49.0-meson-solaris-override.patch b/sdk_container/src/third_party/portage-stable/dev-vcs/git/files/git-2.49.0-meson-solaris-override.patch new file mode 100644 index 0000000000..7866afd138 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-vcs/git/files/git-2.49.0-meson-solaris-override.patch @@ -0,0 +1,38 @@ +meson.build: hardwire Solaris support + +- need __EXTENSIONS__ in order to use functions like memmem, strlcopy, + etc. +- need __EXTENSIONS__ for NSIG symbol from signal.h too +- define for appropriate missing functions and struct members +- avoid believing sys/sysinfo.h is providing the same as on Linux +- add missing network libraries so we can succeed linking the final + executable + +--- a/meson.build ++++ b/meson.build +@@ -1014,7 +1014,7 @@ + libgit_c_args += '-DHAVE_ALLOCA_H' + endif + +-if compiler.has_header('sys/sysinfo.h') ++if host_machine.system() != 'sunos' and compiler.has_header('sys/sysinfo.h') + libgit_c_args += '-DHAVE_SYSINFO' + endif + +@@ -1250,6 +1250,16 @@ + libgit_sources += 'compat/strlcpy.c' + endif + ++if host_machine.system() == 'sunos' ++ libgit_c_args += '-DNO_HSTRERROR' ++ libgit_c_args += '-DNO_GETPAGESIZE' ++ libgit_c_args += '-DNO_NSEC' ++ libgit_c_args += '-D__EXTENSIONS__' ++ libgit_sources += 'compat/hstrerror.c' ++ libgit_dependencies += compiler.find_library('socket') ++ libgit_dependencies += compiler.find_library('nsl') ++endif ++ + if not compiler.has_function('strdup') + libgit_c_args += '-DOVERRIDE_STRDUP' + libgit_sources += 'compat/strdup.c' diff --git a/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.49.0-r2.ebuild b/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.49.0-r2.ebuild index 1e18108eca..56d25e42ea 100644 --- a/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.49.0-r2.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.49.0-r2.ebuild @@ -197,6 +197,15 @@ src_prepare() { ) fi + if [[ ${CHOST} == *-solaris* ]] ; then + # meson.build doesn't carry any Solaris logic, and "sees" + # functions that are not available by default, provide backup + # definitions to match autoconf/Makefile + PATCHES+=( + "${FILESDIR}"/${PN}-2.49.0-meson-solaris-override.patch + ) + fi + default }