如何伪造macports使用我的构建脚本ffmpeg?

时间:2017-06-04 12:23:03

标签: macports

我有自己的bash脚本来配置ffmpeg,它成功更新我的git repo,构建,测试并正确安装所有内容。

基本上我想绕过macports env和配置但是只识别我的构建,但只有ffmpeg,我不希望macports查看/ usr / local或其他位置,我希望它安装在/ opt / local < / p>

所以它可能归结为,如何完全禁用所有macports env并使用我的脚本启动子shell?

创建了tarball,校验和等

PortSystem          1.0
PortGroup           muniversal 1.0
name                ffmpeg
epoch               1
version             9.9.9
revision            9
license             LGPL-2.1+
categories          multimedia
maintainers         nomaintainer
platforms           darwin
homepage            http://www.ffmpeg.org/
master_sites       file:///Volumes/Apps_Media/my_repo
use_zip              yes
checksums {they work}
depends_build       port:pkgconfig \
                    port:gmake \
                    port:texinfo
use_configure    no
build.cmd           $HOME/bin/configFFMPEG

在ffmpeg的配置

中对这些行进行了macports扼流圈
FFmpeg/configure: line 3596: ffbuild/config.log: Operation not permitted
FFmpeg/configure: line 3597: ffbuild/config.log: Operation not permitted

echo "# $0 $FFMPEG_CONFIGURATION" > $logfile
set >> $logfile

1 个答案:

答案 0 :(得分:0)

MacPorts以macports用户身份运行构建版本,而不是yoru普通用户或root。确保用户可以读取脚本并写入脚本尝试写入的位置。

即使您使用超级用户权限调用MacPorts,它也不会在构建软件时使用这些权限。