microcai/gentoo-zh — pull request #168 by xen0n (2014-07-12 08:08:56+00:00)
Title: Multilib WPS

This is for review; please let me know of any problems you sight.

As the title states, this PR made the ebuild of WPS Office multilib-compatible. This is done by running `ldd` on all executables of WPS for a complete list of dependent libraries, then looking up the individual files with `equery belongs` for the packages. The lookup must be done on a `emul-linux-*`-using box (the one used was my former setup); it is done twice with the libdir set to `lib32` and `lib64` for a proper map of packages.

Only `abi_x86_32` is taken into consideration at the moment, but it should be easy to adapt if, for example, a native 64-bit port is eventually available.

### Chinese translation

这是征求意见稿, 请自由吐槽.

如题, 该 PR 使 WPS Office 的 ebuild 兼容了 multilib 配置. 这是通过使用 `ldd` 检查出 WPS 所有可执行文件的依赖库, 并对依赖的文件使用 `equery belongs` 找出对应的包名来实现的. 第二步必须在一台使用 `emul-linux-*` 包的机器上进行 (之前使用的是自己的环境, 不过现在已经完全 multilib 化了), 查找过程进行两次, 分别使用 `lib32` 和 `lib64` 为库文件目录名, 这样可以得到正确的对应关系.

当前只考虑了 `abi_x86_32` 的情况, 不过假如有需要的话应该很容易进行扩展, 比方说如果有一天 WPS 放出了原生 64 位版本的话 (sigh)...