commit: ac62eaed384a1f46439c546632930cbf98e527da Author: Thawann Malfatti <malfatti <AT> disroot <DOT> org> AuthorDate: Mon Aug 24 19:52:16 2020 +0000 Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net> CommitDate: Fri Feb 5 16:11:02 2021 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=ac62eaed
sci-biology/open-ephys-gui: New package Add static version and fix use of jack flag Move KEYWORDS to the if statement Fix extra blank lines and spaces as tab Fix dependencies Fix wrong package name in SRC_URI Add QA_PREBUILD and QA_PRESTRIPPED files Fix relative paths Fix wrong conditional flag statement Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: T Malfatti <malfatti <AT> disroot.org> Closes: https://github.com/gentoo/sci/pull/966 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net> .../files/open-ephys-gui-0.5.2.2.patch | 12 ++++ .../open-ephys-gui/files/open-ephys-gui-9999.patch | 12 ++++ .../files/open-ephys-gui-99999999.patch | 12 ++++ sci-biology/open-ephys-gui/metadata.xml | 14 ++++ .../open-ephys-gui/open-ephys-gui-0.5.2.2.ebuild | 82 ++++++++++++++++++++++ .../open-ephys-gui/open-ephys-gui-9999.ebuild | 82 ++++++++++++++++++++++ .../open-ephys-gui/open-ephys-gui-99999999.ebuild | 82 ++++++++++++++++++++++ 7 files changed, 296 insertions(+) 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 new file mode 100644 index 000000000..77e401639 --- /dev/null +++ b/sci-biology/open-ephys-gui/files/open-ephys-gui-0.5.2.2.patch @@ -0,0 +1,12 @@ +# Add 'Gentoo' build type + +--- ../CMakeLists.txt 2019-12-02 22:29:24.021065669 -0300 ++++ ../CMakeLists.txt 2019-12-02 22:29:11.251065418 -0300 +@@ -123,6 +123,7 @@ + if(${CMAKE_BUILD_TYPE} STREQUAL "Debug") + + elseif (${CMAKE_BUILD_TYPE} STREQUAL "Release") ++ elseif (${CMAKE_BUILD_TYPE} STREQUAL "Gentoo") + else() + message(FATAL_ERROR "Invalid build type") + endif() 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 new file mode 100644 index 000000000..77e401639 --- /dev/null +++ b/sci-biology/open-ephys-gui/files/open-ephys-gui-9999.patch @@ -0,0 +1,12 @@ +# Add 'Gentoo' build type + +--- ../CMakeLists.txt 2019-12-02 22:29:24.021065669 -0300 ++++ ../CMakeLists.txt 2019-12-02 22:29:11.251065418 -0300 +@@ -123,6 +123,7 @@ + if(${CMAKE_BUILD_TYPE} STREQUAL "Debug") + + elseif (${CMAKE_BUILD_TYPE} STREQUAL "Release") ++ elseif (${CMAKE_BUILD_TYPE} STREQUAL "Gentoo") + else() + message(FATAL_ERROR "Invalid build type") + endif() 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 new file mode 100644 index 000000000..77e401639 --- /dev/null +++ b/sci-biology/open-ephys-gui/files/open-ephys-gui-99999999.patch @@ -0,0 +1,12 @@ +# Add 'Gentoo' build type + +--- ../CMakeLists.txt 2019-12-02 22:29:24.021065669 -0300 ++++ ../CMakeLists.txt 2019-12-02 22:29:11.251065418 -0300 +@@ -123,6 +123,7 @@ + if(${CMAKE_BUILD_TYPE} STREQUAL "Debug") + + elseif (${CMAKE_BUILD_TYPE} STREQUAL "Release") ++ elseif (${CMAKE_BUILD_TYPE} STREQUAL "Gentoo") + else() + message(FATAL_ERROR "Invalid build type") + endif() diff --git a/sci-biology/open-ephys-gui/metadata.xml b/sci-biology/open-ephys-gui/metadata.xml new file mode 100644 index 000000000..4b23eb18b --- /dev/null +++ b/sci-biology/open-ephys-gui/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>[email protected]</email> + <name>T Malfatti</name> + </maintainer> + <longdescription lang="en"> + Software for processing, recording, and visualizing multichannel electrophysiological data. + </longdescription> + <upstream> + <remote-id type="github">open-ephys/plugin-GUI</remote-id> + </upstream> +</pkgmetadata> 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 new file mode 100644 index 000000000..b0266e0ac --- /dev/null +++ b/sci-biology/open-ephys-gui/open-ephys-gui-0.5.2.2.ebuild @@ -0,0 +1,82 @@ +# Copyright 2019-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit cmake + +DESCRIPTION="Processing, recording, and visualizing multichannel ephys data" +HOMEPAGE="http://www.open-ephys.org/gui/" +LICENSE="GPL-3" + +if [[ ${PV} == "9999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/open-ephys/plugin-GUI" + EGIT_BRANCH="master" + Suffix=$EGIT_BRANCH + SubDir=${P} +elif [[ ${PV} == "99999999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/open-ephys/plugin-GUI" + EGIT_BRANCH="development" + Suffix=$EGIT_BRANCH + SubDir=${P} +else + SRC_URI="https://github.com/open-ephys/plugin-GUI/archive/v${PV}.tar.gz -> ${P}.tar.gz" + Suffix=${PV} + SubDir="plugin-GUI-${PV}" + S="${WORKDIR}/$SubDir" + KEYWORDS="~amd64 ~x86" +fi + +SLOT="${PV}" +IUSE="jack" + +BDEPEND=" + <sys-devel/gcc-9 +" +DEPEND=" + media-libs/alsa-lib + media-libs/freeglut + media-libs/freetype + x11-libs/libXrandr + x11-libs/libXcursor + x11-libs/libXinerama + jack? ( media-sound/jack-audio-connection-kit ) +" +RDEPEND="${DEPEND}" + +BUILD_DIR="$S/Build" +PATCHES=( "${FILESDIR}"/${P}.patch ) + +QA_PREBUILT="opt/open-ephys-0.5.2.2/shared/*.so" +QA_PRESTRIPPED=" + opt/open-ephys-0.5.2.2/plugins/*.so + opt/open-ephys-0.5.2.2/open-ephys +" + +src_prepare() { + cmake_src_prepare + + if use jack; then + sed -i 's/JUCE_APP_VERSION=/JUCE_JACK=1\n JUCE_APP_VERSION=/' "${WORKDIR}/${SubDir}/CMakeLists.txt" || die "Sed failed!" + fi +} + +src_configure() { + local mycmakeargs=( -DCMAKE_SKIP_RPATH=ON ) + cmake_src_configure +} + +src_install() { + dodir opt/open-ephys-"$Suffix"/ lib/udev/rules.d/ + cp -R "${BUILD_DIR}"/Gentoo/* "${ED}"/opt/open-ephys-"$Suffix"/ + cp -R "${WORKDIR}"/"${SubDir}"/Resources/Scripts/40-open-ephys.rules "${ED}"/lib/udev/rules.d/ + dosym ../../opt/open-ephys-"$Suffix"/open-ephys usr/bin/open-ephys-"$Suffix" +} + +pkg_postinst() { + ewarn " " + ewarn "You must restart the udev service in order to allow your computer to" + ewarn "communicate with the Open Ephys acquisition board." + ewarn " " +} diff --git a/sci-biology/open-ephys-gui/open-ephys-gui-9999.ebuild b/sci-biology/open-ephys-gui/open-ephys-gui-9999.ebuild new file mode 100644 index 000000000..b0266e0ac --- /dev/null +++ b/sci-biology/open-ephys-gui/open-ephys-gui-9999.ebuild @@ -0,0 +1,82 @@ +# Copyright 2019-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit cmake + +DESCRIPTION="Processing, recording, and visualizing multichannel ephys data" +HOMEPAGE="http://www.open-ephys.org/gui/" +LICENSE="GPL-3" + +if [[ ${PV} == "9999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/open-ephys/plugin-GUI" + EGIT_BRANCH="master" + Suffix=$EGIT_BRANCH + SubDir=${P} +elif [[ ${PV} == "99999999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/open-ephys/plugin-GUI" + EGIT_BRANCH="development" + Suffix=$EGIT_BRANCH + SubDir=${P} +else + SRC_URI="https://github.com/open-ephys/plugin-GUI/archive/v${PV}.tar.gz -> ${P}.tar.gz" + Suffix=${PV} + SubDir="plugin-GUI-${PV}" + S="${WORKDIR}/$SubDir" + KEYWORDS="~amd64 ~x86" +fi + +SLOT="${PV}" +IUSE="jack" + +BDEPEND=" + <sys-devel/gcc-9 +" +DEPEND=" + media-libs/alsa-lib + media-libs/freeglut + media-libs/freetype + x11-libs/libXrandr + x11-libs/libXcursor + x11-libs/libXinerama + jack? ( media-sound/jack-audio-connection-kit ) +" +RDEPEND="${DEPEND}" + +BUILD_DIR="$S/Build" +PATCHES=( "${FILESDIR}"/${P}.patch ) + +QA_PREBUILT="opt/open-ephys-0.5.2.2/shared/*.so" +QA_PRESTRIPPED=" + opt/open-ephys-0.5.2.2/plugins/*.so + opt/open-ephys-0.5.2.2/open-ephys +" + +src_prepare() { + cmake_src_prepare + + if use jack; then + sed -i 's/JUCE_APP_VERSION=/JUCE_JACK=1\n JUCE_APP_VERSION=/' "${WORKDIR}/${SubDir}/CMakeLists.txt" || die "Sed failed!" + fi +} + +src_configure() { + local mycmakeargs=( -DCMAKE_SKIP_RPATH=ON ) + cmake_src_configure +} + +src_install() { + dodir opt/open-ephys-"$Suffix"/ lib/udev/rules.d/ + cp -R "${BUILD_DIR}"/Gentoo/* "${ED}"/opt/open-ephys-"$Suffix"/ + cp -R "${WORKDIR}"/"${SubDir}"/Resources/Scripts/40-open-ephys.rules "${ED}"/lib/udev/rules.d/ + dosym ../../opt/open-ephys-"$Suffix"/open-ephys usr/bin/open-ephys-"$Suffix" +} + +pkg_postinst() { + ewarn " " + ewarn "You must restart the udev service in order to allow your computer to" + ewarn "communicate with the Open Ephys acquisition board." + ewarn " " +} diff --git a/sci-biology/open-ephys-gui/open-ephys-gui-99999999.ebuild b/sci-biology/open-ephys-gui/open-ephys-gui-99999999.ebuild new file mode 100644 index 000000000..b0266e0ac --- /dev/null +++ b/sci-biology/open-ephys-gui/open-ephys-gui-99999999.ebuild @@ -0,0 +1,82 @@ +# Copyright 2019-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit cmake + +DESCRIPTION="Processing, recording, and visualizing multichannel ephys data" +HOMEPAGE="http://www.open-ephys.org/gui/" +LICENSE="GPL-3" + +if [[ ${PV} == "9999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/open-ephys/plugin-GUI" + EGIT_BRANCH="master" + Suffix=$EGIT_BRANCH + SubDir=${P} +elif [[ ${PV} == "99999999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/open-ephys/plugin-GUI" + EGIT_BRANCH="development" + Suffix=$EGIT_BRANCH + SubDir=${P} +else + SRC_URI="https://github.com/open-ephys/plugin-GUI/archive/v${PV}.tar.gz -> ${P}.tar.gz" + Suffix=${PV} + SubDir="plugin-GUI-${PV}" + S="${WORKDIR}/$SubDir" + KEYWORDS="~amd64 ~x86" +fi + +SLOT="${PV}" +IUSE="jack" + +BDEPEND=" + <sys-devel/gcc-9 +" +DEPEND=" + media-libs/alsa-lib + media-libs/freeglut + media-libs/freetype + x11-libs/libXrandr + x11-libs/libXcursor + x11-libs/libXinerama + jack? ( media-sound/jack-audio-connection-kit ) +" +RDEPEND="${DEPEND}" + +BUILD_DIR="$S/Build" +PATCHES=( "${FILESDIR}"/${P}.patch ) + +QA_PREBUILT="opt/open-ephys-0.5.2.2/shared/*.so" +QA_PRESTRIPPED=" + opt/open-ephys-0.5.2.2/plugins/*.so + opt/open-ephys-0.5.2.2/open-ephys +" + +src_prepare() { + cmake_src_prepare + + if use jack; then + sed -i 's/JUCE_APP_VERSION=/JUCE_JACK=1\n JUCE_APP_VERSION=/' "${WORKDIR}/${SubDir}/CMakeLists.txt" || die "Sed failed!" + fi +} + +src_configure() { + local mycmakeargs=( -DCMAKE_SKIP_RPATH=ON ) + cmake_src_configure +} + +src_install() { + dodir opt/open-ephys-"$Suffix"/ lib/udev/rules.d/ + cp -R "${BUILD_DIR}"/Gentoo/* "${ED}"/opt/open-ephys-"$Suffix"/ + cp -R "${WORKDIR}"/"${SubDir}"/Resources/Scripts/40-open-ephys.rules "${ED}"/lib/udev/rules.d/ + dosym ../../opt/open-ephys-"$Suffix"/open-ephys usr/bin/open-ephys-"$Suffix" +} + +pkg_postinst() { + ewarn " " + ewarn "You must restart the udev service in order to allow your computer to" + ewarn "communicate with the Open Ephys acquisition board." + ewarn " " +}
