You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
2.1 KiB
81 lines
2.1 KiB
5 years ago
|
# Copyright 1999-2020 Gentoo Authors
|
||
7 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
6 years ago
|
EAPI=7
|
||
7 years ago
|
|
||
4 years ago
|
inherit desktop wrapper
|
||
7 years ago
|
|
||
|
DESCRIPTION="A complete toolset for C and C++ development"
|
||
6 years ago
|
HOMEPAGE="https://www.jetbrains.com/clion"
|
||
|
SRC_URI="https://download.jetbrains.com/cpp/CLion-${PV}.tar.gz -> ${P}.tar.gz"
|
||
7 years ago
|
|
||
5 years ago
|
LICENSE="|| ( IDEA IDEA_Academic IDEA_Classroom IDEA_OpenSource IDEA_Personal )
|
||
|
Apache-1.1 Apache-2.0 BSD BSD-2 CC0-1.0 CDDL-1.1 CPL-0.5 CPL-1.0
|
||
|
EPL-1.0 EPL-2.0 GPL-2 GPL-2-with-classpath-exception GPL-3 ISC JDOM
|
||
|
LGPL-2.1+ LGPL-3 MIT MPL-1.0 MPL-1.1 OFL public-domain PSF-2 UoI-NCSA ZLIB"
|
||
7 years ago
|
SLOT="0"
|
||
|
KEYWORDS="~amd64 ~x86"
|
||
5 years ago
|
RESTRICT="bindist mirror splitdebug"
|
||
6 years ago
|
IUSE="custom-jdk"
|
||
7 years ago
|
|
||
|
# RDEPENDS may cause false positives in repoman.
|
||
|
# clion requires cmake and gdb at runtime to build and debug C/C++ projects
|
||
|
RDEPEND="
|
||
5 years ago
|
dev-libs/libdbusmenu
|
||
6 years ago
|
dev-util/cmake
|
||
7 years ago
|
sys-devel/gdb
|
||
6 years ago
|
!custom-jdk? ( virtual/jdk )"
|
||
7 years ago
|
|
||
|
QA_PREBUILT="opt/${P}/*"
|
||
|
|
||
|
src_prepare() {
|
||
|
default
|
||
|
|
||
|
local remove_me=(
|
||
6 years ago
|
bin/gdb/linux
|
||
|
bin/lldb/linux
|
||
7 years ago
|
bin/cmake
|
||
|
license/CMake*
|
||
5 years ago
|
lib/pty4j-native/linux/ppc64le
|
||
7 years ago
|
)
|
||
|
|
||
5 years ago
|
use amd64 || remove_me+=( bin/fsnotifier64 lib/pty4j-native/linux/x86_64)
|
||
|
use x86 || remove_me+=( bin/fsnotifier lib/pty4j-native/linux/x86)
|
||
7 years ago
|
|
||
5 years ago
|
use custom-jdk || remove_me+=( jbr )
|
||
6 years ago
|
|
||
7 years ago
|
rm -rv "${remove_me[@]}" || die
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
local dir="/opt/${P}"
|
||
|
|
||
|
insinto "${dir}"
|
||
|
doins -r *
|
||
6 years ago
|
fperms 755 "${dir}"/bin/{clion.sh,clang/linux/clang{d,-tidy}}
|
||
|
|
||
|
if use amd64; then
|
||
|
fperms 755 "${dir}"/bin/fsnotifier64
|
||
|
fi
|
||
|
if use arm; then
|
||
|
fperms 755 "${dir}"/bin/fsnotifier-arm
|
||
|
fi
|
||
|
if use x86; then
|
||
|
fperms 755 "${dir}"/bin/fsnotifier
|
||
|
fi
|
||
6 years ago
|
|
||
|
if use custom-jdk; then
|
||
5 years ago
|
if [[ -d jbr ]]; then
|
||
4 years ago
|
fperms 755 "${dir}"/jbr/bin/{jaotc,java,javac,jdb,jjs,jrunscript,keytool,pack200,rmid,rmiregistry,serialver,unpack200}
|
||
6 years ago
|
fi
|
||
|
fi
|
||
7 years ago
|
|
||
|
make_wrapper "${PN}" "${dir}/bin/${PN}.sh"
|
||
|
newicon "bin/${PN}.svg" "${PN}.svg"
|
||
|
make_desktop_entry "${PN}" "clion" "${PN}" "Development;IDE;"
|
||
|
|
||
|
# recommended by: https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit
|
||
|
dodir /usr/lib/sysctl.d/
|
||
|
echo "fs.inotify.max_user_watches = 524288" > "${D}/usr/lib/sysctl.d/30-clion-inotify-watches.conf" || die
|
||
|
}
|