├── .gitignore ├── LICENSE.md ├── Makefile ├── NOTICE.txt ├── README.md ├── control └── layout └── DEBIAN └── preinst /.gitignore: -------------------------------------------------------------------------------- 1 | .theos 2 | packages 3 | versions 4 | tbds 5 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # libswift 2 | 3 | MIT License 4 | 5 | Copyright (c) 2017 Kabir Oberai 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | 25 | # macho_edit 26 | 27 | MIT License 28 | 29 | Copyright (c) 2017 Asger Hautop Drewsen 30 | 31 | Permission is hereby granted, free of charge, to any person obtaining a copy 32 | of this software and associated documentation files (the "Software"), to deal 33 | in the Software without restriction, including without limitation the rights 34 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 35 | copies of the Software, and to permit persons to whom the Software is 36 | furnished to do so, subject to the following conditions: 37 | 38 | The above copyright notice and this permission notice shall be included in all 39 | copies or substantial portions of the Software. 40 | 41 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 42 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 43 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 44 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 45 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 46 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 47 | SOFTWARE. 48 | 49 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | NULL_NAME := libswift 2 | INSTALL_PATH := /usr/lib/libswift/stable 3 | OBJ_PATH = $(THEOS_OBJ_DIR) 4 | 5 | XCODE ?= $(shell xcode-select -p)/../.. 6 | XCODE_USR = $(XCODE)/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr 7 | 8 | include $(THEOS)/makefiles/common.mk 9 | include $(THEOS_MAKE_PATH)/null.mk 10 | 11 | all:: 12 | $(ECHO_NOTHING)rm -rf $(OBJ_PATH)$(ECHO_END) 13 | $(ECHO_NOTHING)mkdir -p $(OBJ_PATH)$(ECHO_END) 14 | $(ECHO_NOTHING)rsync -ra "$(XCODE_USR)"/lib/swift/iphoneos/libswift*.dylib $(OBJ_PATH)$(ECHO_END) 15 | $(ECHO_NOTHING)ldid -S $(OBJ_PATH)/*$(ECHO_END) 16 | 17 | stage:: 18 | $(ECHO_NOTHING)mkdir -p $(THEOS_STAGING_DIR)/$(INSTALL_PATH)$(ECHO_END) 19 | $(ECHO_NOTHING)rsync -ra $(OBJ_PATH)/ $(THEOS_STAGING_DIR)/$(INSTALL_PATH) $(_THEOS_RSYNC_EXCLUDE_COMMANDLINE)$(ECHO_END) 20 | $(ECHO_NOTHING)cp NOTICE.txt $(THEOS_STAGING_DIR)/$(INSTALL_PATH)$(ECHO_END) 21 | -------------------------------------------------------------------------------- /NOTICE.txt: -------------------------------------------------------------------------------- 1 | The license for Swift can be found at https://swift.org/LICENSE.txt. 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # libswift 2 | 3 | A tool to interact with Swift toolchains 4 | 5 | ## Installation 6 | 7 | 1. [Install Theos](https://github.com/theos/theos/wiki/Installation) 8 | 2. Clone this repository somewhere on your computer 9 | 10 | ### Packaging 11 | 12 | make package [XCODE=/path/to/Xcode.app] [FINALPACKAGE=1] 13 | 14 | The Swift stdlib will be copied from the path specified by the `XCODE` variable. 15 | 16 | ### Installing 17 | 18 | make install THEOS_DEVICE_IP= 19 | -------------------------------------------------------------------------------- /control: -------------------------------------------------------------------------------- 1 | Package: org.swift.libswift 2 | Name: libswift (stable) 3 | Section: Development 4 | Architecture: iphoneos-arm 5 | Description: Swift runtime for iOS 6 | Author: Kabir Oberai 7 | Maintainer: Kabir Oberai 8 | Depends: firmware (>= 7.0) 9 | Version: 5.0 10 | -------------------------------------------------------------------------------- /layout/DEBIAN/preinst: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | mkdir -p /usr/lib/libswift 3 | if [[ -x /usr/libexec/cydia/move.sh ]]; then 4 | bash /usr/libexec/cydia/move.sh /usr/lib/libswift/stable 5 | else 6 | : 7 | fi 8 | --------------------------------------------------------------------------------