Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-cpp/sourcetrail/
Date: Thu, 13 Sep 2018 17:19:07
Message-Id: 1536859137.c6880019d5b32d439391bbd26120141a30a7aa59.mgorny@gentoo
1 commit: c6880019d5b32d439391bbd26120141a30a7aa59
2 Author: David Hallas <david <AT> davidhallas <DOT> dk>
3 AuthorDate: Wed Aug 8 19:32:49 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 13 17:18:57 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6880019
7
8 dev-cpp/sourcetrail: New package
9
10 Sourcetrail is a cross-platform source explorer for C/C++ and Java code.
11 It makes it easy to navigate a codebase in an intuitive way.
12
13 Closes: https://bugs.gentoo.org/663036
14 Package-Manager: Portage-2.3.40, Repoman-2.3.9
15 Closes: https://github.com/gentoo/gentoo/pull/9513
16
17 dev-cpp/sourcetrail/Manifest | 1 +
18 dev-cpp/sourcetrail/metadata.xml | 15 ++++
19 dev-cpp/sourcetrail/sourcetrail-2018.3.55.ebuild | 89 ++++++++++++++++++++++++
20 3 files changed, 105 insertions(+)
21
22 diff --git a/dev-cpp/sourcetrail/Manifest b/dev-cpp/sourcetrail/Manifest
23 new file mode 100644
24 index 00000000000..02dc9406177
25 --- /dev/null
26 +++ b/dev-cpp/sourcetrail/Manifest
27 @@ -0,0 +1 @@
28 +DIST sourcetrail-2018.3.55.tar.gz 74278615 BLAKE2B e046acfb90cdb495ff28c3dcf4530129cc569a0e9c481f127f656059f80575e4be22e9b63a8b6f00ffdac977ca930ad7a3c4d0e1aa7912af711150afbef03707 SHA512 b8fccc4bae55abf5c5a05418b37c665817c860cc27e314f8ccb69665a63b90ef68485c2395fc899f1112a05def8e95068d7a5c92db399f1d3f7a203a09107767
29
30 diff --git a/dev-cpp/sourcetrail/metadata.xml b/dev-cpp/sourcetrail/metadata.xml
31 new file mode 100644
32 index 00000000000..1e96a507061
33 --- /dev/null
34 +++ b/dev-cpp/sourcetrail/metadata.xml
35 @@ -0,0 +1,15 @@
36 +<?xml version="1.0" encoding="UTF-8"?>
37 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
38 +<pkgmetadata>
39 + <maintainer type="person">
40 + <email>david@×××××××××××.dk</email>
41 + <name>David Hallas</name>
42 + </maintainer>
43 + <maintainer type="project">
44 + <email>proxy-maint@g.o</email>
45 + <name>Proxy Maintainers Project</name>
46 + </maintainer>
47 + <use>
48 + <flag name="examples">Install example projects.</flag>
49 + </use>
50 +</pkgmetadata>
51
52 diff --git a/dev-cpp/sourcetrail/sourcetrail-2018.3.55.ebuild b/dev-cpp/sourcetrail/sourcetrail-2018.3.55.ebuild
53 new file mode 100644
54 index 00000000000..16d87f9d558
55 --- /dev/null
56 +++ b/dev-cpp/sourcetrail/sourcetrail-2018.3.55.ebuild
57 @@ -0,0 +1,89 @@
58 +# Copyright 1999-2018 Gentoo Foundation
59 +# Distributed under the terms of the GNU General Public License v2
60 +
61 +EAPI=6
62 +
63 +inherit desktop gnome2-utils xdg-utils
64 +
65 +DESCRIPTION="A cross-platform source explorer for C/C++ and Java"
66 +HOMEPAGE="https://www.sourcetrail.com/"
67 +SRC_URI="https://www.sourcetrail.com/downloads/${PV}/linux/64bit -> ${P}.tar.gz"
68 +
69 +LICENSE="Sourcetrail || ( GPL-2 GPL-3 LGPL-3 ) FDL-1.3 BSD"
70 +SLOT="0"
71 +KEYWORDS="~amd64"
72 +IUSE="examples selinux"
73 +
74 +DEPEND="dev-util/patchelf"
75 +
76 +RDEPEND="
77 + dev-libs/openssl
78 + media-libs/fontconfig
79 + media-libs/freetype
80 + media-libs/libpng:1.2
81 + sys-libs/libudev-compat
82 + virtual/opengl
83 + x11-libs/libdrm
84 + x11-libs/libX11
85 + x11-libs/libXau
86 + x11-libs/libxcb
87 + x11-libs/libXdamage
88 + x11-libs/libXext
89 + x11-libs/libXfixes
90 + x11-libs/libXi
91 + x11-libs/libXrender
92 + x11-libs/libXxf86vm
93 + selinux? ( sys-libs/libselinux )
94 +"
95 +
96 +S="${WORKDIR}/Sourcetrail"
97 +QA_PREBUILT="*"
98 +
99 +src_install() {
100 + # This removes the rpath entries with $$ORIGIN
101 + # since they trigger warnings when merging
102 + for f in "Sourcetrail" "sourcetrail_indexer"; do
103 + rpath=$(patchelf --print-rpath "${f}" 2>/dev/null)
104 + new_rpath=${rpath//\$\$ORIGIN\/lib\/:/}
105 + patchelf --set-rpath "${new_rpath}" "${f}" || die
106 + done
107 +
108 + # Remove bundled libraries
109 + rm -f lib/libXi.so.6 lib/libXxf86vm.so.1 lib/libXrender.so.1 lib/libXfixes.so.3 lib/libXext.so.6 \
110 + lib/libXdamage.so.1 lib/libxcb* lib/libXau.so.6 lib/libX11-xcb.so.1 lib/libX11.so.6 \
111 + lib/libudev.so.0 lib/libEGL.so.1 lib/libgbm.so.1 lib/libglapi.so.0 lib/libGL.so.1 \
112 + lib/libdrm.so.2 lib/libfontconfig.so.1 lib/libfreetype.so.6 lib/libcrypto.so lib/libssl.so \
113 + lib/libpng12.so.0 lib/libselinux.so.1
114 + insinto /opt/sourcetrail
115 + doins -r EULA.txt README data lib plugin
116 + if use examples; then
117 + doins -r user
118 + fi
119 + exeinto /opt/sourcetrail
120 + doexe Sourcetrail sourcetrail_indexer Sourcetrail.sh resetPreferences.sh
121 + into /opt
122 + newbin - sourcetrail <<-EOF
123 + #! /bin/sh
124 + exec /opt/sourcetrail/Sourcetrail.sh "\$@"
125 + EOF
126 + local size
127 + for size in 48 64 128 256 512; do
128 + newicon -s ${size} "setup/share/icons/hicolor/${size}x${size}/apps/sourcetrail.png" \
129 + "sourcetrail.png"
130 + done
131 + sed -i -e 's|Exec=/usr/bin/sourcetrail|Exec=/opt/bin/sourcetrail|' "setup/share/applications/sourcetrail.desktop" || die
132 + sed -i -e 's/Utilities;//' "setup/share/applications/sourcetrail.desktop" || die
133 + domenu "setup/share/applications/sourcetrail.desktop"
134 +}
135 +
136 +pkg_postinst() {
137 + gnome2_icon_cache_update
138 + xdg_mimeinfo_database_update
139 + xdg_desktop_database_update
140 +}
141 +
142 +pkg_postrm() {
143 + gnome2_icon_cache_update
144 + xdg_mimeinfo_database_update
145 + xdg_desktop_database_update
146 +}