Skip to content

Commit

Permalink
removing dead code, replaced by comment
Browse files Browse the repository at this point in the history
  • Loading branch information
memsharded committed Jul 28, 2024
1 parent ea58d41 commit d912f91
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions recipes/libphonenumber/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class LibphonenumberConan(ConanFile):
"use_lite_metadata": [True, False],
"use_posix_thread": [True, False],
"use_std_mutex": [True, False],
#re2 is not an option, because using it crashes
}
default_options = {
"shared": False,
Expand Down Expand Up @@ -117,7 +118,7 @@ def generate(self):
tc.variables["USE_LITE_METADATA"] = self.options.use_lite_metadata
tc.variables["USE_POSIX_THREAD"] = self.options.get_safe("use_posix_thread", False)
tc.variables["USE_PROTOBUF_LITE"] = self.dependencies["protobuf"].options.lite
tc.variables["USE_RE2"] = False
tc.variables["USE_RE2"] = False # Hardcoded, attempt to use it crashed
tc.variables["USE_STDMUTEX"] = self.options.use_std_mutex
tc.variables["BUILD_TESTING"] = False
tc.variables["BUILD_TOOLS_ONLY"] = False
Expand All @@ -134,20 +135,8 @@ def generate(self):
deps.generate()

def _patch_sources(self):
replace_in_file(self, os.path.join(self.source_folder, "cpp", "CMakeLists.txt"),
"find_package(absl)", "find_package(absl REQUIRED)")
# Not used yet, because package will not work in Windows/msvc, but at least this managed to get
# pass the configure stage (then fails in build step because dirent.h not found)
if is_msvc(self): # In Windows the lib is called differently
replace_in_file(self, os.path.join(self.source_folder, "cpp", "CMakeLists.txt"),
"find_required_library (PROTOBUF google/protobuf/message_lite.h protobuf",
"find_required_library (PROTOBUF google/protobuf/message_lite.h libprotobuf")
replace_in_file(self, os.path.join(self.source_folder, "cpp", "CMakeLists.txt"),
"find_required_library (ICU_UC unicode/uchar.h icuuc",
"find_required_library (ICU_UC unicode/uchar.h sicuuc")
replace_in_file(self, os.path.join(self.source_folder, "cpp", "CMakeLists.txt"),
"find_required_library (ICU_I18N unicode/regex.h icui18n",
"find_required_library (ICU_I18N unicode/regex.h sicuin")
# (failed) attempt to make it work in windows/msvc, patching some build scripts
# https://github.com/conan-io/conan-center-index/pull/23689/commits/c5e7091d134174fb590218ed066c074f45274a93
replace_in_file(self, os.path.join(self.source_folder, "cpp", "CMakeLists.txt"), " -Werror", "")

def build(self):
Expand Down

0 comments on commit d912f91

Please sign in to comment.