Skip to content

Commit

Permalink
recipes: add new materialyoucolor recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
T-Dynamos committed Mar 16, 2024
1 parent b515a04 commit 198a391
Show file tree
Hide file tree
Showing 15 changed files with 71 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .ci/rebuild_updated_recipes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions kivy_ios/recipes/hostopenssl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 4 additions & 0 deletions kivy_ios/recipes/kivy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions kivy_ios/recipes/libffi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 9 additions & 0 deletions kivy_ios/recipes/materialyoucolor/__init__.py
Original file line number Diff line number Diff line change
@@ -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()
4 changes: 4 additions & 0 deletions kivy_ios/recipes/openssl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions kivy_ios/recipes/python3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions kivy_ios/recipes/sdl2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions kivy_ios/recipes/sdl2_image/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions kivy_ios/recipes/sdl2_mixer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions kivy_ios/recipes/sdl2_ttf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
5 changes: 5 additions & 0 deletions kivy_ios/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 5 additions & 0 deletions kivy_ios/tools/cpplink
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions kivy_ios/tools/liblink
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 198a391

Please sign in to comment.