Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
PolyakovKirill committed Nov 20, 2024
1 parent e637b47 commit a1a6e6c
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions Common/3dParty/apple/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@

if not base.is_dir("glm"):
base.cmd("git", ["clone", "https://github.com/g-truc/glm.git"])
base.cmd_in_dir("glm", "git", ["checkout", "33b4a621a697a305bc3a7610d290677b96beb181"])
base.cmd_in_dir("glm", "git", ["checkout", "33b4a621a697a305bc3a7610d290677b96beb181", "--quiet"])

if not base.is_dir("mdds"):
base.cmd("git", ["clone", "https://github.com/kohei-us/mdds.git"])
base.cmd_in_dir("mdds", "git", ["checkout", "0783158939c6ce4b0b1b89e345ab983ccb0f0ad0"])
base.cmd_in_dir("mdds", "git", ["checkout", "0783158939c6ce4b0b1b89e345ab983ccb0f0ad0"], "--quiet")

#the linux code uses an implementation for c++ 17, so we just put this implementation
if ("linux" == base.host_platform()):
base.replaceInFile("./mdds/include/mdds/global.hpp", "namespace mdds {", "namespace std { template<bool __v> using bool_constant = integral_constant<bool, __v>; }\n\nnamespace mdds {")

if not base.is_dir("librevenge"):
base.cmd("git", ["clone", "https://github.com/Distrotech/librevenge.git"])
base.cmd_in_dir("librevenge", "git", ["checkout", "becd044b519ab83893ad6398e3cbb499a7f0aaf4"])
base.cmd_in_dir("librevenge", "git", ["checkout", "becd044b519ab83893ad6398e3cbb499a7f0aaf4", "--quiet"])

stat_windows = ""
stat_windows += "#if !defined(S_ISREG) && defined(S_IFMT) && defined(S_IFREG)\n"
Expand All @@ -32,15 +32,22 @@

if not base.is_dir("libodfgen"):
base.cmd("git", ["clone", "https://github.com/Distrotech/libodfgen.git"])
base.cmd_in_dir("libodfgen", "git", ["checkout", "8ef8c171ebe3c5daebdce80ee422cf7bb96aa3bc"])
base.cmd_in_dir("libodfgen", "git", ["checkout", "8ef8c171ebe3c5daebdce80ee422cf7bb96aa3bc", "--quiet"])

if not base.is_dir("libetonyek"):
base.cmd("git", ["clone", "https://github.com/LibreOffice/libetonyek.git"])
base.cmd_in_dir("libetonyek", "git", ["checkout", "cb396b4a9453a457469b62a740d8fb933c9442c3"])
base.cmd_in_dir("libetonyek", "git", ["checkout", "cb396b4a9453a457469b62a740d8fb933c9442c3", "--quiet"])

base.replaceInFile("./libetonyek/src/lib/IWORKTable.cpp", "is_tree_valid", "valid_tree")

if len(sys.argv) > 1 and "true" == sys.argv[1].lower():
cmd_args = sys.argv[1:]
use_gperf = False

for arg in cmd_args:
if '--gperf' == arg:
use_gperf = True

if use_gperf:
base_gperf_args = ["--compare-strncmp", "--enum", "--null-strings", "--readonly-tables", "--language", "C++"]
base_gperf_files = ["IWORKToken.gperf", "KEY1Token.gperf", "KEY2Token.gperf", "NUM1Token.gperf", "PAG1Token.gperf"]

Expand Down

0 comments on commit a1a6e6c

Please sign in to comment.