aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cctz/.yandex_meta/__init__.py
blob: 901dd7bc292bc81c8a57fa86e5e2dfe0df9fe351 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from devtools.yamaker.fileutil import subcopy
from devtools.yamaker.modules import Linkable, Switch, Words
from devtools.yamaker.project import NixProject


def cctz_post_build(self):
    # Copy tests preserving the previous layout.
    subcopy(self.srcdir + "/src", self.dstdir + "/test", ["*_test.cc"])


def cctz_post_install(self):
    with self.yamakes["."] as m:
        # Support Darwin.
        m.after(
            "LDFLAGS",
            Switch(OS_DARWIN=Linkable(LDFLAGS=[Words("-framework", "CoreFoundation")])),
        )
        # Recurse to manual ya.make's.
        m.RECURSE |= {"test", "tzdata"}


cctz = NixProject(
    owners=["dfyz", "petrk"],
    arcdir="contrib/libs/cctz",
    nixattr="cctz",
    keep_paths=["README", "test/ya.make", "tzdata/"],
    install_targets=["cctz"],
    addincl_global={".": {"./include"}},
    post_build=cctz_post_build,
    post_install=cctz_post_install,
)