From 0f3cfb7044d28aec2cc59b7abb7b2f52587bfd65 Mon Sep 17 00:00:00 2001 From: mhc2910463910 <2910463910@qq.com> Date: Wed, 15 May 2024 20:06:57 +0800 Subject: [PATCH] build: add app qcad MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QCAD Community Edition 是一个计算机辅助设计应用 (CAD)。 Log: add app qcad , fix install --- io.github.qcad/linglong.yaml | 22 ++++++++++++++++++++++ io.github.qcad/patches/fix-3rdparty.patch | 17 +++++++++++++++++ io.github.qcad/patches/fix-desktop.patch | 13 +++++++++++++ io.github.qcad/patches/fix-install.patch | 20 ++++++++++++++++++++ 4 files changed, 72 insertions(+) create mode 100644 io.github.qcad/linglong.yaml create mode 100644 io.github.qcad/patches/fix-3rdparty.patch create mode 100644 io.github.qcad/patches/fix-desktop.patch create mode 100644 io.github.qcad/patches/fix-install.patch diff --git a/io.github.qcad/linglong.yaml b/io.github.qcad/linglong.yaml new file mode 100644 index 000000000..ecd4a28c0 --- /dev/null +++ b/io.github.qcad/linglong.yaml @@ -0,0 +1,22 @@ +package: + id: io.github.qcad + name: qcad + version: 3.29.6.6 + kind: app + description: | + QCAD Community Edition 是一个计算机辅助设计应用 (CAD)。. + +runtime: + id: org.deepin.Runtime + version: 23.0.0 + +source: + kind: git + url: "https://github.com/qcad/qcad.git" + commit: 38a3944de996268087dc0c51f007109c0a7cb2b6 + patch: + - patches/fix-3rdparty.patch + - patches/fix-install.patch + - patches/fix-desktop.patch +build: + kind: qmake \ No newline at end of file diff --git a/io.github.qcad/patches/fix-3rdparty.patch b/io.github.qcad/patches/fix-3rdparty.patch new file mode 100644 index 000000000..77814ac7b --- /dev/null +++ b/io.github.qcad/patches/fix-3rdparty.patch @@ -0,0 +1,17 @@ +diff --git a/src/3rdparty/3rdparty.pro b/src/3rdparty/3rdparty.pro +index 55e5271680..3205be912f 100644 +--- a/src/3rdparty/3rdparty.pro ++++ b/src/3rdparty/3rdparty.pro +@@ -19,8 +19,10 @@ else { + } + + !r_mobile { +- exists(qt-labs-qtscriptgenerator-$${QT_VERSION}) { +- SUBDIRS += qt-labs-qtscriptgenerator-$${QT_VERSION} ++# exists(qt-labs-qtscriptgenerator-$${QT_VERSION}) { ++# SUBDIRS += qt-labs-qtscriptgenerator-$${QT_VERSION} ++ exists(qt-labs-qtscriptgenerator-5.15.8) { ++ SUBDIRS += qt-labs-qtscriptgenerator-5.15.8 + } + else { + lessThan(QT_MAJOR_VERSION, 6) { diff --git a/io.github.qcad/patches/fix-desktop.patch b/io.github.qcad/patches/fix-desktop.patch new file mode 100644 index 000000000..bb0c004c1 --- /dev/null +++ b/io.github.qcad/patches/fix-desktop.patch @@ -0,0 +1,13 @@ +diff --git a/qcad.desktop b/qcad.desktop +index 93c5e97201..2d0e6bf32a 100644 +--- a/qcad.desktop ++++ b/qcad.desktop +@@ -48,7 +48,7 @@ Comment[sv]=2D CAD-system + Comment[sl]=Sistem 2D CAD + Comment[uk]=2D САПР + Comment[tr]=2D CAD Sistemi +-Exec=qcad %F ++Exec=qcad-bin %F + X-MultipleArgs=true + Icon=qcad_icon + Terminal=false diff --git a/io.github.qcad/patches/fix-install.patch b/io.github.qcad/patches/fix-install.patch new file mode 100644 index 000000000..f1cf2e3da --- /dev/null +++ b/io.github.qcad/patches/fix-install.patch @@ -0,0 +1,20 @@ +diff --git a/qcad.pro b/qcad.pro +index 74f874ef9d..65d8958023 100644 +--- a/qcad.pro ++++ b/qcad.pro +@@ -26,3 +26,14 @@ else { + dummy { + SUBDIRS += scripts + } ++releasefile.target = install ++releasefile.commands = mkdir -p $$PREFIX/bin && cp -r $$PWD/release/* $$PREFIX/bin && mkdir -p $$PREFIX/bin/plugins && cp -r $$PWD/plugins/* $$PREFIX/bin/plugins ++QMAKE_EXTRA_TARGETS += releasefile ++ ++desktopfile.files += $$PWD/qcad.desktop ++desktopfile.path = $$PREFIX/share/applications ++INSTALLS += desktopfile ++ ++iconfile.files += $$PWD/scripts/qcad_icon.svg ++iconfile.path = $$PREFIX/share/icons/hicolor/scalable/apps ++INSTALLS += iconfile +\ No newline at end of file