|
| 1 | + |
| 2 | +Pod::Spec.new do |spec| |
| 3 | + |
| 4 | + spec.name = "PureScript" |
| 5 | + spec.version = "0.1.0" |
| 6 | + spec.summary = "ScriptEngine module of [PureScript]" |
| 7 | + spec.description = "ScriptEngine module of [PureScript]" |
| 8 | + |
| 9 | + spec.homepage = "https://github.com/loonly/PureScript" |
| 10 | + spec.license = "MIT" |
| 11 | + spec.author = { "loonly" => "https://github.com/loonly/PureScript" } |
| 12 | + spec.platform = :ios, '10.1' |
| 13 | + |
| 14 | + spec.source = { :git => "https://github.com/loonly/PureScript.git", :tag => "#{spec.version}" } |
| 15 | + |
| 16 | + |
| 17 | + # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # |
| 18 | + # |
| 19 | + # CocoaPods is smart about how it includes source code. For source files |
| 20 | + # giving a folder will include any swift, h, m, mm, c & cpp files. |
| 21 | + # For header files it will include any header in the folder. |
| 22 | + # Not including the public_header_files will make all headers public. |
| 23 | + # |
| 24 | + |
| 25 | + spec.source_files = "generated/*.{h,m,c,cpp}","lib/include/**/*.h" |
| 26 | + #,"ScriptEngine.c","main/*.{h,m,c,cpp}", "custom/*.{h,m,c,cpp}" |
| 27 | + |
| 28 | + #spec.exclude_files = "Classes/Exclude" |
| 29 | + |
| 30 | + # spec.public_header_files = "Classes/**/*.h" |
| 31 | + |
| 32 | + |
| 33 | + # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # |
| 34 | + # |
| 35 | + # A list of resources included with the Pod. These are copied into the |
| 36 | + # target bundle with a build phase script. Anything else will be cleaned. |
| 37 | + # You can preserve files from being cleaned, please don't preserve |
| 38 | + # non-essential files like tests, examples and documentation. |
| 39 | + # |
| 40 | + |
| 41 | + spec.resources = "Managed" |
| 42 | + #"Managed/*.{dll,aotdata,exe}" |
| 43 | + |
| 44 | + #spec.resource_bundles = {'Managed' => ['Managed/*.{dll,aotdata,exe}']} |
| 45 | + |
| 46 | + # spec.preserve_paths = "FilesToSave", "MoreFilesToSave" |
| 47 | + |
| 48 | + |
| 49 | + # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # |
| 50 | + # |
| 51 | + # Link your library with frameworks, or libraries. Libraries do not include |
| 52 | + # the lib prefix of their name. |
| 53 | + # |
| 54 | + |
| 55 | + # spec.framework = "SomeFramework" |
| 56 | + spec.frameworks = "GSS", "UIKit","Foundation" |
| 57 | + |
| 58 | + # spec.library = "iconv" |
| 59 | + spec.libraries = "iconv", "z" |
| 60 | + #,"il2cpp","iPhone-lib" |
| 61 | + |
| 62 | + spec.static_framework = true |
| 63 | + |
| 64 | + root_path = File.dirname(__FILE__) |
| 65 | + flag_array = Array.new |
| 66 | + |
| 67 | + flag_array.push("-L#{root_path}/lib") |
| 68 | + flag_array.push("-L#{root_path}/aot") |
| 69 | + |
| 70 | + flag_array.push("-lObjC") |
| 71 | + flag_array.push("-force_load #{root_path}/lib/libmono-native-unified.a") |
| 72 | + flag_array.push("-force_load #{root_path}/lib/libScriptEngine.a") |
| 73 | + |
| 74 | + libdir = Dir::open("lib") |
| 75 | + libdir.each do |f| |
| 76 | + if f.include?(".a") |
| 77 | + fname = f.sub(".a","").sub("lib","") |
| 78 | + flag_array.push(%Q[-l"#{fname}"]) |
| 79 | + end |
| 80 | + end |
| 81 | + |
| 82 | + aotdir = Dir::open("aot") |
| 83 | + aotdir.each do |f| |
| 84 | + if f.include?(".a") |
| 85 | + fname = f.sub(".a","").sub("lib","") |
| 86 | + flag_array.push(%Q[-l"#{fname}"]) |
| 87 | + end |
| 88 | + end |
| 89 | + |
| 90 | + flag_array.push(%Q[-l"iconv"]) |
| 91 | + flag_array.push(%Q[-l"z"]) |
| 92 | + |
| 93 | + flag_array.push("$(inherited)") |
| 94 | + |
| 95 | + spec.vendored_libraries = "lib/*.a", "aot/*.a" |
| 96 | + #spec.header_dir = "lib/include" |
| 97 | + # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # |
| 98 | + # |
| 99 | + # If your library depends on compiler flags you can set them in the xcconfig hash |
| 100 | + # where they will only apply to your library. If you depend on other Podspecs |
| 101 | + # you can include multiple dependencies to ensure it works. |
| 102 | + |
| 103 | + # spec.requires_arc = true |
| 104 | + |
| 105 | + spec.xcconfig = { "ENABLE_BITCODE" => "NO", |
| 106 | + "HEADER_SEARCH_PATHS" => ["${PODS_TARGET_SRCROOT}/lib/include","${PODS_ROOT}/../Libraries/libil2cpp/include"] , |
| 107 | + "OTHER_LDFLAGS" => flag_array, |
| 108 | + "GCC_PREPROCESSOR_DEFINITIONS" => "RUNTIME_IOS=1", |
| 109 | + "LIBRARY_SEARCH_PATHS" => ["${PURESCRIPT_DIR}/lib","${PURESCRIPT_DIR}/aot"] #"${PODS_ROOT}/../Libraries" |
| 110 | + } |
| 111 | + # spec.dependency "JSONKit", "~> 1.4" |
| 112 | + |
| 113 | +end |
0 commit comments