summaryrefslogtreecommitdiff
path: root/app-editors/nedit
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-editors/nedit
reinit the tree, so we can have metadata
Diffstat (limited to 'app-editors/nedit')
-rw-r--r--app-editors/nedit/Manifest10
-rw-r--r--app-editors/nedit/files/nedit-5.6-40_Pointer_to_Integer.patch261
-rw-r--r--app-editors/nedit/files/nedit-5.6-format.patch12
-rw-r--r--app-editors/nedit/files/nedit-5.6-ldflags.patch17
-rw-r--r--app-editors/nedit/files/nedit-5.6-security.patch63
-rw-r--r--app-editors/nedit/metadata.xml10
-rw-r--r--app-editors/nedit/nedit-5.6-r1.ebuild77
7 files changed, 450 insertions, 0 deletions
diff --git a/app-editors/nedit/Manifest b/app-editors/nedit/Manifest
new file mode 100644
index 000000000000..444279971f1e
--- /dev/null
+++ b/app-editors/nedit/Manifest
@@ -0,0 +1,10 @@
+AUX nedit-5.6-40_Pointer_to_Integer.patch 10379 SHA256 3e78b6a2cff1b04e9b25a8ee3a328b37cdb342ee65169941f1c5c4c9ebe0326b SHA512 263fd5109c5fc16ea8328ad7855b8ab74e6e744d89374d68bc7db495a3295888f3599d2e9d6653097b4f7b68bae968a5deb7240a565f8fa1beba451b8b1f1b55 WHIRLPOOL c56aad4249ec31f2a1439f63a95ca78e53201d3835d8ab0e69c4f4ba68365f5c0555228baa5b9397a8e7b01c05f91cfacdf4e0df29c6ad8a5d98d945198d07b9
+AUX nedit-5.6-format.patch 453 SHA256 8fca053f62dd939b781d1c212198c35608907b1bae941596a223bb5c062b28e8 SHA512 50e93d7f297ae0b10bec34176c707cc61d4c205e1293cb02b94f85359604864df8698bf35725f007b9c9eb585d0cf18c2498b6d7f55960fabb93b3d98bfe02b8 WHIRLPOOL d8f99dab2f7339d9b817a8e469bcc23d9d169937c0e928270609455df14348361efa03fbe3ba96a2f985ccca10480314426a7f8324bca9c7485f4bcfdc164332
+AUX nedit-5.6-ldflags.patch 800 SHA256 9b796c337d5f98adb2ca0216f675ac06006022e6402bf065dbbf4d76660c6843 SHA512 ebe6add4f5b73ffc33fe65ddbb085373109e150c8f246610de1bb3273042451959bde4a5ec675261f4da1c9853256314c0e78c972bc0c61e206d523b92adf29e WHIRLPOOL 5bd961aa6bd066733e8e623781680c6d7a5f0140be075b6bb2cfa2a138e538e59ccb49c1985f0d02ffa2d255b2d9132c1f3fcc4f9191c332c4f21b1329e5b7a8
+AUX nedit-5.6-security.patch 1944 SHA256 8a8251bceee1b04487531aa52384bfc5fb6b4e8d420fd7eae9001a0a4f3c1531 SHA512 437ff658c4ae4918fa73dee97773d9b8bf9b2dbfd4af3752ab3bdb735ded2508e449170e2aeea43d9bfbdb48e75d52154a847cb9a3a59e7f4b6ad0ec9027bfcd WHIRLPOOL 4728d3b2a6f2977440b0c57c6ab3369b2b3530eefe66f64ff4a362d7e0c4071ab63aa642955ed2effcd57b24b045dbdbec4a1f98ee3a84da4ac1a33ad6056590
+DIST nedit-5.6a-src.tar.gz 1353454 SHA256 53677983cb6c91c5da1fcdcac90f7f9a193f08fa13b7a6330bc9ce21f9461eed SHA512 4d4dcd661f67a4a40549f26774c0ffb90f9059d2e06b0db2becef6848273fe76b7b68fae42319c0badd3c637d96c8dae129b4d0dfa7adccc00ee76f9366e27d0 WHIRLPOOL 12e8494f23d8c67cdfae9e76bbcd7fb2f0c9a8dd037b2036c0f4a218df4c17c6754a234789a80dda209fdddb6b6e0184600a953a5c758ce5c112013df37103f7
+DIST nedit.png.xz 14000 SHA256 7ca585000d4a47872aac1c955b7d6656f41479bd7ead426859304f68ccc862db SHA512 69d5dbea98a5b4065e73cc5c846125c5059e3a50ee1fa3ec4ef99f8f868cf3729ffe73510729534289a91d1a54683b84b6a37bc640c60205be709732dfcb01e3 WHIRLPOOL d689e59d29417272b2f0d6cd8c806c06f7465ff9ca9266b4f2e639775e537d46d8de0f5b47e00ed123b9fcc63db692c20ae6546cece48af6603b0eec570ebede
+EBUILD nedit-5.6-r1.ebuild 2022 SHA256 b28017e3dc03af98bb05fc7d7b0f54e0044d39df7afb097408c8e4a85cb2a20b SHA512 1b6364c8818b5e24452e63cd19b822fd19947b6d07cc0ceeb750a54b7e513845579cdb773da0b4444c2005d2a70ceaf9137721f3dd29bb35d3b037acb370f947 WHIRLPOOL 173d3f59284122406dd1634cfc5849fd30fd871f3d3173a2df5583bca574163a10f9f0203ef67f2b2878f81b25ceec70e63a7f2dc308f5fba788f7952a242a7f
+MISC ChangeLog 5374 SHA256 52483c4f69a601bdd30773dd1c9c08ea8d5eca5f8f56194d36a9b35a79d1a62b SHA512 17e37f533e15132e68cd580d24b0cd23ab95fda68da628229c1e6f0b0cca5de64fe98303dd036393b42b08db25f48f1bed515e77a08867df3ebb1db6d8b1b2d7 WHIRLPOOL 06cbe01d84f8d2912ae9897d1a0d6ecf4a8af08947920a6a93081ca7e2df6dd627aa2eed7b81f5b4700cfeb8f012628038d4e3da85c3de0e2879ae4d015cc616
+MISC ChangeLog-2015 10683 SHA256 bcb4ddcd271146b3485910d72272633e644e4967e42fd3eed5036e0418a64836 SHA512 b062a3b812cbae6f9b7804e34e99fe4f3319bc8ee84c30fb79651323f87e3e8375c186f3838e941416a2781b49130da44b70868e2b733099d9e9092459012d82 WHIRLPOOL b63ba8814c6b35890b3c82294458c4b20700200b1f63b21bd51bfff742412cca719a5e23d74ac449d5a0c1ce9a5c4c6d64dc9ecebd23d94c6e8bd738e6e656f6
+MISC metadata.xml 292 SHA256 33bacc366feb77a19fb4d68a5b7e8862744237dfb0f090d38ef3aa4c12d05610 SHA512 0c0cc8a66f8640a0239d6b971d6faf8ca3b5a50909306b47c02b6f5b401b71534e6965cec6cfb38a47bdb09cb871cd217f9316220b6d7ca2a1019b27bf2f7699 WHIRLPOOL 289ec85b6223c5b457c4c21d37480288c9a742198aa0c7b027cc8e4caa732375b3b2777bb3df1ff7afe680527e21d7232aa738ef844f7e41a45463b7918950ba
diff --git a/app-editors/nedit/files/nedit-5.6-40_Pointer_to_Integer.patch b/app-editors/nedit/files/nedit-5.6-40_Pointer_to_Integer.patch
new file mode 100644
index 000000000000..9081ea340619
--- /dev/null
+++ b/app-editors/nedit/files/nedit-5.6-40_Pointer_to_Integer.patch
@@ -0,0 +1,261 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+# Description: fix warning: cast from pointer to integer of different size
+# Origin: https://sourceforge.net/tracker/download.php?group_id=11005&atid=311005&file_id=340993&aid=2846694
+# Bug: https://sourceforge.net/tracker/?func=detail&atid=311005&aid=2846694&group_id=11005
+# Author: Jack Howarth <jwhowarth@users.sourceforge.net>
+
+@DPATCH@
+diff -urNad nedit-5.6~cvs20081118~/Xlt/SlideC.c nedit-5.6~cvs20081118/Xlt/SlideC.c
+--- nedit-5.6~cvs20081118~/Xlt/SlideC.c 2009-09-15 21:27:12.000000000 +0200
++++ nedit-5.6~cvs20081118/Xlt/SlideC.c 2009-09-15 22:05:42.000000000 +0200
+@@ -28,6 +28,7 @@
+ #endif
+
+ #include <Xm/XmP.h>
++#include <stdint.h>
+
+ #include "SlideCP.h"
+
+@@ -116,14 +117,14 @@
+ /* notify that initialize called XtArgsProc */ NULL,
+ /* NULL XtProc */ NULL,
+ /* NULL XtPointer */ NULL,
+-/* NULL Cardinal */ (Cardinal)NULL,
++/* NULL Cardinal */ (Cardinal)(uintptr_t)NULL,
+ /* resources for subclass fields XtResourceList */ resources,
+ /* number of entries in resources Cardinal */ XtNumber(resources),
+ /* resource class quarkified XrmClass */ NULLQUARK,
+-/* NULL Boolean */ (Boolean)NULL,
+-/* NULL XtEnum */ (XtEnum)NULL,
+-/* NULL Boolean */ (Boolean)NULL,
+-/* NULL Boolean */ (Boolean)NULL,
++/* NULL Boolean */ (Boolean)(uintptr_t)NULL,
++/* NULL XtEnum */ (XtEnum)(uintptr_t)NULL,
++/* NULL Boolean */ (Boolean)(uintptr_t)NULL,
++/* NULL Boolean */ (Boolean)(uintptr_t)NULL,
+ /* free data for subclass pointers XtWidgetProc */ destroy,
+ /* NULL XtProc */ NULL,
+ /* NULL XtProc */ NULL,
+diff -urNad nedit-5.6~cvs20081118~/source/file.c nedit-5.6~cvs20081118/source/file.c
+--- nedit-5.6~cvs20081118~/source/file.c 2009-09-15 21:27:12.000000000 +0200
++++ nedit-5.6~cvs20081118/source/file.c 2009-09-15 22:06:42.000000000 +0200
+@@ -52,6 +52,7 @@
+ #include <limits.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <stdint.h>
+ #include <string.h>
+ #include <unistd.h>
+
+@@ -1914,7 +1915,7 @@
+ if (XmToggleButtonGetState(w)) {
+ XtPointer userData;
+ XtVaGetValues(w, XmNuserData, &userData, NULL);
+- *(int*) clientData = (int) userData;
++ *(int*) clientData = (int) (uintptr_t) userData;
+ }
+ }
+
+diff -urNad nedit-5.6~cvs20081118~/source/highlight.c nedit-5.6~cvs20081118/source/highlight.c
+--- nedit-5.6~cvs20081118~/source/highlight.c 2009-09-15 21:27:12.000000000 +0200
++++ nedit-5.6~cvs20081118/source/highlight.c 2009-09-15 22:07:06.000000000 +0200
+@@ -49,6 +49,7 @@
+ #include <limits.h>
+ #include <math.h>
+ #include <stdlib.h>
++#include <stdint.h>
+ #include <string.h>
+ #ifdef VMS
+ #include "../util/VMSparam.h"
+@@ -512,7 +513,7 @@
+ if (!pattern) {
+ return NULL;
+ }
+- return (void*)pattern->userStyleIndex;
++ return (void*)(uintptr_t)pattern->userStyleIndex;
+ }
+
+ /*
+diff -urNad nedit-5.6~cvs20081118~/source/macro.c nedit-5.6~cvs20081118/source/macro.c
+--- nedit-5.6~cvs20081118~/source/macro.c 2009-09-15 21:27:12.000000000 +0200
++++ nedit-5.6~cvs20081118/source/macro.c 2009-09-15 22:07:27.000000000 +0200
+@@ -60,6 +60,7 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <stdint.h>
+ #include <string.h>
+ #include <ctype.h>
+ #include <errno.h>
+@@ -2924,7 +2925,7 @@
+ readStringArg(argList[i], &btnLabel, btnStorage, errMsg);
+ btn = XtVaCreateManagedWidget("mdBtn", xmPushButtonWidgetClass, dialog,
+ XmNlabelString, s1=XmStringCreateSimple(btnLabel),
+- XmNuserData, (XtPointer)(i+1), NULL);
++ XmNuserData, (XtPointer)(uintptr_t)(i+1), NULL);
+ XtAddCallback(btn, XmNactivateCallback, dialogBtnCB, window);
+ XmStringFree(s1);
+ }
+@@ -2965,7 +2966,7 @@
+ return; /* shouldn't happen */
+ if (XtClass(w) == xmPushButtonWidgetClass) {
+ XtVaGetValues(w, XmNuserData, &userData, NULL);
+- retVal.val.n = (int)userData;
++ retVal.val.n = (int)(uintptr_t)userData;
+ } else
+ retVal.val.n = 1;
+ retVal.tag = INT_TAG;
+@@ -3101,7 +3102,7 @@
+ readStringArg(argList[i], &btnLabel, btnStorage, errMsg);
+ btn = XtVaCreateManagedWidget("mdBtn", xmPushButtonWidgetClass, dialog,
+ XmNlabelString, s1=XmStringCreateSimple(btnLabel),
+- XmNuserData, (XtPointer)(i+1), NULL);
++ XmNuserData, (XtPointer)(uintptr_t)(i+1), NULL);
+ XtAddCallback(btn, XmNactivateCallback, stringDialogBtnCB, window);
+ XmStringFree(s1);
+ }
+@@ -3155,7 +3156,7 @@
+ returned in w. */
+ if (XtClass(w) == xmPushButtonWidgetClass) {
+ XtVaGetValues(w, XmNuserData, &userData, NULL);
+- btnNum = (int)userData;
++ btnNum = (int)(uintptr_t)userData;
+ } else
+ btnNum = 1;
+
+@@ -3680,7 +3681,7 @@
+ readStringArg(argList[i], &btnLabel, btnStorage, errMsg);
+ btn = XtVaCreateManagedWidget("mdBtn", xmPushButtonWidgetClass, dialog,
+ XmNlabelString, s1=XmStringCreateSimple(btnLabel),
+- XmNuserData, (XtPointer)(i+1), NULL);
++ XmNuserData, (XtPointer)(uintptr_t)(i+1), NULL);
+ XtAddCallback(btn, XmNactivateCallback, listDialogBtnCB, window);
+ XmStringFree(s1);
+ }
+@@ -3760,7 +3761,7 @@
+ returned in w. */
+ if (XtClass(w) == xmPushButtonWidgetClass) {
+ XtVaGetValues(w, XmNuserData, &userData, NULL);
+- btnNum = (int)userData;
++ btnNum = (int)(uintptr_t)userData;
+ } else
+ btnNum = 1;
+
+diff -urNad nedit-5.6~cvs20081118~/source/preferences.c nedit-5.6~cvs20081118/source/preferences.c
+--- nedit-5.6~cvs20081118~/source/preferences.c 2009-09-15 21:27:12.000000000 +0200
++++ nedit-5.6~cvs20081118/source/preferences.c 2009-09-15 22:07:47.000000000 +0200
+@@ -58,6 +58,7 @@
+ #include <ctype.h>
+ #include <pwd.h>
+ #include <stdlib.h>
++#include <stdint.h>
+ #include <string.h>
+ #include <stdio.h>
+ #include <unistd.h>
+@@ -2296,7 +2297,7 @@
+ XtVaGetValues(menu, XmNchildren, &items, XmNnumChildren, &nItems, NULL);
+ for (n=0; n<(int)nItems; n++) {
+ XtVaGetValues(items[n], XmNuserData, &userData, NULL);
+- XmToggleButtonSetState(items[n], (int)userData == mode, False);
++ XmToggleButtonSetState(items[n], (int)(uintptr_t)userData == mode, False);
+ }
+ }
+ }
+@@ -5148,7 +5149,7 @@
+ xmToggleButtonGadgetClass, menu,
+ XmNlabelString, s1=XmStringCreateSimple(LanguageModes[i]->name),
+ XmNmarginHeight, 0,
+- XmNuserData, (void *)i,
++ XmNuserData, (void *)(uintptr_t)i,
+ XmNset, window->languageMode==i, NULL);
+ XmStringFree(s1);
+ XtAddCallback(btn, XmNvalueChangedCallback, setLangModeCB, window);
+@@ -5169,14 +5170,14 @@
+ XtVaGetValues(w, XmNuserData, &mode, NULL);
+
+ /* If the mode didn't change, do nothing */
+- if (window->languageMode == (int)mode)
++ if (window->languageMode == (int)(uintptr_t)mode)
+ return;
+
+ /* redo syntax highlighting word delimiters, etc. */
+ /*
+ reapplyLanguageMode(window, (int)mode, False);
+ */
+- params[0] = (((int)mode) == PLAIN_LANGUAGE_MODE) ? "" : LanguageModes[(int)mode]->name;
++ params[0] = (((int)(uintptr_t)mode) == PLAIN_LANGUAGE_MODE) ? "" : LanguageModes[(int)(uintptr_t)mode]->name;
+ XtCallActionProc(window->textArea, "set_language_mode", NULL, params, 1);
+ }
+
+diff -urNad nedit-5.6~cvs20081118~/source/regularExp.c nedit-5.6~cvs20081118/source/regularExp.c
+--- nedit-5.6~cvs20081118~/source/regularExp.c 2009-09-15 21:27:12.000000000 +0200
++++ nedit-5.6~cvs20081118/source/regularExp.c 2009-09-15 22:08:16.000000000 +0200
+@@ -88,6 +88,7 @@
+ #include <limits.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <stdint.h>
+ #include <string.h>
+
+ #ifdef HAVE_DEBUG_H
+@@ -4157,7 +4158,7 @@
+ table [*c] = 1;
+ }
+
+- table [(int) NULL] = 1; /* These */
++ table [(int)(uintptr_t) NULL] = 1; /* These */
+ table [(int) '\t'] = 1; /* characters */
+ table [(int) '\n'] = 1; /* are always */
+ table [(int) ' ' ] = 1; /* delimiters. */
+diff -urNad nedit-5.6~cvs20081118~/source/userCmds.c nedit-5.6~cvs20081118/source/userCmds.c
+--- nedit-5.6~cvs20081118~/source/userCmds.c 2009-09-15 21:27:12.000000000 +0200
++++ nedit-5.6~cvs20081118/source/userCmds.c 2009-09-15 22:08:47.000000000 +0200
+@@ -49,6 +49,7 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <stdint.h>
+ #include <string.h>
+ #include <ctype.h>
+ #ifdef VMS
+@@ -1116,7 +1117,7 @@
+ XtVaGetValues(items[n], XmNsubMenuId, &subMenu, NULL);
+ dimSelDepItemsInMenu(subMenu, menuList, nMenuItems, sensitive);
+ } else {
+- index = (int)userData - 10;
++ index = (int)(uintptr_t)userData - 10;
+ if (index <0 || index >= nMenuItems)
+ return;
+ if (menuList[index]->input == FROM_SELECTION)
+@@ -1928,7 +1929,7 @@
+ XmNlabelString, st1,
+ XmNacceleratorText, st2,
+ XmNmnemonic, f->mnemonic,
+- XmNuserData, (XtPointer)(index+10), NULL);
++ XmNuserData, (XtPointer)(uintptr_t)(index+10), NULL);
+ XtAddCallback(btn, XmNactivateCallback, cbRtn, cbArg);
+ XmStringFree(st1);
+ XmStringFree(st2);
+diff -urNad nedit-5.6~cvs20081118~/util/prefFile.c nedit-5.6~cvs20081118/util/prefFile.c
+--- nedit-5.6~cvs20081118~/util/prefFile.c 2009-09-15 21:27:12.000000000 +0200
++++ nedit-5.6~cvs20081118/util/prefFile.c 2009-09-15 22:04:14.000000000 +0200
+@@ -38,6 +38,7 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
++#include <stdint.h>
+ #ifdef VMS
+ #include "VMSparam.h"
+ #else
+@@ -353,9 +354,9 @@
+ *(int *)rsrcDescrip->valueAddr = 0;
+ return False;
+ case PREF_STRING:
+- if ((int)strlen(string) >= (int)rsrcDescrip->arg)
++ if ((int)strlen(string) >= (int)(uintptr_t)rsrcDescrip->arg)
+ return False;
+- strncpy(rsrcDescrip->valueAddr, string, (int)rsrcDescrip->arg);
++ strncpy(rsrcDescrip->valueAddr, string, (int)(uintptr_t)rsrcDescrip->arg);
+ return True;
+ case PREF_ALLOC_STRING:
+ *(char **)rsrcDescrip->valueAddr = XtMalloc(strlen(string) + 1);
diff --git a/app-editors/nedit/files/nedit-5.6-format.patch b/app-editors/nedit/files/nedit-5.6-format.patch
new file mode 100644
index 000000000000..e2d6e17a6470
--- /dev/null
+++ b/app-editors/nedit/files/nedit-5.6-format.patch
@@ -0,0 +1,12 @@
+diff -up nedit-5.6/source/nc.c.format nedit-5.6/source/nc.c
+--- nedit-5.6/source/nc.c.format 2014-12-28 13:56:20.000000000 +0000
++++ nedit-5.6/source/nc.c 2015-06-17 07:30:25.617032345 +0100
+@@ -503,7 +503,7 @@ static int startServer(const char *messa
+
+ /* prompt user whether to start server */
+ if (!Preferences.autoStart) {
+- printf(message);
++ printf("%s", message);
+ do {
+ c = getc(stdin);
+ } while (c == ' ' || c == '\t');
diff --git a/app-editors/nedit/files/nedit-5.6-ldflags.patch b/app-editors/nedit/files/nedit-5.6-ldflags.patch
new file mode 100644
index 000000000000..4532c6251894
--- /dev/null
+++ b/app-editors/nedit/files/nedit-5.6-ldflags.patch
@@ -0,0 +1,17 @@
+--- source/Makefile.common 2004-03-21 15:25:56.000000000 +0100
++++ source/Makefile.common.new 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)
+ $(CC) $(CFLAGS) -c linkdate.c
+- $(CC) $(CFLAGS) $(OBJS) linkdate.o $(XMLLIB) \
++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) linkdate.o $(XMLLIB) \
+ $(XLTLIB) ../util/libNUtil.a $(LIBS) -o $@
+
+ # Note LIBS isn't quite right here; it links unnecessarily against Motif
+ nc: nc.o server_common.o ../util/libNUtil.a
+- $(CC) $(CFLAGS) nc.o server_common.o ../util/libNUtil.a $(LIBS) -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) nc.o server_common.o ../util/libNUtil.a $(LIBS) -o $@
+
+ help.o: help.c
+ $(CC) $(CFLAGS) $(BIGGER_STRINGS) -c help.c -o $@
diff --git a/app-editors/nedit/files/nedit-5.6-security.patch b/app-editors/nedit/files/nedit-5.6-security.patch
new file mode 100644
index 000000000000..b24ef2355a3c
--- /dev/null
+++ b/app-editors/nedit/files/nedit-5.6-security.patch
@@ -0,0 +1,63 @@
+Index: nedit-5.5/source/file.c
+===================================================================
+--- nedit-5.5.orig/source/file.c 2004-08-24 11:37:24.000000000 +0200
++++ nedit-5.5/source/file.c 2010-03-27 18:44:01.000000000 +0100
+@@ -1314,7 +1314,7 @@
+ */
+ void PrintString(const char *string, int length, Widget parent, const char *jobName)
+ {
+- char tmpFileName[L_tmpnam]; /* L_tmpnam defined in stdio.h */
++ char *tmpFileName=strdup("/tmp/neditXXXXXX");
+ FILE *fp;
+ int fd;
+
+@@ -1325,14 +1325,10 @@
+ 1. Create a filename
+ 2. Open the file with the O_CREAT|O_EXCL flags
+ So all an attacker can do is a DoS on the print function. */
+- tmpnam(tmpFileName);
++ fd = mkstemp(tmpFileName);
+
+ /* open the temporary file */
+-#ifdef VMS
+- if ((fp = fopen(tmpFileName, "w", "rfm = stmlf")) == NULL)
+-#else
+- if ((fd = open(tmpFileName, O_CREAT|O_EXCL|O_WRONLY, S_IRUSR | S_IWUSR)) < 0 || (fp = fdopen(fd, "w")) == NULL)
+-#endif /* VMS */
++ if ((fp = fdopen(fd, "w")) == NULL)
+ {
+ DialogF(DF_WARN, parent, 1, "Error while Printing",
+ "Unable to write file for printing:\n%s", "OK",
+@@ -1346,7 +1342,7 @@
+
+ /* write to the file */
+ #ifdef IBM_FWRITE_BUG
+- write(fileno(fp), string, length);
++ write(fd, string, length);
+ #else
+ fwrite(string, sizeof(char), length, fp);
+ #endif
+@@ -1356,6 +1352,7 @@
+ "%s not printed:\n%s", "OK", jobName, errorString());
+ fclose(fp); /* should call close(fd) in turn! */
+ remove(tmpFileName);
++ free(tmpFileName);
+ return;
+ }
+
+@@ -1366,6 +1363,7 @@
+ "Error closing temp. print file:\n%s", "OK",
+ errorString());
+ remove(tmpFileName);
++ free(tmpFileName);
+ return;
+ }
+
+@@ -1377,6 +1375,7 @@
+ PrintFile(parent, tmpFileName, jobName);
+ remove(tmpFileName);
+ #endif /*VMS*/
++ free(tmpFileName);
+ return;
+ }
+
diff --git a/app-editors/nedit/metadata.xml b/app-editors/nedit/metadata.xml
new file mode 100644
index 000000000000..ec930b3c0db0
--- /dev/null
+++ b/app-editors/nedit/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>amynka@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">nedit</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-editors/nedit/nedit-5.6-r1.ebuild b/app-editors/nedit/nedit-5.6-r1.ebuild
new file mode 100644
index 000000000000..a5a952a8c2c8
--- /dev/null
+++ b/app-editors/nedit/nedit-5.6-r1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils 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/libXp
+ x11-libs/libXpm
+ x11-libs/libXt
+ x11-libs/libX11"
+DEPEND="${RDEPEND}
+ || ( dev-util/yacc sys-devel/bison )
+ dev-lang/perl"
+
+S="${WORKDIR}/${PN}-5.6"
+
+src_prepare() {
+ #respecting LDFLAGS, bug #208189
+ epatch \
+ "${FILESDIR}"/${P}-format.patch \
+ "${FILESDIR}"/${P}-ldflags.patch \
+ "${FILESDIR}"/${P}-40_Pointer_to_Integer.patch \
+ "${FILESDIR}"/${P}-security.patch
+ 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
+
+ epatch_user
+}
+
+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
+}