Skip to content

Commit

Permalink
Fix posixpath import
Browse files Browse the repository at this point in the history
  • Loading branch information
ViliusSutkus89 committed Jun 16, 2024
1 parent af2da51 commit 5a28720
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions recipes/libiconv/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import os
import posixpath

from conan import ConanFile
from conan.tools.apple import fix_apple_shared_install_name
from conan.tools.build import cross_building
Expand All @@ -16,7 +19,6 @@
from conan.tools.layout import basic_layout
from conan.tools.microsoft import is_msvc, unix_path
from conan.tools.scm import Version
import os

required_conan_version = ">=1.54.0"

Expand Down Expand Up @@ -152,21 +154,21 @@ def generate(self):
# using posixpath, not os path,
# because NDK on Windows is problematic with backslashes

toolchain = os.posixpath.join(android_ndk_home, "toolchains", "llvm", "prebuilt", build_machine, "bin")
toolchain = posixpath.join(android_ndk_home, "toolchains", "llvm", "prebuilt", build_machine, "bin")

if self.settings_build.os == "Windows":
executable_suffix = ".exe"
else:
executable_suffix = ""

env.define("AR", os.posixpath.join(toolchain, "llvm-ar" + executable_suffix))
env.define("AS", os.posixpath.join(toolchain, "llvm-as" + executable_suffix))
env.define("RANLIB", os.posixpath.join(toolchain, "llvm-ranlib" + executable_suffix))
env.define("CC", os.posixpath.join(toolchain, "{}{}-clang".format(target_host_triple, api_level)))
env.define("CXX", os.posixpath.join(toolchain, "{}{}-clang++".format(target_host_triple, api_level)))
env.define("LD", os.posixpath.join(toolchain, "ld" + executable_suffix))
env.define("STRIP", os.posixpath.join(toolchain, "llvm-strip" + executable_suffix))
print("[CC]: {}".format(os.posixpath.join(toolchain, "{}{}-clang".format(target_host_triple, api_level))))
env.define("AR", posixpath.join(toolchain, "llvm-ar" + executable_suffix))
env.define("AS", posixpath.join(toolchain, "llvm-as" + executable_suffix))
env.define("RANLIB", posixpath.join(toolchain, "llvm-ranlib" + executable_suffix))
env.define("CC", posixpath.join(toolchain, "{}{}-clang".format(target_host_triple, api_level)))
env.define("CXX", posixpath.join(toolchain, "{}{}-clang++".format(target_host_triple, api_level)))
env.define("LD", posixpath.join(toolchain, "ld" + executable_suffix))
env.define("STRIP", posixpath.join(toolchain, "llvm-strip" + executable_suffix))
print("[CC]: {}".format(posixpath.join(toolchain, "{}{}-clang".format(target_host_triple, api_level))))
tc.generate(env)

def _apply_resource_patch(self):
Expand Down

0 comments on commit 5a28720

Please sign in to comment.