From a350baa64d286035514b620402432aade0e7daac Mon Sep 17 00:00:00 2001 From: Yongxiang Liang Date: Thu, 3 Dec 2026 12:33:37 +0800 Subject: [PATCH] media-gfx/opencadstudio-bin: new package, add 2026.48 Extract the upstream AppImage with unsquashfs to avoid executing its architecture- specific runtime. Both AppImages use Zstandard, so require squashfs-tools[zstd] for unpacking. Remove the unused AppDir-relative RUNPATH so the installed executable can use Gentoo's system libraries. Install the upstream desktop entry, icon, and AppStream metadata to retain the desktop ID and DWG/DXF associations. Restrict mirroring and binary redistribution pending review of the embedded LFF fonts. Assisted-by: Codex:GPT-6 Signed-off-by: Yongxiang Liang --- .github/workflows/overlay.toml | 7 ++ media-gfx/opencadstudio-bin/Manifest | 6 ++ media-gfx/opencadstudio-bin/metadata.xml | 11 +++ .../opencadstudio-bin-2026.48.ebuild | 87 +++++++++++++++++++ 4 files changed, 111 insertions(+) create mode 100644 media-gfx/opencadstudio-bin/Manifest create mode 100644 media-gfx/opencadstudio-bin/metadata.xml create mode 100644 media-gfx/opencadstudio-bin/opencadstudio-bin-2026.48.ebuild diff --git a/.github/workflows/overlay.toml b/.github/workflows/overlay.toml index a3bd420811..116ae4f477 100644 --- a/.github/workflows/overlay.toml +++ b/.github/workflows/overlay.toml @@ -2047,6 +2047,13 @@ use_latest_release = true prefix = "v" github_account = ["vowstar", "gouwazi"] +["media-gfx/opencadstudio-bin"] +source = "github" +github = "HakanSeven12/OpenCADStudio" +use_latest_release = true +prefix = "v" +github_account = "liangyongxiang" + # TODO: very old package #["media-gfx/scangearmp"] diff --git a/media-gfx/opencadstudio-bin/Manifest b/media-gfx/opencadstudio-bin/Manifest new file mode 100644 index 0000000000..bf9e66ae13 --- /dev/null +++ b/media-gfx/opencadstudio-bin/Manifest @@ -0,0 +1,6 @@ +DIST OpenCADStudio-v2026.48-linux-aarch64.AppImage 81283592 BLAKE2B 6be9fb1a896cdaa9f6d4cba2f846d899f1a2c67949466fd6dc48cd6c5afbff9229d4352fa64c6fdf34217c93ef4896a66aa71fe62e1bb87f91c2b5b0a6cc9475 SHA512 ac1ed36de80e0a4dc011d8a2bbc99d707712f90d0e0598fdb1aa77200af5ceffc2e53d0ee15f33a10f539ee5113e08afdf357e8a140bf8f6f71f6262003b9d53 +DIST OpenCADStudio-v2026.48-linux-x86_64.AppImage 87247352 BLAKE2B 7a4a89b8c705a6196556f9249b6bc1d62758241417c02698759ffb4d57a16f083a16380027a1ace7743084849fcf4ce32094f6e16ef139465df08464d5d51fd9 SHA512 a2a5ebb242a1533b5983832e18aa37c3c50043b5e3d24da219bc258562fb1527e4e905edbe2d2054c9dda856e4dc9a7bb7af12d9d4e0a1d297245d7d45d04a03 +DIST opencadstudio-bin-2026.48-LICENSE 35149 BLAKE2B 74915e048cf8b5207abf603136e7d5fcf5b8ad512cce78a2ebe3c88fc3150155893bf9824e6ed6a86414bbe4511a6bd4a42e8ec643c63353dc8eea4a44a021cd SHA512 d361e5e8201481c6346ee6a886592c51265112be550d5224f1a7a6e116255c2f1ab8788df579d9b8372ed7bfd19bac4b6e70e00b472642966ab5b319b99a2686 +DIST opencadstudio-bin-2026.48-LICENSE-phosphor.txt 1071 BLAKE2B 3a9d79a4385ae02f5e67cb13dfb2ee29c11d1dde1830f65e817839a5791e0a90de4f578c4907c8f23b98c751ab3a70d550d37f78b920b1ecb4e6cfe5c5631d92 SHA512 f8c12eaef3989b1d16033be32825c5bf836656c5d7089002fc274f34606db24f3d32ffc2afb6d523c9d2fda8782e47842a93f5d163ec207b66fd1fb7e5fcad11 +DIST opencadstudio-bin-2026.48-THIRD_PARTY.md 1672 BLAKE2B 3cc03f72306f98a645366c5e531836b12e721fcbdaca8ee4dd4d26f7b58129b02db328c6d097d339458b3a4ce461cd0c563795aa68ac0b1aaae9a525aa569f2f SHA512 8972abb7aa523df3fa19e23bf3aac92ed056a6b2ed0b6f8800295b77511a29e0f2ee631d9cb25df015cc5f14e85c900e7660a8efec129b7dce7604c8084ebab3 +DIST opencadstudio-bin-2026.48-solidcore-NOTICE 1494 BLAKE2B ae8ba7bab9a6175b39236fa72acd557355758cc1f3ee38b00b96b65c1dc4ef1a14e8de34b83f6b1e318f5f19f2ec9a715afaebda89aa043202e48466115114fd SHA512 9661b9b41a98fc848d016f2eef327b9b5578a8512cec6683ec2f0f2e04877b86217fb897c286cda7333da75f591fbc8ae9ed0b18d849b19bcf5089b35919ba92 diff --git a/media-gfx/opencadstudio-bin/metadata.xml b/media-gfx/opencadstudio-bin/metadata.xml new file mode 100644 index 0000000000..c6c73d6c34 --- /dev/null +++ b/media-gfx/opencadstudio-bin/metadata.xml @@ -0,0 +1,11 @@ + + + + + tanekliang@gmail.com + Yongxiang Liang + + + HakanSeven12/OpenCADStudio + + diff --git a/media-gfx/opencadstudio-bin/opencadstudio-bin-2026.48.ebuild b/media-gfx/opencadstudio-bin/opencadstudio-bin-2026.48.ebuild new file mode 100644 index 0000000000..0561e651cc --- /dev/null +++ b/media-gfx/opencadstudio-bin/opencadstudio-bin-2026.48.ebuild @@ -0,0 +1,87 @@ +# Copyright 2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit xdg + +MY_PN="OpenCADStudio" +UPSTREAM="https://github.com/HakanSeven12/${MY_PN}" +TAG="v${PV}" +NOTICE_BASE="https://raw.githubusercontent.com/HakanSeven12/${MY_PN}/${TAG}" + +DESCRIPTION="2D drafting and 3D CAD editor with native DWG and DXF support" +HOMEPAGE="https://www.opencadstudio.com/" +SRC_URI=" + amd64? ( ${UPSTREAM}/releases/download/${TAG}/${MY_PN}-${TAG}-linux-x86_64.AppImage ) + arm64? ( ${UPSTREAM}/releases/download/${TAG}/${MY_PN}-${TAG}-linux-aarch64.AppImage ) + ${NOTICE_BASE}/LICENSE -> ${P}-LICENSE + ${NOTICE_BASE}/THIRD_PARTY.md -> ${P}-THIRD_PARTY.md + ${NOTICE_BASE}/crates/step-export/NOTICE -> ${P}-solidcore-NOTICE + ${NOTICE_BASE}/assets/icons/ui/LICENSE-phosphor.txt -> ${P}-LICENSE-phosphor.txt +" +S="${WORKDIR}/squashfs-root" + +LICENSE="Apache-2.0 BSD BSD-2 CC0-1.0 GPL-2+ GPL-3 GPL-3+ ISC MIT MPL-2.0 + Unicode-3.0 ZLIB public-domain" +SLOT="0" +KEYWORDS="-* ~amd64 ~arm64" +# The embedded LFF fonts include files with unresolved redistribution terms. +RESTRICT="bindist mirror strip" + +RDEPEND=" + dev-libs/wayland + media-libs/libglvnd + media-libs/vulkan-loader + sys-apps/dbus + sys-apps/xdg-desktop-portal + sys-devel/gcc + >=sys-libs/glibc-2.35 + x11-libs/libX11 + x11-libs/libXcursor + x11-libs/libXi + x11-libs/libxcb + x11-libs/libxkbcommon[X] + x11-misc/xdg-utils +" +BDEPEND=" + dev-util/patchelf + sys-fs/squashfs-tools[zstd] +" + +QA_PREBUILT="usr/bin/${MY_PN}" + +src_unpack() { + local arch=x86_64 + use arm64 && arch=aarch64 + local appimage="${DISTDIR}/${MY_PN}-${TAG}-linux-${arch}.AppImage" + + # The squashfs follows the ELF section table. This works without executing the AppImage. + local header offset + header=$(LC_ALL=C readelf -h "${appimage}") || die + offset=$(awk ' + /Start of section headers/ { start = $5 } + /Size of section headers/ { size = $5 } + /Number of section headers/ { count = $5 } + END { print start + size * count } + ' <<< "${header}") || die + [[ ${offset} -gt 0 ]] || die "Invalid AppImage squashfs offset" + unsquashfs -no-progress -o "${offset}" -d "${S}" "${appimage}" || die +} + +src_prepare() { + default + # The upstream AppDir-relative RUNPATH is unused after unpacking. + patchelf --remove-rpath "usr/bin/${MY_PN}" || die +} + +src_install() { + dobin "usr/bin/${MY_PN}" + insinto /usr + doins -r usr/share + + newdoc "${DISTDIR}/${P}-LICENSE" LICENSE + newdoc "${DISTDIR}/${P}-THIRD_PARTY.md" THIRD_PARTY.md + newdoc "${DISTDIR}/${P}-solidcore-NOTICE" solidcore-NOTICE + newdoc "${DISTDIR}/${P}-LICENSE-phosphor.txt" LICENSE-phosphor.txt +}