mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-10 07:33:19 -04:00
media-gfx/zw3d: new package, add 2022.26.00
Signed-off-by: Huang Rui <vowstar@gmail.com>
This commit is contained in:
1
media-gfx/zw3d/Manifest
Normal file
1
media-gfx/zw3d/Manifest
Normal file
@@ -0,0 +1 @@
|
||||
DIST ZW3D-2022-Professional-V1.0_amd64.deb 833573660 BLAKE2B b909085f4e56e76a87ca2f94270bcdf5ce416dad185daf6b966ca894b6bc9b1b67590ef8025b86a5a07902a7f5b20711fc7ba7043195f13cbdf75dcd5e0a09c2 SHA512 c045476c67d6976f826c67aba2ffe1ae2d3c51e5a917c7c16fe37bb74cfad7394877b903f4123509ce1fd0f7b956ae8e8c31445c40d6c7f63bba7be657069f30
|
||||
23
media-gfx/zw3d/metadata.xml
Normal file
23
media-gfx/zw3d/metadata.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>vowstar@gmail.com</email>
|
||||
<name>Huang Rui</name>
|
||||
</maintainer>
|
||||
<longdescription lang="en">
|
||||
The first domestic 3D computer-aided drawing software based on Linux system
|
||||
independently developed by ZWSOFT, can import and export files in formats
|
||||
such as STL, IGES, STEP, etc., and provide complete sketches, parts,
|
||||
assemblies, engineering drawings, processing plans, etc. functions, as well
|
||||
as a variety of measurement and detection methods and view functions,
|
||||
to meet the needs of Linux system users for autonomous, safe and efficient
|
||||
3D CAD/CAM software.
|
||||
</longdescription>
|
||||
<longdescription lang="zh">
|
||||
由中望软件自主研发的国内首款基于Linux系统的三维计算机辅助绘图软件,
|
||||
可导入导出如STL、IGES、STEP等格式的文件,提供了完整的草图、零件、装配
|
||||
工程图、加工方案等功能,以及多种测量检测方式与视图功能
|
||||
满足Linux系统用户对自主、安全、高效的三维CAD/CAM软件的使用需求。
|
||||
</longdescription>
|
||||
</pkgmetadata>
|
||||
113
media-gfx/zw3d/zw3d-2022.26.00.ebuild
Normal file
113
media-gfx/zw3d/zw3d-2022.26.00.ebuild
Normal file
@@ -0,0 +1,113 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
MY_PGK_NAME="com.zwsoft.zw3dprofessional"
|
||||
inherit unpacker xdg
|
||||
|
||||
DESCRIPTION="CAD/CAM software for 3D design and processing"
|
||||
HOMEPAGE="https://www.zwsoft.cn/product/zw3d/linux"
|
||||
SRC_URI="https://download.zwcad.com/zw3d/3d_linux/2022/ZW3D-2022-Professional-V1.0_amd64.deb"
|
||||
|
||||
LICENSE="all-rights-reserved"
|
||||
SLOT="0"
|
||||
KEYWORDS="-* ~amd64"
|
||||
|
||||
RESTRICT="strip mirror bindist"
|
||||
|
||||
RDEPEND="
|
||||
app-arch/bzip2
|
||||
app-arch/xz-utils
|
||||
dev-libs/atk
|
||||
dev-libs/glib:2
|
||||
dev-libs/libpcre
|
||||
dev-libs/libxml2
|
||||
dev-qt/qtsvg:5
|
||||
dev-qt/qtwayland:5
|
||||
media-gfx/imagemagick
|
||||
media-libs/libglvnd
|
||||
media-libs/libpng
|
||||
media-libs/tiff
|
||||
sys-libs/zlib
|
||||
x11-libs/cairo
|
||||
x11-libs/gdk-pixbuf:2
|
||||
x11-libs/gtk+:3
|
||||
x11-libs/libX11
|
||||
x11-libs/libxcb
|
||||
x11-libs/libXcomposite
|
||||
x11-libs/libXext
|
||||
x11-libs/libxkbcommon
|
||||
x11-libs/libXmu
|
||||
x11-libs/libXrender
|
||||
x11-libs/libXt
|
||||
x11-libs/pango
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
BDEPEND="dev-util/patchelf"
|
||||
|
||||
S=${WORKDIR}
|
||||
|
||||
QA_PREBUILT="*"
|
||||
|
||||
src_install() {
|
||||
# Move ${MY_PGK_NAME} out from /opt/apps
|
||||
mkdir -p "${S}"/usr/share/icons/hicolor/scalable/apps || die
|
||||
mv "${S}"/opt/apps/${MY_PGK_NAME} "${S}"/opt/${MY_PGK_NAME} || die
|
||||
mv "${S}"/opt/${MY_PGK_NAME}/entries/icons/hicolor/scalable/apps/*.svg "${S}"/usr/share/icons/hicolor/scalable/apps || die
|
||||
|
||||
# Set RPATH for preserve-libs handling
|
||||
pushd "${S}"/opt/${MY_PGK_NAME}/files || die
|
||||
local x
|
||||
for x in $(find) ; do
|
||||
# Use \x7fELF header to separate ELF executables and libraries
|
||||
[[ -f ${x} && $(od -t x1 -N 4 "${x}") == *"7f 45 4c 46"* ]] || continue
|
||||
local RPATH_ROOT="/opt/${MY_PGK_NAME}/files"
|
||||
local RPATH_S="${RPATH_ROOT}/:${RPATH_ROOT}/lib/:${RPATH_ROOT}/lib/xlator/:${RPATH_ROOT}/lib/xlator/InterOp/:${RPATH_ROOT}/libqt/:${RPATH_ROOT}/libqt/plugins/designer/:${RPATH_ROOT}/lib3rd/"
|
||||
patchelf --set-rpath "${RPATH_S}" "${x}" || \
|
||||
die "patchelf failed on ${x}"
|
||||
patchelf --replace-needed libMagickCore-6.Q16.so.7 libMagickCore-7.Q16.so "${x}" || \
|
||||
die "patchelf failed on ${x}"
|
||||
done
|
||||
popd || die
|
||||
|
||||
# Fix desktop files
|
||||
sed -E -i 's/^Exec=.*$/Exec=zw3d %F/g' "${S}/usr/share/applications/${MY_PGK_NAME}.desktop" || die
|
||||
sed -E -i 's/^Icon=.*$/Icon=ZW3Dprofessional/g' "${S}/usr/share/applications/${MY_PGK_NAME}.desktop" || die
|
||||
sed -E -i 's/Application;//g' "${S}/usr/share/applications/${MY_PGK_NAME}.desktop" || die
|
||||
|
||||
# Add zw3d command
|
||||
mkdir -p "${S}"/usr/bin/ || die
|
||||
|
||||
cat >> "${S}"/opt/${MY_PGK_NAME}/zw3d <<- EOF || die
|
||||
#!/bin/sh
|
||||
sh /opt/${MY_PGK_NAME}/files/zw3drun.sh \$*
|
||||
EOF
|
||||
|
||||
ln -s /opt/${MY_PGK_NAME}/zw3d "${S}"/usr/bin/zw3d || die
|
||||
|
||||
sed -i 's|/opt/apps/|/opt/|g' "${S}/opt/${MY_PGK_NAME}/files/zw3drun.sh" || die
|
||||
|
||||
# Use system libraries
|
||||
rm -rf "${S}"/opt/${MY_PGK_NAME}/files/lib3rd/libMagickCore* || die
|
||||
rm -rf "${S}"/opt/${MY_PGK_NAME}/files/lib3rd/libjpeg* || die
|
||||
|
||||
# Install package and fix permissions
|
||||
insinto /opt
|
||||
doins -r opt/${MY_PGK_NAME}
|
||||
insinto /usr
|
||||
doins -r usr/*
|
||||
|
||||
fperms 0755 /opt/${MY_PGK_NAME}/zw3d
|
||||
|
||||
pushd "${S}" || die
|
||||
for x in $(find "opt/${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
|
||||
}
|
||||
Reference in New Issue
Block a user