Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@××××××.net>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-biology/open-ephys-gui/, sci-biology/open-ephys-gui/files/
Date: Fri, 05 Feb 2021 16:11:28
Message-Id: 1612541462.ac62eaed384a1f46439c546632930cbf98e527da.andrewammerlaan@gentoo
1 commit: ac62eaed384a1f46439c546632930cbf98e527da
2 Author: Thawann Malfatti <malfatti <AT> disroot <DOT> org>
3 AuthorDate: Mon Aug 24 19:52:16 2020 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
5 CommitDate: Fri Feb 5 16:11:02 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=ac62eaed
7
8 sci-biology/open-ephys-gui: New package
9
10 Add static version and fix use of jack flag
11 Move KEYWORDS to the if statement
12 Fix extra blank lines and spaces as tab
13 Fix dependencies
14 Fix wrong package name in SRC_URI
15 Add QA_PREBUILD and QA_PRESTRIPPED files
16 Fix relative paths
17 Fix wrong conditional flag statement
18
19 Package-Manager: Portage-3.0.14, Repoman-3.0.2
20 Signed-off-by: T Malfatti <malfatti <AT> disroot.org>
21 Closes: https://github.com/gentoo/sci/pull/966
22 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>
23
24 .../files/open-ephys-gui-0.5.2.2.patch | 12 ++++
25 .../open-ephys-gui/files/open-ephys-gui-9999.patch | 12 ++++
26 .../files/open-ephys-gui-99999999.patch | 12 ++++
27 sci-biology/open-ephys-gui/metadata.xml | 14 ++++
28 .../open-ephys-gui/open-ephys-gui-0.5.2.2.ebuild | 82 ++++++++++++++++++++++
29 .../open-ephys-gui/open-ephys-gui-9999.ebuild | 82 ++++++++++++++++++++++
30 .../open-ephys-gui/open-ephys-gui-99999999.ebuild | 82 ++++++++++++++++++++++
31 7 files changed, 296 insertions(+)
32
33 diff --git a/sci-biology/open-ephys-gui/files/open-ephys-gui-0.5.2.2.patch b/sci-biology/open-ephys-gui/files/open-ephys-gui-0.5.2.2.patch
34 new file mode 100644
35 index 000000000..77e401639
36 --- /dev/null
37 +++ b/sci-biology/open-ephys-gui/files/open-ephys-gui-0.5.2.2.patch
38 @@ -0,0 +1,12 @@
39 +# Add 'Gentoo' build type
40 +
41 +--- ../CMakeLists.txt 2019-12-02 22:29:24.021065669 -0300
42 ++++ ../CMakeLists.txt 2019-12-02 22:29:11.251065418 -0300
43 +@@ -123,6 +123,7 @@
44 + if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
45 +
46 + elseif (${CMAKE_BUILD_TYPE} STREQUAL "Release")
47 ++ elseif (${CMAKE_BUILD_TYPE} STREQUAL "Gentoo")
48 + else()
49 + message(FATAL_ERROR "Invalid build type")
50 + endif()
51
52 diff --git a/sci-biology/open-ephys-gui/files/open-ephys-gui-9999.patch b/sci-biology/open-ephys-gui/files/open-ephys-gui-9999.patch
53 new file mode 100644
54 index 000000000..77e401639
55 --- /dev/null
56 +++ b/sci-biology/open-ephys-gui/files/open-ephys-gui-9999.patch
57 @@ -0,0 +1,12 @@
58 +# Add 'Gentoo' build type
59 +
60 +--- ../CMakeLists.txt 2019-12-02 22:29:24.021065669 -0300
61 ++++ ../CMakeLists.txt 2019-12-02 22:29:11.251065418 -0300
62 +@@ -123,6 +123,7 @@
63 + if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
64 +
65 + elseif (${CMAKE_BUILD_TYPE} STREQUAL "Release")
66 ++ elseif (${CMAKE_BUILD_TYPE} STREQUAL "Gentoo")
67 + else()
68 + message(FATAL_ERROR "Invalid build type")
69 + endif()
70
71 diff --git a/sci-biology/open-ephys-gui/files/open-ephys-gui-99999999.patch b/sci-biology/open-ephys-gui/files/open-ephys-gui-99999999.patch
72 new file mode 100644
73 index 000000000..77e401639
74 --- /dev/null
75 +++ b/sci-biology/open-ephys-gui/files/open-ephys-gui-99999999.patch
76 @@ -0,0 +1,12 @@
77 +# Add 'Gentoo' build type
78 +
79 +--- ../CMakeLists.txt 2019-12-02 22:29:24.021065669 -0300
80 ++++ ../CMakeLists.txt 2019-12-02 22:29:11.251065418 -0300
81 +@@ -123,6 +123,7 @@
82 + if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
83 +
84 + elseif (${CMAKE_BUILD_TYPE} STREQUAL "Release")
85 ++ elseif (${CMAKE_BUILD_TYPE} STREQUAL "Gentoo")
86 + else()
87 + message(FATAL_ERROR "Invalid build type")
88 + endif()
89
90 diff --git a/sci-biology/open-ephys-gui/metadata.xml b/sci-biology/open-ephys-gui/metadata.xml
91 new file mode 100644
92 index 000000000..4b23eb18b
93 --- /dev/null
94 +++ b/sci-biology/open-ephys-gui/metadata.xml
95 @@ -0,0 +1,14 @@
96 +<?xml version="1.0" encoding="UTF-8"?>
97 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
98 +<pkgmetadata>
99 + <maintainer type="person">
100 + <email>malfatti@×××××××.org</email>
101 + <name>T Malfatti</name>
102 + </maintainer>
103 + <longdescription lang="en">
104 + Software for processing, recording, and visualizing multichannel electrophysiological data.
105 + </longdescription>
106 + <upstream>
107 + <remote-id type="github">open-ephys/plugin-GUI</remote-id>
108 + </upstream>
109 +</pkgmetadata>
110
111 diff --git a/sci-biology/open-ephys-gui/open-ephys-gui-0.5.2.2.ebuild b/sci-biology/open-ephys-gui/open-ephys-gui-0.5.2.2.ebuild
112 new file mode 100644
113 index 000000000..b0266e0ac
114 --- /dev/null
115 +++ b/sci-biology/open-ephys-gui/open-ephys-gui-0.5.2.2.ebuild
116 @@ -0,0 +1,82 @@
117 +# Copyright 2019-2021 Gentoo Authors
118 +# Distributed under the terms of the GNU General Public License v2
119 +
120 +EAPI=7
121 +inherit cmake
122 +
123 +DESCRIPTION="Processing, recording, and visualizing multichannel ephys data"
124 +HOMEPAGE="http://www.open-ephys.org/gui/"
125 +LICENSE="GPL-3"
126 +
127 +if [[ ${PV} == "9999" ]] ; then
128 + inherit git-r3
129 + EGIT_REPO_URI="https://github.com/open-ephys/plugin-GUI"
130 + EGIT_BRANCH="master"
131 + Suffix=$EGIT_BRANCH
132 + SubDir=${P}
133 +elif [[ ${PV} == "99999999" ]] ; then
134 + inherit git-r3
135 + EGIT_REPO_URI="https://github.com/open-ephys/plugin-GUI"
136 + EGIT_BRANCH="development"
137 + Suffix=$EGIT_BRANCH
138 + SubDir=${P}
139 +else
140 + SRC_URI="https://github.com/open-ephys/plugin-GUI/archive/v${PV}.tar.gz -> ${P}.tar.gz"
141 + Suffix=${PV}
142 + SubDir="plugin-GUI-${PV}"
143 + S="${WORKDIR}/$SubDir"
144 + KEYWORDS="~amd64 ~x86"
145 +fi
146 +
147 +SLOT="${PV}"
148 +IUSE="jack"
149 +
150 +BDEPEND="
151 + <sys-devel/gcc-9
152 +"
153 +DEPEND="
154 + media-libs/alsa-lib
155 + media-libs/freeglut
156 + media-libs/freetype
157 + x11-libs/libXrandr
158 + x11-libs/libXcursor
159 + x11-libs/libXinerama
160 + jack? ( media-sound/jack-audio-connection-kit )
161 +"
162 +RDEPEND="${DEPEND}"
163 +
164 +BUILD_DIR="$S/Build"
165 +PATCHES=( "${FILESDIR}"/${P}.patch )
166 +
167 +QA_PREBUILT="opt/open-ephys-0.5.2.2/shared/*.so"
168 +QA_PRESTRIPPED="
169 + opt/open-ephys-0.5.2.2/plugins/*.so
170 + opt/open-ephys-0.5.2.2/open-ephys
171 +"
172 +
173 +src_prepare() {
174 + cmake_src_prepare
175 +
176 + if use jack; then
177 + sed -i 's/JUCE_APP_VERSION=/JUCE_JACK=1\n JUCE_APP_VERSION=/' "${WORKDIR}/${SubDir}/CMakeLists.txt" || die "Sed failed!"
178 + fi
179 +}
180 +
181 +src_configure() {
182 + local mycmakeargs=( -DCMAKE_SKIP_RPATH=ON )
183 + cmake_src_configure
184 +}
185 +
186 +src_install() {
187 + dodir opt/open-ephys-"$Suffix"/ lib/udev/rules.d/
188 + cp -R "${BUILD_DIR}"/Gentoo/* "${ED}"/opt/open-ephys-"$Suffix"/
189 + cp -R "${WORKDIR}"/"${SubDir}"/Resources/Scripts/40-open-ephys.rules "${ED}"/lib/udev/rules.d/
190 + dosym ../../opt/open-ephys-"$Suffix"/open-ephys usr/bin/open-ephys-"$Suffix"
191 +}
192 +
193 +pkg_postinst() {
194 + ewarn " "
195 + ewarn "You must restart the udev service in order to allow your computer to"
196 + ewarn "communicate with the Open Ephys acquisition board."
197 + ewarn " "
198 +}
199
200 diff --git a/sci-biology/open-ephys-gui/open-ephys-gui-9999.ebuild b/sci-biology/open-ephys-gui/open-ephys-gui-9999.ebuild
201 new file mode 100644
202 index 000000000..b0266e0ac
203 --- /dev/null
204 +++ b/sci-biology/open-ephys-gui/open-ephys-gui-9999.ebuild
205 @@ -0,0 +1,82 @@
206 +# Copyright 2019-2021 Gentoo Authors
207 +# Distributed under the terms of the GNU General Public License v2
208 +
209 +EAPI=7
210 +inherit cmake
211 +
212 +DESCRIPTION="Processing, recording, and visualizing multichannel ephys data"
213 +HOMEPAGE="http://www.open-ephys.org/gui/"
214 +LICENSE="GPL-3"
215 +
216 +if [[ ${PV} == "9999" ]] ; then
217 + inherit git-r3
218 + EGIT_REPO_URI="https://github.com/open-ephys/plugin-GUI"
219 + EGIT_BRANCH="master"
220 + Suffix=$EGIT_BRANCH
221 + SubDir=${P}
222 +elif [[ ${PV} == "99999999" ]] ; then
223 + inherit git-r3
224 + EGIT_REPO_URI="https://github.com/open-ephys/plugin-GUI"
225 + EGIT_BRANCH="development"
226 + Suffix=$EGIT_BRANCH
227 + SubDir=${P}
228 +else
229 + SRC_URI="https://github.com/open-ephys/plugin-GUI/archive/v${PV}.tar.gz -> ${P}.tar.gz"
230 + Suffix=${PV}
231 + SubDir="plugin-GUI-${PV}"
232 + S="${WORKDIR}/$SubDir"
233 + KEYWORDS="~amd64 ~x86"
234 +fi
235 +
236 +SLOT="${PV}"
237 +IUSE="jack"
238 +
239 +BDEPEND="
240 + <sys-devel/gcc-9
241 +"
242 +DEPEND="
243 + media-libs/alsa-lib
244 + media-libs/freeglut
245 + media-libs/freetype
246 + x11-libs/libXrandr
247 + x11-libs/libXcursor
248 + x11-libs/libXinerama
249 + jack? ( media-sound/jack-audio-connection-kit )
250 +"
251 +RDEPEND="${DEPEND}"
252 +
253 +BUILD_DIR="$S/Build"
254 +PATCHES=( "${FILESDIR}"/${P}.patch )
255 +
256 +QA_PREBUILT="opt/open-ephys-0.5.2.2/shared/*.so"
257 +QA_PRESTRIPPED="
258 + opt/open-ephys-0.5.2.2/plugins/*.so
259 + opt/open-ephys-0.5.2.2/open-ephys
260 +"
261 +
262 +src_prepare() {
263 + cmake_src_prepare
264 +
265 + if use jack; then
266 + sed -i 's/JUCE_APP_VERSION=/JUCE_JACK=1\n JUCE_APP_VERSION=/' "${WORKDIR}/${SubDir}/CMakeLists.txt" || die "Sed failed!"
267 + fi
268 +}
269 +
270 +src_configure() {
271 + local mycmakeargs=( -DCMAKE_SKIP_RPATH=ON )
272 + cmake_src_configure
273 +}
274 +
275 +src_install() {
276 + dodir opt/open-ephys-"$Suffix"/ lib/udev/rules.d/
277 + cp -R "${BUILD_DIR}"/Gentoo/* "${ED}"/opt/open-ephys-"$Suffix"/
278 + cp -R "${WORKDIR}"/"${SubDir}"/Resources/Scripts/40-open-ephys.rules "${ED}"/lib/udev/rules.d/
279 + dosym ../../opt/open-ephys-"$Suffix"/open-ephys usr/bin/open-ephys-"$Suffix"
280 +}
281 +
282 +pkg_postinst() {
283 + ewarn " "
284 + ewarn "You must restart the udev service in order to allow your computer to"
285 + ewarn "communicate with the Open Ephys acquisition board."
286 + ewarn " "
287 +}
288
289 diff --git a/sci-biology/open-ephys-gui/open-ephys-gui-99999999.ebuild b/sci-biology/open-ephys-gui/open-ephys-gui-99999999.ebuild
290 new file mode 100644
291 index 000000000..b0266e0ac
292 --- /dev/null
293 +++ b/sci-biology/open-ephys-gui/open-ephys-gui-99999999.ebuild
294 @@ -0,0 +1,82 @@
295 +# Copyright 2019-2021 Gentoo Authors
296 +# Distributed under the terms of the GNU General Public License v2
297 +
298 +EAPI=7
299 +inherit cmake
300 +
301 +DESCRIPTION="Processing, recording, and visualizing multichannel ephys data"
302 +HOMEPAGE="http://www.open-ephys.org/gui/"
303 +LICENSE="GPL-3"
304 +
305 +if [[ ${PV} == "9999" ]] ; then
306 + inherit git-r3
307 + EGIT_REPO_URI="https://github.com/open-ephys/plugin-GUI"
308 + EGIT_BRANCH="master"
309 + Suffix=$EGIT_BRANCH
310 + SubDir=${P}
311 +elif [[ ${PV} == "99999999" ]] ; then
312 + inherit git-r3
313 + EGIT_REPO_URI="https://github.com/open-ephys/plugin-GUI"
314 + EGIT_BRANCH="development"
315 + Suffix=$EGIT_BRANCH
316 + SubDir=${P}
317 +else
318 + SRC_URI="https://github.com/open-ephys/plugin-GUI/archive/v${PV}.tar.gz -> ${P}.tar.gz"
319 + Suffix=${PV}
320 + SubDir="plugin-GUI-${PV}"
321 + S="${WORKDIR}/$SubDir"
322 + KEYWORDS="~amd64 ~x86"
323 +fi
324 +
325 +SLOT="${PV}"
326 +IUSE="jack"
327 +
328 +BDEPEND="
329 + <sys-devel/gcc-9
330 +"
331 +DEPEND="
332 + media-libs/alsa-lib
333 + media-libs/freeglut
334 + media-libs/freetype
335 + x11-libs/libXrandr
336 + x11-libs/libXcursor
337 + x11-libs/libXinerama
338 + jack? ( media-sound/jack-audio-connection-kit )
339 +"
340 +RDEPEND="${DEPEND}"
341 +
342 +BUILD_DIR="$S/Build"
343 +PATCHES=( "${FILESDIR}"/${P}.patch )
344 +
345 +QA_PREBUILT="opt/open-ephys-0.5.2.2/shared/*.so"
346 +QA_PRESTRIPPED="
347 + opt/open-ephys-0.5.2.2/plugins/*.so
348 + opt/open-ephys-0.5.2.2/open-ephys
349 +"
350 +
351 +src_prepare() {
352 + cmake_src_prepare
353 +
354 + if use jack; then
355 + sed -i 's/JUCE_APP_VERSION=/JUCE_JACK=1\n JUCE_APP_VERSION=/' "${WORKDIR}/${SubDir}/CMakeLists.txt" || die "Sed failed!"
356 + fi
357 +}
358 +
359 +src_configure() {
360 + local mycmakeargs=( -DCMAKE_SKIP_RPATH=ON )
361 + cmake_src_configure
362 +}
363 +
364 +src_install() {
365 + dodir opt/open-ephys-"$Suffix"/ lib/udev/rules.d/
366 + cp -R "${BUILD_DIR}"/Gentoo/* "${ED}"/opt/open-ephys-"$Suffix"/
367 + cp -R "${WORKDIR}"/"${SubDir}"/Resources/Scripts/40-open-ephys.rules "${ED}"/lib/udev/rules.d/
368 + dosym ../../opt/open-ephys-"$Suffix"/open-ephys usr/bin/open-ephys-"$Suffix"
369 +}
370 +
371 +pkg_postinst() {
372 + ewarn " "
373 + ewarn "You must restart the udev service in order to allow your computer to"
374 + ewarn "communicate with the Open Ephys acquisition board."
375 + ewarn " "
376 +}