[arch-commits] Commit in (6 files)
Balló György
bgyorgy at archlinux.org
Wed Jul 15 13:10:11 UTC 2020
Date: Wednesday, July 15, 2020 @ 13:10:10
Author: bgyorgy
Revision: 663964
Move scite from AUR with 17 votes
Added:
scite/
scite/trunk/
scite/trunk/PKGBUILD
scite/trunk/SciTE.appdata.xml
scite/trunk/hardening_flags.patch
scite/trunk/load_so_from_library_path.patch
---------------------------------+
PKGBUILD | 45 +++++++++++++++++++++++
SciTE.appdata.xml | 21 ++++++++++
hardening_flags.patch | 58 +++++++++++++++++++++++++++++
load_so_from_library_path.patch | 74 ++++++++++++++++++++++++++++++++++++++
4 files changed, 198 insertions(+)
Added: scite/trunk/PKGBUILD
===================================================================
--- scite/trunk/PKGBUILD (rev 0)
+++ scite/trunk/PKGBUILD 2020-07-15 13:10:10 UTC (rev 663964)
@@ -0,0 +1,45 @@
+# Maintainer: Balló György <ballogyor+arch at gmail dot com>
+# Contributor: Lex Black <autumn-wind at web.de>
+# Contributor: Alexander F Rødseth <xyproto at archlinux.org>
+# Contributor: Thomas S Hatch <thatch45 at gmail.com>
+# Contributor: Corrado 'bardo' Primier <corrado.primier at mail.polimi.it>
+# Contributor: Jochem Kossen <j.kossen at home.nl>
+# Contributor: Daniel J Griffiths <ghost1227 at archlinux.us>
+
+pkgname=scite
+pkgver=4.4.3
+pkgrel=3
+pkgdesc='Editor with facilities for building and running programs'
+arch=(x86_64)
+url='https://www.scintilla.org/SciTE.html'
+license=('custom:HPND')
+depends=(gtk3)
+backup=(usr/share/scite/SciTEGlobal.properties)
+source=(https://www.scintilla.org/${pkgname}${pkgver//./}.tgz
+ load_so_from_library_path.patch
+ hardening_flags.patch
+ SciTE.appdata.xml)
+sha256sums=('05e53ccb1219753b9c73b0c1b83b6e2868a8c0c91d8785db2a5f8f9c41ed7d3f'
+ 'f2cbc239a1fb166d411a817ad7964d06b72111fc51b5ef56795275a62ead3681'
+ '8d18bef06a73d0a081659119094c6f1b2582bfc3e3ae0c55210b083820d7a514'
+ '04a33885833024a450c295d384f833bbc60894d57615de2a6f89db32d3ba942d')
+
+prepare() {
+ patch -Np1 -i load_so_from_library_path.patch
+ patch -Np1 -i hardening_flags.patch
+ sed -i 's|pixmapdir=$(datadir)/pixmaps|pixmapdir=$(datadir)/icons/hicolor/48x48/apps|
+ s|pixmapdir)/Sci48M.png|pixmapdir)/SciTE.png|' scite/gtk/makefile
+ sed -i 's/Sci48M/SciTE/' scite/gtk/{SciTEGTK.cxx,SciTE.desktop}
+}
+
+build() {
+ GTK3=1 make -C scintilla/gtk
+ GTK3=1 make -C scite/gtk
+}
+
+package() {
+ GTK3=1 make -C scite/gtk DESTDIR="$pkgdir" install
+ install -Dm644 scite/License.txt "$pkgdir/usr/share/licenses/$pkgname/License.txt"
+ install -Dm644 SciTE.appdata.xml "$pkgdir/usr/share/metainfo/SciTE.appdata.xml"
+ ln -sf /usr/bin/SciTE "$pkgdir/usr/bin/scite"
+}
Added: scite/trunk/SciTE.appdata.xml
===================================================================
--- scite/trunk/SciTE.appdata.xml (rev 0)
+++ scite/trunk/SciTE.appdata.xml 2020-07-15 13:10:10 UTC (rev 663964)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component type="desktop-application">
+ <id>org.scintilla.SciTE</id>
+ <launchable type="desktop-id">SciTE.desktop</launchable>
+ <name>SciTE</name>
+ <summary>Edit your source files</summary>
+ <metadata_license>CC0-1.0</metadata_license>
+ <project_license>HPND</project_license>
+ <description>
+ <p>
+ SciTE is a SCIntilla based Text Editor. Originally built to demonstrate Scintilla, it has grown to be a generally useful editor with facilities for building and running programs. It is best used for jobs with simple configurations.
+ </p>
+ </description>
+ <screenshots>
+ <screenshot type="default">
+ <image>https://www.scintilla.org/SciTE224.png</image>
+ </screenshot>
+ </screenshots>
+ <url type="bugtracker">https://sourceforge.net/p/scintilla/bugs/</url>
+ <url type="homepage">https://scintilla.org/SciTE.html</url>
+</component>
Added: scite/trunk/hardening_flags.patch
===================================================================
--- scite/trunk/hardening_flags.patch (rev 0)
+++ scite/trunk/hardening_flags.patch 2020-07-15 13:10:10 UTC (rev 663964)
@@ -0,0 +1,58 @@
+From: Antonio Valentino <antonio.valentino at tiscali.it>
+Date: Sat, 14 Apr 2018 17:39:34 +0000
+Subject: Use CPPFLAGS/CXXFAGS/LDFLAGS in the makefiles to enable all
+ hardening flags
+
+===================================================================
+---
+ scintilla/gtk/makefile | 4 ++--
+ scite/gtk/makefile | 6 +++---
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/scintilla/gtk/makefile b/scintilla/gtk/makefile
+index 00f9025..0a882d2 100644
+--- a/scintilla/gtk/makefile
++++ b/scintilla/gtk/makefile
+@@ -89,9 +89,9 @@ clean:
+ $(DEL) *.o $(call normalize,$(COMPLIB)) *.plist
+
+ %.o: %.cxx
+- $(CXX) $(CXX_ALL_FLAGS) $(CXXFLAGS) -c $<
++ $(CXX) $(CPPFLAGS) $(CXX_ALL_FLAGS) $(CXXFLAGS) -c $<
+ %.o: %.c
+- $(CC) $(DEFINES) $(INCLUDES) $(CONFIG_FLAGS) $(BASE_FLAGS) $(CFLAGS) -w -c $<
++ $(CC) $(CPPFLAGS) $(DEFINES) $(INCLUDES) $(CONFIG_FLAGS) $(BASE_FLAGS) $(CFLAGS) -w -c $<
+
+ GLIB_GENMARSHAL = glib-genmarshal
+ GLIB_GENMARSHAL_FLAGS = --prefix=scintilla_marshal
+diff --git a/scite/gtk/makefile b/scite/gtk/makefile
+index 28c1ee1..33001a7 100644
+--- a/scite/gtk/makefile
++++ b/scite/gtk/makefile
+@@ -79,7 +79,7 @@ INCLUDES += -I$(srcdir)/../lua/src
+ LUA_DEFINES = -DLUA_USE_POSIX -DLUA_USE_DLOPEN
+
+ %.o: %.c
+- $(CC) $(DEFINES) $(INCLUDES) $(WARNINGS) $(LUA_DEFINES) $(BASE_FLAGS) $(CFLAGS) -c $< -o $@
++ $(CC) $(CPPFLAGS) $(DEFINES) $(INCLUDES) $(WARNINGS) $(LUA_DEFINES) $(BASE_FLAGS) $(CFLAGS) -c $< -o $@
+
+ else
+ DEFINES += -DNO_LUA
+@@ -96,7 +96,7 @@ LIBS += -ldl
+ endif
+
+ %.o: %.cxx
+- $(CXX) --std=c++17 $(DEFINES) $(INCLUDES) $(WARNINGS) $(CONFIGFLAGS) $(BASE_FLAGS) $(CXXFLAGS) -c $< -o $@
++ $(CXX) $(CPPFLAGS) --std=c++17 $(DEFINES) $(INCLUDES) $(WARNINGS) $(CONFIGFLAGS) $(BASE_FLAGS) $(CXXFLAGS) -c $< -o $@
+
+ clean:
+ rm -f *.o *.plist $(PROG)
+@@ -143,7 +143,7 @@ SRC_OBJS = \
+ Utf8_16.o
+
+ $(PROG): SciTEGTK.o GUIGTK.o Widget.o DirectorExtension.o $(SRC_OBJS) $(LUA_OBJS)
+- $(CXX) $(BASE_FLAGS) -rdynamic -Wl,--as-needed -Wl,-rpath,'$${ORIGIN}' -Wl,--version-script $(srcdir)/lua.vers -Wl,-rpath,$(libdir) $^ -o $@ $(CONFIGLIB) $(LIBS) -L ../../scintilla/bin -lscintilla $(LDLIBS)
++ $(CXX) $(BASE_FLAGS) $(LDFLAGS) -rdynamic -Wl,--as-needed -Wl,-rpath,'$${ORIGIN}' -Wl,--version-script $(srcdir)/lua.vers -Wl,-rpath,$(libdir) $^ -o $@ $(CONFIGLIB) $(LIBS) -L ../../scintilla/bin -lscintilla $(LDLIBS)
+
+ # Automatically generate header dependencies with "make deps"
+ include deps.mak
Added: scite/trunk/load_so_from_library_path.patch
===================================================================
--- scite/trunk/load_so_from_library_path.patch (rev 0)
+++ scite/trunk/load_so_from_library_path.patch 2020-07-15 13:10:10 UTC (rev 663964)
@@ -0,0 +1,74 @@
+diff -r d1b44eea341b gtk/SciTEGTK.cxx
+--- a/scite/gtk/SciTEGTK.cxx Sat Jun 06 20:55:49 2020 +1000
++++ b/scite/gtk/SciTEGTK.cxx Mon Jun 08 12:02:44 2020 +1000
+@@ -5463,7 +5463,6 @@
+ executableDirectory = FilePath(selfExe).Directory();
+ }
+ #endif
+- LexillaSetDefaultDirectory(executableDirectory.AsInternal());
+
+ // Get this now because gtk_init() clears it
+ const gchar *startup_id = g_getenv("DESKTOP_STARTUP_ID");
+diff -r d1b44eea341b gtk/makefile
+--- a/scite/gtk/makefile Sat Jun 06 20:55:49 2020 +1000
++++ b/scite/gtk/makefile Mon Jun 08 12:02:44 2020 +1000
+@@ -45,6 +45,7 @@
+ datadir=$(prefix)/share
+ pixmapdir=$(datadir)/pixmaps
+ bindir=$(prefix)/bin
++libdir=$(prefix)/lib/scite
+ SYSCONF_PATH=$(prefix)/share/scite
+
+ INSTALL=install
+@@ -149,7 +150,7 @@
+ Utf8_16.o
+
+ $(PROG): SciTEGTK.o GUIGTK.o Widget.o DirectorExtension.o $(SRC_OBJS) $(LUA_OBJS)
+- $(CXX) $(BASE_FLAGS) -rdynamic -Wl,--as-needed -Wl,-rpath,'$${ORIGIN}' -Wl,--version-script $(srcdir)/lua.vers $^ -o $@ $(CONFIGLIB) $(LIBS) -L ../../scintilla/bin -lscintilla $(LDLIBS)
++ $(CXX) $(BASE_FLAGS) -rdynamic -Wl,--as-needed -Wl,-rpath,'$${ORIGIN}' -Wl,--version-script $(srcdir)/lua.vers -Wl,-rpath,$(libdir) $^ -o $@ $(CONFIGLIB) $(LIBS) -L ../../scintilla/bin -lscintilla $(LDLIBS)
+
+ # Automatically generate header dependencies with "make deps"
+ include deps.mak
+@@ -159,10 +160,11 @@
+ # Dead: install -D SciTEGTK.properties $(SYSCONF_PATH)/SciTEGlobal.properties
+ install:
+ $(INSTALL) -m 755 -d $(DESTDIR)$(bindir) $(DESTDIR)$(SYSCONF_PATH)
++ $(INSTALL) -m 755 -d $(DESTDIR)$(libdir)
+
+ $(INSTALL) -m 755 $(PROG) $(DESTDIR)$(bindir)
+- $(INSTALL) -m 755 $(COMPONENT) $(DESTDIR)$(bindir)
+- $(INSTALL) -m 755 $(LEXILLA) $(DESTDIR)$(bindir)
++ $(INSTALL) -m 755 $(COMPONENT) $(DESTDIR)$(libdir)
++ $(INSTALL) -m 755 $(LEXILLA) $(DESTDIR)$(libdir)
+
+ for files in $(srcdir)/../src/*.properties $(srcdir)/../doc/*.html $(srcdir)/../doc/SciTEIco.png $(srcdir)/../doc/PrintHi.png $(srcdir)/../doc/SciTEIndicators.png; \
+ do \
+@@ -177,8 +179,8 @@
+
+ uninstall:
+ rm -f $(DESTDIR)$(bindir)/SciTE
+- rm -f $(DESTDIR)$(bindir)/libscintilla.so
+- rm -f $(DESTDIR)$(bindir)/liblexilla.so
++ rm -f $(DESTDIR)$(libdir)/libscintilla.so
++ rm -f $(DESTDIR)$(libdir)/liblexilla.so
+ rm -rf $(DESTDIR)$(SYSCONF_PATH)
+ ifdef gnomeprefix
+ rm -f $(DESTDIR)$(datadir)/applications/SciTE.desktop
+diff -r d1b44eea341b src/LexillaLibrary.cxx
+--- a/scite/src/LexillaLibrary.cxx Sat Jun 06 20:55:49 2020 +1000
++++ b/scite/src/LexillaLibrary.cxx Mon Jun 08 12:02:44 2020 +1000
+@@ -122,8 +122,12 @@
+ paths.remove_prefix(separator + 1);
+ }
+ if (path == ".") {
+- path = directoryLoadDefault;
+- path += pathSeparator;
++ if (directoryLoadDefault.empty()) {
++ path = "";
++ } else {
++ path = directoryLoadDefault;
++ path += pathSeparator;
++ }
+ path += defaultName;
+ }
+ if (!NameContainsDot(path)) {
More information about the arch-commits
mailing list