diff options
author | snermolaev <snermolaev@yandex-team.com> | 2023-11-17 06:58:50 +0300 |
---|---|---|
committer | snermolaev <snermolaev@yandex-team.com> | 2023-11-17 07:26:08 +0300 |
commit | ef05dd5da576f90723bf75661c1efcabd9b6a3fd (patch) | |
tree | 7a40e460b01ba8012c883fad9827272d19edc575 /contrib | |
parent | 32b5c7f0dc79d7273495e0c99ca3d740c6bd3692 (diff) | |
download | ydb-ef05dd5da576f90723bf75661c1efcabd9b6a3fd.tar.gz |
suport for use of local libaio, libiconv, libidn
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/libs/libaio/ya.make | 18 | ||||
-rw-r--r-- | contrib/libs/libiconv/ya.make | 56 | ||||
-rw-r--r-- | contrib/libs/libidn/ya.make | 18 |
3 files changed, 56 insertions, 36 deletions
diff --git a/contrib/libs/libaio/ya.make b/contrib/libs/libaio/ya.make index 1c3137f630..37000691cd 100644 --- a/contrib/libs/libaio/ya.make +++ b/contrib/libs/libaio/ya.make @@ -1,5 +1,7 @@ # Generated by devtools/yamaker from nixpkgs 22.05. +DEFAULT(USE_AIO ${_USE_AIO}) + LIBRARY() WITHOUT_LICENSE_TEXTS() @@ -17,10 +19,14 @@ IF (EXPORT_CMAKE) CMAKE_TARGET AIO::aio ) -ELSEIF (USE_DYNAMIC_AIO) +ELSEIF (USE_AIO == "dynamic") PEERDIR( contrib/libs/libaio/dynamic ) +ELSEIF (USE_AIO == "local") + GLOBAL_CFLAGS(${USE_LOCAL_AIO_CFLAGS}) + DEFAULT(USE_LOCAL_AIO_LDFLAGS -laio) + LDFLAGS(${USE_LOCAL_AIO_LDFLAGS}) ELSE() PEERDIR( contrib/libs/libaio/static @@ -29,7 +35,9 @@ ENDIF() END() -RECURSE( - dynamic - static -) +IF (USE_AIO != "local") + RECURSE( + dynamic + static + ) +ENDIF() diff --git a/contrib/libs/libiconv/ya.make b/contrib/libs/libiconv/ya.make index f8e7fdce5c..629f048083 100644 --- a/contrib/libs/libiconv/ya.make +++ b/contrib/libs/libiconv/ya.make @@ -8,35 +8,39 @@ WITHOUT_LICENSE_TEXTS() NO_RUNTIME() -IF (OS_WINDOWS) - OPENSOURCE_EXPORT_REPLACEMENT( - CMAKE - Iconv - CMAKE_TARGET - Iconv::Iconv - CONAN - libiconv/1.15 - CONAN_OPTIONS - libiconv:shared=True - ) -ELSE() - # Opensource code is compatible with libc provided iconv API on major linux distributions and macos. - # * We prefere to avoid vendoring LGPL libraries in our opensouce project - # * Major distributions do not provide GNU libiconv as separate package - # * Shared lib dependencies from conan overcomplicate final artefacts distribution - DISABLE(OPENSOURCE_EXPORT) -ENDIF() - -IF (NOT EXPORT_CMAKE) - IF (USE_DYNAMIC_ICONV) - PEERDIR( - contrib/libs/libiconv/dynamic +DEFAULT(USE_ICONV ${_USE_ICONV}) + +IF (EXPORT_CMAKE) + IF (OS_WINDOWS) + OPENSOURCE_EXPORT_REPLACEMENT( + CMAKE + Iconv + CMAKE_TARGET + Iconv::Iconv + CONAN + libiconv/1.15 + CONAN_OPTIONS + libiconv:shared=True ) ELSE() - PEERDIR( - contrib/libs/libiconv/static - ) + # Opensource code is compatible with libc provided iconv API on major linux distributions and macos. + # * We prefere to avoid vendoring LGPL libraries in our opensouce project + # * Major distributions do not provide GNU libiconv as separate package + # * Shared lib dependencies from conan overcomplicate final artefacts distribution + DISABLE(OPENSOURCE_EXPORT) ENDIF() +ELSEIF (USE_ICONV == "dynamic") + PEERDIR( + contrib/libs/libiconv/dynamic + ) +ELSEIF (USE_ICONV == "local") + GLOBAL_CFLAGS(${USE_LOCAL_ICONV_CFLAGS}) + + # Opensource code is compatible with libc provided iconv API on major linux distributions and macos. +ELSE() + PEERDIR( + contrib/libs/libiconv/static + ) ENDIF() END() diff --git a/contrib/libs/libidn/ya.make b/contrib/libs/libidn/ya.make index 1685231bbc..9eaf83a4ba 100644 --- a/contrib/libs/libidn/ya.make +++ b/contrib/libs/libidn/ya.make @@ -1,5 +1,7 @@ # Generated by devtools/yamaker from nixpkgs 22.05. +DEFAULT(USE_IDN ${_USE_IDN}) + LIBRARY() WITHOUT_LICENSE_TEXTS() @@ -19,10 +21,14 @@ IF (EXPORT_CMAKE) CMAKE_TARGET IDN::IDN ) -ELSEIF (USE_DYNAMIC_IDN) +ELSEIF (USE_IDN == "dynamic") PEERDIR( contrib/libs/libidn/dynamic ) +ELSEIF (USE_IDN == "local") + GLOBAL_CFLAGS(${USE_LOCAL_IDN_CFLAGS}) + DEFAULT(USE_LOCAL_IDN_LDFLAGS -lidn) + LDFLAGS(${USE_LOCAL_IDN_LDFLAGS}) ELSE() PEERDIR( contrib/libs/libidn/static @@ -31,7 +37,9 @@ ENDIF() END() -RECURSE( - dynamic - static -) +IF (USE_IDN != "local") + RECURSE( + dynamic + static + ) +ENDIF() |