Compare commits
4 commits
master
...
iphonesimu
Author | SHA1 | Date | |
---|---|---|---|
|
da3262ed93 | ||
|
d0f2810c6d | ||
|
d6919ca667 | ||
|
60b3c202ec |
4602 changed files with 319685 additions and 9663 deletions
.ci
.github
.gitignoreCHANGELOG.mdLICENSEMakefileREADME.mdREADME.rstkivy_ios.egg-info
kivy_ios
context_managers.py
recipes
aiohttp
aioupnp
appdirs
asn1crypto
async-timeout
attrs
audiostream
base58
certifi
cffi
chardet
click
coincurve
__init__.pycross_compile.patchdrop_setup_requires.patchfind_lib.patchno-download.patchsetup.py.patch
colorama
cryptography
curly
cymunk
defusedxml
docopt
ecdsa
ffmpeg
ffpyplayer
flask
freetype
hachoir
host_cffi
host_setuptools
host_setuptools3
hostlibffi
__init__.pyfix-win32-unreferenced-symbol.patchgenerate-darwin-source-and-headers-python3-items.patchlibffi-xcode10.patchpublic_include.patchstaticlib.patchstaticlib2.patch
hostopenssl
hostpython.pyhostpython3
idna
ios
ipaddress
itsdangerous
jinja2
jsonschema
keyring
kivent_core
kivy
lbry
libcurl
libffi
__init__.pyffi-3.0.13-sysv.S.patchfix-win32-unreferenced-symbol.patchgenerate-darwin-source-and-headers-python3-items.patch
libjpeg
libpng
libsecp256k1
libzbar
markupsafe
mock
msgpack
multidict
|
@ -1,4 +0,0 @@
|
||||||
BROKEN_RECIPES = set()
|
|
||||||
|
|
||||||
# recipes that were already built will be skipped
|
|
||||||
CORE_RECIPES = set(["kivy", "hostpython3", "python3"])
|
|
|
@ -1,48 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
"""
|
|
||||||
Continuous Integration helper script.
|
|
||||||
Automatically detects recipes modified in a changeset (compares with master)
|
|
||||||
and recompiles them.
|
|
||||||
|
|
||||||
Current limitations:
|
|
||||||
- will fail on conflicting requirements
|
|
||||||
"""
|
|
||||||
import sh
|
|
||||||
import subprocess
|
|
||||||
from fnmatch import fnmatch
|
|
||||||
from constants import CORE_RECIPES, BROKEN_RECIPES
|
|
||||||
|
|
||||||
|
|
||||||
def modified_recipes(branch="origin/master"):
|
|
||||||
"""
|
|
||||||
Returns a set of modified recipes between the current branch and the one
|
|
||||||
in param.
|
|
||||||
"""
|
|
||||||
# using the contrib version on purpose rather than sh.git, since it comes
|
|
||||||
# with a bunch of fixes, e.g. disabled TTY, see:
|
|
||||||
# https://stackoverflow.com/a/20128598/185510
|
|
||||||
sh.contrib.git.fetch("origin", "master")
|
|
||||||
git_diff = sh.contrib.git.diff("--name-only", branch)
|
|
||||||
recipes = set()
|
|
||||||
for file_path in git_diff:
|
|
||||||
if fnmatch(file_path, "kivy_ios/recipes/*/__init__.py\n"):
|
|
||||||
recipe = file_path.split("/")[2]
|
|
||||||
recipes.add(recipe)
|
|
||||||
return recipes
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
recipes = modified_recipes()
|
|
||||||
recipes -= CORE_RECIPES
|
|
||||||
recipes -= BROKEN_RECIPES
|
|
||||||
updated_recipes = " ".join(recipes)
|
|
||||||
if updated_recipes != "":
|
|
||||||
subprocess.run(
|
|
||||||
f"python3 toolchain.py build {updated_recipes}", shell=True, check=True
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
print("Nothing to do. No updated recipes.")
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
main()
|
|
|
@ -1,11 +0,0 @@
|
||||||
|
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -eo pipefail
|
|
||||||
|
|
||||||
python3 toolchain.py create Touchtracer kivy-ci-clone/examples/demo/touchtracer
|
|
||||||
|
|
||||||
xcodebuild -project touchtracer-ios/touchtracer.xcodeproj \
|
|
||||||
-scheme touchtracer \
|
|
||||||
-destination generic/platform=iOS\
|
|
||||||
clean build CODE_SIGNING_ALLOWED=NO | xcpretty
|
|
51
.github/ISSUE_TEMPLATE/bug_report.md
vendored
51
.github/ISSUE_TEMPLATE/bug_report.md
vendored
|
@ -1,51 +0,0 @@
|
||||||
---
|
|
||||||
name: Bug report
|
|
||||||
about: Create a report to help us improve
|
|
||||||
title: ''
|
|
||||||
labels: ''
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
<!--
|
|
||||||
The issue tracker is a tool to address bugs.
|
|
||||||
Please use the Discord community or Stack Overflow for support questions,
|
|
||||||
more information at https://github.com/kivy/kivy-ios#support
|
|
||||||
|
|
||||||
Before opening a new issue, make sure you do the following:
|
|
||||||
* check that your issue isn't already filed: https://github.com/kivy/kivy-ios/issues
|
|
||||||
* prepare a short, runnable example that reproduces the issue
|
|
||||||
* reproduce the problem with the latest development version (`master`)
|
|
||||||
* double-check that the issue is indeed a bug and not a support request
|
|
||||||
* please use backticks to format code or logs
|
|
||||||
-->
|
|
||||||
|
|
||||||
**Versions**
|
|
||||||
|
|
||||||
* Python :
|
|
||||||
* MacOS version :
|
|
||||||
* XCode Version :
|
|
||||||
* Cython version :
|
|
||||||
|
|
||||||
**Describe the bug**
|
|
||||||
// REPLACE ME: A clear and concise description of what the bug is.
|
|
||||||
|
|
||||||
**To Reproduce**
|
|
||||||
// REPLACE ME: Add your `toolchain.py ....` command or a complete explanation of what you did so We can reproduce your error.
|
|
||||||
|
|
||||||
**Expected behavior**
|
|
||||||
// REPLACE ME: A clear and concise description of what you expected to happen.
|
|
||||||
|
|
||||||
**Logs**
|
|
||||||
```
|
|
||||||
// REPLACE ME: Paste the build output containing the error
|
|
||||||
```
|
|
||||||
|
|
||||||
**Screenshots**
|
|
||||||
<!--
|
|
||||||
ONLY for XCode related errors, use the LOGS section for toolchain.py related problems!
|
|
||||||
If applicable, add screenshots to help explain your problem.
|
|
||||||
-->
|
|
||||||
|
|
||||||
**Additional context**
|
|
||||||
Add any other context about the problem here.
|
|
100
.github/workflows/kivy_ios.yml
vendored
100
.github/workflows/kivy_ios.yml
vendored
|
@ -1,100 +0,0 @@
|
||||||
name: kivy-ios
|
|
||||||
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
flake8:
|
|
||||||
name: Flake8 tests
|
|
||||||
runs-on: macos-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout kivy-ios
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Set up Python 3.7
|
|
||||||
uses: actions/setup-python@v1.1.0
|
|
||||||
with:
|
|
||||||
python-version: 3.7
|
|
||||||
- name: Run flake8
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install tox>=2.0
|
|
||||||
tox -e pep8
|
|
||||||
|
|
||||||
build_python3_kivy:
|
|
||||||
runs-on: macos-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout kivy-ios
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Set up Python 3.7.x
|
|
||||||
uses: actions/setup-python@v1
|
|
||||||
with:
|
|
||||||
python-version: 3.7.x
|
|
||||||
- name: Install requirements
|
|
||||||
run: |
|
|
||||||
pip3 install -r requirements.txt
|
|
||||||
brew install autoconf automake libtool pkg-config
|
|
||||||
brew link libtool
|
|
||||||
pip3 install Cython==0.29.17
|
|
||||||
gem install xcpretty
|
|
||||||
- name: Build Python & Kivy
|
|
||||||
run: |
|
|
||||||
python toolchain.py build python3 kivy
|
|
||||||
- name: Checkout kivy for tests apps
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
repository: kivy/kivy
|
|
||||||
path: kivy-ci-clone
|
|
||||||
- name: Create & Build test project
|
|
||||||
run: |
|
|
||||||
.ci/test_project.sh
|
|
||||||
|
|
||||||
build_python3_kivy_venv:
|
|
||||||
runs-on: macos-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout kivy-ios
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Set up Python 3.7.x
|
|
||||||
uses: actions/setup-python@v1
|
|
||||||
with:
|
|
||||||
python-version: 3.7.x
|
|
||||||
- name: Install requirements
|
|
||||||
run: |
|
|
||||||
python -m venv venv
|
|
||||||
. venv/bin/activate
|
|
||||||
pip install -r requirements.txt
|
|
||||||
pip install sh
|
|
||||||
brew install autoconf automake libtool pkg-config
|
|
||||||
brew link libtool
|
|
||||||
pip install Cython==0.29.17
|
|
||||||
- name: Build Python & Kivy
|
|
||||||
run: |
|
|
||||||
. venv/bin/activate
|
|
||||||
python toolchain.py build python3 kivy
|
|
||||||
- name: Checkout kivy for tests apps
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
repository: kivy/kivy
|
|
||||||
path: kivy-ci-clone
|
|
||||||
- name: Create & Build test project
|
|
||||||
run: |
|
|
||||||
. venv/bin/activate
|
|
||||||
.ci/test_project.sh
|
|
||||||
|
|
||||||
build_updated_recipes:
|
|
||||||
needs: flake8
|
|
||||||
runs-on: macos-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout kivy-ios
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Set up Python 3.7.x
|
|
||||||
uses: actions/setup-python@v1
|
|
||||||
with:
|
|
||||||
python-version: 3.7.x
|
|
||||||
- name: Install requirements
|
|
||||||
run: |
|
|
||||||
pip3 install -r requirements.txt
|
|
||||||
brew install autoconf automake libtool pkg-config
|
|
||||||
brew link libtool
|
|
||||||
pip3 install Cython==0.29.17
|
|
||||||
- name: Build updated recipes
|
|
||||||
run: |
|
|
||||||
python3 .ci/rebuild_updated_recipes.py
|
|
25
.github/workflows/pypi-release.yml
vendored
25
.github/workflows/pypi-release.yml
vendored
|
@ -1,25 +0,0 @@
|
||||||
name: PyPI release
|
|
||||||
on: [push]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
pypi_release:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Set up Python 3.x
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: 3.x
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade setuptools wheel twine
|
|
||||||
- name: Build
|
|
||||||
run: |
|
|
||||||
python setup.py sdist bdist_wheel
|
|
||||||
twine check dist/*
|
|
||||||
- name: Publish package
|
|
||||||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
|
|
||||||
uses: pypa/gh-action-pypi-publish@v1.1.0
|
|
||||||
with:
|
|
||||||
user: __token__
|
|
||||||
password: ${{ secrets.pypi_password }}
|
|
35
.github/workflows/setup.yml
vendored
35
.github/workflows/setup.yml
vendored
|
@ -1,35 +0,0 @@
|
||||||
name: setup
|
|
||||||
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
checks:
|
|
||||||
runs-on: macos-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout kivy-ios
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Set up Python 3.7
|
|
||||||
uses: actions/setup-python@v1.1.0
|
|
||||||
with:
|
|
||||||
python-version: 3.7
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
pip install --upgrade setuptools wheel twine
|
|
||||||
- name: sdist bdist_wheel
|
|
||||||
run: |
|
|
||||||
python setup.py sdist bdist_wheel
|
|
||||||
- name: Twine check
|
|
||||||
run: |
|
|
||||||
twine check dist/*
|
|
||||||
- name: Local install
|
|
||||||
run: |
|
|
||||||
python -m venv venv
|
|
||||||
. venv/bin/activate
|
|
||||||
pip install dist/kivy-ios-*.tar.gz
|
|
||||||
pip install Cython==0.29.17
|
|
||||||
brew install autoconf automake libtool pkg-config
|
|
||||||
- name: Basic toolchain commands
|
|
||||||
run: |
|
|
||||||
. venv/bin/activate
|
|
||||||
toolchain --help
|
|
||||||
toolchain recipes
|
|
8
.gitignore
vendored
8
.gitignore
vendored
|
@ -1,10 +1,7 @@
|
||||||
*.swo
|
*.swo
|
||||||
*.pyc
|
|
||||||
*.pyo
|
|
||||||
*.swp
|
*.swp
|
||||||
freetype-*
|
freetype-*
|
||||||
build/*
|
build/*
|
||||||
dist/*
|
|
||||||
src/SDL/Xcode-iPhoneOS/SDL/build/
|
src/SDL/Xcode-iPhoneOS/SDL/build/
|
||||||
src/SDL/Xcode-iOS/SDL/build/
|
src/SDL/Xcode-iOS/SDL/build/
|
||||||
tmp/*
|
tmp/*
|
||||||
|
@ -16,8 +13,3 @@ app-*
|
||||||
src/ios/build/
|
src/ios/build/
|
||||||
src/ios/iosbuild/
|
src/ios/iosbuild/
|
||||||
src/ios/ios.c
|
src/ios/ios.c
|
||||||
*.DS_Store*
|
|
||||||
*-ios/
|
|
||||||
__pycache__
|
|
||||||
.tox
|
|
||||||
venv
|
|
||||||
|
|
48
CHANGELOG.md
48
CHANGELOG.md
|
@ -1,48 +0,0 @@
|
||||||
# Changelog
|
|
||||||
|
|
||||||
## [1.1.2] - 2020-05-11
|
|
||||||
### Fixed
|
|
||||||
- Fixes (venv build) reference to SDL\_main.h [\#493](https://github.com/kivy/kivy-ios/issues/493) ([AndreMiras](https://github.com/AndreMiras))
|
|
||||||
|
|
||||||
## [1.1.1] - 2020-05-11
|
|
||||||
### Added
|
|
||||||
- Add python depends [\#455](https://github.com/kivy/kivy-ios/issues/455) ([misl6](https://github.com/misl6))
|
|
||||||
|
|
||||||
### Removed
|
|
||||||
- Removed Python 2 support [\#482](https://github.com/kivy/kivy-ios/issues/482) ([AndreMiras](https://github.com/AndreMiras))
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- Adds initial\_working\_directory [\#489](https://github.com/kivy/kivy-ios/issues/489) ([misl6](https://github.com/misl6))
|
|
||||||
- Adds netifaces recipe, closes #239 [\#488](https://github.com/kivy/kivy-ios/issues/488) ([AndreMiras](https://github.com/AndreMiras))
|
|
||||||
- Uses contextlib.suppress to ignore exceptions [\#487](https://github.com/kivy/kivy-ios/issues/487) ([AndreMiras](https://github.com/AndreMiras))
|
|
||||||
- DRY via the find\_xcodeproj() helper method [\#486](https://github.com/kivy/kivy-ios/issues/486) ([AndreMiras](https://github.com/AndreMiras))
|
|
||||||
- Uses cd context manager in Python3Recipe.reduce\_python() [\#485](https://github.com/kivy/kivy-ios/issues/485) ([AndreMiras](https://github.com/AndreMiras))
|
|
||||||
- Uses Python 3 syntax [\#484](https://github.com/kivy/kivy-ios/issues/484) ([AndreMiras](https://github.com/AndreMiras))
|
|
||||||
- Also lints the tools/ folder [\#483](https://github.com/kivy/kivy-ios/issues/483) ([AndreMiras](https://github.com/AndreMiras))
|
|
||||||
- Migrates libffi build to Python 3 [\#481](https://github.com/kivy/kivy-ios/issues/481) ([AndreMiras](https://github.com/AndreMiras))
|
|
||||||
- Uses a couple of syntax shortcuts [\#479](https://github.com/kivy/kivy-ios/issues/479) ([AndreMiras](https://github.com/AndreMiras))
|
|
||||||
- Takes ToolchainCL definition outside the main [\#478](https://github.com/kivy/kivy-ios/issues/478) ([AndreMiras](https://github.com/AndreMiras))
|
|
||||||
|
|
||||||
## [1.1.0] - 2020-05-05
|
|
||||||
### Added
|
|
||||||
- Automatically publish to PyPI upon tagging [\#475](https://github.com/kivy/kivy-ios/issues/475) ([AndreMiras](https://github.com/AndreMiras))
|
|
||||||
- Dedicated setup.py test workflow [\#474](https://github.com/kivy/kivy-ios/issues/474) ([AndreMiras](https://github.com/AndreMiras))
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- Fixes a regression introduced during the linting [\#477](https://github.com/kivy/kivy-ios/issues/477) ([AndreMiras](https://github.com/AndreMiras))
|
|
||||||
- More fixes to Numpy so that the binary is accepted by the App Store [\#473](https://github.com/kivy/kivy-ios/issues/473) ([lerela](https://github.com/lerela))
|
|
||||||
- Do not build known broken recipes [\#471](https://github.com/kivy/kivy-ios/issues/471) ([AndreMiras](https://github.com/AndreMiras))
|
|
||||||
- Fixes minor typos in the issue template [\#469](https://github.com/kivy/kivy-ios/issues/469) ([AndreMiras](https://github.com/AndreMiras))
|
|
||||||
- Activates venv before venv build [\#464](https://github.com/kivy/kivy-ios/issues/464) ([AndreMiras](https://github.com/AndreMiras))
|
|
||||||
- Fixes building in venv [\#462](https://github.com/kivy/kivy-ios/issues/462) ([AndreMiras](https://github.com/AndreMiras))
|
|
||||||
- Cleanup - Removes vendored deps [\#454](https://github.com/kivy/kivy-ios/issues/454) ([misl6](https://github.com/misl6))
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- Updates README.md with install/usage from PyPI [\#476](https://github.com/kivy/kivy-ios/issues/476) ([AndreMiras](https://github.com/AndreMiras))
|
|
||||||
- Moving to dedicated kivy\_ios/ package directory [\#472](https://github.com/kivy/kivy-ios/issues/472) ([AndreMiras](https://github.com/AndreMiras))
|
|
||||||
- Bumps Cython version [\#470](https://github.com/kivy/kivy-ios/issues/470) ([misl6](https://github.com/misl6))
|
|
||||||
- Uses new `cd` context manager more [\#465](https://github.com/kivy/kivy-ios/issues/465) ([AndreMiras](https://github.com/AndreMiras))
|
|
||||||
|
|
||||||
|
|
||||||
## [1.0.0] - 2020-05-02
|
|
||||||
- Initial release
|
|
2
LICENSE
2
LICENSE
|
@ -1,4 +1,4 @@
|
||||||
Copyright (c) 2010-2017 Kivy Team and other contributors
|
Copyright (c) 2010-2013 Kivy Team and other contributors
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
32
Makefile
Normal file
32
Makefile
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
|
||||||
|
all: iphoneos iphonesimulator
|
||||||
|
./tools/link-fat-lib.sh
|
||||||
|
|
||||||
|
iphoneos:
|
||||||
|
mkdir -p build/armv7; \
|
||||||
|
cp -r tools build/armv7/tools; \
|
||||||
|
cp -r src build/armv7/src; \
|
||||||
|
export TARGET_SDK=iphoneos; \
|
||||||
|
TARGET_SDK=iphoneos build/armv7/tools/build-all.sh; \
|
||||||
|
rm -rf tmp; \
|
||||||
|
mkdir -p tmp/; \
|
||||||
|
cp -r build/armv7/tmp/Python-2.7.1 tmp/Python-2.7.1; \
|
||||||
|
rm -rf build/armv7/tools build/armv7/src build/armv7/tmp; \
|
||||||
|
mv build/armv7/build/* build/armv7/; \
|
||||||
|
rm -r build/armv7/build; \
|
||||||
|
libtool -static -o build/armv7/lib/kivy-ios-all.a build/armv7/lib/lib*;
|
||||||
|
|
||||||
|
|
||||||
|
iphonesimulator:
|
||||||
|
mkdir -p build/i386; \
|
||||||
|
cp -r tools build/i386/tools; \
|
||||||
|
cp -r src build/i386/src; \
|
||||||
|
export TARGET_SDK=iphonesimulator; \
|
||||||
|
TARGET_SDK=iphonesimulator build/i386/tools/build-all.sh; \
|
||||||
|
rm -rf build/i386/tools build/i386/src build/i386/tmp; \
|
||||||
|
mv build/i386/build/* build/i386/; \
|
||||||
|
rm -r build/i386/build; \
|
||||||
|
libtool -static -o build/i386/lib/kivy-ios-all.a build/i386/lib/lib*;
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf ./build
|
327
README.md
327
README.md
|
@ -1,327 +0,0 @@
|
||||||
# Kivy for iOS
|
|
||||||
|
|
||||||
[](https://github.com/kivy/kivy-ios/actions?query=workflow%3Akivy-ios)
|
|
||||||
[](https://badge.fury.io/py/kivy-ios)
|
|
||||||
[](#backers)
|
|
||||||
[](#sponsors)
|
|
||||||
|
|
||||||
This toolchain is designed to compile the necessary libraries for iOS to run
|
|
||||||
your application and manage the creation of the Xcode project.
|
|
||||||
|
|
||||||
We do not provide any binary distributions of this toolchain.
|
|
||||||
You do need to compile it at least once before creating your Xcode project.
|
|
||||||
|
|
||||||
The toolchain supports:
|
|
||||||
|
|
||||||
- iPhone Simulator (x86_64)
|
|
||||||
- iPhone / iOS (armv7 and arm64)
|
|
||||||
|
|
||||||
These recipes are not ported to the new toolchain yet:
|
|
||||||
|
|
||||||
- lxml
|
|
||||||
|
|
||||||
|
|
||||||
## Installation & requirements
|
|
||||||
|
|
||||||
Before we start, we strongly advise to use a Python virtual environment to install Python packages.
|
|
||||||
|
|
||||||
python3 -m venv venv
|
|
||||||
. venv/bin/activate
|
|
||||||
|
|
||||||
Install [Kivy for iOS from PyPI](https://pypi.org/project/kivy-ios) with pip like any Python package.
|
|
||||||
|
|
||||||
pip3 install kivy-ios
|
|
||||||
|
|
||||||
Additionally you would need few system dependencies and configuration.
|
|
||||||
|
|
||||||
- Xcode 10 or above, with an iOS SDK and command line tools installed:
|
|
||||||
|
|
||||||
xcode-select --install
|
|
||||||
|
|
||||||
- Using brew, you can install the following dependencies:
|
|
||||||
|
|
||||||
brew install autoconf automake libtool pkg-config
|
|
||||||
brew link libtool
|
|
||||||
|
|
||||||
## Using the toolchain
|
|
||||||
|
|
||||||
Any Python extensions or C/C++ library must be compiled: you need to have what
|
|
||||||
we call a `recipe` to compile it. For example, Python, libffi, SDL2, SDL_image,
|
|
||||||
freetype... all the dependencies, compilation and packaging instructions are
|
|
||||||
contained in a `recipe`.
|
|
||||||
|
|
||||||
You can list the available recipes and their versions with:
|
|
||||||
|
|
||||||
$ toolchain recipes
|
|
||||||
audiostream master
|
|
||||||
click 7.1.2
|
|
||||||
cymunk master
|
|
||||||
ffmpeg 2.6.3
|
|
||||||
ffpyplayer v3.2
|
|
||||||
flask 1.1.2
|
|
||||||
freetype 2.5.5
|
|
||||||
hostlibffi 3.2.1
|
|
||||||
hostpython3 3.7.1
|
|
||||||
ios master
|
|
||||||
itsdangerous 1.1.0
|
|
||||||
jinja2 2.11.2
|
|
||||||
kivy 1.10.1
|
|
||||||
libffi 3.2.1
|
|
||||||
libjpeg v9a
|
|
||||||
libpng 1.6.26
|
|
||||||
markupsafe 1.1.1
|
|
||||||
moodstocks 4.1.5
|
|
||||||
numpy 1.16.4
|
|
||||||
openssl 1.0.2k
|
|
||||||
photolibrary master
|
|
||||||
pillow 6.1.0
|
|
||||||
plyer master
|
|
||||||
pycrypto 2.6.1
|
|
||||||
pykka 1.2.1
|
|
||||||
pyobjus master
|
|
||||||
python3 3.7.1
|
|
||||||
pyyaml 3.11
|
|
||||||
sdl2 2.0.8
|
|
||||||
sdl2_image 2.0.0
|
|
||||||
sdl2_mixer 2.0.0
|
|
||||||
sdl2_ttf 2.0.12
|
|
||||||
werkzeug 1.0.1
|
|
||||||
|
|
||||||
Then, start the compilation with:
|
|
||||||
|
|
||||||
$ toolchain build python3 kivy
|
|
||||||
|
|
||||||
You can build recipes at the same time by adding them as parameters:
|
|
||||||
|
|
||||||
$ toolchain build python3 openssl kivy
|
|
||||||
|
|
||||||
Recipe builds can be removed via the clean command e.g.:
|
|
||||||
|
|
||||||
$ toolchain clean openssl
|
|
||||||
|
|
||||||
You can install package that don't require compilation with pip::
|
|
||||||
|
|
||||||
$ toolchain pip install plyer
|
|
||||||
|
|
||||||
The Kivy recipe depends on several others, like the sdl\* and python recipes.
|
|
||||||
These may in turn depend on others e.g. sdl2_ttf depends on freetype, etc.
|
|
||||||
You can think of it as follows: the kivy recipe will compile everything
|
|
||||||
necessary for a minimal working version of Kivy.
|
|
||||||
|
|
||||||
Don't grab a coffee, just do diner. Compiling all the libraries for the first
|
|
||||||
time, 3x over (remember, 3 archs, x86_64, armv7, arm64) will take time.
|
|
||||||
|
|
||||||
For a complete list of available commands, type:
|
|
||||||
|
|
||||||
$ toolchain
|
|
||||||
|
|
||||||
## Create the Xcode project
|
|
||||||
|
|
||||||
The `toolchain.py` can create the initial Xcode project for you::
|
|
||||||
|
|
||||||
$ toolchain create <title> <app_directory>
|
|
||||||
$ toolchain create Touchtracer ~/code/kivy/examples/demo/touchtracer
|
|
||||||
|
|
||||||
Your app directory must contain a main.py. A directory named `<title>-ios`
|
|
||||||
will be created, with an Xcode project in it.
|
|
||||||
You can open the Xcode project using::
|
|
||||||
|
|
||||||
$ open touchtracer-ios/touchtracer.xcodeproj
|
|
||||||
|
|
||||||
Then click on `Play`, and enjoy.
|
|
||||||
|
|
||||||
> *Did you know ?*
|
|
||||||
>
|
|
||||||
> Everytime you press `Play`, your application directory will be synced to
|
|
||||||
> the `<title>-ios/YourApp` directory. Don't make changes in the -ios
|
|
||||||
> directory directly.
|
|
||||||
|
|
||||||
|
|
||||||
## Configuring your App
|
|
||||||
|
|
||||||
You can configure and customize your app in various ways:
|
|
||||||
|
|
||||||
- Set the icon and launch images in XCode. Note that XCode requires that you
|
|
||||||
specify these assests per device or/and iOS version.
|
|
||||||
|
|
||||||
- When you first build your XCode project, a 'main.m' file is created in your
|
|
||||||
XCode project folder. This file configures your environment variables and
|
|
||||||
controls your application startup. You can edit this file to customize your
|
|
||||||
launch environment.
|
|
||||||
|
|
||||||
- Kivy uses SDL, and as soon as the application starts the SDL main, the launch
|
|
||||||
image will disappear. To prevent that, you need to have 2 files named
|
|
||||||
`Default.png` and `Default-Landscape.png`, and put them
|
|
||||||
in the `Resources` folder in Xcode (not in your application folder)
|
|
||||||
|
|
||||||
> *Did you know ?*
|
|
||||||
>
|
|
||||||
> If you wish to restrict your apps orientation, you should do this via
|
|
||||||
> the 'export_orientation' function in 'main.m'. The XCode orientation
|
|
||||||
> settings should be set to support all.
|
|
||||||
|
|
||||||
|
|
||||||
## Using recipes
|
|
||||||
|
|
||||||
Recipes are used to install and compile any libraries you may need to use. These
|
|
||||||
recipes follow the same format as those used by the
|
|
||||||
[Python-for-Android](https://github.com/kivy/python-for-android) sister project.
|
|
||||||
Please refer to the
|
|
||||||
[recipe documentation](https://python-for-android.readthedocs.io/en/latest/recipes/)
|
|
||||||
there for more detail.
|
|
||||||
|
|
||||||
|
|
||||||
## Reducing the application size
|
|
||||||
|
|
||||||
If you would like to reduce the size of your distributed app, there are a few
|
|
||||||
things you can do to achieve this:
|
|
||||||
|
|
||||||
- Minimize the `build/pythonX/lib/pythonXX.zip`: this contains all the python
|
|
||||||
modules. You can edit the zip file and remove all the files you'll not use
|
|
||||||
(reduce encodings, remove xml, email...)
|
|
||||||
|
|
||||||
- Go to the settings `panel` > `build`, search for `"strip"` options, and
|
|
||||||
triple-check that they are all set to `NO`. Stripping does not work with
|
|
||||||
Python dynamic modules and will remove needed symbols.
|
|
||||||
|
|
||||||
- By default, the iOS package compiles binaries for all processor
|
|
||||||
architectures, namely x86_64, armv7 and arm64 as per the guidelines from
|
|
||||||
Apple. You can reduce the size of your ipa significantly by removing the
|
|
||||||
x86_64 architecture as they are used only for the emulator.
|
|
||||||
|
|
||||||
The procedure is to first compile/build all the host recipes as is:
|
|
||||||
|
|
||||||
toolchain build hostpython3
|
|
||||||
|
|
||||||
Then build all the rest of the recipes using --arch=armv7 --arch=arm64
|
|
||||||
arguments as follows:
|
|
||||||
|
|
||||||
toolchain build python3 kivy --arch=armv7 --arch=arm64
|
|
||||||
|
|
||||||
Note that these packages will not run in the iOS emulators, so use them
|
|
||||||
only for deployment.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```
|
|
||||||
toolchain <command> [<args>]
|
|
||||||
|
|
||||||
Available commands:
|
|
||||||
build Build a recipe (compile a library for the required target
|
|
||||||
architecture)
|
|
||||||
clean Clean the build of the specified recipe
|
|
||||||
distclean Clean the build and the result
|
|
||||||
recipes List all the available recipes
|
|
||||||
status List all the recipes and their build status
|
|
||||||
|
|
||||||
Xcode:
|
|
||||||
create Create a new xcode project
|
|
||||||
update Update an existing xcode project (frameworks, libraries..)
|
|
||||||
launchimage Create Launch images for your xcode project
|
|
||||||
icon Create Icons for your xcode project
|
|
||||||
pip Install a pip dependency into the distribution
|
|
||||||
pip3 Install a pip dependency into the python 3 distribution
|
|
||||||
```
|
|
||||||
|
|
||||||
## Development
|
|
||||||
|
|
||||||
Alternatively, it's also possible to clone the repository and use all the
|
|
||||||
described commands in the above sections.
|
|
||||||
Clone and install it to your local virtual environment:
|
|
||||||
|
|
||||||
git clone https://github.com/kivy/kivy-ios.git
|
|
||||||
cd kivy-ios/
|
|
||||||
python3 -m venv venv
|
|
||||||
. venv/bin/activate
|
|
||||||
pip install -e .
|
|
||||||
|
|
||||||
Then use the `toolchain.py` script:
|
|
||||||
|
|
||||||
python toolchain.py --help
|
|
||||||
|
|
||||||
|
|
||||||
## FAQ
|
|
||||||
|
|
||||||
### Fatal error: "stdio.h" file not found
|
|
||||||
|
|
||||||
You need to install the Command line tools: `xcode-select --install`
|
|
||||||
|
|
||||||
### You must build with bitcode disabled (Xcode setting ENABLE_BITCODE should be No).
|
|
||||||
|
|
||||||
We don't support bitcode. You need to go to the project setting, and disable bitcode.
|
|
||||||
|
|
||||||
### You don't have permissions to run
|
|
||||||
|
|
||||||
It is due to invalid archs, search for them and check it. Maybe you
|
|
||||||
targetted a simulator but have only armv7/arm64. Maybe you want to target
|
|
||||||
your iPad but it as only x86_64.
|
|
||||||
|
|
||||||
### Why does the python multiprocess/subprocess module not work?
|
|
||||||
|
|
||||||
The iOS application model does not currently support multi-processing in a
|
|
||||||
cross-platform compatible way. The application design focuses on minimizing
|
|
||||||
processor usage (to minimize power consumption) and promotes an
|
|
||||||
[alternative concurrency model](https://developer.apple.com/library/archive/documentation/General/Conceptual/ConcurrencyProgrammingGuide/Introduction/Introduction.html).
|
|
||||||
|
|
||||||
If you need to make use of multiple processes, you should consider using
|
|
||||||
[PyObjus](https://github.com/kivy/pyobjus) to leverage native iOS
|
|
||||||
functionals for this.
|
|
||||||
|
|
||||||
## Support
|
|
||||||
|
|
||||||
If you need assistance, you can ask for help on our mailing list:
|
|
||||||
|
|
||||||
* User Group : https://groups.google.com/group/kivy-users
|
|
||||||
* Email : kivy-users@googlegroups.com
|
|
||||||
|
|
||||||
We also have a Discord channel:
|
|
||||||
|
|
||||||
* Server : https://chat.kivy.org
|
|
||||||
* Channel : #support
|
|
||||||
|
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
We love pull requests and discussing novel ideas. Check out our
|
|
||||||
[contribution guide](http://kivy.org/docs/contribute.html) and
|
|
||||||
feel free to improve Kivy for iOS.
|
|
||||||
|
|
||||||
The following mailing list and IRC channel are used exclusively for
|
|
||||||
discussions about developing the Kivy framework and its sister projects:
|
|
||||||
|
|
||||||
* Dev Group : https://groups.google.com/group/kivy-dev
|
|
||||||
* Email : kivy-dev@googlegroups.com
|
|
||||||
|
|
||||||
Discord channel:
|
|
||||||
|
|
||||||
* Server : https://chat.kivy.org
|
|
||||||
* Channel : #dev
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
Kivy for iOS is released under the terms of the MIT License. Please refer to the
|
|
||||||
LICENSE file.
|
|
||||||
|
|
||||||
|
|
||||||
## Backers
|
|
||||||
|
|
||||||
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/kivy#backer)]
|
|
||||||
|
|
||||||
<a href="https://opencollective.com/kivy#backers" target="_blank"><img src="https://opencollective.com/kivy/backers.svg?width=890"></a>
|
|
||||||
|
|
||||||
|
|
||||||
## Sponsors
|
|
||||||
|
|
||||||
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/kivy#sponsor)]
|
|
||||||
|
|
||||||
<a href="https://opencollective.com/kivy/sponsor/0/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/0/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/kivy/sponsor/1/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/1/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/kivy/sponsor/2/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/2/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/kivy/sponsor/3/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/3/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/kivy/sponsor/4/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/4/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/kivy/sponsor/5/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/5/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/kivy/sponsor/6/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/6/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/kivy/sponsor/7/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/7/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/kivy/sponsor/8/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/8/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/kivy/sponsor/9/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/9/avatar.svg"></a>
|
|
||||||
|
|
33
README.rst
Normal file
33
README.rst
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
Kivy for IOS
|
||||||
|
============
|
||||||
|
|
||||||
|
(This is a work in progress.)
|
||||||
|
|
||||||
|
#. Using brew, you can install dependencies::
|
||||||
|
|
||||||
|
brew install autoconf automake libtool pkg-config mercurial
|
||||||
|
brew link libtool
|
||||||
|
brew link mercurial
|
||||||
|
|
||||||
|
#. Install Cython::
|
||||||
|
|
||||||
|
# easy-install method
|
||||||
|
sudo easy_install cython
|
||||||
|
|
||||||
|
# pip method if available (sudo might be needed.)
|
||||||
|
pip install cython
|
||||||
|
|
||||||
|
#. Build the whole toolchain with `tools/build-all.sh`
|
||||||
|
#. Create an Xcode project for your application with `tools/create-xcode-project.sh test /path/to/app`
|
||||||
|
#. Open your newly created Xcode project
|
||||||
|
#. Ensure code signing is setup correctly
|
||||||
|
#. Click on play
|
||||||
|
|
||||||
|
Notes
|
||||||
|
-----
|
||||||
|
|
||||||
|
A build phase is added to the project that processes and moves your
|
||||||
|
app's files to the Xcode project before every build. If you would like
|
||||||
|
to handle this process manually, remove the "Run Script" build phase
|
||||||
|
from your target and use `tools/populate-project.sh /path/to/app`
|
||||||
|
after every change. You can also change the path to your app by modifying this build phase.
|
|
@ -1,339 +0,0 @@
|
||||||
Metadata-Version: 2.1
|
|
||||||
Name: kivy-ios
|
|
||||||
Version: 1.1.2.dev0
|
|
||||||
Summary: Kivy for iOS
|
|
||||||
Home-page: https://github.com/kivy/kivy-ios
|
|
||||||
Author: The Kivy team
|
|
||||||
Author-email: kivy-dev@googlegroups.com
|
|
||||||
License: UNKNOWN
|
|
||||||
Description: # Kivy for iOS
|
|
||||||
|
|
||||||
[](https://github.com/kivy/kivy-ios/actions?query=workflow%3Akivy-ios)
|
|
||||||
[](https://badge.fury.io/py/kivy-ios)
|
|
||||||
[](#backers)
|
|
||||||
[](#sponsors)
|
|
||||||
|
|
||||||
This toolchain is designed to compile the necessary libraries for iOS to run
|
|
||||||
your application and manage the creation of the Xcode project.
|
|
||||||
|
|
||||||
We do not provide any binary distributions of this toolchain.
|
|
||||||
You do need to compile it at least once before creating your Xcode project.
|
|
||||||
|
|
||||||
The toolchain supports:
|
|
||||||
|
|
||||||
- iPhone Simulator (x86_64)
|
|
||||||
- iPhone / iOS (armv7 and arm64)
|
|
||||||
|
|
||||||
These recipes are not ported to the new toolchain yet:
|
|
||||||
|
|
||||||
- lxml
|
|
||||||
|
|
||||||
|
|
||||||
## Installation & requirements
|
|
||||||
|
|
||||||
Before we start, we strongly advise to use a Python virtual environment to install Python packages.
|
|
||||||
|
|
||||||
python3 -m venv venv
|
|
||||||
. venv/bin/activate
|
|
||||||
|
|
||||||
Install [Kivy for iOS from PyPI](https://pypi.org/project/kivy-ios) with pip like any Python package.
|
|
||||||
|
|
||||||
pip3 install kivy-ios
|
|
||||||
|
|
||||||
Additionally you would need few system dependencies and configuration.
|
|
||||||
|
|
||||||
- Xcode 10 or above, with an iOS SDK and command line tools installed:
|
|
||||||
|
|
||||||
xcode-select --install
|
|
||||||
|
|
||||||
- Using brew, you can install the following dependencies:
|
|
||||||
|
|
||||||
brew install autoconf automake libtool pkg-config
|
|
||||||
brew link libtool
|
|
||||||
|
|
||||||
## Using the toolchain
|
|
||||||
|
|
||||||
Any Python extensions or C/C++ library must be compiled: you need to have what
|
|
||||||
we call a `recipe` to compile it. For example, Python, libffi, SDL2, SDL_image,
|
|
||||||
freetype... all the dependencies, compilation and packaging instructions are
|
|
||||||
contained in a `recipe`.
|
|
||||||
|
|
||||||
You can list the available recipes and their versions with:
|
|
||||||
|
|
||||||
$ toolchain recipes
|
|
||||||
audiostream master
|
|
||||||
click 7.1.2
|
|
||||||
cymunk master
|
|
||||||
ffmpeg 2.6.3
|
|
||||||
ffpyplayer v3.2
|
|
||||||
flask 1.1.2
|
|
||||||
freetype 2.5.5
|
|
||||||
hostlibffi 3.2.1
|
|
||||||
hostpython3 3.7.1
|
|
||||||
ios master
|
|
||||||
itsdangerous 1.1.0
|
|
||||||
jinja2 2.11.2
|
|
||||||
kivy 1.10.1
|
|
||||||
libffi 3.2.1
|
|
||||||
libjpeg v9a
|
|
||||||
libpng 1.6.26
|
|
||||||
markupsafe 1.1.1
|
|
||||||
moodstocks 4.1.5
|
|
||||||
numpy 1.16.4
|
|
||||||
openssl 1.0.2k
|
|
||||||
photolibrary master
|
|
||||||
pillow 6.1.0
|
|
||||||
plyer master
|
|
||||||
pycrypto 2.6.1
|
|
||||||
pykka 1.2.1
|
|
||||||
pyobjus master
|
|
||||||
python3 3.7.1
|
|
||||||
pyyaml 3.11
|
|
||||||
sdl2 2.0.8
|
|
||||||
sdl2_image 2.0.0
|
|
||||||
sdl2_mixer 2.0.0
|
|
||||||
sdl2_ttf 2.0.12
|
|
||||||
werkzeug 1.0.1
|
|
||||||
|
|
||||||
Then, start the compilation with:
|
|
||||||
|
|
||||||
$ toolchain build python3 kivy
|
|
||||||
|
|
||||||
You can build recipes at the same time by adding them as parameters:
|
|
||||||
|
|
||||||
$ toolchain build python3 openssl kivy
|
|
||||||
|
|
||||||
Recipe builds can be removed via the clean command e.g.:
|
|
||||||
|
|
||||||
$ toolchain clean openssl
|
|
||||||
|
|
||||||
You can install package that don't require compilation with pip::
|
|
||||||
|
|
||||||
$ toolchain pip install plyer
|
|
||||||
|
|
||||||
The Kivy recipe depends on several others, like the sdl\* and python recipes.
|
|
||||||
These may in turn depend on others e.g. sdl2_ttf depends on freetype, etc.
|
|
||||||
You can think of it as follows: the kivy recipe will compile everything
|
|
||||||
necessary for a minimal working version of Kivy.
|
|
||||||
|
|
||||||
Don't grab a coffee, just do diner. Compiling all the libraries for the first
|
|
||||||
time, 3x over (remember, 3 archs, x86_64, armv7, arm64) will take time.
|
|
||||||
|
|
||||||
For a complete list of available commands, type:
|
|
||||||
|
|
||||||
$ toolchain
|
|
||||||
|
|
||||||
## Create the Xcode project
|
|
||||||
|
|
||||||
The `toolchain.py` can create the initial Xcode project for you::
|
|
||||||
|
|
||||||
$ toolchain create <title> <app_directory>
|
|
||||||
$ toolchain create Touchtracer ~/code/kivy/examples/demo/touchtracer
|
|
||||||
|
|
||||||
Your app directory must contain a main.py. A directory named `<title>-ios`
|
|
||||||
will be created, with an Xcode project in it.
|
|
||||||
You can open the Xcode project using::
|
|
||||||
|
|
||||||
$ open touchtracer-ios/touchtracer.xcodeproj
|
|
||||||
|
|
||||||
Then click on `Play`, and enjoy.
|
|
||||||
|
|
||||||
> *Did you know ?*
|
|
||||||
>
|
|
||||||
> Everytime you press `Play`, your application directory will be synced to
|
|
||||||
> the `<title>-ios/YourApp` directory. Don't make changes in the -ios
|
|
||||||
> directory directly.
|
|
||||||
|
|
||||||
|
|
||||||
## Configuring your App
|
|
||||||
|
|
||||||
You can configure and customize your app in various ways:
|
|
||||||
|
|
||||||
- Set the icon and launch images in XCode. Note that XCode requires that you
|
|
||||||
specify these assests per device or/and iOS version.
|
|
||||||
|
|
||||||
- When you first build your XCode project, a 'main.m' file is created in your
|
|
||||||
XCode project folder. This file configures your environment variables and
|
|
||||||
controls your application startup. You can edit this file to customize your
|
|
||||||
launch environment.
|
|
||||||
|
|
||||||
- Kivy uses SDL, and as soon as the application starts the SDL main, the launch
|
|
||||||
image will disappear. To prevent that, you need to have 2 files named
|
|
||||||
`Default.png` and `Default-Landscape.png`, and put them
|
|
||||||
in the `Resources` folder in Xcode (not in your application folder)
|
|
||||||
|
|
||||||
> *Did you know ?*
|
|
||||||
>
|
|
||||||
> If you wish to restrict your apps orientation, you should do this via
|
|
||||||
> the 'export_orientation' function in 'main.m'. The XCode orientation
|
|
||||||
> settings should be set to support all.
|
|
||||||
|
|
||||||
|
|
||||||
## Using recipes
|
|
||||||
|
|
||||||
Recipes are used to install and compile any libraries you may need to use. These
|
|
||||||
recipes follow the same format as those used by the
|
|
||||||
[Python-for-Android](https://github.com/kivy/python-for-android) sister project.
|
|
||||||
Please refer to the
|
|
||||||
[recipe documentation](https://python-for-android.readthedocs.io/en/latest/recipes/)
|
|
||||||
there for more detail.
|
|
||||||
|
|
||||||
|
|
||||||
## Reducing the application size
|
|
||||||
|
|
||||||
If you would like to reduce the size of your distributed app, there are a few
|
|
||||||
things you can do to achieve this:
|
|
||||||
|
|
||||||
- Minimize the `build/pythonX/lib/pythonXX.zip`: this contains all the python
|
|
||||||
modules. You can edit the zip file and remove all the files you'll not use
|
|
||||||
(reduce encodings, remove xml, email...)
|
|
||||||
|
|
||||||
- Go to the settings `panel` > `build`, search for `"strip"` options, and
|
|
||||||
triple-check that they are all set to `NO`. Stripping does not work with
|
|
||||||
Python dynamic modules and will remove needed symbols.
|
|
||||||
|
|
||||||
- By default, the iOS package compiles binaries for all processor
|
|
||||||
architectures, namely x86_64, armv7 and arm64 as per the guidelines from
|
|
||||||
Apple. You can reduce the size of your ipa significantly by removing the
|
|
||||||
x86_64 architecture as they are used only for the emulator.
|
|
||||||
|
|
||||||
The procedure is to first compile/build all the host recipes as is:
|
|
||||||
|
|
||||||
toolchain build hostpython3
|
|
||||||
|
|
||||||
Then build all the rest of the recipes using --arch=armv7 --arch=arm64
|
|
||||||
arguments as follows:
|
|
||||||
|
|
||||||
toolchain build python3 kivy --arch=armv7 --arch=arm64
|
|
||||||
|
|
||||||
Note that these packages will not run in the iOS emulators, so use them
|
|
||||||
only for deployment.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```
|
|
||||||
toolchain <command> [<args>]
|
|
||||||
|
|
||||||
Available commands:
|
|
||||||
build Build a recipe (compile a library for the required target
|
|
||||||
architecture)
|
|
||||||
clean Clean the build of the specified recipe
|
|
||||||
distclean Clean the build and the result
|
|
||||||
recipes List all the available recipes
|
|
||||||
status List all the recipes and their build status
|
|
||||||
|
|
||||||
Xcode:
|
|
||||||
create Create a new xcode project
|
|
||||||
update Update an existing xcode project (frameworks, libraries..)
|
|
||||||
launchimage Create Launch images for your xcode project
|
|
||||||
icon Create Icons for your xcode project
|
|
||||||
pip Install a pip dependency into the distribution
|
|
||||||
pip3 Install a pip dependency into the python 3 distribution
|
|
||||||
```
|
|
||||||
|
|
||||||
## Development
|
|
||||||
|
|
||||||
Alternatively, it's also possible to clone the repository and use all the
|
|
||||||
described commands in the above sections.
|
|
||||||
Clone and install it to your local virtual environment:
|
|
||||||
|
|
||||||
git clone https://github.com/kivy/kivy-ios.git
|
|
||||||
cd kivy-ios/
|
|
||||||
python3 -m venv venv
|
|
||||||
. venv/bin/activate
|
|
||||||
pip install -e .
|
|
||||||
|
|
||||||
Then use the `toolchain.py` script:
|
|
||||||
|
|
||||||
python toolchain.py --help
|
|
||||||
|
|
||||||
|
|
||||||
## FAQ
|
|
||||||
|
|
||||||
### Fatal error: "stdio.h" file not found
|
|
||||||
|
|
||||||
You need to install the Command line tools: `xcode-select --install`
|
|
||||||
|
|
||||||
### You must build with bitcode disabled (Xcode setting ENABLE_BITCODE should be No).
|
|
||||||
|
|
||||||
We don't support bitcode. You need to go to the project setting, and disable bitcode.
|
|
||||||
|
|
||||||
### You don't have permissions to run
|
|
||||||
|
|
||||||
It is due to invalid archs, search for them and check it. Maybe you
|
|
||||||
targetted a simulator but have only armv7/arm64. Maybe you want to target
|
|
||||||
your iPad but it as only x86_64.
|
|
||||||
|
|
||||||
### Why does the python multiprocess/subprocess module not work?
|
|
||||||
|
|
||||||
The iOS application model does not currently support multi-processing in a
|
|
||||||
cross-platform compatible way. The application design focuses on minimizing
|
|
||||||
processor usage (to minimize power consumption) and promotes an
|
|
||||||
[alternative concurrency model](https://developer.apple.com/library/archive/documentation/General/Conceptual/ConcurrencyProgrammingGuide/Introduction/Introduction.html).
|
|
||||||
|
|
||||||
If you need to make use of multiple processes, you should consider using
|
|
||||||
[PyObjus](https://github.com/kivy/pyobjus) to leverage native iOS
|
|
||||||
functionals for this.
|
|
||||||
|
|
||||||
## Support
|
|
||||||
|
|
||||||
If you need assistance, you can ask for help on our mailing list:
|
|
||||||
|
|
||||||
* User Group : https://groups.google.com/group/kivy-users
|
|
||||||
* Email : kivy-users@googlegroups.com
|
|
||||||
|
|
||||||
We also have a Discord channel:
|
|
||||||
|
|
||||||
* Server : https://chat.kivy.org
|
|
||||||
* Channel : #support
|
|
||||||
|
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
We love pull requests and discussing novel ideas. Check out our
|
|
||||||
[contribution guide](http://kivy.org/docs/contribute.html) and
|
|
||||||
feel free to improve Kivy for iOS.
|
|
||||||
|
|
||||||
The following mailing list and IRC channel are used exclusively for
|
|
||||||
discussions about developing the Kivy framework and its sister projects:
|
|
||||||
|
|
||||||
* Dev Group : https://groups.google.com/group/kivy-dev
|
|
||||||
* Email : kivy-dev@googlegroups.com
|
|
||||||
|
|
||||||
Discord channel:
|
|
||||||
|
|
||||||
* Server : https://chat.kivy.org
|
|
||||||
* Channel : #dev
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
Kivy for iOS is released under the terms of the MIT License. Please refer to the
|
|
||||||
LICENSE file.
|
|
||||||
|
|
||||||
|
|
||||||
## Backers
|
|
||||||
|
|
||||||
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/kivy#backer)]
|
|
||||||
|
|
||||||
<a href="https://opencollective.com/kivy#backers" target="_blank"><img src="https://opencollective.com/kivy/backers.svg?width=890"></a>
|
|
||||||
|
|
||||||
|
|
||||||
## Sponsors
|
|
||||||
|
|
||||||
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/kivy#sponsor)]
|
|
||||||
|
|
||||||
<a href="https://opencollective.com/kivy/sponsor/0/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/0/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/kivy/sponsor/1/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/1/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/kivy/sponsor/2/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/2/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/kivy/sponsor/3/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/3/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/kivy/sponsor/4/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/4/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/kivy/sponsor/5/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/5/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/kivy/sponsor/6/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/6/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/kivy/sponsor/7/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/7/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/kivy/sponsor/8/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/8/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/kivy/sponsor/9/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/9/avatar.svg"></a>
|
|
||||||
|
|
||||||
|
|
||||||
Platform: UNKNOWN
|
|
||||||
Requires-Python: >=3.6.0
|
|
||||||
Description-Content-Type: text/markdown
|
|
|
@ -1,256 +0,0 @@
|
||||||
README.md
|
|
||||||
setup.py
|
|
||||||
kivy_ios/__init__.py
|
|
||||||
kivy_ios/context_managers.py
|
|
||||||
kivy_ios/toolchain.py
|
|
||||||
kivy_ios.egg-info/PKG-INFO
|
|
||||||
kivy_ios.egg-info/SOURCES.txt
|
|
||||||
kivy_ios.egg-info/dependency_links.txt
|
|
||||||
kivy_ios.egg-info/entry_points.txt
|
|
||||||
kivy_ios.egg-info/requires.txt
|
|
||||||
kivy_ios.egg-info/top_level.txt
|
|
||||||
kivy_ios/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/__pycache__/__init__.cpython-38.pyc
|
|
||||||
kivy_ios/__pycache__/context_managers.cpython-37.pyc
|
|
||||||
kivy_ios/__pycache__/context_managers.cpython-38.pyc
|
|
||||||
kivy_ios/__pycache__/toolchain.cpython-37.pyc
|
|
||||||
kivy_ios/__pycache__/toolchain.cpython-38.pyc
|
|
||||||
kivy_ios/recipes/__init__.py
|
|
||||||
kivy_ios/recipes/hostpython.py
|
|
||||||
kivy_ios/recipes/python.py
|
|
||||||
kivy_ios/recipes/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/__pycache__/__init__.cpython-38.pyc
|
|
||||||
kivy_ios/recipes/__pycache__/python.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/__pycache__/python.cpython-38.pyc
|
|
||||||
kivy_ios/recipes/aiohttp/__init__.py
|
|
||||||
kivy_ios/recipes/aioupnp/__init__.py
|
|
||||||
kivy_ios/recipes/appdirs/__init__.py
|
|
||||||
kivy_ios/recipes/appdirs/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/asn1crypto/__init__.py
|
|
||||||
kivy_ios/recipes/asn1crypto/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/async-timeout/__init__.py
|
|
||||||
kivy_ios/recipes/attrs/__init__.py
|
|
||||||
kivy_ios/recipes/attrs/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/audiostream/__init__.py
|
|
||||||
kivy_ios/recipes/audiostream/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/base58/__init__.py
|
|
||||||
kivy_ios/recipes/base58/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/cffi/__init__.py
|
|
||||||
kivy_ios/recipes/cffi/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/chardet/__init__.py
|
|
||||||
kivy_ios/recipes/click/__init__.py
|
|
||||||
kivy_ios/recipes/click/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/coincurve/__init__.py
|
|
||||||
kivy_ios/recipes/coincurve/cross_compile.patch
|
|
||||||
kivy_ios/recipes/coincurve/drop_setup_requires.patch
|
|
||||||
kivy_ios/recipes/coincurve/find_lib.patch
|
|
||||||
kivy_ios/recipes/coincurve/no-download.patch
|
|
||||||
kivy_ios/recipes/coincurve/setup.py.patch
|
|
||||||
kivy_ios/recipes/colorama/__init__.py
|
|
||||||
kivy_ios/recipes/colorama/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/cryptography/__init__.py
|
|
||||||
kivy_ios/recipes/cryptography/getentropy.patch
|
|
||||||
kivy_ios/recipes/cryptography/osrandom.patch
|
|
||||||
kivy_ios/recipes/cryptography/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/curly/__init__.py
|
|
||||||
kivy_ios/recipes/curly/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/cymunk/__init__.py
|
|
||||||
kivy_ios/recipes/cymunk/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/defusedxml/__init__.py
|
|
||||||
kivy_ios/recipes/docopt/__init__.py
|
|
||||||
kivy_ios/recipes/docopt/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/ecdsa/__init__.py
|
|
||||||
kivy_ios/recipes/ecdsa/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/ffmpeg/__init__.py
|
|
||||||
kivy_ios/recipes/ffmpeg/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/ffpyplayer/__init__.py
|
|
||||||
kivy_ios/recipes/ffpyplayer/misc-visibility.patch
|
|
||||||
kivy_ios/recipes/ffpyplayer/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/flask/__init__.py
|
|
||||||
kivy_ios/recipes/flask/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/freetype/__init__.py
|
|
||||||
kivy_ios/recipes/freetype/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/freetype/__pycache__/__init__.cpython-38.pyc
|
|
||||||
kivy_ios/recipes/hachoir/__init__.py
|
|
||||||
kivy_ios/recipes/host_cffi/__init__.py
|
|
||||||
kivy_ios/recipes/host_setuptools/__init__.py
|
|
||||||
kivy_ios/recipes/host_setuptools/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/host_setuptools/setuptools/README.rst
|
|
||||||
kivy_ios/recipes/host_setuptools3/__init__.py
|
|
||||||
kivy_ios/recipes/host_setuptools3/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/host_setuptools3/__pycache__/__init__.cpython-38.pyc
|
|
||||||
kivy_ios/recipes/host_setuptools3/setuptools/README.rst
|
|
||||||
kivy_ios/recipes/hostlibffi/__init__.py
|
|
||||||
kivy_ios/recipes/hostlibffi/ffi-3.0.13-sysv.S.patch
|
|
||||||
kivy_ios/recipes/hostlibffi/fix-win32-unreferenced-symbol.patch
|
|
||||||
kivy_ios/recipes/hostlibffi/generate-darwin-source-and-headers-python3-items.patch
|
|
||||||
kivy_ios/recipes/hostlibffi/libffi-xcode10.patch
|
|
||||||
kivy_ios/recipes/hostlibffi/public_include.patch
|
|
||||||
kivy_ios/recipes/hostlibffi/staticlib.patch
|
|
||||||
kivy_ios/recipes/hostlibffi/staticlib2.patch
|
|
||||||
kivy_ios/recipes/hostlibffi/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/hostlibffi/__pycache__/__init__.cpython-38.pyc
|
|
||||||
kivy_ios/recipes/hostopenssl/__init__.py
|
|
||||||
kivy_ios/recipes/hostopenssl/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/hostopenssl/__pycache__/__init__.cpython-38.pyc
|
|
||||||
kivy_ios/recipes/hostpython3/ModulesSetup
|
|
||||||
kivy_ios/recipes/hostpython3/__init__.py
|
|
||||||
kivy_ios/recipes/hostpython3/pyconfig_detection.patch
|
|
||||||
kivy_ios/recipes/hostpython3/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/hostpython3/__pycache__/__init__.cpython-38.pyc
|
|
||||||
kivy_ios/recipes/idna/__init__.py
|
|
||||||
kivy_ios/recipes/idna/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/ios/__init__.py
|
|
||||||
kivy_ios/recipes/ios/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/ios/__pycache__/__init__.cpython-38.pyc
|
|
||||||
kivy_ios/recipes/ios/src/ios.pyx
|
|
||||||
kivy_ios/recipes/ios/src/ios_browser.m
|
|
||||||
kivy_ios/recipes/ios/src/ios_filechooser.m
|
|
||||||
kivy_ios/recipes/ios/src/ios_mail.m
|
|
||||||
kivy_ios/recipes/ios/src/ios_utils.m
|
|
||||||
kivy_ios/recipes/ios/src/ios_wrapper.h
|
|
||||||
kivy_ios/recipes/ios/src/setup.py
|
|
||||||
kivy_ios/recipes/ipaddress/__init__.py
|
|
||||||
kivy_ios/recipes/ipaddress/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/itsdangerous/__init__.py
|
|
||||||
kivy_ios/recipes/itsdangerous/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/jinja2/__init__.py
|
|
||||||
kivy_ios/recipes/jinja2/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/jsonschema/__init__.py
|
|
||||||
kivy_ios/recipes/jsonschema/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/keyring/__init__.py
|
|
||||||
kivy_ios/recipes/keyring/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/kivent_core/__init__.py
|
|
||||||
kivy_ios/recipes/kivent_core/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/kivy/__init__.py
|
|
||||||
kivy_ios/recipes/kivy/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/kivy/__pycache__/__init__.cpython-38.pyc
|
|
||||||
kivy_ios/recipes/lbry/__init__.py
|
|
||||||
kivy_ios/recipes/lbry/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/libcurl/__init__.py
|
|
||||||
kivy_ios/recipes/libcurl/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/libffi/__init__.py
|
|
||||||
kivy_ios/recipes/libffi/ffi-3.0.13-sysv.S.patch
|
|
||||||
kivy_ios/recipes/libffi/fix-win32-unreferenced-symbol.patch
|
|
||||||
kivy_ios/recipes/libffi/generate-darwin-source-and-headers-python3-items.patch
|
|
||||||
kivy_ios/recipes/libffi/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/libffi/__pycache__/__init__.cpython-38.pyc
|
|
||||||
kivy_ios/recipes/libjpeg/__init__.py
|
|
||||||
kivy_ios/recipes/libjpeg/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/libpng/__init__.py
|
|
||||||
kivy_ios/recipes/libpng/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/libsecp256k1/__init__.py
|
|
||||||
kivy_ios/recipes/libzbar/__init__.py
|
|
||||||
kivy_ios/recipes/libzbar/werror.patch
|
|
||||||
kivy_ios/recipes/libzbar/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/markupsafe/__init__.py
|
|
||||||
kivy_ios/recipes/markupsafe/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/mock/__init__.py
|
|
||||||
kivy_ios/recipes/msgpack/__init__.py
|
|
||||||
kivy_ios/recipes/multidict/__init__.py
|
|
||||||
kivy_ios/recipes/netifaces/__init__.py
|
|
||||||
kivy_ios/recipes/netifaces/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/numpy/__init__.py
|
|
||||||
kivy_ios/recipes/numpy/numpy-1.16.4.patch
|
|
||||||
kivy_ios/recipes/numpy/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/openssl/__init__.py
|
|
||||||
kivy_ios/recipes/openssl/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/openssl/__pycache__/__init__.cpython-38.pyc
|
|
||||||
kivy_ios/recipes/pbkdf2/__init__.py
|
|
||||||
kivy_ios/recipes/pbkdf2/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/photolibrary/__init__.py
|
|
||||||
kivy_ios/recipes/photolibrary/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/pillow/__init__.py
|
|
||||||
kivy_ios/recipes/pillow/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/plyer/__init__.py
|
|
||||||
kivy_ios/recipes/plyer/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/prometheus_client/__init__.py
|
|
||||||
kivy_ios/recipes/protobuf/__init__.py
|
|
||||||
kivy_ios/recipes/protobuf/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/pyasn1/__init__.py
|
|
||||||
kivy_ios/recipes/pyasn1-modules/__init__.py
|
|
||||||
kivy_ios/recipes/pyasn1-modules/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/pyasn1/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/pycparser/__init__.py
|
|
||||||
kivy_ios/recipes/pycrypto/__init__.py
|
|
||||||
kivy_ios/recipes/pycrypto/hash_SHA2_template.c.patch
|
|
||||||
kivy_ios/recipes/pycrypto/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/pykka/__init__.py
|
|
||||||
kivy_ios/recipes/pykka/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/pylru/__init__.py
|
|
||||||
kivy_ios/recipes/pyobjus/__init__.py
|
|
||||||
kivy_ios/recipes/pyobjus/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/pyobjus/__pycache__/__init__.cpython-38.pyc
|
|
||||||
kivy_ios/recipes/python3/ModulesSetup
|
|
||||||
kivy_ios/recipes/python3/ModulesSetup.mobile
|
|
||||||
kivy_ios/recipes/python3/__init__.py
|
|
||||||
kivy_ios/recipes/python3/config.sub.patch
|
|
||||||
kivy_ios/recipes/python3/configure.patch
|
|
||||||
kivy_ios/recipes/python3/ctypes_duplicate.patch
|
|
||||||
kivy_ios/recipes/python3/disable_explicit_blake2.patch
|
|
||||||
kivy_ios/recipes/python3/dynload_shlib.patch
|
|
||||||
kivy_ios/recipes/python3/posixmodule.patch
|
|
||||||
kivy_ios/recipes/python3/pyconfig_detection.patch
|
|
||||||
kivy_ios/recipes/python3/random.patch
|
|
||||||
kivy_ios/recipes/python3/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/python3/__pycache__/__init__.cpython-38.pyc
|
|
||||||
kivy_ios/recipes/python3/mock_modules/_sqlite3/__init__.py
|
|
||||||
kivy_ios/recipes/python3/mock_modules/_sqlite3/_sqlite3.cpython-38-darwin.so
|
|
||||||
kivy_ios/recipes/pyyaml/__init__.py
|
|
||||||
kivy_ios/recipes/pyyaml/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/sdl2/__init__.py
|
|
||||||
kivy_ios/recipes/sdl2/uikit-transparent.patch
|
|
||||||
kivy_ios/recipes/sdl2/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/sdl2/__pycache__/__init__.cpython-38.pyc
|
|
||||||
kivy_ios/recipes/sdl2_image/__init__.py
|
|
||||||
kivy_ios/recipes/sdl2_image/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/sdl2_image/__pycache__/__init__.cpython-38.pyc
|
|
||||||
kivy_ios/recipes/sdl2_mixer/__init__.py
|
|
||||||
kivy_ios/recipes/sdl2_mixer/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/sdl2_mixer/__pycache__/__init__.cpython-38.pyc
|
|
||||||
kivy_ios/recipes/sdl2_ttf/__init__.py
|
|
||||||
kivy_ios/recipes/sdl2_ttf/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/sdl2_ttf/__pycache__/__init__.cpython-38.pyc
|
|
||||||
kivy_ios/recipes/setuptools/__init__.py
|
|
||||||
kivy_ios/recipes/setuptools/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/six/__init__.py
|
|
||||||
kivy_ios/recipes/six/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/werkzeug/__init__.py
|
|
||||||
kivy_ios/recipes/werkzeug/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/recipes/yarl/__init__.py
|
|
||||||
kivy_ios/recipes/zbarlight/__init__.py
|
|
||||||
kivy_ios/recipes/zbarlight/zbarlight_1_2.patch
|
|
||||||
kivy_ios/recipes/zbarlight/__pycache__/__init__.cpython-37.pyc
|
|
||||||
kivy_ios/tools/__init__.py
|
|
||||||
kivy_ios/tools/biglink
|
|
||||||
kivy_ios/tools/cythonize.py
|
|
||||||
kivy_ios/tools/liblink
|
|
||||||
kivy_ios/tools/external/__init__.py
|
|
||||||
kivy_ios/tools/external/xcassets.py
|
|
||||||
kivy_ios/tools/templates/cookiecutter.json
|
|
||||||
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/bridge.h
|
|
||||||
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/bridge.m
|
|
||||||
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/icon.png
|
|
||||||
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/main.m
|
|
||||||
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/{{ cookiecutter.project_name }}-Info.plist
|
|
||||||
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/LaunchImages/Default-568h@2x.png
|
|
||||||
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/LaunchImages/Default-667h@2x.png
|
|
||||||
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/LaunchImages/Default-763h@3x.png
|
|
||||||
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/LaunchImages/Default-Landscape.png
|
|
||||||
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/LaunchImages/Default-Landscape@2x.png
|
|
||||||
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/LaunchImages/Default-Portrait.png
|
|
||||||
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/LaunchImages/Default-Portrait@2x~ipad.png
|
|
||||||
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/LaunchImages/Default-Portrait@3x~ipad.png
|
|
||||||
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/LaunchImages/Default.png
|
|
||||||
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/LaunchImages/Default@2x.png
|
|
||||||
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/LaunchImages/Default@3x.png
|
|
||||||
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/YourApp/README.txt
|
|
||||||
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/YourApp/android.txt
|
|
||||||
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/YourApp/pictures.kv
|
|
||||||
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/YourApp/shadow32.png
|
|
||||||
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/YourApp/images/5509213687_ffd18df0b9_b.jpg
|
|
||||||
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/YourApp/images/5552597274_de8b3fb5d2_b.jpg
|
|
||||||
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/YourApp/images/faust_github.jpg
|
|
||||||
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/{{ cookiecutter.project_name }}.xcodeproj/project.pbxproj
|
|
||||||
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/{{ cookiecutter.project_name }}.xcodeproj/project.xcworkspace/contents.xcworkspacedata
|
|
||||||
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/{{ cookiecutter.project_name }}/Images.xcassets/AppIcon.appiconset/Contents.json
|
|
|
@ -1 +0,0 @@
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
[console_scripts]
|
|
||||||
toolchain = kivy_ios.toolchain:main
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
cookiecutter
|
|
||||||
pbxproj
|
|
||||||
Pillow
|
|
||||||
requests
|
|
||||||
sh
|
|
|
@ -1 +0,0 @@
|
||||||
kivy_ios
|
|
|
@ -1,46 +0,0 @@
|
||||||
"""
|
|
||||||
This module houses context managers to assist in the managing of state during
|
|
||||||
kivy-ios builds.
|
|
||||||
"""
|
|
||||||
from logging import getLogger
|
|
||||||
from contextlib import contextmanager
|
|
||||||
from os import getcwd, chdir, environ
|
|
||||||
from os.path import expanduser
|
|
||||||
|
|
||||||
|
|
||||||
logger = getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
@contextmanager
|
|
||||||
def cd(newdir):
|
|
||||||
"""
|
|
||||||
Set the current working directory to `newdir` for the duration of the
|
|
||||||
context.
|
|
||||||
"""
|
|
||||||
prevdir = getcwd()
|
|
||||||
logger.info("cd {}".format(newdir))
|
|
||||||
chdir(expanduser(newdir))
|
|
||||||
try:
|
|
||||||
yield
|
|
||||||
finally:
|
|
||||||
logger.info("cd {}".format(prevdir))
|
|
||||||
chdir(prevdir)
|
|
||||||
|
|
||||||
|
|
||||||
@contextmanager
|
|
||||||
def python_path(newdir):
|
|
||||||
"""
|
|
||||||
Set the PYTHONPATH environmnet variable to `newdir` for the duraiton of the
|
|
||||||
context.
|
|
||||||
"""
|
|
||||||
prevdir = environ.get("PYTHONPATH")
|
|
||||||
logger.debug("Setting PYTHONPATH to {}".format(newdir))
|
|
||||||
environ["PYTHONPATH"] = newdir
|
|
||||||
try:
|
|
||||||
yield
|
|
||||||
finally:
|
|
||||||
logger.debug("Setting PYTHONPATH to {}".format(prevdir))
|
|
||||||
if prevdir is None:
|
|
||||||
environ.pop("PYTHONPATH")
|
|
||||||
else:
|
|
||||||
environ["PYTHONPATH"] = prevdir
|
|
|
@ -1,23 +0,0 @@
|
||||||
# pure-python package, this can be removed when we'll support any python package
|
|
||||||
import os
|
|
||||||
import sh
|
|
||||||
from kivy_ios.toolchain import CythonRecipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
|
|
||||||
|
|
||||||
class AioHttpRecipe(CythonRecipe):
|
|
||||||
version = "3.5.4"
|
|
||||||
url = "https://pypi.python.org/packages/source/a/aiohttp/aiohttp-{version}.tar.gz"
|
|
||||||
depends = ["python"]
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
recipe = AioHttpRecipe()
|
|
|
@ -1,29 +0,0 @@
|
||||||
# pure-python package, this can be removed when we'll support any python package
|
|
||||||
import os
|
|
||||||
import sh
|
|
||||||
from kivy_ios.toolchain import CythonRecipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
|
|
||||||
class AioupnpRecipe(CythonRecipe):
|
|
||||||
version = "0.0.17"
|
|
||||||
url = "https://pypi.python.org/packages/source/a/aioupnp/aioupnp-{version}.tar.gz"
|
|
||||||
depends = ["python", "defusedxml"]
|
|
||||||
|
|
||||||
def prebuild_arch(self, arch):
|
|
||||||
if self.has_marker("patched"):
|
|
||||||
return
|
|
||||||
self.apply_patch("exclude_netifaces.patch")
|
|
||||||
self.apply_patch("none_netifaces.patch")
|
|
||||||
self.set_marker("patched")
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
recipe = AioupnpRecipe()
|
|
|
@ -1,10 +0,0 @@
|
||||||
--- a/setup.py 2020-09-28 10:20:48.000000000 +0100
|
|
||||||
+++ b/setup.py 2020-09-28 10:21:12.000000000 +0100
|
|
||||||
@@ -36,7 +36,6 @@
|
|
||||||
packages=find_packages(exclude=('tests',)),
|
|
||||||
entry_points={'console_scripts': console_scripts},
|
|
||||||
install_requires=[
|
|
||||||
- 'netifaces',
|
|
||||||
'defusedxml'
|
|
||||||
]
|
|
||||||
)
|
|
|
@ -1,16 +0,0 @@
|
||||||
--- a/aioupnp/interfaces.py 2020-09-28 10:23:40.000000000 +0100
|
|
||||||
+++ b/aioupnp/interfaces.py 2020-09-28 10:23:56.000000000 +0100
|
|
||||||
@@ -1,12 +1,11 @@
|
|
||||||
import socket
|
|
||||||
from collections import OrderedDict
|
|
||||||
import typing
|
|
||||||
-import netifaces
|
|
||||||
from aioupnp.fault import UPnPError
|
|
||||||
|
|
||||||
|
|
||||||
def get_netifaces():
|
|
||||||
- return netifaces
|
|
||||||
+ return None
|
|
||||||
|
|
||||||
|
|
||||||
def ifaddresses(iface: str) -> typing.Dict[int, typing.List[typing.Dict[str, str]]]:
|
|
|
@ -1,20 +0,0 @@
|
||||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
import sh, os
|
|
||||||
|
|
||||||
class AppdirsRecipe(PythonRecipe):
|
|
||||||
version = "1.4.3"
|
|
||||||
url = "https://pypi.python.org/packages/source/a/appdirs/appdirs-{version}.tar.gz"
|
|
||||||
depends = ["python"]
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
recipe = AppdirsRecipe()
|
|
|
@ -1,20 +0,0 @@
|
||||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
import sh, os
|
|
||||||
|
|
||||||
class Asn1CryptoRecipe(PythonRecipe):
|
|
||||||
version = "0.24.0"
|
|
||||||
url = "https://pypi.python.org/packages/source/a/asn1crypto/asn1crypto-{version}.tar.gz"
|
|
||||||
depends = ["python"]
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
recipe = Asn1CryptoRecipe()
|
|
|
@ -1,22 +0,0 @@
|
||||||
# pure-python package, this can be removed when we'll support any python package
|
|
||||||
import os
|
|
||||||
import sh
|
|
||||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
|
||||||
|
|
||||||
|
|
||||||
class AsyncTimeoutRecipe(PythonRecipe):
|
|
||||||
version = "3.0.1"
|
|
||||||
url = "https://pypi.python.org/packages/source/a/async-timeout/async-timeout-{version}.tar.gz"
|
|
||||||
depends = ["python"]
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
recipe = AsyncTimeoutRecipe()
|
|
|
@ -1,20 +0,0 @@
|
||||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
import sh, os
|
|
||||||
|
|
||||||
class AttrsRecipe(PythonRecipe):
|
|
||||||
version = "18.1.0"
|
|
||||||
url = "https://pypi.python.org/packages/source/a/attrs/attrs-{version}.tar.gz"
|
|
||||||
depends = ["python"]
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
recipe = AttrsRecipe()
|
|
|
@ -1,12 +0,0 @@
|
||||||
from kivy_ios.toolchain import CythonRecipe
|
|
||||||
|
|
||||||
|
|
||||||
class AudiostreamRecipe(CythonRecipe):
|
|
||||||
version = "master"
|
|
||||||
url = "https://github.com/kivy/audiostream/archive/{version}.zip"
|
|
||||||
library = "libaudiostream.a"
|
|
||||||
depends = ["python", "sdl2", "sdl2_mixer"]
|
|
||||||
pre_build_ext = True
|
|
||||||
|
|
||||||
|
|
||||||
recipe = AudiostreamRecipe()
|
|
|
@ -1,20 +0,0 @@
|
||||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
import sh, os
|
|
||||||
|
|
||||||
class Base58Recipe(PythonRecipe):
|
|
||||||
version = "1.0.0"
|
|
||||||
url = "https://pypi.python.org/packages/source/b/base58/base58-{version}.tar.gz"
|
|
||||||
depends = ["python"]
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
recipe = Base58Recipe()
|
|
|
@ -1,23 +0,0 @@
|
||||||
# pure-python package, this can be removed when we'll support any python package
|
|
||||||
import os
|
|
||||||
import sh
|
|
||||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
|
||||||
|
|
||||||
|
|
||||||
class CertifiRecipe(PythonRecipe):
|
|
||||||
version = "2020.6.20"
|
|
||||||
url = "https://pypi.python.org/packages/source/c/certifi/certifi-{version}.tar.gz"
|
|
||||||
depends = ["python"]
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
|
|
||||||
recipe = CertifiRecipe()
|
|
|
@ -1,51 +0,0 @@
|
||||||
from kivy_ios.toolchain import CythonRecipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
import os
|
|
||||||
import sh
|
|
||||||
|
|
||||||
|
|
||||||
class CffiRecipe(CythonRecipe):
|
|
||||||
name = "cffi"
|
|
||||||
version = "1.14.3"
|
|
||||||
url = "https://pypi.python.org/packages/source/c/cffi/cffi-{version}.tar.gz"
|
|
||||||
library = "libcffi.a"
|
|
||||||
depends = ["host_cffi", "libffi", "pycparser"]
|
|
||||||
cythonize = False
|
|
||||||
|
|
||||||
def get_recipe_env(self, arch):
|
|
||||||
env = super(CffiRecipe, self).get_recipe_env(arch)
|
|
||||||
env["CFLAGS"] += " -I{}".format(join(self.ctx.dist_dir, "include", arch.arch, "libffi"))
|
|
||||||
env["LDFLAGS"] = " ".join([
|
|
||||||
env.get('CFLAGS', '')
|
|
||||||
])
|
|
||||||
return env
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
|
|
||||||
# manually create expected directory in build directory
|
|
||||||
scripts_dir = join("build", "scripts-3.8")
|
|
||||||
if not os.path.exists(scripts_dir):
|
|
||||||
os.makedirs(scripts_dir)
|
|
||||||
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
shprint(hostpython, "setup.py", "build_ext", _env=build_env)
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
# hack: copy _cffi_backend.so from hostpython
|
|
||||||
so_file = "_cffi_backend.cpython-38-darwin.so"
|
|
||||||
egg_name = "cffi-1.14.3-py3.8-macosx-10.15-x86_64.egg" # harded - needs to change
|
|
||||||
dest_dir = join(self.ctx.dist_dir, "root", "python3", "lib", "python3.8", "site-packages", egg_name)
|
|
||||||
dest_dir_main = join(self.ctx.dist_dir, "root", "python3", "lib", "python3.8", "site-packages")
|
|
||||||
|
|
||||||
src_dir = join(self.ctx.dist_dir, "hostpython3", "lib", "python3.8", "site-packages", egg_name)
|
|
||||||
sh.cp(join(src_dir, so_file), join(dest_dir, so_file))
|
|
||||||
sh.cp(join(src_dir, so_file), join(dest_dir_main, so_file))
|
|
||||||
|
|
||||||
|
|
||||||
recipe = CffiRecipe()
|
|
|
@ -1,23 +0,0 @@
|
||||||
# pure-python package, this can be removed when we'll support any python package
|
|
||||||
import os
|
|
||||||
import sh
|
|
||||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
|
||||||
|
|
||||||
|
|
||||||
class ChardetRecipe(PythonRecipe):
|
|
||||||
version = "3.0.4"
|
|
||||||
url = "https://pypi.python.org/packages/source/c/chardet/chardet-{version}.tar.gz"
|
|
||||||
depends = ["python"]
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
|
|
||||||
recipe = ChardetRecipe()
|
|
|
@ -1,24 +0,0 @@
|
||||||
# pure-python package, this can be removed when we'll support any python package
|
|
||||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
import sh
|
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
class ClickRecipe(PythonRecipe):
|
|
||||||
version = "7.1.2"
|
|
||||||
url = "https://github.com/mitsuhiko/click/archive/{version}.zip"
|
|
||||||
depends = ["python"]
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
|
|
||||||
recipe = ClickRecipe()
|
|
|
@ -1,76 +0,0 @@
|
||||||
import sh
|
|
||||||
import os
|
|
||||||
from os.path import join
|
|
||||||
|
|
||||||
from kivy_ios.toolchain import CythonRecipe, Recipe, shprint
|
|
||||||
from kivy_ios.context_managers import cd
|
|
||||||
|
|
||||||
|
|
||||||
class CoincurveRecipe(CythonRecipe):
|
|
||||||
version = "7.1.0"
|
|
||||||
url = "https://github.com/ofek/coincurve/archive/{version}.tar.gz"
|
|
||||||
depends = ["python3", "libffi", "cffi", "pycparser", "libsecp256k1"]
|
|
||||||
library = 'libcoincurve.a'
|
|
||||||
pre_build_ext = True
|
|
||||||
include_per_arch = True
|
|
||||||
|
|
||||||
def dest_dir(self):
|
|
||||||
return join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
|
|
||||||
def prebuild_arch(self, arch):
|
|
||||||
# common to all archs
|
|
||||||
if self.has_marker("patched"):
|
|
||||||
return
|
|
||||||
self.apply_patch("cross_compile.patch")
|
|
||||||
self.apply_patch("drop_setup_requires.patch")
|
|
||||||
self.apply_patch("find_lib.patch")
|
|
||||||
self.apply_patch("no-download.patch")
|
|
||||||
self.apply_patch("setup.py.patch")
|
|
||||||
self.set_marker("patched")
|
|
||||||
|
|
||||||
def get_recipe_env(self, arch):
|
|
||||||
env = arch.get_env()
|
|
||||||
# sets linker to use the correct gcc (cross compiler)
|
|
||||||
env['TOOLCHAIN_PREFIX'] = arch.triple
|
|
||||||
env['LDSHARED'] = env['CC'] + ' -pthread -shared -Wl'
|
|
||||||
libsecp256k1 = self.get_recipe('libsecp256k1', self.ctx)
|
|
||||||
libsecp256k1_dir = libsecp256k1.get_build_dir(arch.arch)
|
|
||||||
env['LDFLAGS'] += ' -L{}'.format(os.path.join(libsecp256k1_dir, '.libs'))
|
|
||||||
env['CFLAGS'] += ' -I' + os.path.join(libsecp256k1_dir, 'include')
|
|
||||||
|
|
||||||
target_python = Recipe.get_recipe('python3', self.ctx).get_build_dir(arch.arch)
|
|
||||||
env['LDFLAGS'] += ' -L' + target_python
|
|
||||||
|
|
||||||
print(env['LDFLAGS'])
|
|
||||||
|
|
||||||
python_version = '3.8'
|
|
||||||
env["PYTHONPATH"] = join(self.dest_dir(), "lib", "python3.8", "site-packages")
|
|
||||||
env['PYTHON_ROOT'] = join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
env['CFLAGS'] += ' -I' + env['PYTHON_ROOT'] + '/include/python{}'.format(python_version)
|
|
||||||
env['LDFLAGS'] += " -lpython{}".format(python_version)
|
|
||||||
env['LDFLAGS'] += " -lsecp256k1 -lssl -lcrypto -lffi -lz"
|
|
||||||
return env
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
def postbuild_arch(self, arch):
|
|
||||||
py_arch = arch.arch
|
|
||||||
if py_arch == "arm64":
|
|
||||||
py_arch = "x86_64"
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
build_env = self.get_recipe_env(arch)
|
|
||||||
tmp_folder = 'build/temp.macosx-10.15-{}-3.8/build/temp.macosx-10.15-{}-3.8'.format(py_arch, py_arch)
|
|
||||||
shprint(sh.Command(build_env['AR']),
|
|
||||||
"-q",
|
|
||||||
"{}/{}".format(self.build_dir, self.library),
|
|
||||||
"{}/{}/_libsecp256k1.o".format(self.build_dir, tmp_folder))
|
|
||||||
|
|
||||||
recipe = CoincurveRecipe()
|
|
|
@ -1,12 +0,0 @@
|
||||||
diff --git a/setup.py b/setup.py
|
|
||||||
index c224fb2..bf925bd 100644
|
|
||||||
--- a/setup.py
|
|
||||||
+++ b/setup.py
|
|
||||||
@@ -182,6 +182,7 @@ class build_clib(_build_clib):
|
|
||||||
'--disable-dependency-tracking',
|
|
||||||
'--with-pic',
|
|
||||||
'--enable-module-recovery',
|
|
||||||
+ "--host=%s" % os.environ['TOOLCHAIN_PREFIX'],
|
|
||||||
'--disable-jni',
|
|
||||||
'--prefix',
|
|
||||||
os.path.abspath(self.build_clib),
|
|
|
@ -1,12 +0,0 @@
|
||||||
diff --git a/setup.py b/setup.py
|
|
||||||
index c224fb2..466e789 100644
|
|
||||||
--- a/setup.py
|
|
||||||
+++ b/setup.py
|
|
||||||
@@ -250,7 +250,6 @@ else:
|
|
||||||
def has_c_libraries(self):
|
|
||||||
return not has_system_lib()
|
|
||||||
setup_kwargs = dict(
|
|
||||||
- setup_requires=['cffi>=1.3.0', 'pytest-runner>=2.6.2'],
|
|
||||||
ext_package='coincurve',
|
|
||||||
cffi_modules=['_cffi_build/build.py:ffi'],
|
|
||||||
cmdclass={
|
|
|
@ -1,13 +0,0 @@
|
||||||
diff --git a/setup_support.py b/setup_support.py
|
|
||||||
index e7a4f2e..72f0c4d 100644
|
|
||||||
--- a/setup_support.py
|
|
||||||
+++ b/setup_support.py
|
|
||||||
@@ -68,6 +69,8 @@ def build_flags(library, type_, path):
|
|
||||||
|
|
||||||
|
|
||||||
def _find_lib():
|
|
||||||
+ # we're picking up the recipe one
|
|
||||||
+ return True
|
|
||||||
from cffi import FFI
|
|
||||||
ffi = FFI()
|
|
||||||
try:
|
|
|
@ -1,13 +0,0 @@
|
||||||
diff --git a/setup.py b/setup.py
|
|
||||||
index c224fb2..d5f6d1a 100644
|
|
||||||
--- a/setup.py
|
|
||||||
+++ b/setup.py
|
|
||||||
@@ -51,6 +51,8 @@ if [int(i) for i in setuptools_version.split('.', 2)[:2]] < [3, 3]:
|
|
||||||
|
|
||||||
|
|
||||||
def download_library(command):
|
|
||||||
+ # we will use the custom libsecp256k1 recipe
|
|
||||||
+ return
|
|
||||||
if command.dry_run:
|
|
||||||
return
|
|
||||||
libdir = absolute('libsecp256k1')
|
|
|
@ -1,22 +0,0 @@
|
||||||
From bf3a0684e9b0af29d9777f61d6e7e1d3cc0f2803 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kieran Prasch <kieranprasch@gmail.com>
|
|
||||||
Date: Thu, 19 Jul 2018 14:11:48 -0700
|
|
||||||
Subject: [PATCH] Exclude tests in setup.py
|
|
||||||
|
|
||||||
---
|
|
||||||
setup.py | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/setup.py b/setup.py
|
|
||||||
index 0b579f1..0a793ed 100644
|
|
||||||
--- a/setup.py
|
|
||||||
+++ b/setup.py
|
|
||||||
@@ -277,7 +277,7 @@ def has_c_libraries(self):
|
|
||||||
install_requires=['asn1crypto', 'cffi>=1.3.0'],
|
|
||||||
tests_require=['pytest>=2.8.7'],
|
|
||||||
|
|
||||||
- packages=find_packages(exclude=('_cffi_build', '_cffi_build.*', 'libsecp256k1')),
|
|
||||||
+ packages=find_packages(exclude=('_cffi_build', '_cffi_build.*', 'libsecp256k1', 'tests')),
|
|
||||||
|
|
||||||
distclass=Distribution,
|
|
||||||
zip_safe=False,
|
|
|
@ -1,20 +0,0 @@
|
||||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
import sh, os
|
|
||||||
|
|
||||||
class ColoramaRecipe(PythonRecipe):
|
|
||||||
version = "0.3.7"
|
|
||||||
url = "https://pypi.python.org/packages/source/c/colorama/colorama-{version}.tar.gz"
|
|
||||||
depends = ["python"]
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
recipe = ColoramaRecipe()
|
|
|
@ -1,79 +0,0 @@
|
||||||
from os.path import join
|
|
||||||
from kivy_ios.toolchain import CythonRecipe, Recipe, shprint
|
|
||||||
from kivy_ios.context_managers import cd
|
|
||||||
import os
|
|
||||||
import sh
|
|
||||||
|
|
||||||
|
|
||||||
class CryptographyRecipe(CythonRecipe):
|
|
||||||
name = "cryptography"
|
|
||||||
version = "3.1.1"
|
|
||||||
url = "https://pypi.python.org/packages/source/c/cryptography/cryptography-{version}.tar.gz"
|
|
||||||
library = "libcryptography.a"
|
|
||||||
depends = ["host_setuptools3", "host_cffi", "cffi", "asn1crypto", "idna", "six"]
|
|
||||||
python_depends = ["setuptools"]
|
|
||||||
cythonize = False
|
|
||||||
pre_build_ext = True
|
|
||||||
include_per_arch = True
|
|
||||||
|
|
||||||
def prebuild_arch(self, arch):
|
|
||||||
if self.has_marker("patched"):
|
|
||||||
return
|
|
||||||
self.apply_patch("osrandom.patch")
|
|
||||||
self.set_marker("patched")
|
|
||||||
|
|
||||||
def dest_dir(self):
|
|
||||||
return join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
|
|
||||||
def get_recipe_env(self, arch):
|
|
||||||
env = super(CryptographyRecipe, self).get_recipe_env(arch)
|
|
||||||
r = self.get_recipe('openssl', self.ctx)
|
|
||||||
openssl_dir = r.get_build_dir(arch.arch)
|
|
||||||
target_python = Recipe.get_recipe('python3', self.ctx).get_build_dir(arch.arch)
|
|
||||||
env['TOOLCHAIN_PREFIX'] = arch.triple
|
|
||||||
env['LDSHARED'] = env['CC'] + ' -pthread -shared -Wl'
|
|
||||||
env['LDFLAGS'] += ' -L' + target_python
|
|
||||||
|
|
||||||
env['PYTHON_ROOT'] = join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
env['CFLAGS'] += ' -I' + env['PYTHON_ROOT'] + '/include/python3.8' + \
|
|
||||||
' -I' + join(openssl_dir, 'include') + \
|
|
||||||
' -I' + join(self.ctx.dist_dir, "include", arch.arch, "libffi")
|
|
||||||
env['LDFLAGS'] += ' -L' + env['PYTHON_ROOT'] + '/lib' + \
|
|
||||||
' -L' + openssl_dir + \
|
|
||||||
' -lpython3.8' + \
|
|
||||||
' -lssl' + \
|
|
||||||
' -lcrypto' + \
|
|
||||||
' -lffi' + \
|
|
||||||
' -lcffi ' + \
|
|
||||||
' -lz'
|
|
||||||
return env
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
with cd(build_dir):
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
def postbuild_arch(self, arch):
|
|
||||||
py_arch = arch.arch
|
|
||||||
if py_arch == "arm64":
|
|
||||||
py_arch = "x86_64"
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
build_env = self.get_recipe_env(arch)
|
|
||||||
tmp_folder = 'build/temp.macosx-10.15-{}-3.8/build/temp.macosx-10.15-{}-3.8'.format(py_arch, py_arch)
|
|
||||||
for o_file in [
|
|
||||||
"_openssl.o",
|
|
||||||
"_padding.o",
|
|
||||||
]:
|
|
||||||
shprint(sh.Command(build_env['AR']),
|
|
||||||
"-q",
|
|
||||||
"{}/{}".format(self.build_dir, self.library),
|
|
||||||
"{}/{}/{}".format(self.build_dir, tmp_folder, o_file))
|
|
||||||
|
|
||||||
|
|
||||||
recipe = CryptographyRecipe()
|
|
|
@ -1,16 +0,0 @@
|
||||||
--- cryptography-2.2.2/src/_cffi_src/openssl/src/osrandom_engine.h 2018-03-27 15:12:05.000000000 +0100
|
|
||||||
+++ cryptography-2.2.2-patch/src/_cffi_src/openssl/src/osrandom_engine.h 2018-06-02 05:06:04.000000000 +0100
|
|
||||||
@@ -11,13 +11,6 @@
|
|
||||||
#include <sys/syscall.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
- #ifdef __APPLE__
|
|
||||||
- #include <sys/random.h>
|
|
||||||
- /* To support weak linking we need to declare this as a weak import even if
|
|
||||||
- * it's not present in sys/random (e.g. macOS < 10.12). */
|
|
||||||
- extern int getentropy(void *buffer, size_t size) __attribute((weak_import));
|
|
||||||
- #endif
|
|
||||||
-
|
|
||||||
#ifdef __linux__
|
|
||||||
/* for SYS_getrandom */
|
|
||||||
#include <sys/syscall.h>
|
|
|
@ -1,12 +0,0 @@
|
||||||
from kivy_ios.toolchain import CythonRecipe
|
|
||||||
|
|
||||||
|
|
||||||
class CurlyRecipe(CythonRecipe):
|
|
||||||
version = "master"
|
|
||||||
url = "https://github.com/tito/curly/archive/{version}.zip"
|
|
||||||
library = "libcurly.a"
|
|
||||||
depends = ["python", "libcurl", "sdl2", "sdl2_image"]
|
|
||||||
pre_build_ext = True
|
|
||||||
|
|
||||||
|
|
||||||
recipe = CurlyRecipe()
|
|
|
@ -1,24 +0,0 @@
|
||||||
"""
|
|
||||||
Author: Lawrence Du, Lukasz Mach
|
|
||||||
E-mail: larrydu88@gmail.com, maho@pagema.net
|
|
||||||
"""
|
|
||||||
|
|
||||||
from kivy_ios.toolchain import CythonRecipe
|
|
||||||
|
|
||||||
|
|
||||||
class CymunkRecipe(CythonRecipe):
|
|
||||||
version = 'master'
|
|
||||||
url = 'https://github.com/kivy/cymunk/archive/{version}.zip'
|
|
||||||
name = 'cymunk'
|
|
||||||
pre_build_ext = True
|
|
||||||
library = 'libcymunk.a'
|
|
||||||
|
|
||||||
depends = ['python']
|
|
||||||
|
|
||||||
def get_recipe_env(self, arch):
|
|
||||||
ret = super(CymunkRecipe, self).get_recipe_env(arch)
|
|
||||||
ret['CFLAGS'] += ' -Wno-implicit-function-declaration'
|
|
||||||
return ret
|
|
||||||
|
|
||||||
|
|
||||||
recipe = CymunkRecipe()
|
|
|
@ -1,23 +0,0 @@
|
||||||
# pure-python package, this can be removed when we'll support any python package
|
|
||||||
import os
|
|
||||||
import sh
|
|
||||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
|
||||||
|
|
||||||
|
|
||||||
class DefusedXmlRecipe(PythonRecipe):
|
|
||||||
version = "0.6.0"
|
|
||||||
url = "https://pypi.python.org/packages/source/d/defusedxml/defusedxml-{version}.tar.gz"
|
|
||||||
depends = ["python"]
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
|
|
||||||
recipe = DefusedXmlRecipe()
|
|
|
@ -1,20 +0,0 @@
|
||||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
import sh, os
|
|
||||||
|
|
||||||
class DocoptRecipe(PythonRecipe):
|
|
||||||
version = "0.6.2"
|
|
||||||
url = "https://pypi.python.org/packages/source/d/docopt/docopt-{version}.tar.gz"
|
|
||||||
depends = ["python"]
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
recipe = DocoptRecipe()
|
|
|
@ -1,20 +0,0 @@
|
||||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
import sh, os
|
|
||||||
|
|
||||||
class EcdsaRecipe(PythonRecipe):
|
|
||||||
version = "0.13"
|
|
||||||
url = "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-{version}.tar.gz"
|
|
||||||
depends = ["python"]
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
recipe = EcdsaRecipe()
|
|
|
@ -1,94 +0,0 @@
|
||||||
from kivy_ios.toolchain import Recipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
import sh
|
|
||||||
|
|
||||||
|
|
||||||
class FFMpegRecipe(Recipe):
|
|
||||||
version = "n3.4.5"
|
|
||||||
url = "https://github.com/FFmpeg/FFmpeg/archive/{version}.zip"
|
|
||||||
include_per_arch = True
|
|
||||||
include_dir = "dist/include"
|
|
||||||
optional_depends = ["openssl"]
|
|
||||||
libraries = [
|
|
||||||
"libavcodec/libavcodec.a",
|
|
||||||
"libavdevice/libavdevice.a",
|
|
||||||
"libavfilter/libavfilter.a",
|
|
||||||
"libavformat/libavformat.a",
|
|
||||||
"libavresample/libavresample.a",
|
|
||||||
"libavutil/libavutil.a",
|
|
||||||
"libswresample/libswresample.a",
|
|
||||||
"libswscale/libswscale.a",
|
|
||||||
]
|
|
||||||
pbx_frameworks = ["VideoToolbox"]
|
|
||||||
|
|
||||||
def build_arch(self, arch):
|
|
||||||
options = [
|
|
||||||
"--disable-everything",
|
|
||||||
"--enable-parsers",
|
|
||||||
"--enable-decoders",
|
|
||||||
"--enable-demuxers",
|
|
||||||
"--enable-filter=aresample,resample,crop,scale",
|
|
||||||
"--enable-protocol=file,http,rtmp",
|
|
||||||
"--enable-pic",
|
|
||||||
"--enable-small",
|
|
||||||
"--enable-hwaccels",
|
|
||||||
"--enable-static",
|
|
||||||
"--disable-shared",
|
|
||||||
# libpostproc is GPL: https://ffmpeg.org/pipermail/ffmpeg-user/2012-February/005162.html
|
|
||||||
"--enable-gpl",
|
|
||||||
# disable some unused algo
|
|
||||||
# note: "golomb" are the one used in our video test, so don't use --disable-golomb
|
|
||||||
# note: and for aac decoding: "rdft", "mdct", and "fft" are needed
|
|
||||||
"--disable-dxva2",
|
|
||||||
"--disable-vdpau",
|
|
||||||
"--disable-vaapi",
|
|
||||||
"--disable-dct",
|
|
||||||
# disable binaries / doc
|
|
||||||
"--enable-cross-compile",
|
|
||||||
"--disable-debug",
|
|
||||||
"--disable-programs",
|
|
||||||
"--disable-doc",
|
|
||||||
"--enable-pic",
|
|
||||||
"--enable-avresample"]
|
|
||||||
|
|
||||||
if "openssl.build_all" in self.ctx.state:
|
|
||||||
options += [
|
|
||||||
"--enable-openssl",
|
|
||||||
"--enable-nonfree",
|
|
||||||
"--enable-protocol=https,tls_openssl"]
|
|
||||||
|
|
||||||
build_env = arch.get_env()
|
|
||||||
build_env["VERBOSE"] = "1"
|
|
||||||
configure = sh.Command(join(self.build_dir, "configure"))
|
|
||||||
shprint(configure,
|
|
||||||
"--target-os=darwin",
|
|
||||||
"--arch={}".format(arch.arch),
|
|
||||||
"--cc={}".format(build_env["CC"]),
|
|
||||||
"--prefix={}/dist".format(self.build_dir),
|
|
||||||
"--extra-cflags={}".format(build_env["CFLAGS"]),
|
|
||||||
"--extra-cxxflags={}".format(build_env["CFLAGS"]),
|
|
||||||
"--extra-ldflags={}".format(build_env["LDFLAGS"]),
|
|
||||||
"--disable-x86asm",
|
|
||||||
*options,
|
|
||||||
_env=build_env)
|
|
||||||
"""
|
|
||||||
shprint(sh.sed,
|
|
||||||
"-i.bak",
|
|
||||||
"s/HAVE_CLOSESOCKET=yes//g",
|
|
||||||
"config.mak")
|
|
||||||
shprint(sh.sed,
|
|
||||||
"-i.bak",
|
|
||||||
"s/#define HAVE_CLOSESOCKET 1//g",
|
|
||||||
"config.h")
|
|
||||||
if exists("config.asm"):
|
|
||||||
shprint(sh.sed,
|
|
||||||
"-i.bak",
|
|
||||||
"s/%define HAVE_CLOSESOCKET 1//g",
|
|
||||||
"config.asm")
|
|
||||||
"""
|
|
||||||
shprint(sh.make, "clean", _env=build_env)
|
|
||||||
shprint(sh.make, self.ctx.concurrent_make, _env=build_env)
|
|
||||||
shprint(sh.make, "install")
|
|
||||||
|
|
||||||
|
|
||||||
recipe = FFMpegRecipe()
|
|
|
@ -1,35 +0,0 @@
|
||||||
from kivy_ios.toolchain import CythonRecipe
|
|
||||||
from os.path import join
|
|
||||||
|
|
||||||
|
|
||||||
class FFPyplayerRecipe(CythonRecipe):
|
|
||||||
version = "4.2.0"
|
|
||||||
url = "https://github.com/matham/ffpyplayer/archive/{version}.zip"
|
|
||||||
library = "libffpyplayer.a"
|
|
||||||
depends = ["python", "ffmpeg"]
|
|
||||||
pbx_frameworks = [
|
|
||||||
"CoreVideo", "CoreMedia", "CoreImage", "AVFoundation", "UIKit",
|
|
||||||
"CoreMotion"]
|
|
||||||
pbx_libraries = ["libiconv"]
|
|
||||||
pre_build_ext = True
|
|
||||||
|
|
||||||
def get_recipe_env(self, arch):
|
|
||||||
env = super(FFPyplayerRecipe, self).get_recipe_env(arch)
|
|
||||||
env["CC"] += " -I{}".format(
|
|
||||||
join(self.ctx.dist_dir, "include", arch.arch, "libffi"))
|
|
||||||
env["SDL_INCLUDE_DIR"] = join(self.ctx.dist_dir, "include",
|
|
||||||
"common", "sdl2")
|
|
||||||
env["FFMPEG_INCLUDE_DIR"] = join(self.ctx.dist_dir, "include",
|
|
||||||
arch.arch, "ffmpeg")
|
|
||||||
env["CONFIG_POSTPROC"] = "0"
|
|
||||||
return env
|
|
||||||
|
|
||||||
def prebuild_arch(self, arch):
|
|
||||||
# common to all archs
|
|
||||||
if self.has_marker("patched"):
|
|
||||||
return
|
|
||||||
self.apply_patch("misc-visibility.patch")
|
|
||||||
self.set_marker("patched")
|
|
||||||
|
|
||||||
|
|
||||||
recipe = FFPyplayerRecipe()
|
|
|
@ -1,41 +0,0 @@
|
||||||
diff --git a/ffpyplayer/clib/misc.c b/ffpyplayer/clib/misc.c
|
|
||||||
index 55181d1..6011ffa 100644
|
|
||||||
--- a/ffpyplayer/clib/misc.c
|
|
||||||
+++ b/ffpyplayer/clib/misc.c
|
|
||||||
@@ -1,8 +1,7 @@
|
|
||||||
-
|
|
||||||
#include "misc.h"
|
|
||||||
|
|
||||||
#define FLAGS (o->type == AV_OPT_TYPE_FLAGS) ? AV_DICT_APPEND : 0
|
|
||||||
-void print_all_libs_info(int flags, int level)
|
|
||||||
+void __attribute__ ((visibility ("hidden"))) print_all_libs_info(int flags, int level)
|
|
||||||
{
|
|
||||||
#if CONFIG_AVUTIL
|
|
||||||
PRINT_LIB_INFO(avutil, AVUTIL, flags, level);
|
|
||||||
@@ -30,7 +29,7 @@ void print_all_libs_info(int flags, int level)
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
-const AVOption *opt_find(void *obj, const char *name, const char *unit,
|
|
||||||
+const AVOption __attribute__ ((visibility ("hidden"))) *opt_find(void *obj, const char *name, const char *unit,
|
|
||||||
int opt_flags, int search_flags)
|
|
||||||
{
|
|
||||||
const AVOption *o = av_opt_find(obj, name, unit, opt_flags, search_flags);
|
|
||||||
@@ -40,7 +39,7 @@ const AVOption *opt_find(void *obj, const char *name, const char *unit,
|
|
||||||
}
|
|
||||||
|
|
||||||
#define FLAGS (o->type == AV_OPT_TYPE_FLAGS) ? AV_DICT_APPEND : 0
|
|
||||||
-int opt_default(const char *opt, const char *arg,
|
|
||||||
+int __attribute__ ((visibility ("hidden"))) opt_default(const char *opt, const char *arg,
|
|
||||||
struct SwsContext *sws_opts, AVDictionary **sws_dict, AVDictionary **swr_opts,
|
|
||||||
AVDictionary **resample_opts, AVDictionary **format_opts, AVDictionary **codec_opts)
|
|
||||||
{
|
|
||||||
@@ -140,7 +139,7 @@ int opt_default(const char *opt, const char *arg,
|
|
||||||
return AVERROR_OPTION_NOT_FOUND;
|
|
||||||
}
|
|
||||||
|
|
||||||
-int get_plane_sizes(int size[4], int required_plane[4], enum AVPixelFormat pix_fmt,
|
|
||||||
+int __attribute__ ((visibility ("hidden"))) get_plane_sizes(int size[4], int required_plane[4], enum AVPixelFormat pix_fmt,
|
|
||||||
int height, const int linesizes[4])
|
|
||||||
{
|
|
||||||
int i, total_size;
|
|
|
@ -1,24 +0,0 @@
|
||||||
# pure-python package, this can be removed when we'll support any python package
|
|
||||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
import sh
|
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
class FlaskRecipe(PythonRecipe):
|
|
||||||
version = "1.1.2"
|
|
||||||
url = "https://github.com/mitsuhiko/flask/archive/{version}.zip"
|
|
||||||
depends = ["python", "jinja2", "werkzeug", "itsdangerous", "click"]
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
|
|
||||||
recipe = FlaskRecipe()
|
|
|
@ -1,34 +0,0 @@
|
||||||
from kivy_ios.toolchain import Recipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
import sh
|
|
||||||
|
|
||||||
|
|
||||||
class FreetypeRecipe(Recipe):
|
|
||||||
version = "2.5.5"
|
|
||||||
url = "http://download.savannah.gnu.org/releases/freetype/freetype-{version}.tar.bz2"
|
|
||||||
library = "objs/.libs/libfreetype.a"
|
|
||||||
include_dir = ["include", ("builds/unix/ftconfig.h", "config/ftconfig.h")]
|
|
||||||
include_per_arch = True
|
|
||||||
|
|
||||||
def build_arch(self, arch):
|
|
||||||
build_env = arch.get_env()
|
|
||||||
configure = sh.Command(join(self.build_dir, "configure"))
|
|
||||||
shprint(configure,
|
|
||||||
"CC={}".format(build_env["CC"]),
|
|
||||||
"LD={}".format(build_env["LD"]),
|
|
||||||
"CFLAGS={}".format(build_env["CFLAGS"]),
|
|
||||||
"LDFLAGS={}".format(build_env["LDFLAGS"]),
|
|
||||||
"--prefix=/",
|
|
||||||
"--host={}".format(arch.triple),
|
|
||||||
"--without-png",
|
|
||||||
"--without-bzip2",
|
|
||||||
"--without-fsspec",
|
|
||||||
"--without-harfbuzz",
|
|
||||||
"--without-old-mac-fonts",
|
|
||||||
"--enable-static=yes",
|
|
||||||
"--enable-shared=no")
|
|
||||||
shprint(sh.make, "clean")
|
|
||||||
shprint(sh.make, self.ctx.concurrent_make)
|
|
||||||
|
|
||||||
|
|
||||||
recipe = FreetypeRecipe()
|
|
|
@ -1,23 +0,0 @@
|
||||||
# pure-python package, this can be removed when we'll support any python package
|
|
||||||
import os
|
|
||||||
import sh
|
|
||||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
|
||||||
|
|
||||||
|
|
||||||
class HachoirRecipe(PythonRecipe):
|
|
||||||
version = "3.1.1"
|
|
||||||
url = "https://pypi.python.org/packages/source/h/hachoir/hachoir-{version}.tar.gz"
|
|
||||||
depends = ["python"]
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
|
|
||||||
recipe = HachoirRecipe()
|
|
|
@ -1,61 +0,0 @@
|
||||||
from os.path import join
|
|
||||||
from kivy_ios.toolchain import Recipe, shprint
|
|
||||||
import os
|
|
||||||
import sh
|
|
||||||
|
|
||||||
libffi_tpl = """
|
|
||||||
prefix=%PREFIX%
|
|
||||||
exec_prefix=${prefix}
|
|
||||||
libdir=${exec_prefix}/build/Release
|
|
||||||
includedir=${libdir}/build_macosx-x86_64/include
|
|
||||||
|
|
||||||
Name: libffi
|
|
||||||
Description: Library supporting Foreign Function Interfaces
|
|
||||||
Version: %VERSION%
|
|
||||||
Libs: -L${libdir} -lffi
|
|
||||||
Cflags: -I${includedir}
|
|
||||||
"""
|
|
||||||
|
|
||||||
class HostCffiRecipe(Recipe):
|
|
||||||
name = "host_cffi"
|
|
||||||
version = "1.14.3"
|
|
||||||
archs = ["x86_64"]
|
|
||||||
url = "https://pypi.python.org/packages/source/c/cffi/cffi-{version}.tar.gz"
|
|
||||||
depends = ["hostlibffi", "pycparser"]
|
|
||||||
|
|
||||||
def get_recipe_env(self, arch):
|
|
||||||
sdk_path = sh.xcrun("--sdk", "macosx", "--show-sdk-path").strip()
|
|
||||||
env = super(HostCffiRecipe, self).get_recipe_env(arch)
|
|
||||||
env["CC"] = "clang -Qunused-arguments -fcolor-diagnostics"
|
|
||||||
env["LDFLAGS"] = " ".join([
|
|
||||||
"-undefined dynamic_lookup",
|
|
||||||
#"-shared",
|
|
||||||
"-L{}".format(join(self.ctx.dist_dir, "hostlibffi", "usr", "local", "lib"))
|
|
||||||
])
|
|
||||||
env["CFLAGS"] = " ".join([
|
|
||||||
"--sysroot={}".format(sdk_path),
|
|
||||||
"-I{}".format(join(self.ctx.dist_dir, "hostlibffi", "usr", "local", "include"))
|
|
||||||
])
|
|
||||||
return env
|
|
||||||
|
|
||||||
def prebuild_arch(self, arch):
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
build_env = self.get_recipe_env(arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
|
|
||||||
# generate a fake libffi pkg-config to let cffi use it
|
|
||||||
hostlibffi = Recipe.get_recipe("hostlibffi", self.ctx)
|
|
||||||
with open("libffi.pc", "w") as fd:
|
|
||||||
tpl = libffi_tpl.replace("%PREFIX%",
|
|
||||||
hostlibffi.get_build_dir(arch.arch))
|
|
||||||
tpl = tpl.replace("%VERSION%", hostlibffi.version)
|
|
||||||
fd.write(tpl)
|
|
||||||
|
|
||||||
build_env["PKG_CONFIG"] = "/usr/local/bin/pkg-config"
|
|
||||||
build_env["PKG_CONFIG_PATH"] = build_dir
|
|
||||||
|
|
||||||
shprint(hostpython, "setup.py", "build_ext", _env=build_env)
|
|
||||||
shprint(hostpython, "setup.py", "install", _env=build_env)
|
|
||||||
|
|
||||||
recipe = HostCffiRecipe()
|
|
|
@ -1,34 +0,0 @@
|
||||||
from kivy_ios.toolchain import Recipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
import sh
|
|
||||||
import os
|
|
||||||
import shutil
|
|
||||||
|
|
||||||
|
|
||||||
class HostSetuptools(Recipe):
|
|
||||||
depends = ["openssl", "hostpython"]
|
|
||||||
archs = ["x86_64"]
|
|
||||||
url = "setuptools"
|
|
||||||
|
|
||||||
def prebuild_arch(self, arch):
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
sh.curl("-O", "https://bootstrap.pypa.io/ez_setup.py")
|
|
||||||
shprint(hostpython, "./ez_setup.py")
|
|
||||||
# Extract setuptools egg and remove .pth files. Otherwise subsequent
|
|
||||||
# python package installations using setuptools will raise exceptions.
|
|
||||||
# Setuptools version 28.3.0
|
|
||||||
site_packages_path = join(
|
|
||||||
self.ctx.dist_dir, 'hostpython3',
|
|
||||||
'lib', 'python3.8', 'site-packages')
|
|
||||||
os.chdir(site_packages_path)
|
|
||||||
with open('setuptools.pth', 'r') as f:
|
|
||||||
setuptools_egg_path = f.read().strip('./').strip('\n')
|
|
||||||
unzip = sh.Command('unzip')
|
|
||||||
shprint(unzip, '-o', setuptools_egg_path)
|
|
||||||
os.remove(setuptools_egg_path)
|
|
||||||
os.remove('setuptools.pth')
|
|
||||||
os.remove('easy-install.pth')
|
|
||||||
shutil.rmtree('EGG-INFO')
|
|
||||||
|
|
||||||
|
|
||||||
recipe = HostSetuptools()
|
|
|
@ -1 +0,0 @@
|
||||||
Make toolchain happy
|
|
|
@ -1,24 +0,0 @@
|
||||||
from kivy_ios.toolchain import Recipe, shprint, cache_execution
|
|
||||||
from kivy_ios.context_managers import cd, python_path
|
|
||||||
import sh
|
|
||||||
|
|
||||||
|
|
||||||
class HostSetuptools3(Recipe):
|
|
||||||
depends = ["openssl", "hostpython3", "python3"]
|
|
||||||
archs = ["x86_64"]
|
|
||||||
version = '40.9.0'
|
|
||||||
url = 'https://pypi.python.org/packages/source/s/setuptools/setuptools-{version}.zip'
|
|
||||||
|
|
||||||
@cache_execution
|
|
||||||
def install(self):
|
|
||||||
arch = self.filtered_archs[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
|
|
||||||
with python_path(self.ctx.site_packages_dir):
|
|
||||||
with cd(build_dir):
|
|
||||||
shprint(hostpython, "setup.py", "install",
|
|
||||||
f"--prefix={self.ctx.python_prefix}")
|
|
||||||
|
|
||||||
|
|
||||||
recipe = HostSetuptools3()
|
|
|
@ -1 +0,0 @@
|
||||||
Make toolchain happy
|
|
|
@ -1,69 +0,0 @@
|
||||||
from kivy_ios.toolchain import Recipe, shprint
|
|
||||||
import sh
|
|
||||||
from os.path import exists
|
|
||||||
import logging
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class LibffiRecipe(Recipe):
|
|
||||||
version = "3.2.1"
|
|
||||||
url = "ftp://sourceware.org/pub/libffi/libffi-{version}.tar.gz"
|
|
||||||
library = "build/Release-{arch.sdk}/libffi.a"
|
|
||||||
include_per_arch = True
|
|
||||||
include_dir = "build_{arch.sdk}-{arch.arch}/include"
|
|
||||||
archs = ["x86_64"]
|
|
||||||
|
|
||||||
def build_all(self):
|
|
||||||
filtered_archs = self.filtered_archs
|
|
||||||
logger.info("Build {} for {} (filtered)".format(
|
|
||||||
self.name,
|
|
||||||
", ".join([x.arch for x in filtered_archs])))
|
|
||||||
for arch in self.filtered_archs:
|
|
||||||
self.build(arch)
|
|
||||||
|
|
||||||
# since we don't run cache_execution, call this here for `status`
|
|
||||||
self.update_state("{}.build_all".format(self.name), True)
|
|
||||||
|
|
||||||
def prebuild_arch(self, arch):
|
|
||||||
if self.has_marker("patched"):
|
|
||||||
return
|
|
||||||
# necessary as it doesn't compile with XCode 6.0. If we use 5.1.1, the
|
|
||||||
# compiler for i386 is not working.
|
|
||||||
# shprint(sh.sed,
|
|
||||||
# "-i.bak",
|
|
||||||
# "s/-miphoneos-version-min=5.1.1/-miphoneos-version-min=6.0/g",
|
|
||||||
# "generate-darwin-source-and-headers.py")
|
|
||||||
self.apply_patch("fix-win32-unreferenced-symbol.patch")
|
|
||||||
self.apply_patch("public_include.patch")
|
|
||||||
self.apply_patch("staticlib.patch")
|
|
||||||
self.apply_patch("staticlib2.patch")
|
|
||||||
self.apply_patch("libffi-xcode10.patch")
|
|
||||||
self.apply_patch("generate-darwin-source-and-headers-python3-items.patch")
|
|
||||||
self.set_marker("patched")
|
|
||||||
|
|
||||||
def build_arch(self, arch):
|
|
||||||
if exists("generate-darwin-source-and-headers.py"):
|
|
||||||
shprint(
|
|
||||||
sh.mv,
|
|
||||||
"generate-darwin-source-and-headers.py",
|
|
||||||
"_generate-darwin-source-and-headers.py")
|
|
||||||
shprint(sh.touch, "generate-darwin-source-and-headers.py")
|
|
||||||
python3 = sh.Command("python3")
|
|
||||||
shprint(python3, "_generate-darwin-source-and-headers.py", "--only-osx")
|
|
||||||
shprint(sh.xcodebuild,
|
|
||||||
self.ctx.concurrent_xcodebuild,
|
|
||||||
"ONLY_ACTIVE_ARCH=NO",
|
|
||||||
"ARCHS={}".format(arch.arch),
|
|
||||||
"DSTROOT={}/hostlibffi".format(self.ctx.dist_dir),
|
|
||||||
"-sdk", "macosx",
|
|
||||||
"clean", "build", "installhdrs", "install",
|
|
||||||
"-project", "libffi.xcodeproj",
|
|
||||||
"-scheme", "libffi-Mac",
|
|
||||||
"-configuration", "Release")
|
|
||||||
|
|
||||||
def postbuild_arch(self, arch):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
recipe = LibffiRecipe()
|
|
|
@ -1,94 +0,0 @@
|
||||||
diff -Naur --exclude 'build*' --exclude darwin_ios --exclude '*.swp' ../armv7/libffi-3.2.1/generate-darwin-source-and-headers.py libffi-3.2.1/generate-darwin-source-and-headers.py
|
|
||||||
--- ../armv7/libffi-3.2.1/generate-darwin-source-and-headers.py 2015-02-11 02:28:30.000000000 +0100
|
|
||||||
+++ libffi-3.2.1/generate-darwin-source-and-headers.py 2015-02-11 12:33:38.000000000 +0100
|
|
||||||
@@ -19,7 +19,7 @@
|
|
||||||
prefix = "#ifdef __i386__\n\n"
|
|
||||||
suffix = "\n\n#endif"
|
|
||||||
src_dir = 'x86'
|
|
||||||
- src_files = ['darwin.S', 'win32.S', 'ffi.c']
|
|
||||||
+ src_files = ['darwin.S', 'ffi.c']
|
|
||||||
|
|
||||||
|
|
||||||
class simulator64_platform(Platform):
|
|
||||||
diff -Naur --exclude 'build*' --exclude darwin_ios --exclude '*.swp' ../armv7/libffi-3.2.1/src/x86/ffi.c libffi-3.2.1/src/x86/ffi.c
|
|
||||||
--- ../armv7/libffi-3.2.1/src/x86/ffi.c 2014-11-08 13:47:24.000000000 +0100
|
|
||||||
+++ libffi-3.2.1/src/x86/ffi.c 2015-02-11 12:41:27.000000000 +0100
|
|
||||||
@@ -393,6 +393,7 @@
|
|
||||||
case FFI_SYSV:
|
|
||||||
case FFI_MS_CDECL:
|
|
||||||
#endif
|
|
||||||
+#ifdef X86_WIN322
|
|
||||||
case FFI_STDCALL:
|
|
||||||
case FFI_THISCALL:
|
|
||||||
case FFI_FASTCALL:
|
|
||||||
@@ -402,6 +403,7 @@
|
|
||||||
ecif.rvalue, fn);
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
+#endif
|
|
||||||
default:
|
|
||||||
FFI_ASSERT(0);
|
|
||||||
break;
|
|
||||||
@@ -741,6 +743,7 @@
|
|
||||||
&ffi_closure_SYSV,
|
|
||||||
(void*)codeloc);
|
|
||||||
}
|
|
||||||
+#ifdef X86_WIN32
|
|
||||||
else if (cif->abi == FFI_REGISTER)
|
|
||||||
{
|
|
||||||
FFI_INIT_TRAMPOLINE_WIN32 (&closure->tramp[0],
|
|
||||||
@@ -765,7 +768,6 @@
|
|
||||||
&ffi_closure_STDCALL,
|
|
||||||
(void*)codeloc);
|
|
||||||
}
|
|
||||||
-#ifdef X86_WIN32
|
|
||||||
else if (cif->abi == FFI_MS_CDECL)
|
|
||||||
{
|
|
||||||
FFI_INIT_TRAMPOLINE (&closure->tramp[0],
|
|
||||||
@@ -909,7 +911,7 @@
|
|
||||||
case FFI_SYSV:
|
|
||||||
case FFI_MS_CDECL:
|
|
||||||
#endif
|
|
||||||
-#ifndef X86_WIN64
|
|
||||||
+#ifdef X86_WIN32
|
|
||||||
case FFI_STDCALL:
|
|
||||||
case FFI_THISCALL:
|
|
||||||
case FFI_FASTCALL:
|
|
||||||
diff -Naur --exclude 'build*' --exclude darwin_ios --exclude '*.swp' ../armv7/libffi-3.2.1/src/x86/win32.S libffi-3.2.1/src/x86/win32.S
|
|
||||||
--- ../armv7/libffi-3.2.1/src/x86/win32.S 2014-11-11 15:41:37.000000000 +0100
|
|
||||||
+++ libffi-3.2.1/src/x86/win32.S 2015-02-11 12:33:46.000000000 +0100
|
|
||||||
@@ -37,8 +37,6 @@
|
|
||||||
#define CIF_BYTES_OFFSET 16
|
|
||||||
#define CIF_FLAGS_OFFSET 20
|
|
||||||
|
|
||||||
-#ifdef _MSC_VER
|
|
||||||
-
|
|
||||||
#define CLOSURE_CIF_OFFSET ((FFI_TRAMPOLINE_SIZE + 3) AND NOT 3)
|
|
||||||
|
|
||||||
.386
|
|
||||||
@@ -1344,8 +1342,6 @@
|
|
||||||
.align 4
|
|
||||||
.LEFDE5:
|
|
||||||
|
|
||||||
-#endif /* !_MSC_VER */
|
|
||||||
-
|
|
||||||
#if defined __ELF__ && defined __linux__
|
|
||||||
.section .note.GNU-stack,"",@progbits
|
|
||||||
#endif
|
|
||||||
diff -Naur --exclude 'build*' --exclude darwin_ios --exclude '*.swp' ../armv7/libffi-3.2.1/src/x86/win64.S libffi-3.2.1/src/x86/win64.S
|
|
||||||
--- ../armv7/libffi-3.2.1/src/x86/win64.S 2014-11-08 13:47:24.000000000 +0100
|
|
||||||
+++ libffi-3.2.1/src/x86/win64.S 2015-02-11 12:31:27.000000000 +0100
|
|
||||||
@@ -16,7 +16,6 @@
|
|
||||||
unsigned *rvalue, void (*fn)());
|
|
||||||
*/
|
|
||||||
|
|
||||||
-#ifdef _MSC_VER
|
|
||||||
PUBLIC ffi_call_win64
|
|
||||||
|
|
||||||
EXTRN __chkstk:NEAR
|
|
||||||
@@ -516,5 +515,4 @@
|
|
||||||
pop %rbp
|
|
||||||
retq
|
|
||||||
.seh_endproc
|
|
||||||
-#endif /* !_MSC_VER */
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
diff -Nru libffi-3.2.1/generate-darwin-source-and-headers.py libffi-3.2.1-new/generate-darwin-source-and-headers.py
|
|
||||||
--- libffi-3.2.1/generate-darwin-source-and-headers.py 2014-11-08 13:47:24.000000000 +0100
|
|
||||||
+++ libffi-3.2.1-new/generate-darwin-source-and-headers.py 2020-05-06 10:30:46.000000000 +0200
|
|
||||||
@@ -194,7 +194,7 @@
|
|
||||||
build_target(desktop64_platform, platform_headers)
|
|
||||||
|
|
||||||
mkdir_p('darwin_common/include')
|
|
||||||
- for header_name, tag_tuples in platform_headers.iteritems():
|
|
||||||
+ for header_name, tag_tuples in platform_headers.items():
|
|
||||||
basename, suffix = os.path.splitext(header_name)
|
|
||||||
with open(os.path.join('darwin_common/include', header_name), 'w') as header:
|
|
||||||
for tag_tuple in tag_tuples:
|
|
|
@ -1,391 +0,0 @@
|
||||||
--- libffi-3.2.1.old/generate-darwin-source-and-headers.py 2018-10-26 17:08:07.000000000 +0200
|
|
||||||
+++ libffi-3.2.1/generate-darwin-source-and-headers.py 2018-10-26 17:08:50.000000000 +0200
|
|
||||||
@@ -174,23 +174,23 @@
|
|
||||||
|
|
||||||
if generate_ios:
|
|
||||||
make_tramp()
|
|
||||||
- copy_src_platform_files(simulator_platform)
|
|
||||||
+ #copy_src_platform_files(simulator_platform)
|
|
||||||
copy_src_platform_files(simulator64_platform)
|
|
||||||
copy_src_platform_files(device_platform)
|
|
||||||
copy_src_platform_files(device64_platform)
|
|
||||||
if generate_osx:
|
|
||||||
- copy_src_platform_files(desktop32_platform)
|
|
||||||
+ #copy_src_platform_files(desktop32_platform)
|
|
||||||
copy_src_platform_files(desktop64_platform)
|
|
||||||
|
|
||||||
platform_headers = collections.defaultdict(set)
|
|
||||||
|
|
||||||
if generate_ios:
|
|
||||||
- build_target(simulator_platform, platform_headers)
|
|
||||||
+ #build_target(simulator_platform, platform_headers)
|
|
||||||
build_target(simulator64_platform, platform_headers)
|
|
||||||
build_target(device_platform, platform_headers)
|
|
||||||
build_target(device64_platform, platform_headers)
|
|
||||||
if generate_osx:
|
|
||||||
- build_target(desktop32_platform, platform_headers)
|
|
||||||
+ #build_target(desktop32_platform, platform_headers)
|
|
||||||
build_target(desktop64_platform, platform_headers)
|
|
||||||
|
|
||||||
mkdir_p('darwin_common/include')
|
|
||||||
--- libffi-3.2.1.old/configure 2014-11-12 12:59:57.000000000 +0100
|
|
||||||
+++ libffi-3.2.1/configure 2018-10-26 09:02:12.000000000 +0200
|
|
||||||
@@ -18725,11 +18725,11 @@
|
|
||||||
toolexecdir="${libdir}"/gcc-lib/'$(target_alias)'
|
|
||||||
toolexeclibdir="${libdir}"
|
|
||||||
fi
|
|
||||||
- multi_os_directory=`$CC $CFLAGS -print-multi-os-directory`
|
|
||||||
- case $multi_os_directory in
|
|
||||||
- .) ;; # Avoid trailing /.
|
|
||||||
- ../*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
|
|
||||||
- esac
|
|
||||||
+ # multi_os_directory=`$CC $CFLAGS -print-multi-os-directory`
|
|
||||||
+ # case $multi_os_directory in
|
|
||||||
+ # .) ;; # Avoid trailing /.
|
|
||||||
+ # ../*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
|
|
||||||
+ # esac
|
|
||||||
|
|
||||||
else
|
|
||||||
toolexeclibdir="${libdir}"
|
|
||||||
--- libffi-3.2.1.old/configure.ac 2014-11-12 12:56:51.000000000 +0100
|
|
||||||
+++ libffi-3.2.1/configure.ac 2018-10-26 09:00:50.000000000 +0200
|
|
||||||
@@ -601,11 +601,11 @@
|
|
||||||
toolexecdir="${libdir}"/gcc-lib/'$(target_alias)'
|
|
||||||
toolexeclibdir="${libdir}"
|
|
||||||
fi
|
|
||||||
- multi_os_directory=`$CC $CFLAGS -print-multi-os-directory`
|
|
||||||
- case $multi_os_directory in
|
|
||||||
- .) ;; # Avoid trailing /.
|
|
||||||
- ../*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
|
|
||||||
- esac
|
|
||||||
+ # multi_os_directory=`$CC $CFLAGS -print-multi-os-directory`
|
|
||||||
+ # case $multi_os_directory in
|
|
||||||
+ # .) ;; # Avoid trailing /.
|
|
||||||
+ # ../*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
|
|
||||||
+ # esac
|
|
||||||
AC_SUBST(toolexecdir)
|
|
||||||
else
|
|
||||||
toolexeclibdir="${libdir}"
|
|
||||||
--- libffi-3.2.1.old/libffi.xcodeproj/project.pbxproj 2018-10-26 17:31:30.000000000 +0200
|
|
||||||
+++ libffi-3.2.1/libffi.xcodeproj/project.pbxproj 2018-10-26 17:30:17.000000000 +0200
|
|
||||||
@@ -24,20 +24,11 @@
|
|
||||||
DBFA7179187F1D9B00A76262 /* ffi_armv7.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA716F187F1D9B00A76262 /* ffi_armv7.c */; };
|
|
||||||
DBFA717A187F1D9B00A76262 /* sysv_armv7.S in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7170187F1D9B00A76262 /* sysv_armv7.S */; };
|
|
||||||
DBFA717B187F1D9B00A76262 /* trampoline_armv7.S in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7171187F1D9B00A76262 /* trampoline_armv7.S */; };
|
|
||||||
- DBFA717C187F1D9B00A76262 /* darwin64_x86_64.S in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7173187F1D9B00A76262 /* darwin64_x86_64.S */; };
|
|
||||||
- DBFA717D187F1D9B00A76262 /* darwin_i386.S in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7174187F1D9B00A76262 /* darwin_i386.S */; };
|
|
||||||
- DBFA717E187F1D9B00A76262 /* ffi64_x86_64.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7175187F1D9B00A76262 /* ffi64_x86_64.c */; };
|
|
||||||
- DBFA717F187F1D9B00A76262 /* ffi_i386.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7176187F1D9B00A76262 /* ffi_i386.c */; };
|
|
||||||
- DBFA718E187F1DA100A76262 /* ffi_i386.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7182187F1DA100A76262 /* ffi_i386.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
|
||||||
DBFA718F187F1DA100A76262 /* ffi_x86_64.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7183187F1DA100A76262 /* ffi_x86_64.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
|
||||||
- DBFA7190187F1DA100A76262 /* fficonfig_i386.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7184187F1DA100A76262 /* fficonfig_i386.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
|
||||||
DBFA7191187F1DA100A76262 /* fficonfig_x86_64.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7185187F1DA100A76262 /* fficonfig_x86_64.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
|
||||||
- DBFA7192187F1DA100A76262 /* ffitarget_i386.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7186187F1DA100A76262 /* ffitarget_i386.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
|
||||||
DBFA7193187F1DA100A76262 /* ffitarget_x86_64.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7187187F1DA100A76262 /* ffitarget_x86_64.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
|
||||||
DBFA7194187F1DA100A76262 /* darwin64_x86_64.S in Sources */ = {isa = PBXBuildFile; fileRef = DBFA718A187F1DA100A76262 /* darwin64_x86_64.S */; };
|
|
||||||
- DBFA7195187F1DA100A76262 /* darwin_i386.S in Sources */ = {isa = PBXBuildFile; fileRef = DBFA718B187F1DA100A76262 /* darwin_i386.S */; };
|
|
||||||
DBFA7196187F1DA100A76262 /* ffi64_x86_64.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA718C187F1DA100A76262 /* ffi64_x86_64.c */; };
|
|
||||||
- DBFA7197187F1DA100A76262 /* ffi_i386.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA718D187F1DA100A76262 /* ffi_i386.c */; };
|
|
||||||
/* End PBXBuildFile section */
|
|
||||||
|
|
||||||
/* Begin PBXCopyFilesBuildPhase section */
|
|
||||||
@@ -81,20 +72,11 @@
|
|
||||||
DBFA716F187F1D9B00A76262 /* ffi_armv7.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ffi_armv7.c; sourceTree = "<group>"; };
|
|
||||||
DBFA7170187F1D9B00A76262 /* sysv_armv7.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = sysv_armv7.S; sourceTree = "<group>"; };
|
|
||||||
DBFA7171187F1D9B00A76262 /* trampoline_armv7.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = trampoline_armv7.S; sourceTree = "<group>"; };
|
|
||||||
- DBFA7173187F1D9B00A76262 /* darwin64_x86_64.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = darwin64_x86_64.S; sourceTree = "<group>"; };
|
|
||||||
- DBFA7174187F1D9B00A76262 /* darwin_i386.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = darwin_i386.S; sourceTree = "<group>"; };
|
|
||||||
- DBFA7175187F1D9B00A76262 /* ffi64_x86_64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ffi64_x86_64.c; sourceTree = "<group>"; };
|
|
||||||
- DBFA7176187F1D9B00A76262 /* ffi_i386.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ffi_i386.c; sourceTree = "<group>"; };
|
|
||||||
- DBFA7182187F1DA100A76262 /* ffi_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffi_i386.h; sourceTree = "<group>"; };
|
|
||||||
DBFA7183187F1DA100A76262 /* ffi_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffi_x86_64.h; sourceTree = "<group>"; };
|
|
||||||
- DBFA7184187F1DA100A76262 /* fficonfig_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fficonfig_i386.h; sourceTree = "<group>"; };
|
|
||||||
DBFA7185187F1DA100A76262 /* fficonfig_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fficonfig_x86_64.h; sourceTree = "<group>"; };
|
|
||||||
- DBFA7186187F1DA100A76262 /* ffitarget_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffitarget_i386.h; sourceTree = "<group>"; };
|
|
||||||
DBFA7187187F1DA100A76262 /* ffitarget_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffitarget_x86_64.h; sourceTree = "<group>"; };
|
|
||||||
DBFA718A187F1DA100A76262 /* darwin64_x86_64.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = darwin64_x86_64.S; sourceTree = "<group>"; };
|
|
||||||
- DBFA718B187F1DA100A76262 /* darwin_i386.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = darwin_i386.S; sourceTree = "<group>"; };
|
|
||||||
DBFA718C187F1DA100A76262 /* ffi64_x86_64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ffi64_x86_64.c; sourceTree = "<group>"; };
|
|
||||||
- DBFA718D187F1DA100A76262 /* ffi_i386.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ffi_i386.c; sourceTree = "<group>"; };
|
|
||||||
/* End PBXFileReference section */
|
|
||||||
|
|
||||||
/* Begin PBXGroup section */
|
|
||||||
@@ -182,7 +164,6 @@
|
|
||||||
children = (
|
|
||||||
DBFA716B187F1D9B00A76262 /* aarch64 */,
|
|
||||||
DBFA716E187F1D9B00A76262 /* arm */,
|
|
||||||
- DBFA7172187F1D9B00A76262 /* x86 */,
|
|
||||||
);
|
|
||||||
path = src;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
@@ -206,17 +187,6 @@
|
|
||||||
path = arm;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
- DBFA7172187F1D9B00A76262 /* x86 */ = {
|
|
||||||
- isa = PBXGroup;
|
|
||||||
- children = (
|
|
||||||
- DBFA7173187F1D9B00A76262 /* darwin64_x86_64.S */,
|
|
||||||
- DBFA7174187F1D9B00A76262 /* darwin_i386.S */,
|
|
||||||
- DBFA7175187F1D9B00A76262 /* ffi64_x86_64.c */,
|
|
||||||
- DBFA7176187F1D9B00A76262 /* ffi_i386.c */,
|
|
||||||
- );
|
|
||||||
- path = x86;
|
|
||||||
- sourceTree = "<group>";
|
|
||||||
- };
|
|
||||||
DBFA7180187F1DA100A76262 /* darwin_osx */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
@@ -229,11 +199,8 @@
|
|
||||||
DBFA7181187F1DA100A76262 /* include */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
- DBFA7182187F1DA100A76262 /* ffi_i386.h */,
|
|
||||||
DBFA7183187F1DA100A76262 /* ffi_x86_64.h */,
|
|
||||||
- DBFA7184187F1DA100A76262 /* fficonfig_i386.h */,
|
|
||||||
DBFA7185187F1DA100A76262 /* fficonfig_x86_64.h */,
|
|
||||||
- DBFA7186187F1DA100A76262 /* ffitarget_i386.h */,
|
|
||||||
DBFA7187187F1DA100A76262 /* ffitarget_x86_64.h */,
|
|
||||||
);
|
|
||||||
path = include;
|
|
||||||
@@ -251,9 +218,7 @@
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
DBFA718A187F1DA100A76262 /* darwin64_x86_64.S */,
|
|
||||||
- DBFA718B187F1DA100A76262 /* darwin_i386.S */,
|
|
||||||
DBFA718C187F1DA100A76262 /* ffi64_x86_64.c */,
|
|
||||||
- DBFA718D187F1DA100A76262 /* ffi_i386.c */,
|
|
||||||
);
|
|
||||||
path = x86;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
@@ -269,12 +234,9 @@
|
|
||||||
DBFA714D187F1D8600A76262 /* ffitarget.h in Headers */,
|
|
||||||
DBFA714B187F1D8600A76262 /* ffi_common.h in Headers */,
|
|
||||||
DBFA718F187F1DA100A76262 /* ffi_x86_64.h in Headers */,
|
|
||||||
- DBFA718E187F1DA100A76262 /* ffi_i386.h in Headers */,
|
|
||||||
- DBFA7192187F1DA100A76262 /* ffitarget_i386.h in Headers */,
|
|
||||||
DBFA7193187F1DA100A76262 /* ffitarget_x86_64.h in Headers */,
|
|
||||||
DBFA714C187F1D8600A76262 /* fficonfig.h in Headers */,
|
|
||||||
DBFA7191187F1DA100A76262 /* fficonfig_x86_64.h in Headers */,
|
|
||||||
- DBFA7190187F1DA100A76262 /* fficonfig_i386.h in Headers */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
@@ -321,7 +283,7 @@
|
|
||||||
DB13B15C1849DEB70010F42D /* Project object */ = {
|
|
||||||
isa = PBXProject;
|
|
||||||
attributes = {
|
|
||||||
- LastUpgradeCheck = 0510;
|
|
||||||
+ LastUpgradeCheck = 1000;
|
|
||||||
};
|
|
||||||
buildConfigurationList = DB13B15F1849DEB70010F42D /* Build configuration list for PBXProject "libffi" */;
|
|
||||||
compatibilityVersion = "Xcode 3.2";
|
|
||||||
@@ -366,7 +328,7 @@
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
shellPath = /bin/sh;
|
|
||||||
- shellScript = "/usr/bin/python generate-darwin-source-and-headers.py --only-osx";
|
|
||||||
+ shellScript = "/usr/bin/python generate-darwin-source-and-headers.py --only-osx\n";
|
|
||||||
};
|
|
||||||
/* End PBXShellScriptBuildPhase section */
|
|
||||||
|
|
||||||
@@ -375,17 +337,13 @@
|
|
||||||
isa = PBXSourcesBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
- DBFA717E187F1D9B00A76262 /* ffi64_x86_64.c in Sources */,
|
|
||||||
DBFA7179187F1D9B00A76262 /* ffi_armv7.c in Sources */,
|
|
||||||
DBFA717B187F1D9B00A76262 /* trampoline_armv7.S in Sources */,
|
|
||||||
DBFA714E187F1D8600A76262 /* closures.c in Sources */,
|
|
||||||
DBFA717A187F1D9B00A76262 /* sysv_armv7.S in Sources */,
|
|
||||||
- DBFA717D187F1D9B00A76262 /* darwin_i386.S in Sources */,
|
|
||||||
DBFA7156187F1D8600A76262 /* prep_cif.c in Sources */,
|
|
||||||
- DBFA717F187F1D9B00A76262 /* ffi_i386.c in Sources */,
|
|
||||||
DBFA7158187F1D8600A76262 /* raw_api.c in Sources */,
|
|
||||||
DBFA7178187F1D9B00A76262 /* sysv_arm64.S in Sources */,
|
|
||||||
- DBFA717C187F1D9B00A76262 /* darwin64_x86_64.S in Sources */,
|
|
||||||
DBFA715A187F1D8600A76262 /* types.c in Sources */,
|
|
||||||
DBFA7177187F1D9B00A76262 /* ffi_arm64.c in Sources */,
|
|
||||||
);
|
|
||||||
@@ -396,9 +354,7 @@
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
DBFA7196187F1DA100A76262 /* ffi64_x86_64.c in Sources */,
|
|
||||||
- DBFA7195187F1DA100A76262 /* darwin_i386.S in Sources */,
|
|
||||||
DBFA7157187F1D8600A76262 /* prep_cif.c in Sources */,
|
|
||||||
- DBFA7197187F1DA100A76262 /* ffi_i386.c in Sources */,
|
|
||||||
DBFA715B187F1D8600A76262 /* types.c in Sources */,
|
|
||||||
DBFA7159187F1D8600A76262 /* raw_api.c in Sources */,
|
|
||||||
DBFA714F187F1D8600A76262 /* closures.c in Sources */,
|
|
||||||
@@ -412,21 +368,74 @@
|
|
||||||
DB13B1601849DEB70010F42D /* Debug */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
|
||||||
+ CLANG_WARN_BOOL_CONVERSION = YES;
|
|
||||||
+ CLANG_WARN_COMMA = YES;
|
|
||||||
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
||||||
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
|
||||||
+ CLANG_WARN_EMPTY_BODY = YES;
|
|
||||||
+ CLANG_WARN_ENUM_CONVERSION = YES;
|
|
||||||
+ CLANG_WARN_INFINITE_RECURSION = YES;
|
|
||||||
+ CLANG_WARN_INT_CONVERSION = YES;
|
|
||||||
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
|
||||||
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
|
||||||
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
|
||||||
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
|
||||||
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
|
|
||||||
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
|
||||||
+ CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
||||||
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
||||||
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
||||||
+ ENABLE_TESTABILITY = YES;
|
|
||||||
+ GCC_NO_COMMON_BLOCKS = YES;
|
|
||||||
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
||||||
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
|
||||||
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
||||||
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
|
||||||
+ GCC_WARN_UNUSED_FUNCTION = YES;
|
|
||||||
+ GCC_WARN_UNUSED_VARIABLE = YES;
|
|
||||||
HEADER_SEARCH_PATHS = (
|
|
||||||
"$(inherited)",
|
|
||||||
darwin_common/include,
|
|
||||||
);
|
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
|
||||||
+ VALID_ARCHS = x86_64;
|
|
||||||
};
|
|
||||||
name = Debug;
|
|
||||||
};
|
|
||||||
DB13B1611849DEB70010F42D /* Release */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
|
||||||
+ CLANG_WARN_BOOL_CONVERSION = YES;
|
|
||||||
+ CLANG_WARN_COMMA = YES;
|
|
||||||
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
||||||
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
|
||||||
+ CLANG_WARN_EMPTY_BODY = YES;
|
|
||||||
+ CLANG_WARN_ENUM_CONVERSION = YES;
|
|
||||||
+ CLANG_WARN_INFINITE_RECURSION = YES;
|
|
||||||
+ CLANG_WARN_INT_CONVERSION = YES;
|
|
||||||
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
|
||||||
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
|
||||||
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
|
||||||
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
|
||||||
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
|
|
||||||
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
|
||||||
+ CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
||||||
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
||||||
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
||||||
+ GCC_NO_COMMON_BLOCKS = YES;
|
|
||||||
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
||||||
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
|
||||||
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
||||||
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
|
||||||
+ GCC_WARN_UNUSED_FUNCTION = YES;
|
|
||||||
+ GCC_WARN_UNUSED_VARIABLE = YES;
|
|
||||||
HEADER_SEARCH_PATHS = (
|
|
||||||
"$(inherited)",
|
|
||||||
darwin_common/include,
|
|
||||||
);
|
|
||||||
+ VALID_ARCHS = x86_64;
|
|
||||||
};
|
|
||||||
name = Release;
|
|
||||||
};
|
|
||||||
@@ -434,7 +443,6 @@
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
||||||
- ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
|
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
|
||||||
CLANG_ENABLE_MODULES = YES;
|
|
||||||
@@ -467,7 +475,7 @@
|
|
||||||
"$(inherited)",
|
|
||||||
darwin_ios/include,
|
|
||||||
);
|
|
||||||
- IPHONEOS_DEPLOYMENT_TARGET = 5.0;
|
|
||||||
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
|
||||||
"IPHONEOS_DEPLOYMENT_TARGET[arch=arm64]" = 7.0;
|
|
||||||
OTHER_LDFLAGS = "-ObjC";
|
|
||||||
PRODUCT_NAME = ffi;
|
|
||||||
@@ -480,7 +488,6 @@
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
||||||
- ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
|
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
|
||||||
CLANG_ENABLE_MODULES = YES;
|
|
||||||
@@ -507,7 +514,7 @@
|
|
||||||
"$(inherited)",
|
|
||||||
darwin_ios/include,
|
|
||||||
);
|
|
||||||
- IPHONEOS_DEPLOYMENT_TARGET = 5.0;
|
|
||||||
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
|
||||||
"IPHONEOS_DEPLOYMENT_TARGET[arch=arm64]" = 7.0;
|
|
||||||
OTHER_LDFLAGS = "-ObjC";
|
|
||||||
PRODUCT_NAME = ffi;
|
|
||||||
--- libffi-3.2.1.old/libffi.xcodeproj/project.pbxproj.orig 2018-10-26 17:31:30.000000000 +0200
|
|
||||||
+++ libffi-3.2.1/libffi.xcodeproj/project.pbxproj.orig 2018-10-26 17:27:16.000000000 +0200
|
|
||||||
@@ -54,7 +54,7 @@
|
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
|
||||||
DB13B1661849DF1E0010F42D /* libffi.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libffi.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
||||||
- DB13B1911849DF510010F42D /* ffi.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = ffi.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
||||||
+ DB13B1911849DF510010F42D /* libffi.a */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libffi.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
||||||
DBFA713E187F1D8600A76262 /* ffi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffi.h; sourceTree = "<group>"; };
|
|
||||||
DBFA713F187F1D8600A76262 /* ffi_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffi_common.h; sourceTree = "<group>"; };
|
|
||||||
DBFA7140187F1D8600A76262 /* fficonfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fficonfig.h; sourceTree = "<group>"; };
|
|
||||||
@@ -112,7 +112,7 @@
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
DB13B1661849DF1E0010F42D /* libffi.a */,
|
|
||||||
- DB13B1911849DF510010F42D /* ffi.dylib */,
|
|
||||||
+ DB13B1911849DF510010F42D /* libffi.a */,
|
|
||||||
);
|
|
||||||
name = Products;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
@@ -312,7 +312,7 @@
|
|
||||||
);
|
|
||||||
name = "libffi-Mac";
|
|
||||||
productName = ffi;
|
|
||||||
- productReference = DB13B1911849DF510010F42D /* ffi.dylib */;
|
|
||||||
+ productReference = DB13B1911849DF510010F42D /* libffi.a */;
|
|
||||||
productType = "com.apple.product-type.library.dynamic";
|
|
||||||
};
|
|
||||||
/* End PBXNativeTarget section */
|
|
||||||
@@ -535,6 +535,7 @@
|
|
||||||
COPY_PHASE_STRIP = NO;
|
|
||||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
|
||||||
DYLIB_CURRENT_VERSION = 1;
|
|
||||||
+ EXECUTABLE_EXTENSION = a;
|
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
||||||
GCC_DYNAMIC_NO_PIC = NO;
|
|
||||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
|
||||||
@@ -558,7 +559,7 @@
|
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
|
||||||
OTHER_LDFLAGS = "-Wl,-no_compact_unwind";
|
|
||||||
- PRODUCT_NAME = ffi;
|
|
||||||
+ PRODUCT_NAME = libffi;
|
|
||||||
SDKROOT = macosx;
|
|
||||||
};
|
|
||||||
name = Debug;
|
|
||||||
@@ -583,6 +584,7 @@
|
|
||||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
|
||||||
DYLIB_CURRENT_VERSION = 1;
|
|
||||||
ENABLE_NS_ASSERTIONS = NO;
|
|
||||||
+ EXECUTABLE_EXTENSION = a;
|
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
||||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
|
||||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
||||||
@@ -598,7 +600,7 @@
|
|
||||||
MACH_O_TYPE = staticlib;
|
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
|
||||||
OTHER_LDFLAGS = "-Wl,-no_compact_unwind";
|
|
||||||
- PRODUCT_NAME = ffi;
|
|
||||||
+ PRODUCT_NAME = libffi;
|
|
||||||
SDKROOT = macosx;
|
|
||||||
};
|
|
||||||
name = Release;
|
|
|
@ -1,141 +0,0 @@
|
||||||
diff -u libffi-3.2.1/libffi.xcodeproj/project.pbxproj libffi-3.2.1-orig/libffi.xcodeproj/project.pbxproj
|
|
||||||
--- libffi-3.2.1/libffi.xcodeproj/project.pbxproj 2015-10-26 18:06:27.000000000 -0400
|
|
||||||
+++ libffi-3.2.1-orig/libffi.xcodeproj/project.pbxproj 2014-11-08 07:47:24.000000000 -0500
|
|
||||||
@@ -7,10 +7,10 @@
|
|
||||||
objects = {
|
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
|
||||||
- DBFA714A187F1D8600A76262 /* ffi.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA713E187F1D8600A76262 /* ffi.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
- DBFA714B187F1D8600A76262 /* ffi_common.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA713F187F1D8600A76262 /* ffi_common.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
- DBFA714C187F1D8600A76262 /* fficonfig.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7140187F1D8600A76262 /* fficonfig.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
|
||||||
- DBFA714D187F1D8600A76262 /* ffitarget.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7141187F1D8600A76262 /* ffitarget.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
+ DBFA714A187F1D8600A76262 /* ffi.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA713E187F1D8600A76262 /* ffi.h */; };
|
|
||||||
+ DBFA714B187F1D8600A76262 /* ffi_common.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA713F187F1D8600A76262 /* ffi_common.h */; };
|
|
||||||
+ DBFA714C187F1D8600A76262 /* fficonfig.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7140187F1D8600A76262 /* fficonfig.h */; };
|
|
||||||
+ DBFA714D187F1D8600A76262 /* ffitarget.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7141187F1D8600A76262 /* ffitarget.h */; };
|
|
||||||
DBFA714E187F1D8600A76262 /* closures.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7143187F1D8600A76262 /* closures.c */; };
|
|
||||||
DBFA714F187F1D8600A76262 /* closures.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7143187F1D8600A76262 /* closures.c */; };
|
|
||||||
DBFA7156187F1D8600A76262 /* prep_cif.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7147187F1D8600A76262 /* prep_cif.c */; };
|
|
||||||
@@ -28,12 +28,12 @@
|
|
||||||
DBFA717D187F1D9B00A76262 /* darwin_i386.S in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7174187F1D9B00A76262 /* darwin_i386.S */; };
|
|
||||||
DBFA717E187F1D9B00A76262 /* ffi64_x86_64.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7175187F1D9B00A76262 /* ffi64_x86_64.c */; };
|
|
||||||
DBFA717F187F1D9B00A76262 /* ffi_i386.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA7176187F1D9B00A76262 /* ffi_i386.c */; };
|
|
||||||
- DBFA718E187F1DA100A76262 /* ffi_i386.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7182187F1DA100A76262 /* ffi_i386.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
|
||||||
- DBFA718F187F1DA100A76262 /* ffi_x86_64.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7183187F1DA100A76262 /* ffi_x86_64.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
|
||||||
- DBFA7190187F1DA100A76262 /* fficonfig_i386.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7184187F1DA100A76262 /* fficonfig_i386.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
|
||||||
- DBFA7191187F1DA100A76262 /* fficonfig_x86_64.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7185187F1DA100A76262 /* fficonfig_x86_64.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
|
||||||
- DBFA7192187F1DA100A76262 /* ffitarget_i386.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7186187F1DA100A76262 /* ffitarget_i386.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
|
||||||
- DBFA7193187F1DA100A76262 /* ffitarget_x86_64.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7187187F1DA100A76262 /* ffitarget_x86_64.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
|
||||||
+ DBFA718E187F1DA100A76262 /* ffi_i386.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7182187F1DA100A76262 /* ffi_i386.h */; };
|
|
||||||
+ DBFA718F187F1DA100A76262 /* ffi_x86_64.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7183187F1DA100A76262 /* ffi_x86_64.h */; };
|
|
||||||
+ DBFA7190187F1DA100A76262 /* fficonfig_i386.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7184187F1DA100A76262 /* fficonfig_i386.h */; };
|
|
||||||
+ DBFA7191187F1DA100A76262 /* fficonfig_x86_64.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7185187F1DA100A76262 /* fficonfig_x86_64.h */; };
|
|
||||||
+ DBFA7192187F1DA100A76262 /* ffitarget_i386.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7186187F1DA100A76262 /* ffitarget_i386.h */; };
|
|
||||||
+ DBFA7193187F1DA100A76262 /* ffitarget_x86_64.h in Headers */ = {isa = PBXBuildFile; fileRef = DBFA7187187F1DA100A76262 /* ffitarget_x86_64.h */; };
|
|
||||||
DBFA7194187F1DA100A76262 /* darwin64_x86_64.S in Sources */ = {isa = PBXBuildFile; fileRef = DBFA718A187F1DA100A76262 /* darwin64_x86_64.S */; };
|
|
||||||
DBFA7195187F1DA100A76262 /* darwin_i386.S in Sources */ = {isa = PBXBuildFile; fileRef = DBFA718B187F1DA100A76262 /* darwin_i386.S */; };
|
|
||||||
DBFA7196187F1DA100A76262 /* ffi64_x86_64.c in Sources */ = {isa = PBXBuildFile; fileRef = DBFA718C187F1DA100A76262 /* ffi64_x86_64.c */; };
|
|
||||||
@@ -123,7 +123,7 @@
|
|
||||||
DBFA713D187F1D8600A76262 /* include */,
|
|
||||||
DBFA7142187F1D8600A76262 /* src */,
|
|
||||||
);
|
|
||||||
- path = darwin_common;
|
|
||||||
+ path = "darwin_common";
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
DBFA713D187F1D8600A76262 /* include */ = {
|
|
||||||
@@ -155,7 +155,7 @@
|
|
||||||
DBFA715D187F1D9B00A76262 /* include */,
|
|
||||||
DBFA716A187F1D9B00A76262 /* src */,
|
|
||||||
);
|
|
||||||
- path = darwin_ios;
|
|
||||||
+ path = "darwin_ios";
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
DBFA715D187F1D9B00A76262 /* include */ = {
|
|
||||||
@@ -223,7 +223,7 @@
|
|
||||||
DBFA7181187F1DA100A76262 /* include */,
|
|
||||||
DBFA7188187F1DA100A76262 /* src */,
|
|
||||||
);
|
|
||||||
- path = darwin_osx;
|
|
||||||
+ path = "darwin_osx";
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
DBFA7181187F1DA100A76262 /* include */ = {
|
|
||||||
@@ -265,16 +265,16 @@
|
|
||||||
isa = PBXHeadersBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
- DBFA714A187F1D8600A76262 /* ffi.h in Headers */,
|
|
||||||
+ DBFA714C187F1D8600A76262 /* fficonfig.h in Headers */,
|
|
||||||
DBFA714D187F1D8600A76262 /* ffitarget.h in Headers */,
|
|
||||||
- DBFA714B187F1D8600A76262 /* ffi_common.h in Headers */,
|
|
||||||
+ DBFA714A187F1D8600A76262 /* ffi.h in Headers */,
|
|
||||||
DBFA718F187F1DA100A76262 /* ffi_x86_64.h in Headers */,
|
|
||||||
- DBFA718E187F1DA100A76262 /* ffi_i386.h in Headers */,
|
|
||||||
- DBFA7192187F1DA100A76262 /* ffitarget_i386.h in Headers */,
|
|
||||||
- DBFA7193187F1DA100A76262 /* ffitarget_x86_64.h in Headers */,
|
|
||||||
- DBFA714C187F1D8600A76262 /* fficonfig.h in Headers */,
|
|
||||||
DBFA7191187F1DA100A76262 /* fficonfig_x86_64.h in Headers */,
|
|
||||||
+ DBFA718E187F1DA100A76262 /* ffi_i386.h in Headers */,
|
|
||||||
DBFA7190187F1DA100A76262 /* fficonfig_i386.h in Headers */,
|
|
||||||
+ DBFA714B187F1D8600A76262 /* ffi_common.h in Headers */,
|
|
||||||
+ DBFA7193187F1DA100A76262 /* ffitarget_x86_64.h in Headers */,
|
|
||||||
+ DBFA7192187F1DA100A76262 /* ffitarget_i386.h in Headers */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
@@ -414,7 +414,7 @@
|
|
||||||
buildSettings = {
|
|
||||||
HEADER_SEARCH_PATHS = (
|
|
||||||
"$(inherited)",
|
|
||||||
- darwin_common/include,
|
|
||||||
+ "darwin_common/include",
|
|
||||||
);
|
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
|
||||||
};
|
|
||||||
@@ -425,7 +425,7 @@
|
|
||||||
buildSettings = {
|
|
||||||
HEADER_SEARCH_PATHS = (
|
|
||||||
"$(inherited)",
|
|
||||||
- darwin_common/include,
|
|
||||||
+ "darwin_common/include",
|
|
||||||
);
|
|
||||||
};
|
|
||||||
name = Release;
|
|
||||||
@@ -465,7 +465,7 @@
|
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
||||||
HEADER_SEARCH_PATHS = (
|
|
||||||
"$(inherited)",
|
|
||||||
- darwin_ios/include,
|
|
||||||
+ "darwin_ios/include",
|
|
||||||
);
|
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
|
|
||||||
"IPHONEOS_DEPLOYMENT_TARGET[arch=arm64]" = 7.0;
|
|
||||||
@@ -505,7 +505,7 @@
|
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
||||||
HEADER_SEARCH_PATHS = (
|
|
||||||
"$(inherited)",
|
|
||||||
- darwin_ios/include,
|
|
||||||
+ "darwin_ios/include",
|
|
||||||
);
|
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
|
|
||||||
"IPHONEOS_DEPLOYMENT_TARGET[arch=arm64]" = 7.0;
|
|
||||||
@@ -552,7 +552,7 @@
|
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
||||||
HEADER_SEARCH_PATHS = (
|
|
||||||
"$(inherited)",
|
|
||||||
- darwin_osx/include,
|
|
||||||
+ "darwin_osx/include",
|
|
||||||
);
|
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
|
||||||
@@ -592,7 +592,7 @@
|
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
||||||
HEADER_SEARCH_PATHS = (
|
|
||||||
"$(inherited)",
|
|
||||||
- darwin_osx/include,
|
|
||||||
+ "darwin_osx/include",
|
|
||||||
);
|
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
|
||||||
OTHER_LDFLAGS = "-Wl,-no_compact_unwind";
|
|
|
@ -1,18 +0,0 @@
|
||||||
--- libffi-3.2.1/libffi.xcodeproj/project.pbxproj 2015-10-26 18:32:03.000000000 -0400
|
|
||||||
+++ libffi-3.2.1-orig/libffi.xcodeproj/project.pbxproj 2015-10-26 18:10:09.000000000 -0400
|
|
||||||
@@ -554,7 +554,6 @@
|
|
||||||
"$(inherited)",
|
|
||||||
darwin_osx/include,
|
|
||||||
);
|
|
||||||
- MACH_O_TYPE = staticlib;
|
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
|
||||||
OTHER_LDFLAGS = "-Wl,-no_compact_unwind";
|
|
||||||
@@ -595,7 +594,6 @@
|
|
||||||
"$(inherited)",
|
|
||||||
darwin_osx/include,
|
|
||||||
);
|
|
||||||
- MACH_O_TYPE = staticlib;
|
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
|
||||||
OTHER_LDFLAGS = "-Wl,-no_compact_unwind";
|
|
||||||
PRODUCT_NAME = ffi;
|
|
|
@ -1,66 +0,0 @@
|
||||||
diff -u libffi-3.2.1/libffi.xcodeproj/project.pbxproj libffi-3.2.1-orig/libffi.xcodeproj/project.pbxproj
|
|
||||||
--- libffi-3.2.1/libffi.xcodeproj/project.pbxproj 2015-10-26 20:02:36.000000000 -0400
|
|
||||||
+++ libffi-3.2.1-orig/libffi.xcodeproj/project.pbxproj 2015-10-26 19:41:01.000000000 -0400
|
|
||||||
@@ -54,7 +54,7 @@
|
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
|
||||||
DB13B1661849DF1E0010F42D /* libffi.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libffi.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
||||||
- DB13B1911849DF510010F42D /* libffi.a */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libffi.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
||||||
+ DB13B1911849DF510010F42D /* ffi.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = ffi.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
||||||
DBFA713E187F1D8600A76262 /* ffi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffi.h; sourceTree = "<group>"; };
|
|
||||||
DBFA713F187F1D8600A76262 /* ffi_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffi_common.h; sourceTree = "<group>"; };
|
|
||||||
DBFA7140187F1D8600A76262 /* fficonfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fficonfig.h; sourceTree = "<group>"; };
|
|
||||||
@@ -112,7 +112,7 @@
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
DB13B1661849DF1E0010F42D /* libffi.a */,
|
|
||||||
- DB13B1911849DF510010F42D /* libffi.a */,
|
|
||||||
+ DB13B1911849DF510010F42D /* ffi.dylib */,
|
|
||||||
);
|
|
||||||
name = Products;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
@@ -312,7 +312,7 @@
|
|
||||||
);
|
|
||||||
name = "libffi-Mac";
|
|
||||||
productName = ffi;
|
|
||||||
- productReference = DB13B1911849DF510010F42D /* libffi.a */;
|
|
||||||
+ productReference = DB13B1911849DF510010F42D /* ffi.dylib */;
|
|
||||||
productType = "com.apple.product-type.library.dynamic";
|
|
||||||
};
|
|
||||||
/* End PBXNativeTarget section */
|
|
||||||
@@ -535,7 +535,6 @@
|
|
||||||
COPY_PHASE_STRIP = NO;
|
|
||||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
|
||||||
DYLIB_CURRENT_VERSION = 1;
|
|
||||||
- EXECUTABLE_EXTENSION = a;
|
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
||||||
GCC_DYNAMIC_NO_PIC = NO;
|
|
||||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
|
||||||
@@ -559,7 +558,7 @@
|
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
|
||||||
OTHER_LDFLAGS = "-Wl,-no_compact_unwind";
|
|
||||||
- PRODUCT_NAME = libffi;
|
|
||||||
+ PRODUCT_NAME = ffi;
|
|
||||||
SDKROOT = macosx;
|
|
||||||
};
|
|
||||||
name = Debug;
|
|
||||||
@@ -584,7 +583,6 @@
|
|
||||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
|
||||||
DYLIB_CURRENT_VERSION = 1;
|
|
||||||
ENABLE_NS_ASSERTIONS = NO;
|
|
||||||
- EXECUTABLE_EXTENSION = a;
|
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
||||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
|
||||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
||||||
@@ -600,7 +598,7 @@
|
|
||||||
MACH_O_TYPE = staticlib;
|
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
|
||||||
OTHER_LDFLAGS = "-Wl,-no_compact_unwind";
|
|
||||||
- PRODUCT_NAME = libffi;
|
|
||||||
+ PRODUCT_NAME = ffi;
|
|
||||||
SDKROOT = macosx;
|
|
||||||
};
|
|
||||||
name = Release;
|
|
||||||
Only in libffi-3.2.1/libffi.xcodeproj: project.xcworkspace
|
|
||||||
Only in libffi-3.2.1/libffi.xcodeproj: xcuserdata
|
|
|
@ -1,39 +0,0 @@
|
||||||
from kivy_ios.toolchain import Recipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
import sh
|
|
||||||
import logging
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class HostOpensslRecipe(Recipe):
|
|
||||||
version = "1.1.1f"
|
|
||||||
url = "http://www.openssl.org/source/openssl-{version}.tar.gz"
|
|
||||||
archs = ["x86_64"]
|
|
||||||
|
|
||||||
def get_build_env(self):
|
|
||||||
build_env = self.ctx.env.copy()
|
|
||||||
self.build_env_x86_84 = build_env
|
|
||||||
return build_env
|
|
||||||
|
|
||||||
def build_x86_64(self):
|
|
||||||
build_env = self.get_build_env()
|
|
||||||
configure = sh.Command(join(self.build_dir, "Configure"))
|
|
||||||
shprint(configure,
|
|
||||||
"darwin64-x86_64-cc",
|
|
||||||
_env=build_env)
|
|
||||||
shprint(sh.make, "clean")
|
|
||||||
shprint(sh.make, self.ctx.concurrent_make, "build_libs")
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
sh.mkdir('-p', join(self.ctx.dist_dir, 'hostopenssl'))
|
|
||||||
sh.cp('-r', join(self.get_build_dir('x86_64'), 'include'),
|
|
||||||
join(self.ctx.dist_dir, 'hostopenssl', 'include'))
|
|
||||||
sh.mkdir('-p', join(self.ctx.dist_dir, 'hostopenssl', 'lib'))
|
|
||||||
sh.cp(join(self.get_build_dir('x86_64'), 'libssl.a'),
|
|
||||||
join(self.ctx.dist_dir, 'hostopenssl', 'lib'))
|
|
||||||
sh.cp(join(self.get_build_dir('x86_64'), 'libcrypto.a'),
|
|
||||||
join(self.ctx.dist_dir, 'hostopenssl', 'lib'))
|
|
||||||
|
|
||||||
|
|
||||||
recipe = HostOpensslRecipe()
|
|
|
@ -1,31 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import sys
|
|
||||||
from kivy_ios.toolchain import Recipe
|
|
||||||
import logging
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class HostpythonAliasRecipe(Recipe):
|
|
||||||
"""
|
|
||||||
Note this recipe was created to handle both hostpython2 and hostpython3.
|
|
||||||
As hostpython2 support was dropped, this could probably be simplified.
|
|
||||||
"""
|
|
||||||
is_alias = True
|
|
||||||
|
|
||||||
def init_after_import(self, ctx):
|
|
||||||
hostpython = ctx.state.get("hostpython")
|
|
||||||
if not hostpython:
|
|
||||||
# search in wanted_recipes if it's the first time
|
|
||||||
if "hostpython3" in ctx.wanted_recipes:
|
|
||||||
hostpython = "hostpython3"
|
|
||||||
else:
|
|
||||||
logger.error("No hostpython version set in the build.")
|
|
||||||
logger.error("Add python3 in your recipes:")
|
|
||||||
logger.error("./toolchain.py build python3 ...")
|
|
||||||
sys.exit(1)
|
|
||||||
if hostpython:
|
|
||||||
self.depends = [hostpython]
|
|
||||||
|
|
||||||
|
|
||||||
recipe = HostpythonAliasRecipe()
|
|
|
@ -1 +0,0 @@
|
||||||
zlib zlibmodule.c -I$(prefix)/include -lz
|
|
|
@ -1,100 +0,0 @@
|
||||||
from kivy_ios.toolchain import Recipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
import os
|
|
||||||
import sh
|
|
||||||
import shutil
|
|
||||||
import logging
|
|
||||||
from kivy_ios.context_managers import cd
|
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class Hostpython3Recipe(Recipe):
|
|
||||||
version = "3.8.2"
|
|
||||||
url = "https://www.python.org/ftp/python/{version}/Python-{version}.tgz"
|
|
||||||
depends = ["hostlibffi", "hostopenssl"]
|
|
||||||
optional_depends = []
|
|
||||||
archs = ["x86_64"]
|
|
||||||
build_subdir = 'native-build'
|
|
||||||
|
|
||||||
def init_with_ctx(self, ctx):
|
|
||||||
super().init_with_ctx(ctx)
|
|
||||||
self.set_hostpython(self, "3.8")
|
|
||||||
self.ctx.so_suffix = ".cpython-38m-darwin.so"
|
|
||||||
self.ctx.hostpython = join(self.ctx.dist_dir, "hostpython3", "bin", "python")
|
|
||||||
self.ctx.hostpgen = join(self.ctx.dist_dir, "hostpython3", "bin", "pgen")
|
|
||||||
logger.info("Global: hostpython located at {}".format(self.ctx.hostpython))
|
|
||||||
logger.info("Global: hostpgen located at {}".format(self.ctx.hostpgen))
|
|
||||||
|
|
||||||
def get_build_subdir(self, arch):
|
|
||||||
return join(self.get_build_dir(arch), self.build_subdir)
|
|
||||||
|
|
||||||
def prebuild_arch(self, arch):
|
|
||||||
if self.has_marker("patched"):
|
|
||||||
return
|
|
||||||
self.apply_patch("pyconfig_detection.patch")
|
|
||||||
self.copy_file("ModulesSetup", "Modules/Setup.local")
|
|
||||||
self.set_marker("patched")
|
|
||||||
|
|
||||||
def postbuild_arch(self, arch):
|
|
||||||
return
|
|
||||||
|
|
||||||
def get_build_env(self):
|
|
||||||
sdk_path = sh.xcrun("--sdk", "macosx", "--show-sdk-path").strip()
|
|
||||||
build_env = self.ctx.env.copy()
|
|
||||||
self.build_env_x86_84 = build_env
|
|
||||||
ccache = (build_env["CCACHE"] + ' ') if 'CCACHE' in build_env else ''
|
|
||||||
build_env["CC"] = ccache + "clang -Qunused-arguments -fcolor-diagnostics"
|
|
||||||
build_env["LDFLAGS"] = " ".join([
|
|
||||||
"-lsqlite3",
|
|
||||||
"-lffi",
|
|
||||||
"-L{}".format(join(self.ctx.dist_dir, "hostlibffi", "usr", "local", "lib"))
|
|
||||||
])
|
|
||||||
build_env["CFLAGS"] = " ".join([
|
|
||||||
"--sysroot={}".format(sdk_path),
|
|
||||||
"-arch x86_64",
|
|
||||||
"-mmacosx-version-min=10.12",
|
|
||||||
"-I{}".format(join(self.ctx.dist_dir, "hostlibffi", "usr", "local", "include"))
|
|
||||||
])
|
|
||||||
return build_env
|
|
||||||
|
|
||||||
def build_x86_64(self):
|
|
||||||
build_env = self.get_build_env()
|
|
||||||
configure = sh.Command(join(self.build_dir, "configure"))
|
|
||||||
arch = self.filtered_archs[0]
|
|
||||||
build_subdir = self.get_build_subdir(arch.arch)
|
|
||||||
os.makedirs(build_subdir, exist_ok=True)
|
|
||||||
with cd(build_subdir):
|
|
||||||
shprint(configure,
|
|
||||||
"--prefix={}".format(join(self.ctx.dist_dir, "hostpython3")),
|
|
||||||
"--with-openssl={}".format(join(self.ctx.dist_dir, 'hostopenssl')),
|
|
||||||
_env=build_env)
|
|
||||||
shprint(sh.make, "-C", build_subdir, self.ctx.concurrent_make,
|
|
||||||
_env=build_env)
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_env = self.get_build_env()
|
|
||||||
build_subdir = self.get_build_subdir(arch.arch)
|
|
||||||
build_env["PATH"] = os.environ["PATH"]
|
|
||||||
shprint(sh.make, self.ctx.concurrent_make,
|
|
||||||
"-C", build_subdir,
|
|
||||||
"install",
|
|
||||||
_env=build_env)
|
|
||||||
shutil.copy(
|
|
||||||
join(self.ctx.dist_dir, "hostpython3", "bin", "python3"),
|
|
||||||
join(self.ctx.dist_dir, "hostpython3", "bin", "python"))
|
|
||||||
"""
|
|
||||||
I don't like this kind of "patches".
|
|
||||||
sysconfig was overriding our cflags and extensions were failing to build.
|
|
||||||
This hack resets the cflags provided by sysconfig.
|
|
||||||
"""
|
|
||||||
with open(join(self.ctx.dist_dir, "hostpython3", "lib", "python3.8", "distutils", "sysconfig.py"), 'r') as sysconfigfile:
|
|
||||||
lines = sysconfigfile.readlines()
|
|
||||||
lines[192] = ' cflags = ""\n'
|
|
||||||
with open(join(self.ctx.dist_dir, "hostpython3", "lib", "python3.8", "distutils", "sysconfig.py"), 'w') as sysconfigfile:
|
|
||||||
sysconfigfile.writelines(lines)
|
|
||||||
|
|
||||||
|
|
||||||
recipe = Hostpython3Recipe()
|
|
|
@ -1,25 +0,0 @@
|
||||||
diff -Nru Python-3.8.2/Lib/site.py Python-3.8.2-new/Lib/site.py
|
|
||||||
--- Python-3.8.2/Lib/site.py 2020-02-24 22:36:25.000000000 +0100
|
|
||||||
+++ Python-3.8.2-new/Lib/site.py 2020-05-01 17:10:43.000000000 +0200
|
|
||||||
@@ -458,9 +458,8 @@
|
|
||||||
|
|
||||||
env = os.environ
|
|
||||||
if sys.platform == 'darwin' and '__PYVENV_LAUNCHER__' in env:
|
|
||||||
- executable = sys._base_executable = os.environ['__PYVENV_LAUNCHER__']
|
|
||||||
- else:
|
|
||||||
- executable = sys.executable
|
|
||||||
+ print("Ignoring __PYVENV_LAUNCHER__")
|
|
||||||
+ executable = sys.executable
|
|
||||||
exe_dir, _ = os.path.split(os.path.abspath(executable))
|
|
||||||
site_prefix = os.path.dirname(exe_dir)
|
|
||||||
sys._home = None
|
|
||||||
@@ -487,7 +486,8 @@
|
|
||||||
if key == 'include-system-site-packages':
|
|
||||||
system_site = value.lower()
|
|
||||||
elif key == 'home':
|
|
||||||
- sys._home = value
|
|
||||||
+ # this is breaking pyconfig.h path detection with venv
|
|
||||||
+ print('Ignoring "sys._home = value" override')
|
|
||||||
|
|
||||||
sys.prefix = sys.exec_prefix = site_prefix
|
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
import sh, os
|
|
||||||
|
|
||||||
class IdnaRecipe(PythonRecipe):
|
|
||||||
version = "2.6"
|
|
||||||
url = "https://pypi.python.org/packages/source/i/idna/idna-{version}.tar.gz"
|
|
||||||
depends = ["python"]
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
recipe = IdnaRecipe()
|
|
|
@ -1,16 +0,0 @@
|
||||||
from kivy_ios.toolchain import CythonRecipe
|
|
||||||
|
|
||||||
|
|
||||||
class IosRecipe(CythonRecipe):
|
|
||||||
version = "master"
|
|
||||||
url = "src"
|
|
||||||
library = "libios.a"
|
|
||||||
depends = ["python"]
|
|
||||||
pbx_frameworks = ["MessageUI", "CoreMotion", "UIKit", "WebKit", "Photos"]
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
self.install_python_package(
|
|
||||||
name=self.so_filename("ios"), is_dir=False)
|
|
||||||
|
|
||||||
|
|
||||||
recipe = IosRecipe()
|
|
|
@ -1,41 +0,0 @@
|
||||||
/*
|
|
||||||
* Browser support
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import <Foundation/Foundation.h>
|
|
||||||
#import <UIKit/UIKit.h>
|
|
||||||
#include <WebKit/WebKit.h>
|
|
||||||
#include "ios_wrapper.h"
|
|
||||||
|
|
||||||
void ios_open_url(char *url)
|
|
||||||
{
|
|
||||||
NSString *nsurl = [NSString stringWithCString:(char *)url encoding:NSUTF8StringEncoding];
|
|
||||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: nsurl]];
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Webview support
|
|
||||||
*/
|
|
||||||
void load_url_webview(char *url, int x, int y, int width, int height)
|
|
||||||
{
|
|
||||||
NSString *nsurl = [NSString stringWithCString:(char *)url encoding:NSUTF8StringEncoding];
|
|
||||||
WKWebView *webView = [[WKWebView alloc] initWithFrame: CGRectMake(x, y, width, height)];
|
|
||||||
UIWindow *window = [[UIApplication sharedApplication] keyWindow];
|
|
||||||
UIView *view = [window.rootViewController view];
|
|
||||||
[view addSubview:webView];
|
|
||||||
NSURL *ur = [[NSURL alloc] initWithString: nsurl];
|
|
||||||
NSURLRequest *req = [[NSURLRequest alloc] initWithURL: ur];
|
|
||||||
[webView loadRequest: req];
|
|
||||||
[req release];
|
|
||||||
[ur release];
|
|
||||||
|
|
||||||
UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
|
|
||||||
[button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
|
|
||||||
[button setTitle:@"X" forState:UIControlStateNormal];
|
|
||||||
button.frame = CGRectMake(0.0, 0.0, 40, 40);
|
|
||||||
[button addTarget:webView
|
|
||||||
action:@selector(removeFromSuperview) forControlEvents:UIControlEventTouchDown];
|
|
||||||
[webView addSubview:button];
|
|
||||||
[button release];
|
|
||||||
[webView release];
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
#import <Foundation/Foundation.h>
|
|
||||||
#import <UIKit/UIKit.h>
|
|
||||||
#include "ios_wrapper.h"
|
|
||||||
|
|
||||||
@interface NativeImagePicker : NSObject
|
|
||||||
@end
|
|
||||||
@implementation NativeImagePicker
|
|
||||||
|
|
||||||
- (NSString*) getFileName:(NSURL *) ns_url {
|
|
||||||
// Return the file name without the path or file extention
|
|
||||||
NSString *image_name = ns_url.pathComponents.lastObject;
|
|
||||||
NSArray *listItems = [image_name componentsSeparatedByString:@"."];
|
|
||||||
NSString *ret = listItems[0];
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSString*) writeToPNG: (NSDictionary *) info {
|
|
||||||
/* Given the info frozen dictionary returned by the file picker, convert
|
|
||||||
the image selected to a PNG and return the full path. */
|
|
||||||
|
|
||||||
// Get the image name, stripped of path and extention
|
|
||||||
NSString *image_name = [self getFileName: info[UIImagePickerControllerImageURL]];
|
|
||||||
|
|
||||||
// Get the png representation of the image
|
|
||||||
UIImage *image = info[UIImagePickerControllerOriginalImage];
|
|
||||||
NSData *imageData = UIImagePNGRepresentation(image);
|
|
||||||
|
|
||||||
// Generate the final image destination
|
|
||||||
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
|
|
||||||
NSString *documentsDirectory = [paths objectAtIndex:0];
|
|
||||||
NSString *imagePath = [documentsDirectory stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.png", image_name]];
|
|
||||||
|
|
||||||
// Write the image data to the file
|
|
||||||
if (![imageData writeToFile:imagePath atomically:NO])
|
|
||||||
{
|
|
||||||
NSLog(@"Failed to cache image data to disk");
|
|
||||||
return @"";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
NSLog(@"the cachedImagedPath is %@",imagePath);
|
|
||||||
return imagePath;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@end
|
|
|
@ -1,163 +0,0 @@
|
||||||
/*
|
|
||||||
* iOS utils
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import <Foundation/Foundation.h>
|
|
||||||
#import <UIKit/UIKit.h>
|
|
||||||
#import <sys/utsname.h>
|
|
||||||
#include "ios_wrapper.h"
|
|
||||||
|
|
||||||
|
|
||||||
float ios_uiscreen_get_scale() {
|
|
||||||
float scale = 1.0;
|
|
||||||
if ([[UIScreen mainScreen] respondsToSelector:@selector(nativeScale)]) {
|
|
||||||
scale = [[UIScreen mainScreen] nativeScale];
|
|
||||||
};
|
|
||||||
return scale;
|
|
||||||
}
|
|
||||||
|
|
||||||
int ios_uiscreen_get_dpi() {
|
|
||||||
/*
|
|
||||||
* dpi function from src/video/uikit/SDL_uikitmodes.m (SDL2)
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* A well up to date list of device info can be found here:
|
|
||||||
* https://github.com/lmirosevic/GBDeviceInfo/blob/master/GBDeviceInfo/GBDeviceInfo_iOS.m
|
|
||||||
*/
|
|
||||||
NSDictionary* devices = @{
|
|
||||||
@"iPhone1,1": @163,
|
|
||||||
@"iPhone1,2": @163,
|
|
||||||
@"iPhone2,1": @163,
|
|
||||||
@"iPhone3,1": @326,
|
|
||||||
@"iPhone3,2": @326,
|
|
||||||
@"iPhone3,3": @326,
|
|
||||||
@"iPhone4,1": @326,
|
|
||||||
@"iPhone5,1": @326,
|
|
||||||
@"iPhone5,2": @326,
|
|
||||||
@"iPhone5,3": @326,
|
|
||||||
@"iPhone5,4": @326,
|
|
||||||
@"iPhone6,1": @326,
|
|
||||||
@"iPhone6,2": @326,
|
|
||||||
@"iPhone7,1": @401,
|
|
||||||
@"iPhone7,2": @326,
|
|
||||||
@"iPhone8,1": @326,
|
|
||||||
@"iPhone8,2": @401,
|
|
||||||
@"iPhone8,4": @326,
|
|
||||||
@"iPhone9,1": @326,
|
|
||||||
@"iPhone9,2": @401,
|
|
||||||
@"iPhone9,3": @326,
|
|
||||||
@"iPhone9,4": @401,
|
|
||||||
@"iPhone10,1": @326,
|
|
||||||
@"iPhone10,2": @401,
|
|
||||||
@"iPhone10,3": @458,
|
|
||||||
@"iPhone10,4": @326,
|
|
||||||
@"iPhone10,5": @401,
|
|
||||||
@"iPhone10,6": @458,
|
|
||||||
@"iPhone11,2": @458,
|
|
||||||
@"iPhone11,4": @458,
|
|
||||||
@"iPhone11,6": @458,
|
|
||||||
@"iPhone11,8": @326,
|
|
||||||
@"iPhone12,1": @326,
|
|
||||||
@"iPhone12,3": @458,
|
|
||||||
@"iPhone12,5": @458,
|
|
||||||
@"iPad1,1": @132,
|
|
||||||
@"iPad2,1": @132,
|
|
||||||
@"iPad2,2": @132,
|
|
||||||
@"iPad2,3": @132,
|
|
||||||
@"iPad2,4": @132,
|
|
||||||
@"iPad2,5": @163,
|
|
||||||
@"iPad2,6": @163,
|
|
||||||
@"iPad2,7": @163,
|
|
||||||
@"iPad3,1": @264,
|
|
||||||
@"iPad3,2": @264,
|
|
||||||
@"iPad3,3": @264,
|
|
||||||
@"iPad3,4": @264,
|
|
||||||
@"iPad3,5": @264,
|
|
||||||
@"iPad3,6": @264,
|
|
||||||
@"iPad4,1": @264,
|
|
||||||
@"iPad4,2": @264,
|
|
||||||
@"iPad4,3": @264,
|
|
||||||
@"iPad4,4": @326,
|
|
||||||
@"iPad4,5": @326,
|
|
||||||
@"iPad4,6": @326,
|
|
||||||
@"iPad4,7": @326,
|
|
||||||
@"iPad4,8": @326,
|
|
||||||
@"iPad4,9": @326,
|
|
||||||
@"iPad5,1": @326,
|
|
||||||
@"iPad5,2": @326,
|
|
||||||
@"iPad5,3": @264,
|
|
||||||
@"iPad5,4": @264,
|
|
||||||
@"iPad6,3": @264,
|
|
||||||
@"iPad6,4": @264,
|
|
||||||
@"iPad6,7": @264,
|
|
||||||
@"iPad6,8": @264,
|
|
||||||
@"iPad6,11": @264,
|
|
||||||
@"iPad6,12": @264,
|
|
||||||
@"iPad7,1": @264,
|
|
||||||
@"iPad7,2": @264,
|
|
||||||
@"iPad7,3": @264,
|
|
||||||
@"iPad7,4": @264,
|
|
||||||
@"iPad7,5": @264,
|
|
||||||
@"iPad7,6": @264,
|
|
||||||
@"iPad7,11": @264,
|
|
||||||
@"iPad7,12": @264,
|
|
||||||
@"iPad8,1": @264,
|
|
||||||
@"iPad8,2": @264,
|
|
||||||
@"iPad8,3": @264,
|
|
||||||
@"iPad8,4": @264,
|
|
||||||
@"iPad8,5": @264,
|
|
||||||
@"iPad8,6": @264,
|
|
||||||
@"iPad8,7": @264,
|
|
||||||
@"iPad8,8": @264,
|
|
||||||
@"iPad11,1": @326,
|
|
||||||
@"iPad11,2": @326,
|
|
||||||
@"iPad11,3": @326,
|
|
||||||
@"iPad11,4": @326,
|
|
||||||
@"iPod1,1": @163,
|
|
||||||
@"iPod2,1": @163,
|
|
||||||
@"iPod3,1": @163,
|
|
||||||
@"iPod4,1": @326,
|
|
||||||
@"iPod5,1": @326,
|
|
||||||
@"iPod7,1": @326,
|
|
||||||
@"iPod9,1": @326,
|
|
||||||
};
|
|
||||||
struct utsname systemInfo;
|
|
||||||
uname(&systemInfo);
|
|
||||||
NSString* deviceName = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding];
|
|
||||||
id foundDPI = devices[deviceName];
|
|
||||||
if (foundDPI) {
|
|
||||||
return (float)[foundDPI integerValue];
|
|
||||||
} else {
|
|
||||||
/*
|
|
||||||
* Estimate the DPI based on the screen scale multiplied by the base DPI for the device
|
|
||||||
* type (e.g. based on iPhone 1 and iPad 1)
|
|
||||||
*/
|
|
||||||
float scale = ios_uiscreen_get_scale();
|
|
||||||
float dpi = 160 * scale;
|
|
||||||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
|
|
||||||
dpi = 132 * scale;
|
|
||||||
} else if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
|
|
||||||
dpi = 163 * scale;
|
|
||||||
}
|
|
||||||
return dpi;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
padding ios_get_safe_area() {
|
|
||||||
padding safearea;
|
|
||||||
if (@available(iOS 11.0, *)){
|
|
||||||
UIWindow *window = UIApplication.sharedApplication.windows[0];
|
|
||||||
safearea.top = window.safeAreaInsets.top;
|
|
||||||
safearea.bottom = window.safeAreaInsets.bottom;
|
|
||||||
safearea.left = window.safeAreaInsets.left;
|
|
||||||
safearea.right = window.safeAreaInsets.right;
|
|
||||||
} else {
|
|
||||||
safearea.top = 0;
|
|
||||||
safearea.bottom = 0;
|
|
||||||
safearea.left = 0;
|
|
||||||
safearea.right = 0;
|
|
||||||
}
|
|
||||||
return safearea;
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
from distutils.core import setup, Extension
|
|
||||||
|
|
||||||
|
|
||||||
setup(name='ios',
|
|
||||||
version='1.1',
|
|
||||||
ext_modules=[
|
|
||||||
Extension('ios',
|
|
||||||
['ios.c', 'ios_utils.m', 'ios_mail.m', 'ios_browser.m',
|
|
||||||
'ios_filechooser.m'],
|
|
||||||
libraries=[],
|
|
||||||
library_dirs=[],
|
|
||||||
)
|
|
||||||
]
|
|
||||||
)
|
|
|
@ -1,20 +0,0 @@
|
||||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
import sh, os
|
|
||||||
|
|
||||||
class IpaddressRecipe(PythonRecipe):
|
|
||||||
version = "1.0.22"
|
|
||||||
url = "https://pypi.python.org/packages/source/i/ipaddress/ipaddress-{version}.tar.gz"
|
|
||||||
depends = ["python"]
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
recipe = IpaddressRecipe()
|
|
|
@ -1,24 +0,0 @@
|
||||||
# pure-python package, this can be removed when we'll support any python package
|
|
||||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
|
||||||
from kivy_ios.context_managers import cd
|
|
||||||
from os.path import join
|
|
||||||
import sh
|
|
||||||
|
|
||||||
|
|
||||||
class ItsDangerousRecipe(PythonRecipe):
|
|
||||||
version = "1.1.0"
|
|
||||||
url = "https://github.com/mitsuhiko/itsdangerous/archive/{version}.zip"
|
|
||||||
depends = ["python"]
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
with cd(build_dir):
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
|
|
||||||
recipe = ItsDangerousRecipe()
|
|
|
@ -1,24 +0,0 @@
|
||||||
# pure-python package, this can be removed when we'll support any python package
|
|
||||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
import sh
|
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
class Jinja2Recipe(PythonRecipe):
|
|
||||||
version = "2.11.2"
|
|
||||||
url = "https://github.com/mitsuhiko/jinja2/archive/{version}.zip"
|
|
||||||
depends = ["python", "markupsafe"]
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
|
|
||||||
recipe = Jinja2Recipe()
|
|
|
@ -1,20 +0,0 @@
|
||||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
import sh, os
|
|
||||||
|
|
||||||
class JsonschemaRecipe(PythonRecipe):
|
|
||||||
version = "2.6.0"
|
|
||||||
url = "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-{version}.tar.gz"
|
|
||||||
depends = ["python"]
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
recipe = JsonschemaRecipe()
|
|
|
@ -1,20 +0,0 @@
|
||||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
import sh, os
|
|
||||||
|
|
||||||
class KeyringRecipe(PythonRecipe):
|
|
||||||
version = "10.4.0"
|
|
||||||
url = "https://pypi.python.org/packages/source/k/keyring/keyring-{version}.tar.gz"
|
|
||||||
depends = ["python"]
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
recipe = KeyringRecipe()
|
|
|
@ -1,102 +0,0 @@
|
||||||
"""
|
|
||||||
Author: Lawrence Du
|
|
||||||
E-mail: larrydu88@gmail.com
|
|
||||||
"""
|
|
||||||
|
|
||||||
from kivy_ios.toolchain import CythonRecipe, shprint
|
|
||||||
import sh
|
|
||||||
from os.path import join
|
|
||||||
from os import chdir
|
|
||||||
import logging
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class KiventCoreRecipe(CythonRecipe):
|
|
||||||
version = 'master'
|
|
||||||
url = 'https://github.com/kivy/kivent/archive/{version}.zip'
|
|
||||||
name = 'kivent_core'
|
|
||||||
depends = ['libffi', 'kivy'] # note: unsure if libffi is necessary here
|
|
||||||
pre_build_ext = False
|
|
||||||
subbuilddir = False
|
|
||||||
cythonize = True
|
|
||||||
pbx_frameworks = ["OpenGLES"] # note: This line may be unnecessary
|
|
||||||
|
|
||||||
def get_recipe_env(self, arch):
|
|
||||||
env = super(KiventCoreRecipe, self).get_recipe_env(arch)
|
|
||||||
env['CYTHONPATH'] = self.get_recipe(
|
|
||||||
'kivy', self.ctx).get_build_dir(arch.arch)
|
|
||||||
return env
|
|
||||||
|
|
||||||
def get_build_dir(self, arch, sub=False):
|
|
||||||
"""
|
|
||||||
Call this to get the correct build_dir, where setup.py is located which is
|
|
||||||
actually under modules/core/setup.py
|
|
||||||
"""
|
|
||||||
builddir = super(KiventCoreRecipe, self).get_build_dir(str(arch))
|
|
||||||
if sub or self.subbuilddir:
|
|
||||||
core_build_dir = join(builddir, 'modules', 'core')
|
|
||||||
logger.info("Core build directory is located at {}".format(core_build_dir))
|
|
||||||
return core_build_dir
|
|
||||||
else:
|
|
||||||
logger.info("Building in {}".format(builddir))
|
|
||||||
return builddir
|
|
||||||
|
|
||||||
def build_arch(self, arch):
|
|
||||||
"""
|
|
||||||
Override build.arch to avoid calling setup.py here (Call it in
|
|
||||||
install() instead).
|
|
||||||
"""
|
|
||||||
self.subbuildir = True
|
|
||||||
self.cythonize_build()
|
|
||||||
self.biglink()
|
|
||||||
self.subbuilddir = False
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
"""
|
|
||||||
This method simply builds the command line call for calling
|
|
||||||
kivent_core/modules/core/setup.py
|
|
||||||
|
|
||||||
This constructs the equivalent of the command
|
|
||||||
"$python setup.py build_ext install"
|
|
||||||
only with the environment variables altered for each different architecture
|
|
||||||
The appropriate version of kivy also needs to be added to the path, and this
|
|
||||||
differs for each architecture (i386, x86_64, armv7, etc)
|
|
||||||
|
|
||||||
Note: This method is called by build_all() in toolchain.py
|
|
||||||
|
|
||||||
"""
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
|
|
||||||
build_dir = self.get_build_dir(arch.arch, sub=True)
|
|
||||||
logger.info("Building kivent_core {} in {}".format(arch.arch, build_dir))
|
|
||||||
chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
|
|
||||||
# Get the appropriate environment for this recipe (including CYTHONPATH)
|
|
||||||
# build_env = arch.get_env()
|
|
||||||
build_env = self.get_recipe_env(arch)
|
|
||||||
|
|
||||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.7', 'site-packages')
|
|
||||||
|
|
||||||
# Add Architecture specific kivy path for 'import kivy' to PYTHONPATH
|
|
||||||
arch_kivy_path = self.get_recipe('kivy', self.ctx).get_build_dir(arch.arch)
|
|
||||||
build_env['PYTHONPATH'] = join(build_env['PYTHONPATH'], ':', arch_kivy_path)
|
|
||||||
|
|
||||||
# Make sure you call kivent_core/modules/core/setup.py
|
|
||||||
subdir_path = self.get_build_dir(str(arch), sub=True)
|
|
||||||
setup_path = join(subdir_path, "setup.py")
|
|
||||||
|
|
||||||
# Print out directories for sanity check
|
|
||||||
logger.info("ENVS", build_env)
|
|
||||||
logger.info("ROOT", self.ctx.root_dir)
|
|
||||||
logger.info("BUILD", self.ctx.build_dir)
|
|
||||||
logger.info("INCLUDE", self.ctx.include_dir)
|
|
||||||
logger.info("DISTDIR", self.ctx.dist_dir)
|
|
||||||
logger.info("ARCH KIVY LOC", self.get_recipe('kivy', self.ctx).get_build_dir(arch.arch))
|
|
||||||
|
|
||||||
shprint(hostpython, setup_path, "build_ext", "install", _env=build_env)
|
|
||||||
|
|
||||||
|
|
||||||
recipe = KiventCoreRecipe()
|
|
|
@ -1,58 +0,0 @@
|
||||||
from kivy_ios.toolchain import CythonRecipe
|
|
||||||
from os.path import join
|
|
||||||
import logging
|
|
||||||
import shutil
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class KivyRecipe(CythonRecipe):
|
|
||||||
"""
|
|
||||||
post kivy 2.0.0rc1
|
|
||||||
Includes these iOS specific fixes:
|
|
||||||
- Statusbar / Fullscreen fix (PR #4589)
|
|
||||||
- Extend usage of certifi on iOS (PR #4648)
|
|
||||||
"""
|
|
||||||
version = "067064c23a275187e67f1c9d7de7cc06f384af4d"
|
|
||||||
url = "https://github.com/kivy/kivy/archive/{version}.zip"
|
|
||||||
library = "libkivy.a"
|
|
||||||
depends = ["sdl2", "sdl2_image", "sdl2_mixer", "sdl2_ttf", "ios",
|
|
||||||
"pyobjus", "python", "host_setuptools3"]
|
|
||||||
python_depends = ["certifi"]
|
|
||||||
pbx_frameworks = ["OpenGLES", "Accelerate", "CoreMedia", "CoreVideo"]
|
|
||||||
pre_build_ext = True
|
|
||||||
|
|
||||||
def get_recipe_env(self, arch):
|
|
||||||
env = super().get_recipe_env(arch)
|
|
||||||
env["KIVY_SDL2_PATH"] = ":".join([
|
|
||||||
join(self.ctx.dist_dir, "include", "common", "sdl2"),
|
|
||||||
join(self.ctx.dist_dir, "include", "common", "sdl2_image"),
|
|
||||||
join(self.ctx.dist_dir, "include", "common", "sdl2_ttf"),
|
|
||||||
join(self.ctx.dist_dir, "include", "common", "sdl2_mixer")])
|
|
||||||
return env
|
|
||||||
|
|
||||||
def build_arch(self, arch):
|
|
||||||
self._patch_setup()
|
|
||||||
super().build_arch(arch)
|
|
||||||
|
|
||||||
def _patch_setup(self):
|
|
||||||
# patch setup to remove some functionnalities
|
|
||||||
pyconfig = join(self.build_dir, "setup.py")
|
|
||||||
|
|
||||||
def _remove_line(lines, pattern):
|
|
||||||
for line in lines[:]:
|
|
||||||
if pattern in line:
|
|
||||||
lines.remove(line)
|
|
||||||
with open(pyconfig) as fd:
|
|
||||||
lines = fd.readlines()
|
|
||||||
_remove_line(lines, "flags['libraries'] = ['GLESv2']")
|
|
||||||
with open(pyconfig, "w") as fd:
|
|
||||||
fd.writelines(lines)
|
|
||||||
|
|
||||||
def reduce_python_package(self):
|
|
||||||
dest_dir = join(self.ctx.site_packages_dir, "kivy")
|
|
||||||
shutil.rmtree(join(dest_dir, "tools"))
|
|
||||||
shutil.rmtree(join(dest_dir, "tests"))
|
|
||||||
|
|
||||||
|
|
||||||
recipe = KivyRecipe()
|
|
|
@ -1,58 +0,0 @@
|
||||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
import sh, os
|
|
||||||
|
|
||||||
class LbryRecipe(PythonRecipe):
|
|
||||||
version = "v0.82.0"
|
|
||||||
url = "https://github.com/lbryio/lbry/archive/{version}.tar.gz"
|
|
||||||
depends = [
|
|
||||||
"openssl",
|
|
||||||
"python",
|
|
||||||
"ios",
|
|
||||||
"pyobjus",
|
|
||||||
"sdl2",
|
|
||||||
"setuptools",
|
|
||||||
|
|
||||||
# install_requires dependencies
|
|
||||||
"aiohttp",
|
|
||||||
"aioupnp",
|
|
||||||
"appdirs",
|
|
||||||
"async-timeout",
|
|
||||||
"base58",
|
|
||||||
"certifi",
|
|
||||||
"chardet",
|
|
||||||
"coincurve",
|
|
||||||
"colorama",
|
|
||||||
"cryptography",
|
|
||||||
"defusedxml",
|
|
||||||
"docopt",
|
|
||||||
"ecdsa",
|
|
||||||
"hachoir",
|
|
||||||
"keyring",
|
|
||||||
"mock",
|
|
||||||
"msgpack",
|
|
||||||
"pbkdf2",
|
|
||||||
"prometheus_client",
|
|
||||||
"protobuf",
|
|
||||||
"pylru",
|
|
||||||
"pyyaml",
|
|
||||||
"six"
|
|
||||||
]
|
|
||||||
|
|
||||||
def prebuild_arch(self, arch):
|
|
||||||
if self.has_marker("patched"):
|
|
||||||
return
|
|
||||||
self.apply_patch("setup_override.patch")
|
|
||||||
self.set_marker("patched")
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
recipe = LbryRecipe()
|
|
|
@ -1,33 +0,0 @@
|
||||||
--- a/setup.py 2020-09-28 10:43:56.000000000 +0100
|
|
||||||
+++ b/setup.py 2020-09-28 10:44:34.000000000 +0100
|
|
||||||
@@ -32,29 +32,7 @@
|
|
||||||
'orchstr8=lbry.wallet.orchstr8.cli:main',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
- install_requires=[
|
|
||||||
- 'aiohttp==3.5.4',
|
|
||||||
- 'aioupnp==0.0.17',
|
|
||||||
- 'appdirs==1.4.3',
|
|
||||||
- 'certifi>=2018.11.29',
|
|
||||||
- 'colorama==0.3.7',
|
|
||||||
- 'distro==1.4.0',
|
|
||||||
- 'base58==1.0.0',
|
|
||||||
- 'cffi==1.13.2',
|
|
||||||
- 'cryptography==2.5',
|
|
||||||
- 'protobuf==3.6.1',
|
|
||||||
- 'msgpack==0.6.1',
|
|
||||||
- 'prometheus_client==0.7.1',
|
|
||||||
- 'ecdsa==0.13.3',
|
|
||||||
- 'pyyaml==5.3.1',
|
|
||||||
- 'docopt==0.6.2',
|
|
||||||
- 'hachoir',
|
|
||||||
- 'multidict==4.6.1',
|
|
||||||
- 'coincurve==11.0.0',
|
|
||||||
- 'pbkdf2==1.3',
|
|
||||||
- 'attrs==18.2.0',
|
|
||||||
- 'pylru==1.1.0'
|
|
||||||
- ] + PLYVEL,
|
|
||||||
+ install_requires=[],
|
|
||||||
classifiers=[
|
|
||||||
'Framework :: AsyncIO',
|
|
||||||
'Intended Audience :: Developers',
|
|
|
@ -1,29 +0,0 @@
|
||||||
from kivy_ios.toolchain import Recipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
import sh
|
|
||||||
|
|
||||||
|
|
||||||
class CurlRecipe(Recipe):
|
|
||||||
version = "7.65.3"
|
|
||||||
url = "https://curl.haxx.se/download/curl-{version}.tar.gz"
|
|
||||||
library = "lib/.libs/libcurl.a"
|
|
||||||
include_dir = "include"
|
|
||||||
depends = ["openssl"]
|
|
||||||
|
|
||||||
def build_arch(self, arch):
|
|
||||||
build_env = arch.get_env()
|
|
||||||
configure = sh.Command(join(self.build_dir, "configure"))
|
|
||||||
shprint(configure,
|
|
||||||
"CC={}".format(build_env["CC"]),
|
|
||||||
"LD={}".format(build_env["LD"]),
|
|
||||||
"CFLAGS={}".format(build_env["CFLAGS"]),
|
|
||||||
"LDFLAGS={}".format(build_env["LDFLAGS"]),
|
|
||||||
"--prefix=/",
|
|
||||||
"--host={}".format(arch.triple),
|
|
||||||
"--disable-shared",
|
|
||||||
"--without-libidn2")
|
|
||||||
shprint(sh.make, "clean")
|
|
||||||
shprint(sh.make, self.ctx.concurrent_make)
|
|
||||||
|
|
||||||
|
|
||||||
recipe = CurlRecipe()
|
|
|
@ -1,45 +0,0 @@
|
||||||
from kivy_ios.toolchain import Recipe, shprint
|
|
||||||
import sh
|
|
||||||
from os.path import exists
|
|
||||||
|
|
||||||
|
|
||||||
class LibffiRecipe(Recipe):
|
|
||||||
version = "3.2.1"
|
|
||||||
url = "https://sourceware.org/pub/libffi/libffi-{version}.tar.gz"
|
|
||||||
library = "build/Release-{arch.sdk}/libffi.a"
|
|
||||||
include_per_arch = True
|
|
||||||
include_dir = "build_{arch.sdk}-{arch.arch}/include"
|
|
||||||
include_name = "ffi"
|
|
||||||
archs = ["x86_64", "arm64"]
|
|
||||||
|
|
||||||
def prebuild_arch(self, arch):
|
|
||||||
if self.has_marker("patched"):
|
|
||||||
return
|
|
||||||
# XCode 10 minimum is 8.0 now.
|
|
||||||
shprint(sh.sed,
|
|
||||||
"-i.bak",
|
|
||||||
"s/-miphoneos-version-min=5.1.1/-miphoneos-version-min=8.0/g",
|
|
||||||
"generate-darwin-source-and-headers.py")
|
|
||||||
self.apply_patch("fix-win32-unreferenced-symbol.patch")
|
|
||||||
self.apply_patch("generate-darwin-source-and-headers-python3-items.patch")
|
|
||||||
self.set_marker("patched")
|
|
||||||
|
|
||||||
def build_arch(self, arch):
|
|
||||||
if exists("generate-darwin-source-and-headers.py"):
|
|
||||||
shprint(
|
|
||||||
sh.mv,
|
|
||||||
"generate-darwin-source-and-headers.py",
|
|
||||||
"_generate-darwin-source-and-headers.py")
|
|
||||||
shprint(sh.touch, "generate-darwin-source-and-headers.py")
|
|
||||||
python3 = sh.Command("python3")
|
|
||||||
shprint(python3, "_generate-darwin-source-and-headers.py", "--only-ios")
|
|
||||||
shprint(sh.xcodebuild, self.ctx.concurrent_xcodebuild,
|
|
||||||
"ONLY_ACTIVE_ARCH=NO",
|
|
||||||
"ARCHS={}".format(arch.arch),
|
|
||||||
"-sdk", arch.sdk,
|
|
||||||
"-project", "libffi.xcodeproj",
|
|
||||||
"-target", "libffi-iOS",
|
|
||||||
"-configuration", "Release")
|
|
||||||
|
|
||||||
|
|
||||||
recipe = LibffiRecipe()
|
|
|
@ -1,137 +0,0 @@
|
||||||
--- libffi-3.0.13-old/src/arm/sysv.S 2013-03-16 12:19:39.000000000 +0100
|
|
||||||
+++ libffi-3.0.13-new/src/arm/sysv.S 2013-08-26 19:33:28.000000000 +0200
|
|
||||||
@@ -109,58 +109,35 @@
|
|
||||||
#define UNWIND @
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+.syntax unified
|
|
||||||
|
|
||||||
#if defined(__thumb__) && !defined(__THUMB_INTERWORK__)
|
|
||||||
-.macro ARM_FUNC_START name
|
|
||||||
- .text
|
|
||||||
- .align 0
|
|
||||||
- .thumb
|
|
||||||
- .thumb_func
|
|
||||||
-#ifdef __APPLE__
|
|
||||||
- ENTRY($0)
|
|
||||||
+#define ARM_FUNC_START(name) \
|
|
||||||
+ .text; \
|
|
||||||
+ .align 4; \
|
|
||||||
+ .thumb; \
|
|
||||||
+ .thumb_func; \
|
|
||||||
+ ENTRY(name); \
|
|
||||||
+ bx pc; \
|
|
||||||
+ nop; \
|
|
||||||
+ .arm; \
|
|
||||||
+ UNWIND .fnstart; \
|
|
||||||
+_L__##name:
|
|
||||||
#else
|
|
||||||
- ENTRY(\name)
|
|
||||||
-#endif
|
|
||||||
- bx pc
|
|
||||||
- nop
|
|
||||||
- .arm
|
|
||||||
- UNWIND .fnstart
|
|
||||||
-/* A hook to tell gdb that we've switched to ARM mode. Also used to call
|
|
||||||
- directly from other local arm routines. */
|
|
||||||
-#ifdef __APPLE__
|
|
||||||
-_L__$0:
|
|
||||||
-#else
|
|
||||||
-_L__\name:
|
|
||||||
-#endif
|
|
||||||
-.endm
|
|
||||||
-#else
|
|
||||||
-.macro ARM_FUNC_START name
|
|
||||||
- .text
|
|
||||||
- .align 0
|
|
||||||
- .arm
|
|
||||||
-#ifdef __APPLE__
|
|
||||||
- ENTRY($0)
|
|
||||||
-#else
|
|
||||||
- ENTRY(\name)
|
|
||||||
-#endif
|
|
||||||
+#define ARM_FUNC_START(name) \
|
|
||||||
+ .text; \
|
|
||||||
+ .align 4; \
|
|
||||||
+ .arm; \
|
|
||||||
+ ENTRY(name); \
|
|
||||||
UNWIND .fnstart
|
|
||||||
-.endm
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-.macro RETLDM regs=, cond=, dirn=ia
|
|
||||||
+.macro RETLDM
|
|
||||||
#if defined (__INTERWORKING__)
|
|
||||||
- .ifc "\regs",""
|
|
||||||
- ldr\cond lr, [sp], #4
|
|
||||||
- .else
|
|
||||||
- ldm\cond\dirn sp!, {\regs, lr}
|
|
||||||
- .endif
|
|
||||||
- bx\cond lr
|
|
||||||
+ ldr lr, [sp], #4
|
|
||||||
+ bx lr
|
|
||||||
#else
|
|
||||||
- .ifc "\regs",""
|
|
||||||
- ldr\cond pc, [sp], #4
|
|
||||||
- .else
|
|
||||||
- ldm\cond\dirn sp!, {\regs, pc}
|
|
||||||
- .endif
|
|
||||||
+ ldr pc, [sp], #4
|
|
||||||
#endif
|
|
||||||
.endm
|
|
||||||
|
|
||||||
@@ -170,8 +147,7 @@
|
|
||||||
@ r3: fig->flags
|
|
||||||
@ sp+0: ecif.rvalue
|
|
||||||
|
|
||||||
- @ This assumes we are using gas.
|
|
||||||
-ARM_FUNC_START ffi_call_SYSV
|
|
||||||
+ARM_FUNC_START(ffi_call_SYSV)
|
|
||||||
@ Save registers
|
|
||||||
stmfd sp!, {r0-r3, fp, lr}
|
|
||||||
UNWIND .save {r0-r3, fp, lr}
|
|
||||||
@@ -228,7 +204,7 @@
|
|
||||||
#if defined(__SOFTFP__) || defined(__ARM_EABI__)
|
|
||||||
cmpne r3, #FFI_TYPE_DOUBLE
|
|
||||||
#endif
|
|
||||||
- stmeqia r2, {r0, r1}
|
|
||||||
+ stmiaeq r2, {r0, r1}
|
|
||||||
|
|
||||||
#if !defined(__SOFTFP__) && !defined(__ARM_EABI__)
|
|
||||||
beq LSYM(Lepilogue)
|
|
||||||
@@ -266,7 +242,7 @@
|
|
||||||
void *args;
|
|
||||||
*/
|
|
||||||
|
|
||||||
-ARM_FUNC_START ffi_closure_SYSV
|
|
||||||
+ARM_FUNC_START(ffi_closure_SYSV)
|
|
||||||
UNWIND .pad #16
|
|
||||||
add ip, sp, #16
|
|
||||||
stmfd sp!, {ip, lr}
|
|
||||||
@@ -345,7 +321,7 @@
|
|
||||||
@ r3: fig->flags
|
|
||||||
@ sp+0: ecif.rvalue
|
|
||||||
|
|
||||||
-ARM_FUNC_START ffi_call_VFP
|
|
||||||
+ARM_FUNC_START(ffi_call_VFP)
|
|
||||||
@ Save registers
|
|
||||||
stmfd sp!, {r0-r3, fp, lr}
|
|
||||||
UNWIND .save {r0-r3, fp, lr}
|
|
||||||
@@ -410,7 +386,7 @@
|
|
||||||
beq LSYM(Lepilogue_vfp)
|
|
||||||
|
|
||||||
cmp r3, #FFI_TYPE_SINT64
|
|
||||||
- stmeqia r2, {r0, r1}
|
|
||||||
+ stmiaeq r2, {r0, r1}
|
|
||||||
beq LSYM(Lepilogue_vfp)
|
|
||||||
|
|
||||||
cmp r3, #FFI_TYPE_FLOAT
|
|
||||||
@@ -433,7 +409,7 @@
|
|
||||||
.size CNAME(ffi_call_VFP),.ffi_call_VFP_end-CNAME(ffi_call_VFP)
|
|
||||||
|
|
||||||
|
|
||||||
-ARM_FUNC_START ffi_closure_VFP
|
|
||||||
+ARM_FUNC_START(ffi_closure_VFP)
|
|
||||||
fstmfdd sp!, {d0-d7}
|
|
||||||
@ r0-r3, then d0-d7
|
|
||||||
UNWIND .pad #80
|
|
|
@ -1,94 +0,0 @@
|
||||||
diff -Naur --exclude 'build*' --exclude darwin_ios --exclude '*.swp' ../armv7/libffi-3.2.1/generate-darwin-source-and-headers.py libffi-3.2.1/generate-darwin-source-and-headers.py
|
|
||||||
--- ../armv7/libffi-3.2.1/generate-darwin-source-and-headers.py 2015-02-11 02:28:30.000000000 +0100
|
|
||||||
+++ libffi-3.2.1/generate-darwin-source-and-headers.py 2015-02-11 12:33:38.000000000 +0100
|
|
||||||
@@ -19,7 +19,7 @@
|
|
||||||
prefix = "#ifdef __i386__\n\n"
|
|
||||||
suffix = "\n\n#endif"
|
|
||||||
src_dir = 'x86'
|
|
||||||
- src_files = ['darwin.S', 'win32.S', 'ffi.c']
|
|
||||||
+ src_files = ['darwin.S', 'ffi.c']
|
|
||||||
|
|
||||||
|
|
||||||
class simulator64_platform(Platform):
|
|
||||||
diff -Naur --exclude 'build*' --exclude darwin_ios --exclude '*.swp' ../armv7/libffi-3.2.1/src/x86/ffi.c libffi-3.2.1/src/x86/ffi.c
|
|
||||||
--- ../armv7/libffi-3.2.1/src/x86/ffi.c 2014-11-08 13:47:24.000000000 +0100
|
|
||||||
+++ libffi-3.2.1/src/x86/ffi.c 2015-02-11 12:41:27.000000000 +0100
|
|
||||||
@@ -393,6 +393,7 @@
|
|
||||||
case FFI_SYSV:
|
|
||||||
case FFI_MS_CDECL:
|
|
||||||
#endif
|
|
||||||
+#ifdef X86_WIN322
|
|
||||||
case FFI_STDCALL:
|
|
||||||
case FFI_THISCALL:
|
|
||||||
case FFI_FASTCALL:
|
|
||||||
@@ -402,6 +403,7 @@
|
|
||||||
ecif.rvalue, fn);
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
+#endif
|
|
||||||
default:
|
|
||||||
FFI_ASSERT(0);
|
|
||||||
break;
|
|
||||||
@@ -741,6 +743,7 @@
|
|
||||||
&ffi_closure_SYSV,
|
|
||||||
(void*)codeloc);
|
|
||||||
}
|
|
||||||
+#ifdef X86_WIN32
|
|
||||||
else if (cif->abi == FFI_REGISTER)
|
|
||||||
{
|
|
||||||
FFI_INIT_TRAMPOLINE_WIN32 (&closure->tramp[0],
|
|
||||||
@@ -765,7 +768,6 @@
|
|
||||||
&ffi_closure_STDCALL,
|
|
||||||
(void*)codeloc);
|
|
||||||
}
|
|
||||||
-#ifdef X86_WIN32
|
|
||||||
else if (cif->abi == FFI_MS_CDECL)
|
|
||||||
{
|
|
||||||
FFI_INIT_TRAMPOLINE (&closure->tramp[0],
|
|
||||||
@@ -909,7 +911,7 @@
|
|
||||||
case FFI_SYSV:
|
|
||||||
case FFI_MS_CDECL:
|
|
||||||
#endif
|
|
||||||
-#ifndef X86_WIN64
|
|
||||||
+#ifdef X86_WIN32
|
|
||||||
case FFI_STDCALL:
|
|
||||||
case FFI_THISCALL:
|
|
||||||
case FFI_FASTCALL:
|
|
||||||
diff -Naur --exclude 'build*' --exclude darwin_ios --exclude '*.swp' ../armv7/libffi-3.2.1/src/x86/win32.S libffi-3.2.1/src/x86/win32.S
|
|
||||||
--- ../armv7/libffi-3.2.1/src/x86/win32.S 2014-11-11 15:41:37.000000000 +0100
|
|
||||||
+++ libffi-3.2.1/src/x86/win32.S 2015-02-11 12:33:46.000000000 +0100
|
|
||||||
@@ -37,8 +37,6 @@
|
|
||||||
#define CIF_BYTES_OFFSET 16
|
|
||||||
#define CIF_FLAGS_OFFSET 20
|
|
||||||
|
|
||||||
-#ifdef _MSC_VER
|
|
||||||
-
|
|
||||||
#define CLOSURE_CIF_OFFSET ((FFI_TRAMPOLINE_SIZE + 3) AND NOT 3)
|
|
||||||
|
|
||||||
.386
|
|
||||||
@@ -1344,8 +1342,6 @@
|
|
||||||
.align 4
|
|
||||||
.LEFDE5:
|
|
||||||
|
|
||||||
-#endif /* !_MSC_VER */
|
|
||||||
-
|
|
||||||
#if defined __ELF__ && defined __linux__
|
|
||||||
.section .note.GNU-stack,"",@progbits
|
|
||||||
#endif
|
|
||||||
diff -Naur --exclude 'build*' --exclude darwin_ios --exclude '*.swp' ../armv7/libffi-3.2.1/src/x86/win64.S libffi-3.2.1/src/x86/win64.S
|
|
||||||
--- ../armv7/libffi-3.2.1/src/x86/win64.S 2014-11-08 13:47:24.000000000 +0100
|
|
||||||
+++ libffi-3.2.1/src/x86/win64.S 2015-02-11 12:31:27.000000000 +0100
|
|
||||||
@@ -16,7 +16,6 @@
|
|
||||||
unsigned *rvalue, void (*fn)());
|
|
||||||
*/
|
|
||||||
|
|
||||||
-#ifdef _MSC_VER
|
|
||||||
PUBLIC ffi_call_win64
|
|
||||||
|
|
||||||
EXTRN __chkstk:NEAR
|
|
||||||
@@ -516,5 +515,4 @@
|
|
||||||
pop %rbp
|
|
||||||
retq
|
|
||||||
.seh_endproc
|
|
||||||
-#endif /* !_MSC_VER */
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
diff -Nru libffi-3.2.1/generate-darwin-source-and-headers.py libffi-3.2.1-new/generate-darwin-source-and-headers.py
|
|
||||||
--- libffi-3.2.1/generate-darwin-source-and-headers.py 2014-11-08 13:47:24.000000000 +0100
|
|
||||||
+++ libffi-3.2.1-new/generate-darwin-source-and-headers.py 2020-05-06 10:30:46.000000000 +0200
|
|
||||||
@@ -194,7 +194,7 @@
|
|
||||||
build_target(desktop64_platform, platform_headers)
|
|
||||||
|
|
||||||
mkdir_p('darwin_common/include')
|
|
||||||
- for header_name, tag_tuples in platform_headers.iteritems():
|
|
||||||
+ for header_name, tag_tuples in platform_headers.items():
|
|
||||||
basename, suffix = os.path.splitext(header_name)
|
|
||||||
with open(os.path.join('darwin_common/include', header_name), 'w') as header:
|
|
||||||
for tag_tuple in tag_tuples:
|
|
|
@ -1,33 +0,0 @@
|
||||||
from kivy_ios.toolchain import Recipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
import sh
|
|
||||||
|
|
||||||
|
|
||||||
class JpegRecipe(Recipe):
|
|
||||||
version = "v9a"
|
|
||||||
url = "http://www.ijg.org/files/jpegsrc.{version}.tar.gz"
|
|
||||||
library = ".libs/libjpeg.a"
|
|
||||||
include_dir = [
|
|
||||||
("jpeglib.h", ""),
|
|
||||||
("jconfig.h", ""),
|
|
||||||
("jerror.h", ""),
|
|
||||||
("jmorecfg.h", ""),
|
|
||||||
]
|
|
||||||
include_per_arch = True
|
|
||||||
|
|
||||||
def build_arch(self, arch):
|
|
||||||
build_env = arch.get_env()
|
|
||||||
configure = sh.Command(join(self.build_dir, "configure"))
|
|
||||||
shprint(configure,
|
|
||||||
"CC={}".format(build_env["CC"]),
|
|
||||||
"LD={}".format(build_env["LD"]),
|
|
||||||
"CFLAGS={}".format(build_env["CFLAGS"]),
|
|
||||||
"LDFLAGS={}".format(build_env["LDFLAGS"]),
|
|
||||||
"--prefix=/",
|
|
||||||
"--host={}".format(arch.triple),
|
|
||||||
"--disable-shared")
|
|
||||||
shprint(sh.make, "clean")
|
|
||||||
shprint(sh.make, self.ctx.concurrent_make)
|
|
||||||
|
|
||||||
|
|
||||||
recipe = JpegRecipe()
|
|
|
@ -1,28 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from kivy_ios.toolchain import Recipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
import sh
|
|
||||||
|
|
||||||
|
|
||||||
class PngRecipe(Recipe):
|
|
||||||
version = '1.6.26'
|
|
||||||
url = 'http://downloads.sourceforge.net/sourceforge/libpng/libpng-{version}.tar.gz'
|
|
||||||
depends = ["python"]
|
|
||||||
library = '.libs/libpng16.a'
|
|
||||||
|
|
||||||
def build_arch(self, arch):
|
|
||||||
build_env = arch.get_env()
|
|
||||||
configure = sh.Command(join(self.build_dir, "configure"))
|
|
||||||
shprint(configure,
|
|
||||||
"CC={}".format(build_env["CC"]),
|
|
||||||
"LD={}".format(build_env["LD"]),
|
|
||||||
"CFLAGS={}".format(build_env["CFLAGS"]),
|
|
||||||
"LDFLAGS={}".format(build_env["LDFLAGS"]),
|
|
||||||
"--prefix=/",
|
|
||||||
"--host={}".format(arch.triple),
|
|
||||||
"--disable-shared")
|
|
||||||
shprint(sh.make, "clean")
|
|
||||||
shprint(sh.make, self.ctx.concurrent_make, _env=build_env)
|
|
||||||
|
|
||||||
|
|
||||||
recipe = PngRecipe()
|
|
|
@ -1,29 +0,0 @@
|
||||||
from kivy_ios.toolchain import Recipe, shprint
|
|
||||||
from os.path import join, exists
|
|
||||||
from multiprocessing import cpu_count
|
|
||||||
import sh
|
|
||||||
|
|
||||||
class LibSecp256k1Recipe(Recipe):
|
|
||||||
version = 'b0452e6'
|
|
||||||
url = 'https://github.com/bitcoin-core/secp256k1/archive/{version}.zip'
|
|
||||||
library = '.libs/libsecp256k1.a'
|
|
||||||
include_per_arch = True
|
|
||||||
|
|
||||||
def build_arch(self, arch):
|
|
||||||
super(LibSecp256k1Recipe, self).build_arch(arch)
|
|
||||||
env = self.get_recipe_env(arch)
|
|
||||||
|
|
||||||
if not exists(join(self.build_dir, "configure")):
|
|
||||||
shprint(sh.Command('./autogen.sh'))
|
|
||||||
shprint(
|
|
||||||
sh.Command('./configure'),
|
|
||||||
'--host=' + arch.triple,
|
|
||||||
'--prefix=/',
|
|
||||||
'--enable-module-recovery',
|
|
||||||
'--enable-experimental',
|
|
||||||
'--enable-module-ecdh',
|
|
||||||
'--disable-shared',
|
|
||||||
_env=env)
|
|
||||||
shprint(sh.make, '-j' + str(cpu_count()), _env=env)
|
|
||||||
|
|
||||||
recipe = LibSecp256k1Recipe()
|
|
|
@ -1,58 +0,0 @@
|
||||||
from kivy_ios.toolchain import Recipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
import sh
|
|
||||||
|
|
||||||
|
|
||||||
class LibZBarRecipe(Recipe):
|
|
||||||
|
|
||||||
version = '0.10'
|
|
||||||
|
|
||||||
url = 'https://github.com/ZBar/ZBar/archive/{version}.zip'
|
|
||||||
|
|
||||||
depends = ['hostpython3']
|
|
||||||
|
|
||||||
library = 'zbar/.libs/libzbar.a'
|
|
||||||
|
|
||||||
include_per_arch = True
|
|
||||||
include_dir = [
|
|
||||||
("include", "")
|
|
||||||
]
|
|
||||||
|
|
||||||
def prebuild_arch(self, arch):
|
|
||||||
if self.has_marker("patched"):
|
|
||||||
return
|
|
||||||
self.apply_patch("werror.patch")
|
|
||||||
self.set_marker("patched")
|
|
||||||
|
|
||||||
def build_arch(self, arch):
|
|
||||||
super(LibZBarRecipe, self).build_arch(arch)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
build_env["CFLAGS"] = " ".join([
|
|
||||||
"-I{}".format(join(self.ctx.dist_dir, "build", "libiconv", arch.arch)) +
|
|
||||||
" -arch {}".format(arch.arch), build_env['CFLAGS']
|
|
||||||
])
|
|
||||||
shprint(sh.Command('autoreconf'), '-vif')
|
|
||||||
shprint(
|
|
||||||
sh.Command('./configure'),
|
|
||||||
"CC={}".format(build_env["CC"]),
|
|
||||||
"LD={}".format(build_env["LD"]),
|
|
||||||
"CFLAGS={}".format(build_env["CFLAGS"]),
|
|
||||||
"LDFLAGS={}".format(build_env["LDFLAGS"]),
|
|
||||||
"--host={}".format(arch.triple),
|
|
||||||
'--target={}'.format(arch.triple),
|
|
||||||
# Python bindings are compiled in a separated recipe
|
|
||||||
'--with-python=no',
|
|
||||||
'--with-gtk=no',
|
|
||||||
'--with-qt=no',
|
|
||||||
'--with-x=no',
|
|
||||||
'--with-jpeg=no',
|
|
||||||
'--with-imagemagick=no',
|
|
||||||
'--enable-pthread=no',
|
|
||||||
'--enable-video=no',
|
|
||||||
"--disable-shared",
|
|
||||||
_env=build_env)
|
|
||||||
shprint(sh.make, 'clean')
|
|
||||||
shprint(sh.make, _env=build_env)
|
|
||||||
|
|
||||||
|
|
||||||
recipe = LibZBarRecipe()
|
|
|
@ -1,13 +0,0 @@
|
||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index 256aedb..727caba 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -3,7 +3,7 @@ AC_PREREQ([2.61])
|
|
||||||
AC_INIT([zbar], [0.10], [spadix@users.sourceforge.net])
|
|
||||||
AC_CONFIG_AUX_DIR(config)
|
|
||||||
AC_CONFIG_MACRO_DIR(config)
|
|
||||||
-AM_INIT_AUTOMAKE([1.10 -Wall -Werror foreign subdir-objects std-options dist-bzip2])
|
|
||||||
+AM_INIT_AUTOMAKE([1.10 -Wall foreign subdir-objects std-options dist-bzip2])
|
|
||||||
AC_CONFIG_HEADERS([include/config.h])
|
|
||||||
AC_CONFIG_SRCDIR(zbar/scanner.c)
|
|
||||||
LT_PREREQ([2.2])
|
|
|
@ -1,28 +0,0 @@
|
||||||
# pure-python package, this can be removed when we'll support any python package
|
|
||||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
|
||||||
from os.path import join
|
|
||||||
import sh
|
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
class MarkupSafeRecipe(PythonRecipe):
|
|
||||||
version = "1.1.1"
|
|
||||||
url = "https://github.com/mitsuhiko/markupsafe/archive/{version}.zip"
|
|
||||||
depends = ["python"]
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
cmd = sh.Command("sed")
|
|
||||||
shprint(cmd, "-i", "", "s/,.*Feature//g", "./setup.py", _env=build_env)
|
|
||||||
shprint(cmd, "-i", "", "/^speedups = Feature/,/^)$/s/.*//g", "./setup.py", _env=build_env)
|
|
||||||
shprint(cmd, "-i", "", "s/features\['speedups'\].*=.*speedups/pass/g", "./setup.py", _env=build_env) # noqa: W605
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
|
|
||||||
recipe = MarkupSafeRecipe()
|
|
|
@ -1,23 +0,0 @@
|
||||||
# pure-python package, this can be removed when we'll support any python package
|
|
||||||
import os
|
|
||||||
import sh
|
|
||||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
|
||||||
|
|
||||||
|
|
||||||
class MockRecipe(PythonRecipe):
|
|
||||||
version = "4.0.2"
|
|
||||||
url = "https://pypi.python.org/packages/source/m/mock/mock-{version}.tar.gz"
|
|
||||||
depends = ["python"]
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
|
|
||||||
recipe = MockRecipe()
|
|
|
@ -1,23 +0,0 @@
|
||||||
# pure-python package, this can be removed when we'll support any python package
|
|
||||||
import os
|
|
||||||
import sh
|
|
||||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
|
||||||
|
|
||||||
|
|
||||||
class MsgpackRecipe(PythonRecipe):
|
|
||||||
version = "0.6.1"
|
|
||||||
url = "https://pypi.python.org/packages/source/m/msgpack/msgpack-{version}.tar.gz"
|
|
||||||
depends = ["python"]
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
|
|
||||||
recipe = MsgpackRecipe()
|
|
|
@ -1,22 +0,0 @@
|
||||||
# pure-python package, this can be removed when we'll support any python package
|
|
||||||
import os
|
|
||||||
import sh
|
|
||||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
|
||||||
|
|
||||||
|
|
||||||
class MultidictRecipe(PythonRecipe):
|
|
||||||
version = "4.5.2"
|
|
||||||
url = "https://pypi.python.org/packages/source/m/multidict/multidict-{version}.tar.gz"
|
|
||||||
depends = ["python"]
|
|
||||||
|
|
||||||
def install(self):
|
|
||||||
arch = list(self.filtered_archs)[0]
|
|
||||||
build_dir = self.get_build_dir(arch.arch)
|
|
||||||
os.chdir(build_dir)
|
|
||||||
hostpython = sh.Command(self.ctx.hostpython)
|
|
||||||
build_env = arch.get_env()
|
|
||||||
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
|
|
||||||
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
|
||||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
||||||
|
|
||||||
recipe = MultidictRecipe()
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue