From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 37C94158094 for ; Fri, 24 Jun 2022 10:46:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DF03DE08F0; Fri, 24 Jun 2022 10:46:16 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C5A34E08F0 for ; Fri, 24 Jun 2022 10:46:16 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E9D3E341406 for ; Fri, 24 Jun 2022 10:46:15 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 862E7521 for ; Fri, 24 Jun 2022 10:46:13 +0000 (UTC) From: "Florian Schmaus" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Florian Schmaus" Message-ID: <1656057510.403a49314fc5375fd7f775581c7868d3b0d5c41b.flow@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: media-gfx/zwcad/ X-VCS-Repository: repo/proj/guru X-VCS-Files: media-gfx/zwcad/Manifest media-gfx/zwcad/zwcad-2023.23.0.3.4.ebuild X-VCS-Directories: media-gfx/zwcad/ X-VCS-Committer: flow X-VCS-Committer-Name: Florian Schmaus X-VCS-Revision: 403a49314fc5375fd7f775581c7868d3b0d5c41b X-VCS-Branch: master Date: Fri, 24 Jun 2022 10:46:13 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e543cc8a-feb4-4b00-9208-38b1248b222e X-Archives-Hash: fb816147dfb88b31f938ff5b880be4c0 commit: 403a49314fc5375fd7f775581c7868d3b0d5c41b Author: Huang Rui gmail com> AuthorDate: Fri Jun 24 07:58:30 2022 +0000 Commit: Florian Schmaus gentoo org> CommitDate: Fri Jun 24 07:58:30 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=403a4931 media-gfx/zwcad: add 2023.23.0.3.4 Signed-off-by: Huang Rui gmail.com> media-gfx/zwcad/Manifest | 1 + media-gfx/zwcad/zwcad-2023.23.0.3.4.ebuild | 129 +++++++++++++++++++++++++++++ 2 files changed, 130 insertions(+) diff --git a/media-gfx/zwcad/Manifest b/media-gfx/zwcad/Manifest index d159e473d..2fe1ceda9 100644 --- a/media-gfx/zwcad/Manifest +++ b/media-gfx/zwcad/Manifest @@ -1,2 +1,3 @@ DIST zwcad-2022.22.2.2.3.deb 159631816 BLAKE2B 39892032de774e85b472c238caed6c3f09992bc55c967a954099275925bb5c967c887d0bdf3b03d7cdb6cedb6725089a98828dbfdb6aebe82f34c3688373b0c7 SHA512 9d5e9a694f459643a7ad2d20cbafbb5847a39e88ab7fef4c7d6c5cbcc61628dda7138b537c3a9b5aec36b430289dd0814395e0e89cc1aacaef75bb5029c5d10d +DIST zwcad-2023.23.0.3.4.deb 187029904 BLAKE2B 257c0ff67718d56fadd63e01c47e249d999f5ba1f1425f010ad295009aabfe2d8a6df5fadd78726bbc80efa6d01aa5ee4addba39a19018f0e099de504c4fc30b SHA512 95be727f0474b1c649ea714ec937ea70bac614f86036729b092edd9e5f6d944a8054601743734e54337eaa4b6251c15acd36b8f853f25e0d0bb66e208947ecae DIST zwcad-python-3.7.13.tar.bz2 56117484 BLAKE2B b81d58d4c8854c4c014276ef7e03e7a2cc16cd6e5aa50c69ac63346087d527e7083f36ab489530aea59a8e07828e315f53bd5075223471471134842f3c09c084 SHA512 22eaff6624f6dacbc903a033e99738f67faf2e221ba75cd13f201dfb0ec6f1d09e31e7fe82677d8f1f4f5ae732306213c9864c2615d61827316b782dfacceac4 diff --git a/media-gfx/zwcad/zwcad-2023.23.0.3.4.ebuild b/media-gfx/zwcad/zwcad-2023.23.0.3.4.ebuild new file mode 100644 index 000000000..e1cec7c63 --- /dev/null +++ b/media-gfx/zwcad/zwcad-2023.23.0.3.4.ebuild @@ -0,0 +1,129 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_PV_YEAR="$(ver_cut 1)" +MY_PV="$(ver_cut 2).$(ver_cut 3).$(ver_cut 4).$(ver_cut 5)" +MY_PGK_NAME="com.zwsoft.${PN}${MY_PV_YEAR}" +inherit desktop unpacker xdg + +DESCRIPTION="CAD software for 2D drawing, reviewing and printing work" +HOMEPAGE="https://www.zwsoft.cn/product/zwcad/linux" + +SRC_URI=" + https://home-store-packages.uniontech.com/appstore/pool/appstore/c/${MY_PGK_NAME}/${MY_PGK_NAME}_${MY_PV}_amd64.deb -> ${P}.deb + https://anaconda.org/anaconda/python/3.7.13/download/linux-64/python-3.7.13-h12debd9_0.tar.bz2 -> ${PN}-python-3.7.13.tar.bz2 +" + +LICENSE="all-rights-reserved" +SLOT="0" +KEYWORDS="-* ~amd64" + +RESTRICT="strip mirror bindist" + +RDEPEND=" + media-libs/fontconfig + media-libs/libglvnd + sys-apps/util-linux + sys-libs/zlib + virtual/libcrypt:= +" + +DEPEND="${RDEPEND}" + +BDEPEND="dev-util/patchelf" + +S=${WORKDIR} + +QA_PREBUILT="*" + +src_unpack() { + unpack_deb "${DISTDIR}/${P}.deb" + tar -xf "${DISTDIR}/${PN}-python-3.7.13.tar.bz2" -C "${S}/opt/apps/"${MY_PGK_NAME}"/files/ZwPyRuntime/python3.7/" || die +} + +src_install() { + # Install scalable icons + doicon -s scalable "${S}"/opt/apps/${MY_PGK_NAME}/files/Icons/ZWCAD.svg + + # Fix python and QA problems about python + rm -rf "${S}/opt/apps/"${MY_PGK_NAME}"/files/ZwPyRuntime/python3.6/" || die + rm -rf "${S}/opt/apps/"${MY_PGK_NAME}"/files/libZwPythonLoad6.so" || die + rm -rf "${S}/opt/apps/"${MY_PGK_NAME}"/files/ZwPyRuntime/python3.5/" || die + rm -rf "${S}/opt/apps/"${MY_PGK_NAME}"/files/libZwPythonLoad5.so" || die + rm -rf "${S}/opt/apps/"${MY_PGK_NAME}"/files/ZwPyRuntime/python3.4/" || die + rm -rf "${S}/opt/apps/"${MY_PGK_NAME}"/files/libZwPythonLoad4.so" || die + rm -rf "${S}/opt/apps/"${MY_PGK_NAME}"/files/ZwPyRuntime/python3.7/compiler_compat" || die + + # Set RPATH for preserve-libs handling + pushd "${S}"/opt/apps/${MY_PGK_NAME}/files || die + local x + for x in $(find) ; do + # Use \x7fELF header to separate ELF executables and libraries + [[ -f "${x}" && "${x: -2}" != ".o" && $(od -t x1 -N 4 "${x}") == *"7f 45 4c 46"* ]] || continue + local RPATH_ROOT="/opt/apps/${MY_PGK_NAME}/files" + local RPATH_S="${RPATH_ROOT}/:${RPATH_ROOT}/lib/:${RPATH_ROOT}/lib/mono/lib/:${RPATH_ROOT}/plugins/:${RPATH_ROOT}/zh-CN/:${RPATH_ROOT}/ZwPyRuntime/python3.7/lib" + patchelf --set-rpath "${RPATH_S}" "${x}" || \ + die "patchelf failed on ${x}" + done + popd || die + + # Fix desktop files + sed -E -i 's/^Exec=.*$/Exec=zwcad %F/g' "${S}/opt/apps/${MY_PGK_NAME}/entries/applications/${MY_PGK_NAME}.desktop" || die + sed -E -i 's/^Icon=.*$/Icon=ZWCAD/g' "${S}/opt/apps/${MY_PGK_NAME}/entries/applications/${MY_PGK_NAME}.desktop" || die + sed -E -i 's/Application;//g' "${S}/opt/apps/${MY_PGK_NAME}/entries/applications/${MY_PGK_NAME}.desktop" || die + # The Version entry in a .desktop file doesn't refer to the version of the + # target program. It's the version of the desktop file specification that + # this desktop file conforms to. + sed -E -i 's/^Version=.*$/Version=1.0/g' "${S}/opt/apps/${MY_PGK_NAME}/entries/applications/${MY_PGK_NAME}.desktop" || die + sed -E -i 's/^Categories=.*$/Categories=Graphics;VectorGraphics;Engineering;Construction;2DGraphics;/g' "${S}/opt/apps/${MY_PGK_NAME}/entries/applications/${MY_PGK_NAME}.desktop" || die + domenu "${S}/opt/apps/${MY_PGK_NAME}/entries/applications/${MY_PGK_NAME}.desktop" + + sed -i "1i\\export MONO_PATH=/opt/apps/${MY_PGK_NAME}/files/lib/mono/lib/mono/4.5\n" "${S}/opt/apps/${MY_PGK_NAME}/files/ZWCADRUN.sh" || die + sed -E -i 's/export QT_IM_MODULE=fcitx//g' "${S}/opt/apps/${MY_PGK_NAME}/files/ZWCADRUN.sh" || die + + # Add zw3d command + mkdir -p "${S}"/usr/bin/ || die + + cat >> "${S}"/opt/apps/${MY_PGK_NAME}/zwcad <<- EOF || die +#!/bin/sh +if [ -z "\${QT_IM_MODULE}" ] +then + if [ -n "\$(pidof fcitx5)" ] + then + export XMODIFIERS="@im=fcitx" + export QT_IM_MODULE=fcitx + elif [ -n "\$(pidof ibus-daemon)" ] + then + export XMODIFIERS="@im=ibus" + export QT_IM_MODULE=ibus + elif [ -n "\$(pidof fcitx)" ] + then + export XMODIFIERS="@im=fcitx" + export QT_IM_MODULE=fcitx + fi +fi +export MONO_PATH=/opt/apps/${MY_PGK_NAME}/files/lib/mono/lib/mono/4.5 +sh /opt/apps/${MY_PGK_NAME}/files/ZWCADRUN.sh \$* + EOF + + ln -s /opt/apps/${MY_PGK_NAME}/zwcad "${S}"/usr/bin/zwcad || die + + # Install package and fix permissions + insinto /opt/apps/ + doins -r opt/apps/${MY_PGK_NAME} + insinto /usr + doins -r usr/* + + fperms 0755 /opt/apps/${MY_PGK_NAME}/zwcad + + pushd "${S}" || die + for x in $(find "opt/apps/${MY_PGK_NAME}") ; do + # Fix shell script permissions + [[ "${x: -3}" == ".sh" ]] && fperms 0755 "/${x}" + # Use \x7fELF header to separate ELF executables and libraries + [[ -f ${x} && $(od -t x1 -N 4 "${x}") == *"7f 45 4c 46"* ]] && fperms 0755 "/${x}" + done + popd || die +}