本文介绍了是否有可能为iOS编译potrace?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

观察potrace的跨平台性质,有可能为iOS编译吗?如果是这样,怎么做?

Looking at the cross-platform nature of potrace http://potrace.sourceforge.net/, is it possible to compile this for iOS? If so, how?

推荐答案

是的,可以为iOS编译 potrace

Yes, it is possible to compile potrace for iOS.

事实上,大多数使用在MacOS X上编译的标准(GNU)配置工具的开源库都可以在iOS上轻松编译,因为它们可能没有特定于平台的特性代码(例如 linuxisms )和标准配置工具允许交叉编译。

As a matter of fact, most open source libraries using standard (GNU) configure tools that compile on MacOS X will easily compile on iOS, because they are likely free of platform-specific code (e.g. linuxisms) and standard configure tools allow cross-compilation.

您可以通过将configure指向正确的来在shell中编译这些库工具链和SDK。路径随Mavericks和Xcode 5而改变,但幸运的是,自动化脚本存在于更受欢迎的库中,例如expat。

You can compile these libraries in the shell by pointing configure to the proper toolchain and SDKs. Paths changed with Mavericks and Xcode 5, but fortunately automated scripts exist for more popular libraries such as expat.

建议的解决方案基于项目。他们的脚本修复了 expat的 config.sub ,它不知道arm64目标。做potrace 1.11的 config.sub 。但是,更简单的方法是下载更新版本的 config.sub 。与expat不同,potrace似乎不需要为iOS编译任何补丁。

The proposed solution is based on the x2on/expat-ios project on GitHub. Their script fixes expat's config.sub which doesn't know about arm64 target. Do does potrace 1.11's config.sub. However, a simpler approach consists in downloading a more recent version of config.sub. Unlike expat, potrace doesn't seem to need any patch to compile for iOS.

完整脚本 build-potrace.sh 可在此处获取:

Full script build-potrace.sh is available here:https://gist.github.com/pguyot/dce18af64a71b93c0204

请注意,potrace是根据GPLv2许可的。您可能需要查看问题。

Please note that potrace is licensed under the GPLv2. You might want to check Is it legal to publish iOS apps under the GNU GPLv3 open-source license? question.

这篇关于是否有可能为iOS编译potrace?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-23 11:10