summaryrefslogtreecommitdiff
path: root/app-editors/nedit
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-03-13 16:55:35 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-03-13 16:55:35 +0000
commit1dde4e5c4b92d849bf1abf0a48135b2a0644f7e1 (patch)
treec99a472cce74148d499f42ada873454b0e32a42d /app-editors/nedit
parentda6a52f691ef980bab92d003d5df8f463c623af8 (diff)
gentoo resync : 13.03.2018
Diffstat (limited to 'app-editors/nedit')
-rw-r--r--app-editors/nedit/Manifest4
-rw-r--r--app-editors/nedit/files/nedit-5.6-fix-crash-with-noX.patch118
-rw-r--r--app-editors/nedit/files/nedit-5.6-ldflags.patch4
-rw-r--r--app-editors/nedit/nedit-5.6-r2.ebuild76
4 files changed, 199 insertions, 3 deletions
diff --git a/app-editors/nedit/Manifest b/app-editors/nedit/Manifest
index 362f0c4c3602..d7aac0a872a6 100644
--- a/app-editors/nedit/Manifest
+++ b/app-editors/nedit/Manifest
@@ -1,8 +1,10 @@
AUX nedit-5.6-40_Pointer_to_Integer.patch 10379 BLAKE2B d7a855d17ca5744ec3d1a8f6b286911458236b452a98d36fe57e0779e17101786e7c52702dbc20f98b460f3b3ac05093823214adc99eb17399919d2361a60085 SHA512 263fd5109c5fc16ea8328ad7855b8ab74e6e744d89374d68bc7db495a3295888f3599d2e9d6653097b4f7b68bae968a5deb7240a565f8fa1beba451b8b1f1b55
+AUX nedit-5.6-fix-crash-with-noX.patch 4726 BLAKE2B 1378cd446adf148d5a69b772e790c6bbb052ce27c668c4b391f3f08081bc523368a6c4a63eae39c503b4f569c7f374c0b9c5303bf23505acb2f322dcc98f1121 SHA512 38a3292370482b295afa3eb7033061e2837819c519fa1d3215c4d69bdf11871ee193615ecec8a01a102da5e27e3098337db06ab296f3feffac53ed84d660bb90
AUX nedit-5.6-format.patch 453 BLAKE2B b8a226e93e2c1666caefb5032706d8ac08284af3e2a2658f794b4af6eaae18311db52ed01a49c368d050958e55ef2fbc0893ee3b8bc63418bce676c5c4d7aae1 SHA512 50e93d7f297ae0b10bec34176c707cc61d4c205e1293cb02b94f85359604864df8698bf35725f007b9c9eb585d0cf18c2498b6d7f55960fabb93b3d98bfe02b8
-AUX nedit-5.6-ldflags.patch 800 BLAKE2B 4fee6b83215739f6fe58347ff24b7ff0e29f0b340dc4f27e1aa7f5d05e4435e97fd3dc20beff4bead79f156133ec54d3709c58c6d70c11d8c2b1b6870ca941e9 SHA512 ebe6add4f5b73ffc33fe65ddbb085373109e150c8f246610de1bb3273042451959bde4a5ec675261f4da1c9853256314c0e78c972bc0c61e206d523b92adf29e
+AUX nedit-5.6-ldflags.patch 800 BLAKE2B ee06dcdd07f7d01c23c943e85382d33d316e85c364b1c3bc243ee3468078e8a47a770191389dd53a94d83b6e896e9dbe15b40d365aab4f3a8ef5c8705941ea9a SHA512 65818ef8b425414bf4c9f0bd9b71b56df5a6ef05f0e2914558733cbc7bbe435199e8c69c66b2f460964d1913bbc6fb8722a77d881ea4efa1be07f8fb55ad66e4
AUX nedit-5.6-security.patch 1944 BLAKE2B 8b3e21d074f274c5ba24f1888d9d13d71ac08f80c0e063a5e0e85794a1677c10f7d6d64298e0588a73e86af1d3dfdacb32a389a53ff7a4e408f9006006adc60e SHA512 437ff658c4ae4918fa73dee97773d9b8bf9b2dbfd4af3752ab3bdb735ded2508e449170e2aeea43d9bfbdb48e75d52154a847cb9a3a59e7f4b6ad0ec9027bfcd
DIST nedit-5.6a-src.tar.gz 1353454 BLAKE2B e3e8ed86b12a4c3673513b65c7ca08c11b22dcac4816287be680f112c5c8de0c59510f26605a7f288846fb4bb8c28dd958c534a52450a905f7639712d832e69a SHA512 4d4dcd661f67a4a40549f26774c0ffb90f9059d2e06b0db2becef6848273fe76b7b68fae42319c0badd3c637d96c8dae129b4d0dfa7adccc00ee76f9366e27d0
DIST nedit.png.xz 14000 BLAKE2B dd50757a52fe3a2c57490cd0783f323877dc23733acc28b2c303d73724b6b66ed73dc819827ea52b96410fd7264a991040f00d609070bd87945d406328567ca0 SHA512 69d5dbea98a5b4065e73cc5c846125c5059e3a50ee1fa3ec4ef99f8f868cf3729ffe73510729534289a91d1a54683b84b6a37bc640c60205be709732dfcb01e3
EBUILD nedit-5.6-r1.ebuild 1989 BLAKE2B 8d5cde4cb3ecd3a20db4ecc763a1a97db7ba9a86dbea7c5355d8c5c7056ef3afe7d90fb94f97dd4652b8d71a7163ef17346b71fdd0a1ad9dfaa966d5b2c8a203 SHA512 147d9308121e65466d22b9973f8d0ab69b0fca53769b51dce8da933a8a069e025cf1222f4ff5d03af3df71fd4c0a93def2f99c0b9402456e3903bce5ebf5dc3b
+EBUILD nedit-5.6-r2.ebuild 2037 BLAKE2B b881666c19e2d9aa63e219ad2a1a0d4d632470d80bbe74bbddfcbd7272a210882bc172e9499d61c77afd8fa63fa30f465fd9c7814c893e635ad0833adf05bb31 SHA512 ed954cd69acc1652f597d188c72c38f38e8ff0d06ede0f7b98c818b1c0a442c9e688a1ade3cb245ab3de907966c86210dd6b28528ddef448fc367c6d8aab20ed
MISC metadata.xml 292 BLAKE2B 10ee90c2d8d7cc7bdef834d511467fe8dc1bf90929caf19a919d2e428c6d42f432f996bddd4cf1e4f2fbee70621e85144a7458b70b8c139aac20e3f7f82a0710 SHA512 0c0cc8a66f8640a0239d6b971d6faf8ca3b5a50909306b47c02b6f5b401b71534e6965cec6cfb38a47bdb09cb871cd217f9316220b6d7ca2a1019b27bf2f7699
diff --git a/app-editors/nedit/files/nedit-5.6-fix-crash-with-noX.patch b/app-editors/nedit/files/nedit-5.6-fix-crash-with-noX.patch
new file mode 100644
index 000000000000..92b0778e2ab2
--- /dev/null
+++ b/app-editors/nedit/files/nedit-5.6-fix-crash-with-noX.patch
@@ -0,0 +1,118 @@
+diff -urN a/source/highlightData.c b/source/highlightData.c
+--- a/source/highlightData.c 2018-03-13 08:42:40.930188154 +0100
++++ b/source/highlightData.c 2018-03-13 08:44:59.651196431 +0100
+@@ -1280,7 +1280,7 @@
+ XFontStruct *font;
+
+ if (styleNo<0)
+- return GetDefaultFontStruct(window->fontList);
++ return GetDefaultFontStruct(TheDisplay, window->fontList);
+ fontNum = HighlightStyles[styleNo]->font;
+ if (fontNum == BOLD_FONT)
+ font = window->boldFontStruct;
+@@ -1289,10 +1289,10 @@
+ else if (fontNum == BOLD_ITALIC_FONT)
+ font = window->boldItalicFontStruct;
+ else /* fontNum == PLAIN_FONT */
+- font = GetDefaultFontStruct(window->fontList);
++ font = GetDefaultFontStruct(TheDisplay, window->fontList);
+
+ /* If font isn't loaded, silently substitute primary font */
+- return font == NULL ? GetDefaultFontStruct(window->fontList) : font;
++ return font == NULL ? GetDefaultFontStruct(TheDisplay, window->fontList) : font;
+ }
+
+ int FontOfNamedStyleIsBold(char *styleName)
+diff -urN a/source/text.c b/source/text.c
+--- a/source/text.c 2018-03-13 08:42:40.931188154 +0100
++++ b/source/text.c 2018-03-13 08:46:37.785202286 +0100
+@@ -778,9 +778,13 @@
+ textBuffer *buf;
+ Pixel white, black;
+ int textLeft;
+- int charWidth = fs->max_bounds.width;
+- int marginWidth = new->text.marginWidth;
+- int lineNumCols = new->text.lineNumCols;
++ int charWidth;
++ int marginWidth;
++ int lineNumCols;
++
++ charWidth = fs->max_bounds.width;
++ marginWidth = new->text.marginWidth;
++ lineNumCols = new->text.lineNumCols;
+
+ /* Set the initial window size based on the rows and columns resources */
+ if (request->core.width == 0)
+diff -urN a/source/window.c b/source/window.c
+--- a/source/window.c 2018-03-13 08:42:40.937188155 +0100
++++ b/source/window.c 2018-03-13 08:48:07.727207652 +0100
+@@ -1839,7 +1839,7 @@
+
+ /* Change the primary font in all the widgets */
+ if (primaryChanged) {
+- font = GetDefaultFontStruct(window->fontList);
++ font = GetDefaultFontStruct(TheDisplay, window->fontList);
+ XtVaSetValues(window->textArea, textNfont, font, NULL);
+ for (i=0; i<window->nPanes; i++)
+ XtVaSetValues(window->textPanes[i], textNfont, font, NULL);
+@@ -1861,7 +1861,7 @@
+ size appropriate for the new font, but only do so if there's only
+ _one_ document in the window, in order to avoid growing-window bug */
+ if (NDocuments(window) == 1) {
+- fontWidth = GetDefaultFontStruct(window->fontList)->max_bounds.width;
++ fontWidth = GetDefaultFontStruct(TheDisplay, window->fontList)->max_bounds.width;
+ fontHeight = textD->ascent + textD->descent;
+ newWindowWidth = (oldTextWidth*fontWidth) / oldFontWidth + borderWidth;
+ newWindowHeight = (oldTextHeight*fontHeight) / oldFontHeight +
+@@ -2244,7 +2244,7 @@
+ textNrows, rows, textNcolumns, cols,
+ textNlineNumCols, lineNumCols,
+ textNemulateTabs, emTabDist,
+- textNfont, GetDefaultFontStruct(window->fontList),
++ textNfont, GetDefaultFontStruct(TheDisplay, window->fontList),
+ textNhScrollBar, hScrollBar, textNvScrollBar, vScrollBar,
+ textNreadOnly, IS_ANY_LOCKED(window->lockReasons),
+ textNwordDelimiters, delimiters,
+
+--- a/util/misc.c 2018-03-13 08:50:54.892217626 +0100
++++ b/util/misc.c 2018-03-13 08:56:50.346238834 +0100
+@@ -1018,7 +1018,7 @@
+ ** a Motif font list. Since Motif stores this, it saves us from storing
+ ** it or querying it from the X server.
+ */
+-XFontStruct *GetDefaultFontStruct(XmFontList font)
++XFontStruct *GetDefaultFontStruct(Display *d, XmFontList font)
+ {
+ XFontStruct *fs;
+ XmFontContext context;
+@@ -1028,6 +1028,17 @@
+ XmFontListGetNextFont(context, &charset, &fs);
+ XmFontListFreeFontContext(context);
+ XtFree(charset);
++
++ /* FontList might be a render table with no only XFT fonts */
++ if (fs == NULL) {
++ fs = XLoadQueryFont(d, "fixed");
++ }
++
++ if (fs == NULL) {
++ fprintf(stderr, "Unabled to load any fallback fonts.\n");
++ exit(EXIT_FAILURE);
++ }
++
+ return fs;
+ }
+
+diff -urN a/util/misc.h b/util/misc.h
+--- a/util/misc.h 2018-03-13 08:50:54.890217626 +0100
++++ b/util/misc.h 2018-03-13 08:55:52.790235400 +0100
+@@ -65,7 +65,7 @@
+ void AccelLockBugPatch(Widget topWidget, Widget topMenuContainer);
+ void UpdateAccelLockPatch(Widget topWidget, Widget newButton);
+ char *GetXmStringText(XmString fromString);
+-XFontStruct *GetDefaultFontStruct(XmFontList font);
++XFontStruct *GetDefaultFontStruct(Display *d, XmFontList font);
+ XmString* StringTable(int count, ...);
+ void FreeStringTable(XmString *table);
+ void SimulateButtonPress(Widget widget);
+
diff --git a/app-editors/nedit/files/nedit-5.6-ldflags.patch b/app-editors/nedit/files/nedit-5.6-ldflags.patch
index 4532c6251894..a549b02490c0 100644
--- a/app-editors/nedit/files/nedit-5.6-ldflags.patch
+++ b/app-editors/nedit/files/nedit-5.6-ldflags.patch
@@ -1,5 +1,5 @@
---- source/Makefile.common 2004-03-21 15:25:56.000000000 +0100
-+++ source/Makefile.common.new 2009-10-24 10:47:03.667835157 +0200
+--- a/source/Makefile.common 2004-03-21 15:25:56.000000000 +0100
++++ b/source/Makefile.common 2009-10-24 10:47:03.667835157 +0200
@@ -21,12 +21,12 @@
# we only want natural rebuilds to regenerate the link date.
nedit: $(OBJS) ../util/libNUtil.a $(XMLLIB) $(XLTLIB)
diff --git a/app-editors/nedit/nedit-5.6-r2.ebuild b/app-editors/nedit/nedit-5.6-r2.ebuild
new file mode 100644
index 000000000000..a37c9fcd64a5
--- /dev/null
+++ b/app-editors/nedit/nedit-5.6-r2.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit desktop toolchain-funcs
+
+DESCRIPTION="Multi-purpose text editor for the X Window System"
+HOMEPAGE="https://sourceforge.net/projects/nedit"
+SRC_URI="
+ https://downloads.sourceforge.net/project/${PN}/${PN}-source/${P}a-src.tar.gz
+ https://dev.gentoo.org/~jlec/distfiles/${PN}.png.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~mips ~ppc ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+
+RDEPEND=">=x11-libs/motif-2.3:0
+ x11-libs/libXt
+ x11-libs/libX11"
+DEPEND="${RDEPEND}
+ || ( dev-util/yacc sys-devel/bison )
+ dev-lang/perl"
+
+S="${WORKDIR}/${PN}-${PV}"
+
+PATCHES=( "${FILESDIR}/${P}-format.patch"
+ "${FILESDIR}/${P}-ldflags.patch"
+ "${FILESDIR}/${P}-40_Pointer_to_Integer.patch"
+ "${FILESDIR}/${P}-security.patch"
+ "${FILESDIR}/${P}-fix-crash-with-noX.patch"
+)
+
+src_prepare() {
+ #respecting LDFLAGS, bug #208189
+ default
+ sed \
+ -e "s:bin/:${EPREFIX}/bin/:g" \
+ -i Makefile source/preferences.c source/help_data.h source/nedit.c Xlt/Makefile || die
+ sed \
+ -e "s:nc:neditc:g" -i doc/nc.pod || die
+ sed -i -e "s:CFLAGS=-O:CFLAGS=${CFLAGS}:" -e "s:check_tif_rule::" \
+ makefiles/Makefile.linux || die
+ sed -i -e "s:CFLAGS=-O:CFLAGS=${CFLAGS}:" \
+ -e "s:MOTIFDIR=/usr/local:MOTIFDIR=${EPREFIX}/usr:" \
+ -e "s:-lX11:-lX11 -lXmu -liconv:" \
+ -e "s:check_tif_rule::" \
+ makefiles/Makefile.macosx || die
+}
+
+src_compile() {
+ case "${CHOST}" in
+ *-darwin*)
+ emake CC="$(tc-getCC)" AR="$(tc-getAR)" macosx
+ ;;
+ *-linux*)
+ emake CC="$(tc-getCC)" AR="$(tc-getAR)" linux
+ ;;
+ esac
+ emake VERSION="NEdit ${PV}" -C doc all
+}
+
+src_install() {
+ dobin source/nedit
+ newbin source/nc neditc
+
+ make_desktop_entry "${PN}"
+ doicon "${WORKDIR}/${PN}.png"
+
+ newman doc/nedit.man nedit.1
+ newman doc/nc.man neditc.1
+
+ dodoc README ReleaseNotes ChangeLog
+ dodoc doc/nedit.doc doc/NEdit.ad doc/faq.txt
+ dohtml doc/nedit.html
+}