def METHOD_NAME(self):
    for patch in self.conan_data.get("patches", {}).get(self.version, []):
        tools.patch(**patch)
    # Don't build tests and examples (and also tools if Visual Studio)
    to_build = ["src"]
    if self.settings.compiler != "Visual Studio":
        to_build.append("tools")
    tools.replace_in_file(os.path.join(self._source_subfolder, "Makefile.am"),
                          "SUBDIRS = src tools test examples",
                          "SUBDIRS = {}".format(" ".join(to_build)))
    # Honor build type settings and fPIC option
    for subdir in ["src", "tools"]:
        for flag in ["-O3", "-fPIC"]:
            tools.replace_in_file(os.path.join(self._source_subfolder, subdir, "Makefile.am"),
                                  flag, "")