From 198a391bbd70d8308c8a7f5847442ce97cf815cd Mon Sep 17 00:00:00 2001 From: Ansh Dadwal Date: Sat, 16 Mar 2024 18:29:39 +0530 Subject: [PATCH] recipes: add new `materialyoucolor` recipe --- .ci/rebuild_updated_recipes.py | 7 +++++++ README.md | 4 ++++ kivy_ios/recipes/hostopenssl/__init__.py | 4 ++++ kivy_ios/recipes/kivy/__init__.py | 4 ++++ kivy_ios/recipes/libffi/__init__.py | 4 ++++ kivy_ios/recipes/materialyoucolor/__init__.py | 9 +++++++++ kivy_ios/recipes/openssl/__init__.py | 4 ++++ kivy_ios/recipes/python3/__init__.py | 4 ++++ kivy_ios/recipes/sdl2/__init__.py | 4 ++++ kivy_ios/recipes/sdl2_image/__init__.py | 4 ++++ kivy_ios/recipes/sdl2_mixer/__init__.py | 4 ++++ kivy_ios/recipes/sdl2_ttf/__init__.py | 4 ++++ kivy_ios/toolchain.py | 5 +++++ kivy_ios/tools/cpplink | 5 +++++ kivy_ios/tools/liblink | 5 +++++ 15 files changed, 71 insertions(+) create mode 100644 kivy_ios/recipes/materialyoucolor/__init__.py diff --git a/.ci/rebuild_updated_recipes.py b/.ci/rebuild_updated_recipes.py index 7b2bb227..f2b63363 100644 --- a/.ci/rebuild_updated_recipes.py +++ b/.ci/rebuild_updated_recipes.py @@ -22,10 +22,17 @@ def modified_recipes(branch="origin/master"): # with a bunch of fixes, e.g. disabled TTY, see: # https://stackoverflow.com/a/20128598/185510 sh.contrib.git.fetch("origin", "master") +<<<<<<< HEAD git_diff = sh.contrib.git.diff("--name-only", "--diff-filter=d", branch).split("\n") recipes = set() for file_path in git_diff: if fnmatch(file_path, "kivy_ios/recipes/*/__init__.py"): +======= + git_diff = sh.contrib.git.diff("--name-only", "--diff-filter=d", branch) + recipes = set() + for file_path in git_diff: + if fnmatch(file_path, "kivy_ios/recipes/*/__init__.py\n"): +>>>>>>> 780cb9f (recipes: add new `materialyoucolor` recipe) recipe = file_path.split("/")[2] recipes.add(recipe) return recipes diff --git a/README.md b/README.md index 988430c2..9ba39301 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,11 @@ ![PyPI - Version](https://img.shields.io/pypi/v/kivy-ios) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/kivy-ios) +<<<<<<< HEAD [![kivy-ios](https://github.com/kivy/kivy-ios/actions/workflows/kivy_ios.yml/badge.svg)](https://github.com/kivy/kivy-ios/actions/workflows/kivy_ios.yml) +======= +[![kivy-ios](https://github.com/kivy/kivy-ios/workflows/kivy-ios/badge.svg)](https://github.com/kivy/kivy-ios/actions?query=workflow%3Akivy-ios) +>>>>>>> 780cb9f (recipes: add new `materialyoucolor` recipe) Kivy for iOS (kivy-ios) is a toolchain to compile the necessary libraries for [iOS](https://www.apple.com/ios/) to run [Kivy](https://kivy.org) applications, diff --git a/kivy_ios/recipes/hostopenssl/__init__.py b/kivy_ios/recipes/hostopenssl/__init__.py index 2d48ee06..824fe3de 100644 --- a/kivy_ios/recipes/hostopenssl/__init__.py +++ b/kivy_ios/recipes/hostopenssl/__init__.py @@ -10,7 +10,11 @@ class HostOpensslRecipe(HostRecipe): +<<<<<<< HEAD version = "1.1.1w" +======= + version = "1.1.1l" +>>>>>>> 780cb9f (recipes: add new `materialyoucolor` recipe) url = "http://www.openssl.org/source/openssl-{version}.tar.gz" def get_build_env(self): diff --git a/kivy_ios/recipes/kivy/__init__.py b/kivy_ios/recipes/kivy/__init__.py index 0b314df0..3848021c 100644 --- a/kivy_ios/recipes/kivy/__init__.py +++ b/kivy_ios/recipes/kivy/__init__.py @@ -7,7 +7,11 @@ class KivyRecipe(CythonRecipe): +<<<<<<< HEAD version = "2.3.0" +======= + version = "2.2.1" +>>>>>>> 780cb9f (recipes: add new `materialyoucolor` recipe) url = "https://github.com/kivy/kivy/archive/{version}.zip" library = "libkivy.a" depends = ["sdl2", "sdl2_image", "sdl2_mixer", "sdl2_ttf", "ios", diff --git a/kivy_ios/recipes/libffi/__init__.py b/kivy_ios/recipes/libffi/__init__.py index 504280b2..f2e251c0 100644 --- a/kivy_ios/recipes/libffi/__init__.py +++ b/kivy_ios/recipes/libffi/__init__.py @@ -30,6 +30,10 @@ def build_platform(self, plat): shprint(sh.xcodebuild, self.ctx.concurrent_xcodebuild, "ONLY_ACTIVE_ARCH=NO", "ARCHS={}".format(plat.arch), +<<<<<<< HEAD +======= + "BITCODE_GENERATION_MODE=bitcode", +>>>>>>> 780cb9f (recipes: add new `materialyoucolor` recipe) "-sdk", plat.sdk, "-project", "libffi.xcodeproj", "-target", "libffi-iOS", diff --git a/kivy_ios/recipes/materialyoucolor/__init__.py b/kivy_ios/recipes/materialyoucolor/__init__.py new file mode 100644 index 00000000..4a16a2ff --- /dev/null +++ b/kivy_ios/recipes/materialyoucolor/__init__.py @@ -0,0 +1,9 @@ +from kivy_ios.toolchain import PythonRecipe + + +class MaterialYouColorRecipe(PythonRecipe): + version = "2.0.7" + url = "https://github.com/T-Dynamos/materialyoucolor-pyhton/archive/refs/tags/v{version}.tar.gz" + + +recipe = MaterialYouColorRecipe() diff --git a/kivy_ios/recipes/openssl/__init__.py b/kivy_ios/recipes/openssl/__init__.py index 62dd2e00..b64c9e3d 100644 --- a/kivy_ios/recipes/openssl/__init__.py +++ b/kivy_ios/recipes/openssl/__init__.py @@ -11,7 +11,11 @@ class OpensslRecipe(Recipe): +<<<<<<< HEAD version = "1.1.1w" +======= + version = "1.1.1l" +>>>>>>> 780cb9f (recipes: add new `materialyoucolor` recipe) url = "http://www.openssl.org/source/openssl-{version}.tar.gz" libraries = ["libssl.a", "libcrypto.a"] include_dir = "include" diff --git a/kivy_ios/recipes/python3/__init__.py b/kivy_ios/recipes/python3/__init__.py index 47e78066..9f2632cf 100644 --- a/kivy_ios/recipes/python3/__init__.py +++ b/kivy_ios/recipes/python3/__init__.py @@ -56,7 +56,11 @@ def build_platform(self, plat): shprint(configure, "CC={}".format(build_env["CC"]), "LD={}".format(build_env["LD"]), +<<<<<<< HEAD "CFLAGS={}".format(build_env["CFLAGS"]), +======= + "CFLAGS={}".format(build_env["CFLAGS"].replace("-fembed-bitcode", "")), +>>>>>>> 780cb9f (recipes: add new `materialyoucolor` recipe) "LDFLAGS={} -undefined dynamic_lookup".format(build_env["LDFLAGS"]), "ac_cv_file__dev_ptmx=yes", "ac_cv_file__dev_ptc=no", diff --git a/kivy_ios/recipes/sdl2/__init__.py b/kivy_ios/recipes/sdl2/__init__.py index 3e34611d..fb306958 100644 --- a/kivy_ios/recipes/sdl2/__init__.py +++ b/kivy_ios/recipes/sdl2/__init__.py @@ -24,6 +24,10 @@ def build_platform(self, plat): shprint(sh.xcodebuild, self.ctx.concurrent_xcodebuild, "ONLY_ACTIVE_ARCH=NO", "ARCHS={}".format(plat.arch), +<<<<<<< HEAD +======= + "BITCODE_GENERATION_MODE=bitcode", +>>>>>>> 780cb9f (recipes: add new `materialyoucolor` recipe) "CC={}".format(env['CC']), "-sdk", plat.sdk, "-project", "Xcode/SDL/SDL.xcodeproj", diff --git a/kivy_ios/recipes/sdl2_image/__init__.py b/kivy_ios/recipes/sdl2_image/__init__.py index be4c3579..33b1ce26 100644 --- a/kivy_ios/recipes/sdl2_image/__init__.py +++ b/kivy_ios/recipes/sdl2_image/__init__.py @@ -15,6 +15,10 @@ def build_platform(self, plat): shprint(sh.xcodebuild, self.ctx.concurrent_xcodebuild, "ONLY_ACTIVE_ARCH=NO", "ARCHS={}".format(plat.arch), +<<<<<<< HEAD +======= + "BITCODE_GENERATION_MODE=bitcode", +>>>>>>> 780cb9f (recipes: add new `materialyoucolor` recipe) "HEADER_SEARCH_PATHS={}".format( join(self.ctx.include_dir, "common", "sdl2")), "-sdk", plat.sdk, diff --git a/kivy_ios/recipes/sdl2_mixer/__init__.py b/kivy_ios/recipes/sdl2_mixer/__init__.py index 1b27bdc2..722a86be 100644 --- a/kivy_ios/recipes/sdl2_mixer/__init__.py +++ b/kivy_ios/recipes/sdl2_mixer/__init__.py @@ -18,6 +18,10 @@ def build_platform(self, plat): shprint(sh.xcodebuild, self.ctx.concurrent_xcodebuild, "ONLY_ACTIVE_ARCH=NO", "ARCHS={}".format(plat.arch), +<<<<<<< HEAD +======= + "BITCODE_GENERATION_MODE=bitcode", +>>>>>>> 780cb9f (recipes: add new `materialyoucolor` recipe) "HEADER_SEARCH_PATHS=$HEADER_SEARCH_PATHS /usr/include/machine {} ".format(" ".join(plat.include_dirs)), "-sdk", plat.sdk, "-project", "Xcode/SDL_mixer.xcodeproj", diff --git a/kivy_ios/recipes/sdl2_ttf/__init__.py b/kivy_ios/recipes/sdl2_ttf/__init__.py index 57c2e6c7..2a70181c 100644 --- a/kivy_ios/recipes/sdl2_ttf/__init__.py +++ b/kivy_ios/recipes/sdl2_ttf/__init__.py @@ -14,6 +14,10 @@ def build_platform(self, plat): shprint(sh.xcodebuild, self.ctx.concurrent_xcodebuild, "ONLY_ACTIVE_ARCH=NO", "ARCHS={}".format(plat.arch), +<<<<<<< HEAD +======= + "BITCODE_GENERATION_MODE=bitcode", +>>>>>>> 780cb9f (recipes: add new `materialyoucolor` recipe) "GENERATE_MASTER_OBJECT_FILE=YES", "HEADER_SEARCH_PATHS={sdl_include_dir} {libpng_include_dir}".format( sdl_include_dir=join(self.ctx.include_dir, "common", "sdl2"), diff --git a/kivy_ios/toolchain.py b/kivy_ios/toolchain.py index cd30b318..3710241f 100755 --- a/kivy_ios/toolchain.py +++ b/kivy_ios/toolchain.py @@ -250,6 +250,11 @@ def noicctempfile(): "-O3", self.version_min, ] + include_dirs) +<<<<<<< HEAD +======= + if self.sdk == "iphoneos": + env["CFLAGS"] += " -fembed-bitcode" +>>>>>>> 780cb9f (recipes: add new `materialyoucolor` recipe) env["LDFLAGS"] = " ".join([ "-arch", self.arch, # "--sysroot", self.sysroot, diff --git a/kivy_ios/tools/cpplink b/kivy_ios/tools/cpplink index e9328e15..fcafc3b0 100755 --- a/kivy_ios/tools/cpplink +++ b/kivy_ios/tools/cpplink @@ -109,6 +109,11 @@ def call_linker(objects, output): raise ValueError("Unsupported SDK: {}".format(sdk)) call = [ld, '-r', '-o', output + '.o', min_version_flag, '9.0', '-arch', arch] +<<<<<<< HEAD +======= + if min_version_flag == "-ios_version_min": + call += ["-bitcode_bundle"] +>>>>>>> 780cb9f (recipes: add new `materialyoucolor` recipe) call += objects print("Linking: {}".format(" ".join(call))) result = subprocess.run(call) diff --git a/kivy_ios/tools/liblink b/kivy_ios/tools/liblink index c48a1456..7fdc43ae 100755 --- a/kivy_ios/tools/liblink +++ b/kivy_ios/tools/liblink @@ -87,6 +87,11 @@ elif sdk == 'iphonesimulator': else: raise ValueError("Unsupported SDK: {}".format(sdk)) call = [ld, '-r', '-o', output + '.o', min_version_flag, '9.0', '-arch', arch] +<<<<<<< HEAD +======= +if min_version_flag == "-ios_version_min": + call += ["-bitcode_bundle"] +>>>>>>> 780cb9f (recipes: add new `materialyoucolor` recipe) call += objects print("Linking: {}".format(" ".join(call))) subprocess.call(call)