1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id: Portfile 83173 2011-08-27 05:35:20Z ryandesign@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name virtualbox-oracle-vm-virtualbox-extension-pack |
---|
7 | version 4.1.2 |
---|
8 | categories emulators |
---|
9 | maintainers pixilla openmaintainer |
---|
10 | platforms darwin |
---|
11 | description Oracle VM VirtualBox Extension Pack |
---|
12 | long_description ${description} |
---|
13 | license PUEL |
---|
14 | |
---|
15 | homepage http://www.virtualbox.org/ |
---|
16 | master_sites http://download.virtualbox.org/virtualbox/${version}/ |
---|
17 | |
---|
18 | supported_archs i386 |
---|
19 | depends_run port:virtualbox |
---|
20 | |
---|
21 | distname Oracle_VM_VirtualBox_Extension_Pack-${version}-73507 |
---|
22 | set name_extpack Oracle_VM_VirtualBox_Extension_Pack |
---|
23 | checksums rmd160 398b7267e3c7c4fd4d26a19066dd830d1b29456b \ |
---|
24 | sha256 3bc5ad8d7082b6debeec24c40a86629bf0ad6313343532d0ad0fee4131e8f9fc |
---|
25 | |
---|
26 | worksrcdir ${name}/${name_extpack} |
---|
27 | extract.suffix .vbox-extpack |
---|
28 | extract.mkdir yes |
---|
29 | |
---|
30 | use_configure no |
---|
31 | |
---|
32 | set my_app_dir VirtualBox.app |
---|
33 | set my_lib_dir ${my_app_dir}/Contents/MacOS |
---|
34 | set my_ext_dir ${my_app_dir}/Contents/MacOS/ExtensionPacks |
---|
35 | build { |
---|
36 | # The pre-built libraries use weird prefixes and Oracle recommends setting |
---|
37 | # DYLD_LIBRARY_PATH to deal with this. I would rather fix the paths in the |
---|
38 | # libraries at install time. |
---|
39 | foreach {my_arch} {x86 amd64} { |
---|
40 | foreach lib [glob -directory ${worksrcpath}/darwin.${my_arch} *.dylib*] { |
---|
41 | system "install_name_tool -id ${applications_dir}/${my_ext_dir}/${name_extpack}/[strsed ${lib} /^.*\\///] ${lib}" |
---|
42 | |
---|
43 | # Then for each dependent dylib with a weird path that this dylib |
---|
44 | # references, fix the reference to use ${lib_dir}. |
---|
45 | foreach dep [exec otool -L ${lib}] { |
---|
46 | if [string match "/Applications/${my_lib_dir}/*" ${dep}] { |
---|
47 | system "install_name_tool -change ${dep} ${applications_dir}/${my_lib_dir}/[strsed ${dep} /^.*\\///] ${lib}" |
---|
48 | } |
---|
49 | } |
---|
50 | } |
---|
51 | } |
---|
52 | } |
---|
53 | |
---|
54 | destroot { |
---|
55 | xinstall -d -o root -g admin -m 755 ${destroot}${applications_dir}/${my_ext_dir} |
---|
56 | copy ${worksrcpath} ${destroot}${applications_dir}/${my_ext_dir} |
---|
57 | fs-traverse f ${destroot}${applications_dir} { |
---|
58 | file attributes ${f} -owner "root" -group "admin" |
---|
59 | } |
---|
60 | } |
---|
61 | |
---|
62 | livecheck.type regex |
---|
63 | livecheck.url ${homepage} |
---|
64 | livecheck.regex "VirtualBox (\\d+\\.\\d+(?:\\.\\d+)?) released!" |
---|
65 | #http://download.virtualbox.org/virtualbox/4.1.2/Oracle_VM_VirtualBox_Extension_Pack-4.1.2-73507.vbox-extpack |
---|