summaryrefslogtreecommitdiff
path: root/scite-fedora/scite.spec
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-04-04 17:07:01 -0400
committerB. Stack <bgstack15@gmail.com>2022-04-04 17:07:01 -0400
commite034b3b92a49fe23f9b8e19b9d41448c8e32a991 (patch)
tree82b1c1bd8d6b09b8b799dbdc89f6b91e256f32f7 /scite-fedora/scite.spec
parentMerge branch 'veracrypt-bump' into 'master' (diff)
downloadstackrpms-e034b3b92a49fe23f9b8e19b9d41448c8e32a991.tar.gz
stackrpms-e034b3b92a49fe23f9b8e19b9d41448c8e32a991.tar.bz2
stackrpms-e034b3b92a49fe23f9b8e19b9d41448c8e32a991.zip
scite 5.2.2 with emitunicode patch, for fedora
Diffstat (limited to 'scite-fedora/scite.spec')
-rw-r--r--scite-fedora/scite.spec107
1 files changed, 74 insertions, 33 deletions
diff --git a/scite-fedora/scite.spec b/scite-fedora/scite.spec
index 1b6a692..fe90350 100644
--- a/scite-fedora/scite.spec
+++ b/scite-fedora/scite.spec
@@ -1,14 +1,41 @@
-# el is on 3.x, fc is on 5.x
-%global pkgversion 5.2.1
+# Tunables
+# el7 is on 3.x, el8/fc is on 5.x
+%global pkgversion 5.2.2
+# Use lua
+%define with_lua 1
+# Use bundled lua. If 0, then use distro lua
+%define with_bundled_lua 0
+# Add my emitUnicode lua script
+%define with_emitunicode 1
+# Choose GTK=2 or GTK=3. El6 is hardcoded to 2.
+%define gtk_ 3
+
+# Calculated or derived flags. Do not mess with these.
%define tarballversion %( echo %pkgversion | tr -d '.' )
+%define luaflag NO_LUA=1
+%if 0%{with_lua}
+%define luaflag %nil
+%endif
+%define gtkflag GTK3=1
+%if 0%{gtk_} == 2
+%define gtkflag %nil
+%endif
+# Turn off lto for local builds but leave them on for copr
+%if !0%{?copr_username:1}
+%global _lto_cflags %nil
+%endif
%global __brp_check_rpaths %{nil}
-
%define scl_env %{nil}
%define scl_buildreq coreutils
%if 0%{?el6}
%define scl_env devtoolset-7
%define scl_buildreq devtoolset-7-toolchain
+ %define gtk_ 2
%endif
+%global all_build_flags '%{?_smp_mflags} LDFLAGS="%{?__global_ldflags} -shared -dynamiclib" \
+ CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" %{gtkflag} DEBUG=1 %{luaflag} libdir=%{_libdir}'
+# Just for vim:
+#'
Name: scite
Version: %{pkgversion}
@@ -20,15 +47,26 @@ Url: http://www.scintilla.org/SciTE.html
Packager: B. Stack <bgstack15@gmail.com>
Source0: https://www.scintilla.org/scite%{tarballversion}.tgz
+%if 0%{with_emitunicode}
+Source1: emitUnicode.lua
+%endif
Patch0: scite-utf8.patch
+Patch1: add-emitUnicode.patch
+%if 0%{with_lua} && !0%{with_bundled_lua}
+Patch2: use-lua5.4.4.patch
+%endif
BuildRequires: desktop-file-utils
BuildRequires: gcc-c++
BuildRequires: %{scl_buildreq}
-%if !0%{?el6}
+%if 0%{gtk_} == 3
BuildRequires: gtk3-devel
-%endif
+%else
BuildRequires: gtk2-devel
+%endif
+%if 0%{with_lua} && !0%{with_bundled_lua}
+BuildRequires: lua-devel
+%endif
Provides: bundled(scintilla) = %{version}
@@ -38,41 +76,37 @@ Scintilla, it has grown to be a generally useful editor with facilities for
building and running programs.
%prep
+echo "USING gtkflag=\"%{gtkflag}\""
%setup -q -c
%patch0
+%if !0%{with_lua}
#remove bundled lua
rm -rf scite/lua
+%else
+%if !0%{with_bundled_lua}
+# Use distro lua
+rm -rf scite/lua
+%patch2 -p1
+%endif
+%endif
+%patch1 -p1
%build
-
-%if 0%{?el6}
- %if "%{?scl_env}" != ""
- scl enable %{scl_env} /bin/bash <<'EOFSCL'
- %endif
- make %{?_smp_mflags} LDFLAGS="%{?__global_ldflags} -shared -dynamiclib" \
- CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" DEBUG=1 -C lexilla/src \
- libdir=%{_libdir}
- make %{?_smp_mflags} LDFLAGS="%{?__global_ldflags} -shared -dynamiclib" \
- CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" DEBUG=1 -C scintilla/gtk \
- libdir=%{_libdir}
- #Build without lua support
- make %{?_smp_mflags} LDFLAGS="%{?__global_ldflags}" \
- CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" DEBUG=1 NO_LUA=1 -C scite/gtk \
- libdir=%{_libdir}
- %if "%{?scl_env}" != ""
+%if "%{?scl_env}" != ""
+ scl enable %{scl_env} /bin/bash <<'EOFSCL'
+%endif
+make %{?_smp_mflags} LDFLAGS="%{?__global_ldflags} -shared -dynamiclib" \
+ CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" %{gtkflag} DEBUG=1 %{luaflag} -C lexilla/src \
+ libdir=%{_libdir}
+make %{?_smp_mflags} LDFLAGS="%{?__global_ldflags} -shared -dynamiclib" \
+ CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" %{gtkflag} DEBUG=1 %{luaflag} -C scintilla/gtk \
+ libdir=%{_libdir}
+#Build without lua support
+make %{?_smp_mflags} LDFLAGS="%{?__global_ldflags}" \
+ CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" %{gtkflag} DEBUG=1 %{luaflag} -C scite/gtk \
+ libdir=%{_libdir}
+%if "%{?scl_env}" != ""
EOFSCL
- %endif
-%else
- make %{?_smp_mflags} LDFLAGS="%{?__global_ldflags} -shared -dynamiclib" \
- CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" GTK3=1 DEBUG=1 -C lexilla/src \
- libdir=%{_libdir}
- make %{?_smp_mflags} LDFLAGS="%{?__global_ldflags} -shared -dynamiclib" \
- CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" GTK3=1 DEBUG=1 -C scintilla/gtk \
- libdir=%{_libdir}
- #Build without lua support
- make %{?_smp_mflags} LDFLAGS="%{?__global_ldflags}" \
- CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" GTK3=1 DEBUG=1 NO_LUA=1 -C scite/gtk \
- libdir=%{_libdir}
%endif
%install
@@ -88,6 +122,9 @@ desktop-file-install --delete-original \
--remove-key Encoding \
%{buildroot}%{_datadir}/applications/SciTE.desktop
+%if 0%{with_emitunicode}
+install -D -p -m 644 %{SOURCE1} %{buildroot}%{_datadir}/scite/emitUnicode.lua
+%endif
%if 0%{?fedora}
%posttrans
/usr/bin/update-desktop-database &> /dev/null || :
@@ -110,6 +147,10 @@ desktop-file-install --delete-original \
%{_libdir}/*
%changelog
+* Mon Apr 04 2022 B. Stack <bgstack15@gmail.com> - 5.2.2-1/3.7.6-1
+- Update version
+- Add tunables: gtk, lua, bundled lua, add emitunicode
+
* Thu Mar 24 2022 B. Stack <bgstack15@gmail.com> - 5.2.1-1/3.7.6-1
- Update version
bgstack15