Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-editors/scite/
Date: Mon, 04 Oct 2021 12:33:31
Message-Id: 1633350777.bac27c86014d36523781c64c8defcfec8d551a8d.juippis@gentoo
1 commit: bac27c86014d36523781c64c8defcfec8d551a8d
2 Author: Ervin Peters <coder <AT> ervnet <DOT> de>
3 AuthorDate: Fri Sep 24 17:29:34 2021 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Mon Oct 4 12:32:57 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bac27c86
7
8 app-editors/scite: Version Bump to 5.1.3.
9
10 Actual enhancements and upstream bugfixes. See
11 http://www.scintilla.org/ScintillaHistory.html
12
13 Signed-off-by: Ervin Peters <coder <AT> ervnet.de>
14 Package-Manager: Portage-3.0.20, Repoman-3.0.3
15 Closes: https://github.com/gentoo/gentoo/pull/22389
16 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
17
18 app-editors/scite/Manifest | 1 +
19 app-editors/scite/scite-5.1.3.ebuild | 115 +++++++++++++++++++++++++++++++++++
20 2 files changed, 116 insertions(+)
21
22 diff --git a/app-editors/scite/Manifest b/app-editors/scite/Manifest
23 index f1e5139c084..8c3caadf3bd 100644
24 --- a/app-editors/scite/Manifest
25 +++ b/app-editors/scite/Manifest
26 @@ -1,2 +1,3 @@
27 DIST scite-4.4.4.tgz 2775628 BLAKE2B a7607b53bf529c56f6525d44b052a08c914d8aa1d90d475dcf46927ac5ce83c06d68b70e8d8e8969c77c367240ba1e7ac10d599c77002575e84b9baf6445d03b SHA512 1e8529286206d542e0c07353b73ab38aa9ee2e2256ed8e15328965e00a33eb026f79bd7d330253e8743cf5503fadb32c64162973ad21da16993f11e124842ec0
28 DIST scite-5.1.1.tgz 3374717 BLAKE2B b7a45a86008eb592adacc8fde90cb637cc7cac821f339bb65920aaf912ee10d52badde3ed2e71118a7ce4690a0536b298c5fe5f673b886902ad4634b3a1ffaa6 SHA512 4d6c9b3ca4caed4fcb70a6b1c86a2ace13b023241f16d6faa01b3f692bcbfa14e0ce186bb08776ee0cf62768b2b77c4ffcae610ddbb6b04dcb7584fd8b3f27bb
29 +DIST scite-5.1.3.tgz 3427245 BLAKE2B ca765b61cb1fa96934c1e28d76a97cd7086a6c692ae33bb57591dfbc8637ffc94c4a3f20f9c6b55d11da8a76664f1d521f7e393bf6f31db55cbe02e0bf5052ba SHA512 ef86a18f739062598d3c7bf19bcd2f38ca012e890b9b4685c1f1b809e928762ab60d24c33a1f45ca33133ce5007e3a22a76e80222b121c9a4089d3c57aa0bc4c
30
31 diff --git a/app-editors/scite/scite-5.1.3.ebuild b/app-editors/scite/scite-5.1.3.ebuild
32 new file mode 100644
33 index 00000000000..d206fb1266d
34 --- /dev/null
35 +++ b/app-editors/scite/scite-5.1.3.ebuild
36 @@ -0,0 +1,115 @@
37 +# Copyright 1999-2021 Gentoo Authors
38 +# Distributed under the terms of the GNU General Public License v2
39 +
40 +EAPI=8
41 +
42 +LUA_COMPAT=( lua5-1 )
43 +
44 +inherit lua-single toolchain-funcs xdg
45 +
46 +DESCRIPTION="A very powerful, highly configurable, small editor with syntax coloring"
47 +HOMEPAGE="https://www.scintilla.org/SciTE.html"
48 +SRC_URI="https://www.scintilla.org/${PN}${PV//./}.tgz -> ${P}.tgz"
49 +
50 +LICENSE="HPND lua? ( MIT )"
51 +SLOT="0"
52 +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
53 +IUSE="lua"
54 +
55 +REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
56 +
57 +RDEPEND="
58 + dev-libs/atk
59 + dev-libs/glib:2
60 + x11-libs/cairo
61 + x11-libs/gdk-pixbuf:2
62 + x11-libs/gtk+:3
63 + x11-libs/pango
64 + lua? ( ${LUA_DEPS} )"
65 +
66 +DEPEND="${RDEPEND}"
67 +
68 +BDEPEND="
69 + virtual/pkgconfig"
70 +
71 +DOCS=("../README")
72 +
73 +S="${WORKDIR}/${PN}/gtk"
74 +
75 +pkg_pretend() {
76 + if tc-is-clang ; then
77 + # need c++17 features
78 + [[ "${MERGE_TYPE}" != "binary" &&
79 + $(clang-major-version) -lt 5 ]] &&
80 + die "Sorry, SCiTE uses C++17 Features and needs >sys-devel/clang-5
81 + ($(clang-major-version))."
82 +
83 + elif tc-is-gcc; then
84 + # older gcc is not supported
85 + [[ "${MERGE_TYPE}" != "binary" &&
86 + $(gcc-major-version) -lt 7 ]] &&
87 + die "Sorry, Scite uses C++17 Features, need >sys-devel/gcc-7."
88 + else
89 + die "Either gcc or clang should be configured for building scite"
90 + fi
91 +}
92 +
93 +pkg_setup() {
94 + use lua && lua-single_pkg_setup
95 +}
96 +
97 +src_prepare() {
98 + tc-export AR CC CXX RANLIB
99 +
100 + # remove hardcoded CC, Optimizations and clang unknown flags
101 + sed -i "${WORKDIR}/scintilla/gtk/makefile" \
102 + -e "s#^CC = gcc#CC = ${CC}#" \
103 + -e "s#^CC = clang#CC = ${CC}#" \
104 + -e "s#^CXX = clang++#CXX = ${CXX}#" \
105 + -e "s#-Os##" \
106 + -e "s#-Wno-misleading-indentation##" \
107 + || die "error patching /scintilla/gtk/makefile"
108 +
109 + sed -i "${S}/makefile" \
110 + -e "s#^CC = clang#CC = ${CC}#" \
111 + -e "s#^CXX = clang++#CXX = ${CXX}#" \
112 + -e "s#-rdynamic#-rdynamic ${LDFLAGS}#" \
113 + -e "s#-Os##" \
114 + || die "error patching gtk/makefile"
115 +
116 + # repair and enhance the .desktop file
117 + sed -i "${S}/SciTE.desktop" \
118 + -e "s#text/plain#text/\*;application/xhtml+xml#" \
119 + -e "s#^Categories=\(.*\)#Categories=Development;#" \
120 + || die "error patching /scite/gtk/SciTe.desktop"
121 +
122 + # add the ebuild suffix as shell type for working with ebuilds
123 + sed -i "${WORKDIR}/scite/src/perl.properties" \
124 + -e "s#\*.sh;\*.bsh;#\*.ebuild;\*.sh;\*.bsh;#" \
125 + || die "error patching /scite/src/perl.properties"
126 +
127 + # it seems that pwd here is ${S}, but user patches are relative to ${workdir}
128 + # Bug #576162
129 +
130 + cd "${WORKDIR}" || die "couldn't cd into ${WORKDIR}"
131 + eapply_user
132 +}
133 +
134 +src_compile() {
135 + # prepare make options
136 + local emake_pars=("GTK3=1")
137 +
138 + tc-is-clang && emake_pars+=("CLANG=1")
139 + use !lua && emake_pars+=("NO_LUA=1")
140 +
141 + emake -C "${WORKDIR}/lexilla/src" "${emake_pars[@]}"
142 + emake -C "${WORKDIR}/scintilla/gtk" "${emake_pars[@]}"
143 + emake "${emake_pars[@]}"
144 +}
145 +
146 +# want to use the base src_install() as base_src_install()
147 +
148 +src_install() {
149 + default
150 + dosym SciTE /usr/bin/scite
151 +}