remove ia64 keywords
[gentoo-zh.git] / app-emulation / deepin-wine5 / deepin-wine5-5.0.16-r1.ebuild
blobb6d87a1925a3d981db0ade5606902a7f57097584
1 # Copyright 1999-2022 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 inherit unpacker
8 DESCRIPTION="Deepin wine5"
9 HOMEPAGE="https://www.deepin.org"
11 APPSTORE_URI="https://community-store-packages.deepin.com/appstore/pool/appstore"
12 COMMUNITY_URI="https://community-packages.deepin.com/deepin/pool/main"
13 SRC_URI="${APPSTORE_URI}/d/${PN}/${PN}_${PV}-${PR/r/}_i386.deb
14 ${APPSTORE_URI}/d/${PN}/${PN}-i386_${PV}-${PR/r/}_i386.deb
16 ${COMMUNITY_URI}/o/openldap/libldap-2.4-2_2.4.47+dfsg.4-1+eagle_i386.deb
17 ${COMMUNITY_URI}/o/openldap/libldap-2.4-2_2.4.47+dfsg.4-1+eagle_amd64.deb
18 ${COMMUNITY_URI}/c/cyrus-sasl2/libsasl2-2_2.1.27.1-1+dde_i386.deb
19 ${COMMUNITY_URI}/c/cyrus-sasl2/libsasl2-2_2.1.27.1-1+dde_amd64.deb
20 ${COMMUNITY_URI}/libp/libpcap/libpcap0.8_1.8.1.1-6+dde_i386.deb
21 ${COMMUNITY_URI}/libp/libpcap/libpcap0.8_1.8.1.1-6+dde_amd64.deb
24 LICENSE="LGPL-2.1"
25 SLOT="0"
26 KEYWORDS="~amd64"
27 RESTRICT="strip"
29 RDEPEND="
30 >=media-libs/alsa-lib-1.0.16[abi_x86_32(-)]
31 >=media-libs/libgphoto2-2.5.10[abi_x86_32(-)]
32 media-libs/gst-plugins-base[abi_x86_32(-)]
33 media-libs/lcms:2[abi_x86_32(-)]
34 >=net-nds/openldap-2.4.7[abi_x86_32(-)]
35 >=media-sound/mpg123-1.13.7[abi_x86_32(-)]
36 >=media-libs/openal-1.14[abi_x86_32(-)]
37 >=net-libs/libpcap-0.9.8[abi_x86_32(-)]
38 media-libs/libcanberra[pulseaudio,abi_x86_32(-)]
39 virtual/libudev[abi_x86_32(-)]
40 virtual/libusb:1[abi_x86_32(-)]
41 >=app-emulation/vkd3d-1.0[abi_x86_32(-)]
42 x11-libs/libX11[abi_x86_32(-)]
43 x11-libs/libXext[abi_x86_32(-)]
44 >=dev-libs/libxml2-2.9.0[abi_x86_32(-)]
45 || ( dev-libs/ocl-icd[abi_x86_32(-)] dev-libs/opencl-icd-loader[abi_x86_32(-)] )
46 app-emulation/deepin-udis86
47 >=sys-libs/zlib-1.1.4[abi_x86_32(-)]
48 || ( sys-libs/ncurses[abi_x86_32(-)] sys-libs/ncurses-compat:5[abi_x86_32(-)] )
49 media-libs/fontconfig[abi_x86_32(-)]
50 media-libs/freetype:2[abi_x86_32(-)]
51 sys-devel/gettext[abi_x86_32(-)]
52 x11-libs/libXcursor[abi_x86_32(-)]
53 media-libs/mesa[osmesa,abi_x86_32(-)]
54 media-libs/glu[abi_x86_32(-)]
55 media-libs/libjpeg-turbo[abi_x86_32(-)]
56 x11-libs/libXrandr[abi_x86_32(-)]
57 x11-libs/libXi[abi_x86_32(-)]
60 BDEPEND="dev-util/patchelf"
62 S=${WORKDIR}
63 QA_FLAGS_IGNORED=".*"
64 QA_PREBUILT="*"
65 QA_SONAME="*"
66 QA_TEXTRELS="*"
68 src_install() {
69 # Fix files installing to one or more unexpected paths
70 mkdir -p "${S}"/opt/"${PN}"/share/ || die
71 mv "${S}"/usr/share/* "${S}"/opt/"${PN}"/share/ || die
72 # Install missing lib/lib64
73 mkdir -p "${S}"/opt/"${PN}"/lib/ || die
74 mv "${S}"/usr/lib/i386-linux-gnu/* "${S}"/opt/"${PN}"/lib/ || die
75 mv "${S}"/opt/"${PN}"/lib/"${PN}"/* "${S}"/opt/"${PN}"/lib/ || die
76 rm -r "${S}"/opt/"${PN}"/lib/"${PN}"
78 # Set RPATH for libs handling
79 pushd "${S}"/opt/"${PN}"/lib || die
80 local x
81 for x in $(find) ; do
82 # Use \x7fELF header to separate ELF executables and libraries
83 [[ -f ${x} && $(od -t x1 -N 4 "${x}") == *"7f 45 4c 46"* ]] || continue
84 local RPATH_ROOT="${EPREFIX}"/opt/"${PN}"/lib
85 local RPATH_S="${RPATH_ROOT}/"
86 [[ ${x} != *"wine-preloader" ]] || continue
87 patchelf --set-rpath "${RPATH_S}" "${x}" || \
88 die "patchelf failed on ${x}"
89 done
90 popd || die
92 # Set RPATH for binaries handlings
93 pushd "${S}"/usr/lib/"${PN}" || die
94 local x
95 for x in $(find) ; do
96 # Use \x7fELF header to separate ELF executables and libraries
97 [[ -f ${x} && $(od -t x1 -N 4 "${x}") == *"7f 45 4c 46"* ]] || continue
98 local RPATH_ROOT="${EPREFIX}"/opt/"${PN}"/lib
99 local RPATH_S="${RPATH_ROOT}/"
100 [[ ${x} != *"wine-preloader" ]] || continue
101 patchelf --set-rpath "${RPATH_S}" "${x}" || \
102 die "patchelf failed on ${x}"
103 done
104 popd || die
106 insinto /
107 doins -r usr opt
109 fperms 755 -R /opt/"${PN}"/
110 fperms 755 -R /usr/bin/
111 chmod 755 "${ED}"/usr/lib/"${PN}"/*
112 find "${ED}"/opt/${PN}/lib* -name '*.a' -exec chmod 644 '{}' + || die