Lines 1-10
Link Here
|
1 |
# Copyright 1999-2010 Gentoo Foundation |
1 |
# Copyright 1999-2010 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-player/vmware-player-2.5.3.185404.ebuild,v 1.4 2009/09/25 10:37:05 maekke Exp $ |
3 |
# $Header$ |
4 |
|
4 |
|
5 |
EAPI="2" |
5 |
EAPI="2" |
6 |
|
6 |
|
7 |
inherit eutils versionator fdo-mime gnome2-utils |
7 |
inherit eutils versionator fdo-mime gnome2-utils vmware-bundle |
8 |
|
8 |
|
9 |
MY_PN="VMware-Player" |
9 |
MY_PN="VMware-Player" |
10 |
MY_PV="$(replace_version_separator 3 - $PV)" |
10 |
MY_PV="$(replace_version_separator 3 - $PV)" |
Lines 25-33
Link Here
|
25 |
|
25 |
|
26 |
# vmware-workstation should not use virtual/libc as this is a |
26 |
# vmware-workstation should not use virtual/libc as this is a |
27 |
# precompiled binary package thats linked to glibc. |
27 |
# precompiled binary package thats linked to glibc. |
28 |
DEPEND="dev-libs/libxslt" |
|
|
29 |
RDEPEND=" |
28 |
RDEPEND=" |
30 |
~app-emulation/vmware-modules-1.0.0.26 |
29 |
~app-emulation/vmware-modules-1.0.0.26 |
|
|
30 |
~app-emulation/vmware-tools-8.1.4.227600 |
31 |
app-arch/libarchive |
31 |
app-arch/libarchive |
32 |
dev-cpp/cairomm |
32 |
dev-cpp/cairomm |
33 |
dev-cpp/glibmm |
33 |
dev-cpp/glibmm |
Lines 92-108
Link Here
|
92 |
local bundle |
92 |
local bundle |
93 |
|
93 |
|
94 |
if use x86; then |
94 |
if use x86; then |
95 |
bundle="${MY_PN}.i386.bundle" |
95 |
bundle="${MY_P}.i386.bundle" |
96 |
elif use amd64; then |
96 |
elif use amd64; then |
97 |
bundle="${MY_PN}.x86_64.bundle" |
97 |
bundle="${MY_P}.x86_64.bundle" |
98 |
fi |
98 |
fi |
99 |
|
99 |
|
100 |
einfo "Please download the ${bundle} from ${HOMEPAGE}" |
100 |
einfo "Please download ${bundle}" |
|
|
101 |
einfo "from ${HOMEPAGE}" |
101 |
einfo "and place it in ${DISTDIR}" |
102 |
einfo "and place it in ${DISTDIR}" |
102 |
} |
103 |
} |
103 |
|
104 |
|
104 |
src_unpack() { |
105 |
src_unpack() { |
105 |
bundle_extract_component "${DISTDIR}/${A}" vmware-player-app |
106 |
vmware-bundle_extract-bundle-component "${DISTDIR}/${A}" vmware-player-app |
106 |
} |
107 |
} |
107 |
|
108 |
|
108 |
src_prepare() { |
109 |
src_prepare() { |
Lines 189-195
Link Here
|
189 |
sed -e "s:@@BINARY@@:${VM_INSTALL_DIR}/bin/vmplayer:g" \ |
190 |
sed -e "s:@@BINARY@@:${VM_INSTALL_DIR}/bin/vmplayer:g" \ |
190 |
-i "${D}/usr/share/applications/${PN}.desktop" || die |
191 |
-i "${D}/usr/share/applications/${PN}.desktop" || die |
191 |
|
192 |
|
192 |
# delete superfluous stuff |
193 |
# remove superfluous libraries |
193 |
rm -rf "${D}${VM_INSTALL_DIR}"/bin/vmware-modconfig \ |
194 |
rm -rf "${D}${VM_INSTALL_DIR}"/bin/vmware-modconfig \ |
194 |
"${D}${VM_INSTALL_DIR}"/lib/vmware/lib/libarchive.so.2 \ |
195 |
"${D}${VM_INSTALL_DIR}"/lib/vmware/lib/libarchive.so.2 \ |
195 |
"${D}${VM_INSTALL_DIR}"/lib/vmware/lib/libart_lgpl_2.so.2 \ |
196 |
"${D}${VM_INSTALL_DIR}"/lib/vmware/lib/libart_lgpl_2.so.2 \ |
Lines 251-258
Link Here
|
251 |
"${D}${VM_INSTALL_DIR}"/lib/vmware/lib/libxmlrpc_util.so.3 \ |
252 |
"${D}${VM_INSTALL_DIR}"/lib/vmware/lib/libxmlrpc_util.so.3 \ |
252 |
"${D}${VM_INSTALL_DIR}"/lib/vmware/lib/libXrandr.so.2 \ |
253 |
"${D}${VM_INSTALL_DIR}"/lib/vmware/lib/libXrandr.so.2 \ |
253 |
"${D}${VM_INSTALL_DIR}"/lib/vmware/lib/libXrender.so.1 \ |
254 |
"${D}${VM_INSTALL_DIR}"/lib/vmware/lib/libXrender.so.1 \ |
254 |
|| die "failed to remove erroneous stuff" |
255 |
|| die "failed to remove superfluous libraries" |
255 |
|
|
|
256 |
} |
256 |
} |
257 |
|
257 |
|
258 |
pkg_config() { |
258 |
pkg_config() { |
Lines 283-316
Link Here
|
283 |
fdo-mime_desktop_database_update |
283 |
fdo-mime_desktop_database_update |
284 |
gnome2_icon_cache_update |
284 |
gnome2_icon_cache_update |
285 |
} |
285 |
} |
286 |
|
|
|
287 |
bundle_extract_component() { |
288 |
local -i bundle_size=$(stat -L -c'%s' "${1}") |
289 |
local -i bundle_manifestOffset=$(od -An -j$((bundle_size-36)) -N4 -tu4 "${1}") |
290 |
local -i bundle_manifestSize=$(od -An -j$((bundle_size-40)) -N4 -tu4 "${1}") |
291 |
local -i bundle_dataOffset=$(od -An -j$((bundle_size-44)) -N4 -tu4 "${1}") |
292 |
local -i bundle_dataSize=$(od -An -j$((bundle_size-52)) -N8 -tu8 "${1}") |
293 |
tail -c+$((bundle_manifestOffset+1)) "${1}" 2> /dev/null | head -c$((bundle_manifestSize)) | |
294 |
xsltproc "${FILESDIR}"/list-bundle-components.xsl - | |
295 |
while read -r component_offset component_size component_name ; do |
296 |
if [[ ${component_name} == ${2} ]] ; then |
297 |
ebegin "Extracting '${component_name}' component from '$(basename "${1}")'" |
298 |
declare -i component_manifestOffset=$(od -An -j$((bundle_dataOffset+component_offset+9)) -N4 -tu4 "${1}") |
299 |
declare -i component_manifestSize=$(od -An -j$((bundle_dataOffset+component_offset+13)) -N4 -tu4 "${1}") |
300 |
declare -i component_dataOffset=$(od -An -j$((bundle_dataOffset+component_offset+17)) -N4 -tu4 "${1}") |
301 |
declare -i component_dataSize=$(od -An -j$((bundle_dataOffset+component_offset+21)) -N8 -tu8 "${1}") |
302 |
tail -c+$((bundle_dataOffset+component_offset+component_manifestOffset+1)) "${1}" 2> /dev/null | |
303 |
head -c$((component_manifestSize)) | xsltproc "${FILESDIR}"/list-component-files.xsl - | |
304 |
while read -r file_offset file_compressedSize file_uncompressedSize file_path ; do |
305 |
if [[ ${file_path} ]] ; then |
306 |
echo -n '.' |
307 |
file_path="${component_name}/${file_path}" |
308 |
mkdir -p "$(dirname "${file_path}")" |
309 |
tail -c+$((bundle_dataOffset+component_offset+component_dataOffset+file_offset+1)) "${1}" 2> /dev/null | |
310 |
head -c$((file_compressedSize)) | gzip -cd > "${file_path}" |
311 |
fi |
312 |
done |
313 |
echo ; eend |
314 |
fi |
315 |
done |
316 |
} |