1 |
commit: 944c2547a0ac1729be6ecdf9d1af0e2d09cce038 |
2 |
Author: Ervin Peters <coder <AT> ervnet <DOT> de> |
3 |
AuthorDate: Sat Sep 4 07:15:31 2021 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 10 07:22:23 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=944c2547 |
7 |
|
8 |
app-editors/scite: version bump to 5.1.1 |
9 |
|
10 |
Upstream Bugfixes extracted lexer lib, |
11 |
compatible with gcc-11 (bug #786447) |
12 |
|
13 |
Bug: https://bugs.gentoo.org/786447 |
14 |
Signed-off-by: Ervin Peters <coder <AT> ervnet.de> |
15 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
16 |
Closes: https://github.com/gentoo/gentoo/pull/22211 |
17 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
18 |
|
19 |
app-editors/scite/Manifest | 1 + |
20 |
app-editors/scite/scite-5.1.1.ebuild | 124 +++++++++++++++++++++++++++++++++++ |
21 |
2 files changed, 125 insertions(+) |
22 |
|
23 |
diff --git a/app-editors/scite/Manifest b/app-editors/scite/Manifest |
24 |
index 23796f2da8a..f1e5139c084 100644 |
25 |
--- a/app-editors/scite/Manifest |
26 |
+++ b/app-editors/scite/Manifest |
27 |
@@ -1 +1,2 @@ |
28 |
DIST scite-4.4.4.tgz 2775628 BLAKE2B a7607b53bf529c56f6525d44b052a08c914d8aa1d90d475dcf46927ac5ce83c06d68b70e8d8e8969c77c367240ba1e7ac10d599c77002575e84b9baf6445d03b SHA512 1e8529286206d542e0c07353b73ab38aa9ee2e2256ed8e15328965e00a33eb026f79bd7d330253e8743cf5503fadb32c64162973ad21da16993f11e124842ec0 |
29 |
+DIST scite-5.1.1.tgz 3374717 BLAKE2B b7a45a86008eb592adacc8fde90cb637cc7cac821f339bb65920aaf912ee10d52badde3ed2e71118a7ce4690a0536b298c5fe5f673b886902ad4634b3a1ffaa6 SHA512 4d6c9b3ca4caed4fcb70a6b1c86a2ace13b023241f16d6faa01b3f692bcbfa14e0ce186bb08776ee0cf62768b2b77c4ffcae610ddbb6b04dcb7584fd8b3f27bb |
30 |
|
31 |
diff --git a/app-editors/scite/scite-5.1.1.ebuild b/app-editors/scite/scite-5.1.1.ebuild |
32 |
new file mode 100644 |
33 |
index 00000000000..e00df8c904a |
34 |
--- /dev/null |
35 |
+++ b/app-editors/scite/scite-5.1.1.ebuild |
36 |
@@ -0,0 +1,124 @@ |
37 |
+# Copyright 1999-2021 Gentoo Authors |
38 |
+# Distributed under the terms of the GNU General Public License v2 |
39 |
+ |
40 |
+EAPI=7 |
41 |
+ |
42 |
+LUA_COMPAT=( lua5-1 ) |
43 |
+ |
44 |
+inherit lua-single toolchain-funcs xdg-utils |
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/glib:2 |
59 |
+ x11-libs/cairo |
60 |
+ x11-libs/gdk-pixbuf |
61 |
+ x11-libs/gtk+:3 |
62 |
+ x11-libs/pango |
63 |
+ lua? ( ${LUA_DEPS} )" |
64 |
+ |
65 |
+DEPEND="${RDEPEND}" |
66 |
+ |
67 |
+BDEPEND=" |
68 |
+ virtual/pkgconfig" |
69 |
+ |
70 |
+DOCS=("../README") |
71 |
+ |
72 |
+S="${WORKDIR}/${PN}/gtk" |
73 |
+ |
74 |
+pkg_pretend() { |
75 |
+ if tc-is-clang ; then |
76 |
+ # need c++17 features |
77 |
+ [[ "${MERGE_TYPE}" != "binary" && |
78 |
+ $(clang-major-version) -lt 5 ]] && |
79 |
+ die "Sorry, SCiTE uses C++17 Features and needs >sys-devel/clang-5 |
80 |
+ ($(clang-major-version))." |
81 |
+ |
82 |
+ elif tc-is-gcc; then |
83 |
+ # older gcc is not supported |
84 |
+ [[ "${MERGE_TYPE}" != "binary" && |
85 |
+ $(gcc-major-version) -lt 7 ]] && |
86 |
+ die "Sorry, Scite uses C++17 Features, need >sys-devel/gcc-7." |
87 |
+ else |
88 |
+ die "Either gcc or clang should be configured for building scite" |
89 |
+ fi |
90 |
+} |
91 |
+ |
92 |
+pkg_setup() { |
93 |
+ use lua && lua-single_pkg_setup |
94 |
+} |
95 |
+ |
96 |
+src_prepare() { |
97 |
+ tc-export AR CC CXX RANLIB |
98 |
+ |
99 |
+ # remove hardcoded CC, Optimizations and clang unknown flags |
100 |
+ sed -i "${WORKDIR}/scintilla/gtk/makefile" \ |
101 |
+ -e "s#^CC = gcc#CC = ${CC}#" \ |
102 |
+ -e "s#^CC = clang#CC = ${CC}#" \ |
103 |
+ -e "s#^CXX = clang++#CXX = ${CXX}#" \ |
104 |
+ -e "s#-Os##" \ |
105 |
+ -e "s#-Wno-misleading-indentation##" \ |
106 |
+ || die "error patching /scintilla/gtk/makefile" |
107 |
+ |
108 |
+ sed -i "${S}/makefile" \ |
109 |
+ -e "s#^CC = clang#CC = ${CC}#" \ |
110 |
+ -e "s#^CXX = clang++#CXX = ${CXX}#" \ |
111 |
+ -e "s#-rdynamic#-rdynamic ${LDFLAGS}#" \ |
112 |
+ -e "s#-Os##" \ |
113 |
+ || die "error patching gtk/makefile" |
114 |
+ |
115 |
+ # repair and enhance the .desktop file |
116 |
+ sed -i "${S}/SciTE.desktop" \ |
117 |
+ -e "s#text/plain#text/\*;application/xhtml+xml#" \ |
118 |
+ -e "s#^Categories=\(.*\)#Categories=Development;#" \ |
119 |
+ || die "error patching /scite/gtk/SciTe.desktop" |
120 |
+ |
121 |
+ # add the ebuild suffix as shell type for working with ebuilds |
122 |
+ sed -i "${WORKDIR}/scite/src/perl.properties" \ |
123 |
+ -e "s#\*.sh;\*.bsh;#\*.ebuild;\*.sh;\*.bsh;#" \ |
124 |
+ || die "error patching /scite/src/perl.properties" |
125 |
+ |
126 |
+ # it seems that pwd here is ${S}, but user patches are relative to ${workdir} |
127 |
+ # Bug #576162 |
128 |
+ |
129 |
+ cd "${WORKDIR}" || die "couldn't cd into ${WORKDIR}" |
130 |
+ eapply_user |
131 |
+} |
132 |
+ |
133 |
+src_compile() { |
134 |
+ # prepare make options |
135 |
+ local emake_pars=("GTK3=1") |
136 |
+ |
137 |
+ tc-is-clang && emake_pars+=("CLANG=1") |
138 |
+ use !lua && emake_pars+=("NO_LUA=1") |
139 |
+ |
140 |
+ emake -C "${WORKDIR}/lexilla/src" "${emake_pars[@]}" |
141 |
+ emake -C "${WORKDIR}/scintilla/gtk" "${emake_pars[@]}" |
142 |
+ emake "${emake_pars[@]}" |
143 |
+} |
144 |
+ |
145 |
+# want to use the base src_install() as base_src_install() |
146 |
+ |
147 |
+src_install() { |
148 |
+ default |
149 |
+ dosym SciTE /usr/bin/scite |
150 |
+} |
151 |
+ |
152 |
+pkg_postinst() { |
153 |
+ xdg_icon_cache_update |
154 |
+ xdg_desktop_database_update |
155 |
+} |
156 |
+ |
157 |
+pkg_postrm() { |
158 |
+ xdg_icon_cache_update |
159 |
+ xdg_desktop_database_update |
160 |
+} |