1 |
commit: 3e2cceff9553d594e46f5be9e77dded1c2541641 |
2 |
Author: Huang Rui <vowstar <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Aug 18 10:04:53 2020 +0000 |
4 |
Commit: Rui Huang <vowstar <AT> gmail <DOT> com> |
5 |
CommitDate: Tue Aug 18 10:04:53 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=3e2cceff |
7 |
|
8 |
sci-electronics/dsview: new package |
9 |
|
10 |
DSView is an GUI programe for supporting various instruments. |
11 |
The patches under ${FILESDIR} pushed to upstream: |
12 |
https://github.com/DreamSourceLab/DSView/pull/335 |
13 |
|
14 |
Package-Manager: Portage-3.0.3, Repoman-3.0.0 |
15 |
Signed-off-by: Huang Rui <vowstar <AT> gmail.com> |
16 |
|
17 |
sci-electronics/dsview/Manifest | 1 + |
18 |
sci-electronics/dsview/dsview-1.12.ebuild | 98 ++++++++++++++++++++++ |
19 |
.../dsview/files/dsview-1.01-viewport.patch | 10 +++ |
20 |
.../dsview/files/dsview-1.12-cmake.patch | 26 ++++++ |
21 |
.../dsview/files/dsview-1.12-desktop.patch | 20 +++++ |
22 |
sci-electronics/dsview/metadata.xml | 20 +++++ |
23 |
6 files changed, 175 insertions(+) |
24 |
|
25 |
diff --git a/sci-electronics/dsview/Manifest b/sci-electronics/dsview/Manifest |
26 |
new file mode 100644 |
27 |
index 0000000..61e0d4c |
28 |
--- /dev/null |
29 |
+++ b/sci-electronics/dsview/Manifest |
30 |
@@ -0,0 +1 @@ |
31 |
+DIST dsview-1.12.tar.gz 8150237 BLAKE2B 0f746d0691f006d368cf9f40bf0c1b91223a7f6011d0ce55bdded7924ef940ecb18eec4bfe4cf842eea7eda85e97f3516a6f07e7e361eff991191e6d8bf7628c SHA512 a0b90d654ea64121540815627e8559c147a0b3bb77d10b65d98587b1f67dc3c0ed4d1c022cd686c31aab2879ee602eade69a02f32c5c9947a3bbdf1e7ab475dd |
32 |
|
33 |
diff --git a/sci-electronics/dsview/dsview-1.12.ebuild b/sci-electronics/dsview/dsview-1.12.ebuild |
34 |
new file mode 100644 |
35 |
index 0000000..9cd110b |
36 |
--- /dev/null |
37 |
+++ b/sci-electronics/dsview/dsview-1.12.ebuild |
38 |
@@ -0,0 +1,98 @@ |
39 |
+# Copyright 1999-2020 Gentoo Authors |
40 |
+# Distributed under the terms of the GNU General Public License v2 |
41 |
+ |
42 |
+EAPI=7 |
43 |
+ |
44 |
+PYTHON_COMPAT=( python3_{6,7,8,9} ) |
45 |
+GITHUB_PN="DSView" |
46 |
+ |
47 |
+inherit autotools cmake python-r1 xdg |
48 |
+ |
49 |
+DESCRIPTION="An open source multi-function instrument" |
50 |
+HOMEPAGE=" |
51 |
+ https://www.dreamsourcelab.com |
52 |
+ https://github.com/DreamSourceLab/DSView |
53 |
+" |
54 |
+ |
55 |
+if [[ ${PV} == "9999" ]] ; then |
56 |
+ inherit git-r3 |
57 |
+ EGIT_REPO_URI="https://github.com/DreamSourceLab/${GITHUB_PN}.git" |
58 |
+else |
59 |
+ SRC_URI="https://github.com/DreamSourceLab/${GITHUB_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
60 |
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" |
61 |
+ S="${WORKDIR}/${GITHUB_PN}-${PV}" |
62 |
+fi |
63 |
+ |
64 |
+LICENSE="GPL-3" |
65 |
+SLOT="0" |
66 |
+ |
67 |
+RDEPEND=" |
68 |
+ dev-cpp/glibmm:2 |
69 |
+ dev-libs/boost |
70 |
+ dev-libs/glib |
71 |
+ dev-libs/libzip |
72 |
+ dev-qt/qtcore:5 |
73 |
+ dev-qt/qtgui:5 |
74 |
+ dev-qt/qtwidgets:5 |
75 |
+ dev-qt/qtsvg:5 |
76 |
+ sci-libs/fftw:3.0 |
77 |
+ virtual/libusb:1 |
78 |
+" |
79 |
+ |
80 |
+DEPEND=" |
81 |
+ ${RDEPEND} |
82 |
+" |
83 |
+ |
84 |
+PATCHES=( |
85 |
+ "${FILESDIR}"/${PN}-1.01-viewport.patch |
86 |
+ "${FILESDIR}"/${PN}-1.12-desktop.patch |
87 |
+ "${FILESDIR}"/${PN}-1.12-cmake.patch |
88 |
+) |
89 |
+ |
90 |
+src_prepare() { |
91 |
+ default |
92 |
+ |
93 |
+ local LIBDIR="/usr/$(get_libdir)" |
94 |
+ |
95 |
+ grep -rl "/usr/local/lib" "${S}" | xargs sed -i "s@/usr/local/lib@${LIBDIR}@g" || die |
96 |
+ grep -rl "/usr/local" "${S}" | xargs sed -i "s@/usr/local@/usr@g" || die |
97 |
+ cd "${S}/libsigrok4DSL" || die |
98 |
+ sh ./autogen.sh || die |
99 |
+ cd "${S}/libsigrokdecode4DSL" || die |
100 |
+ sh ./autogen.sh || die |
101 |
+} |
102 |
+ |
103 |
+src_configure() { |
104 |
+ local LIBDIR="/usr/$(get_libdir)" |
105 |
+ |
106 |
+ cd "${S}/libsigrok4DSL" || die |
107 |
+ sh ./configure --libdir=${LIBDIR} --prefix=/usr || die |
108 |
+ cd "${S}/libsigrokdecode4DSL" || die |
109 |
+ sh ./configure --libdir=${LIBDIR} --prefix=/usr || die |
110 |
+} |
111 |
+ |
112 |
+src_compile() { |
113 |
+ cd "${S}/libsigrok4DSL" || die |
114 |
+ emake DESTDIR="${D}" |
115 |
+ cd "${S}/libsigrokdecode4DSL" || die |
116 |
+ emake DESTDIR="${D}" |
117 |
+ cd "${S}" |
118 |
+} |
119 |
+ |
120 |
+src_install() { |
121 |
+ local LIBDIR="/usr/$(get_libdir)" |
122 |
+ |
123 |
+ cd "${S}/libsigrok4DSL" || die |
124 |
+ emake DESTDIR="${D}" install |
125 |
+ cd "${S}/libsigrokdecode4DSL" || die |
126 |
+ emake DESTDIR="${D}" install |
127 |
+ cd "${S}/DSView" || die |
128 |
+ |
129 |
+ DESTDIR="${D}" \ |
130 |
+ PKG_CONFIG_PATH="${D}${LIBDIR}/pkgconfig" \ |
131 |
+ CFLAGS="-I${D}/usr/include" \ |
132 |
+ CXXFLAGS="-I${D}/usr/include" \ |
133 |
+ LDFLAGS="-L${D}${LIBDIR}" \ |
134 |
+ cmake -DCMAKE_INSTALL_PREFIX=/usr . || die |
135 |
+ emake DESTDIR="${D}" install |
136 |
+} |
137 |
|
138 |
diff --git a/sci-electronics/dsview/files/dsview-1.01-viewport.patch b/sci-electronics/dsview/files/dsview-1.01-viewport.patch |
139 |
new file mode 100644 |
140 |
index 0000000..6f8f49d |
141 |
--- /dev/null |
142 |
+++ b/sci-electronics/dsview/files/dsview-1.01-viewport.patch |
143 |
@@ -0,0 +1,10 @@ |
144 |
+--- a/DSView/pv/view/viewport.cpp |
145 |
++++ b/DSView/pv/view/viewport.cpp |
146 |
+@@ -37,7 +37,7 @@ |
147 |
+ |
148 |
+ #include <QMouseEvent> |
149 |
+ #include <QStyleOption> |
150 |
+- |
151 |
++#include <QPainterPath> |
152 |
+ |
153 |
+ #include <math.h> |
154 |
|
155 |
diff --git a/sci-electronics/dsview/files/dsview-1.12-cmake.patch b/sci-electronics/dsview/files/dsview-1.12-cmake.patch |
156 |
new file mode 100644 |
157 |
index 0000000..4b01365 |
158 |
--- /dev/null |
159 |
+++ b/sci-electronics/dsview/files/dsview-1.12-cmake.patch |
160 |
@@ -0,0 +1,26 @@ |
161 |
+diff --git a/DSView/CMakeLists.txt b/DSView/CMakeLists.txt |
162 |
+index 29f848d..554952f 100755 |
163 |
+--- a/DSView/CMakeLists.txt |
164 |
++++ b/DSView/CMakeLists.txt |
165 |
+@@ -420,15 +420,17 @@ set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_ |
166 |
+ #------------------------------------------------------------------------------- |
167 |
+ |
168 |
+ # Install the executable. |
169 |
+-install(TARGETS ${PROJECT_NAME} DESTINATION bin/) |
170 |
++install(TARGETS ${PROJECT_NAME} DESTINATION bin) |
171 |
+ install(DIRECTORY res DESTINATION share/${PROJECT_NAME}) |
172 |
+ install(FILES icons/logo.svg DESTINATION share/${PROJECT_NAME} RENAME logo.svg) |
173 |
++install(FILES icons/logo.svg DESTINATION share/icons/hicolor/scalable/apps RENAME dsview.svg) |
174 |
++install(FILES icons/logo.svg DESTINATION share/pixmaps RENAME dsview.svg) |
175 |
+ install(FILES ../NEWS25 DESTINATION share/${PROJECT_NAME} RENAME NEWS25) |
176 |
+ install(FILES ../NEWS31 DESTINATION share/${PROJECT_NAME} RENAME NEWS31) |
177 |
+ install(FILES ../ug25.pdf DESTINATION share/${PROJECT_NAME} RENAME ug25.pdf) |
178 |
+ install(FILES ../ug31.pdf DESTINATION share/${PROJECT_NAME} RENAME ug31.pdf) |
179 |
+-install(FILES DreamSourceLab.rules DESTINATION /etc/udev/rules.d/) |
180 |
+-install(FILES DSView.desktop DESTINATION /usr/share/applications/) |
181 |
++install(FILES DreamSourceLab.rules DESTINATION /lib/udev/rules.d RENAME 60-dreamsourcelab.rules) |
182 |
++install(FILES DSView.desktop DESTINATION /usr/share/applications RENAME dsview.desktop) |
183 |
+ |
184 |
+ #=============================================================================== |
185 |
+ #= Packaging (handled by CPack) |
186 |
+ |
187 |
\ No newline at end of file |
188 |
|
189 |
diff --git a/sci-electronics/dsview/files/dsview-1.12-desktop.patch b/sci-electronics/dsview/files/dsview-1.12-desktop.patch |
190 |
new file mode 100644 |
191 |
index 0000000..92e267e |
192 |
--- /dev/null |
193 |
+++ b/sci-electronics/dsview/files/dsview-1.12-desktop.patch |
194 |
@@ -0,0 +1,20 @@ |
195 |
+diff --git a/DSView/DSView.desktop b/DSView/DSView.desktop |
196 |
+index fba3202..e114324 100755 |
197 |
+--- a/DSView/DSView.desktop |
198 |
++++ b/DSView/DSView.desktop |
199 |
+@@ -1,9 +1,10 @@ |
200 |
+ [Desktop Entry] |
201 |
+-Version=0.96 |
202 |
+-Exec=/usr/local/bin/DSView |
203 |
++Type=Application |
204 |
++Encoding=UTF-8 |
205 |
+ Name=DSView |
206 |
+ Comment=GUI Program for DreamSourceLab USB-based Instruments |
207 |
+-Icon=/usr/local/share/DSView/logo.png |
208 |
+-Type=Application |
209 |
++TryExec=DSView |
210 |
++Exec=DSView |
211 |
++Icon=dsview |
212 |
+ Terminal=false |
213 |
+-Categories=Development |
214 |
++Categories=Development;Electronics;Qt; |
215 |
|
216 |
diff --git a/sci-electronics/dsview/metadata.xml b/sci-electronics/dsview/metadata.xml |
217 |
new file mode 100644 |
218 |
index 0000000..c58b17b |
219 |
--- /dev/null |
220 |
+++ b/sci-electronics/dsview/metadata.xml |
221 |
@@ -0,0 +1,20 @@ |
222 |
+<?xml version="1.0" encoding="UTF-8"?> |
223 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
224 |
+<pkgmetadata> |
225 |
+ <maintainer type="person"> |
226 |
+ <email>vowstar@×××××.com</email> |
227 |
+ <name>Huang Rui</name> |
228 |
+ </maintainer> |
229 |
+ <upstream> |
230 |
+ <remote-id type="github">DreamSourceLab/DSView</remote-id> |
231 |
+ </upstream> |
232 |
+ <longdescription lang="en"> |
233 |
+ DSView is an GUI programe for supporting various instruments from |
234 |
+ DreamSourceLab, including logic analyzer, oscilloscope, etc. DSView is based |
235 |
+ on sigrok project. |
236 |
+ The sigrok project aims at creating a portable, cross-platform, |
237 |
+ Free/Libre/Open-Source signal analysis software suite that supports various |
238 |
+ device types (such as logic analyzers, oscilloscopes, multimeters, and |
239 |
+ more). |
240 |
+ </longdescription> |
241 |
+</pkgmetadata> |