def METHOD_NAME(self, arch):
    super().METHOD_NAME(arch)
    patch_mark = join(self.get_build_dir(arch.arch), '.protobuf-patched')
    if self.ctx.python_recipe.name == 'python3' and not exists(patch_mark):
        self.apply_patch('fix-python3-compatibility.patch', arch.arch)
        touch(patch_mark)
    # During building, host needs to transpile .proto files to .py
    # ideally with the same version as protobuf runtime, or with an older one.
    # Because protoc is compiled for target (i.e. Android), we need an other binary
    # which can be run by host.
    # To make it easier, we download prebuild protoc binary adapted to the platform
    info_notify("Downloading protoc compiler for your platform")
    url_prefix = "https://github.com/protocolbuffers/protobuf/releases/download/v{version}".format(version=self.version)
    if sys.platform.startswith('linux'):
        info_notify("GNU/Linux detected")
        filename = "protoc-{version}-linux-x86_64.zip".format(version=self.version)
    elif sys.platform.startswith('darwin'):
        info_notify("Mac OS X detected")
        filename = "protoc-{version}-osx-x86_64.zip".format(version=self.version)
    else:
        info_notify("Your platform is not supported, but recipe can still "
                    "be built if you have a valid protoc (<={version}) in "
                    "your path".format(version=self.version))
        return
    protoc_url = join(url_prefix, filename)
    self.protoc_dir = join(self.ctx.build_dir, "tools", "protoc")
    if os.path.exists(join(self.protoc_dir, "bin", "protoc")):
        info_notify("protoc found, no download needed")
        return
    try:
        os.makedirs(self.protoc_dir)
    except OSError as e:
        # if dir already exists (errno 17), we ignore the error
        if e.errno != 17:
            raise e
    info_notify("Will download into {dest_dir}".format(dest_dir=self.protoc_dir))
    self.download_file(protoc_url, join(self.protoc_dir, filename))
    with current_directory(self.protoc_dir):
        shprint(sh.unzip, join(self.protoc_dir, filename))