diff --git a/nedit-5.4-makefiles.patch b/nedit-5.4-makefiles.patch index a45e2a5..17539d5 100644 --- a/nedit-5.4-makefiles.patch +++ b/nedit-5.4-makefiles.patch @@ -1,23 +1,35 @@ ---- nedit-5.4/makefiles/Makefile.linux.makefiles 2003-05-20 02:27:56.000000000 +0200 -+++ nedit-5.4/makefiles/Makefile.linux 2004-03-17 15:28:40.000000000 +0100 +diff -up nedit-5.5/Makefile.makefiles nedit-5.5/Makefile +--- nedit-5.5/Makefile.makefiles 2004-09-30 22:51:05.000000000 +0200 ++++ nedit-5.5/Makefile 2008-01-06 11:07:45.000000000 +0100 +@@ -29,7 +29,6 @@ all: + then ln -s ../makefiles/Makefile.$@ .; fi) + + (cd util; \ +- $(MAKE) -f Makefile.$@ verify_config && \ + $(MAKE) -f Makefile.$@ libNUtil.a) + (cd Xlt; $(MAKE) -f Makefile.$@ libXlt.a) + (cd Microline/XmL; $(MAKE) -f Makefile.$@ libXmL.a) +diff -up nedit-5.5/makefiles/Makefile.linux.makefiles nedit-5.5/makefiles/Makefile.linux +--- nedit-5.5/makefiles/Makefile.linux.makefiles 2003-05-20 02:27:56.000000000 +0200 ++++ nedit-5.5/makefiles/Makefile.linux 2008-01-06 11:10:31.000000000 +0100 @@ -1,5 +1,5 @@ - # $Id: nedit-5.4-makefiles.patch,v 1.2 2005/12/16 15:33:50 jnovy Exp $ + # $Id: nedit-5.4-makefiles.patch,v 1.3 2008/01/22 13:09:53 pertusus Exp $ -CC=cc +CC=gcc AR=ar # For editres, add -DEDITRES to CFLAGS and -lXmu to LIBS -@@ -17,11 +17,11 @@ +@@ -17,11 +17,11 @@ AR=ar # To test if the Motif library exports the runtime version # add -DHAVE__XMVERSIONSTRING to CFLAGS # -CFLAGS=-O -I/usr/X11R6/include -DUSE_DIRENT -DUSE_LPR_PRINT_CMD -+CFLAGS=-I/usr/X11R6/include $(RPM_OPT_FLAGS) -DUSE_DIRENT -DUSE_LPR_PRINT_CMD -DBUILD_UNTESTED_NEDIT ++CFLAGS= $(C_OPT_FLAGS) -DUSE_DIRENT -DUSE_LPR_PRINT_CMD -DBUILD_UNTESTED_NEDIT ARFLAGS=-urs -LIBS= -L/usr/X11R6/lib -Wl,-Bstatic -lXm -Wl,-Bdynamic -lXp -lXpm -lXext -lXt -lSM -lICE -lX11 -lm -+LIBS= -lXm -lXmu -lXp -lXpm -lXext -lXt -lSM -lICE -lX11 -lm ++LIBS= $(LD_OPT_FLAGS) -lXm -lXmu -lXp -lXpm -lXext -lXt -lSM -lICE -lX11 -lm include Makefile.common diff --git a/nedit-5.5-nocsh.patch b/nedit-5.5-nocsh.patch new file mode 100644 index 0000000..a2c56b3 --- /dev/null +++ b/nedit-5.5-nocsh.patch @@ -0,0 +1,15 @@ +diff -up nedit-5.5/source/preferences.c.nocsh nedit-5.5/source/preferences.c +--- nedit-5.5/source/preferences.c.nocsh 2004-08-20 21:33:20.000000000 +0200 ++++ nedit-5.5/source/preferences.c 2007-10-29 13:07:26.000000000 +0100 +@@ -926,11 +926,7 @@ static PrefDescripRec PrefDescrip[] = { + (void *)sizeof(PrefData.tooltipBgColor), False}, + + {"shell", "Shell", PREF_STRING, +-#if defined(__MVS__) || defined(__EMX__) + "/bin/sh", +-#else +- "/bin/csh", +-#endif + PrefData.shell, (void *)sizeof(PrefData.shell), False}, + {"geometry", "Geometry", PREF_STRING, "", + PrefData.geometry, (void *)sizeof(PrefData.geometry), False}, diff --git a/nedit-5.5-scroll.patch b/nedit-5.5-scroll.patch new file mode 100644 index 0000000..ba75aba --- /dev/null +++ b/nedit-5.5-scroll.patch @@ -0,0 +1,22 @@ +diff -up nedit-5.5/util/misc.c.scroll nedit-5.5/util/misc.c +--- nedit-5.5/util/misc.c.scroll 2007-10-29 13:09:28.000000000 +0100 ++++ nedit-5.5/util/misc.c 2007-10-29 13:59:22.000000000 +0100 +@@ -2032,12 +2032,12 @@ void AddMouseWheelSupport(Widget w) + if (XmIsScrolledWindow(XtParent(w))) + { + static const char scrollTranslations[] = +- "Shift,: scrolled-window-scroll-up(1)\n" +- "Shift,: scrolled-window-scroll-down(1)\n" +- "Ctrl,: scrolled-window-page-up()\n" +- "Ctrl,: scrolled-window-page-down()\n" +- ",: scrolled-window-scroll-up(3)\n" +- ",: scrolled-window-scroll-down(3)\n"; ++ "Shift: scrolled-window-scroll-up(1)\n" ++ "Shift: scrolled-window-scroll-down(1)\n" ++ "Ctrl: scrolled-window-page-up()\n" ++ "Ctrl: scrolled-window-page-down()\n" ++ ": scrolled-window-scroll-up(3)\n" ++ ": scrolled-window-scroll-down(3)\n"; + static XtTranslations trans_table = NULL; + + if (trans_table == NULL) diff --git a/nedit.desktop b/nedit.desktop index cdd6d84..5a495b1 100644 --- a/nedit.desktop +++ b/nedit.desktop @@ -22,7 +22,6 @@ Name=Nedit Name[et]=Tekstiredaktor Nedit Name[ru]=NEdit Exec=nedit %f -Icon=nedit-icon.png -Path= +Icon=nedit Type=Application Terminal=false diff --git a/nedit.spec b/nedit.spec index d8ef1cc..0d2803c 100644 --- a/nedit.spec +++ b/nedit.spec @@ -1,11 +1,7 @@ -%define desktop_file 1 -%if %{desktop_file} -%define desktop_file_utils_version 0.2.93 -%endif -Summary: A GUI text editor for systems with X and Motif. +Summary: A GUI text editor for systems with X Name: nedit Version: 5.5 -Release: 11%{?dist} +Release: 16%{?dist} Source: http://nedit.org/ftp/v5_5/nedit-%{version}-src.tar.bz2 Source1: nedit.desktop Source2: nedit-icon.png @@ -16,18 +12,17 @@ Patch3: nedit-5.5-motif223.patch Patch4: nedit-5.5-varfix.patch Patch5: nedit-5.5-nc-manfix.patch Patch6: nedit-5.5-visfix.patch +Patch7: nedit-5.5-nocsh.patch +Patch8: nedit-5.5-scroll.patch URL: http://nedit.org -License: GPL +License: GPLv2 Group: Applications/Editors -Requires: lesstif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: lesstif-devel, libXau-devel, libXpm-devel, libXmu-devel -%if %{desktop_file} -BuildPrereq: desktop-file-utils >= %{desktop_file_utils_version} -%endif +BuildRequires: openmotif-devel, libXau-devel, libXpm-devel, libXmu-devel +BuildRequires: desktop-file-utils %description -NEdit is a GUI text editor for the X Window System and Motif. NEdit is +NEdit is a GUI text editor for the X Window System. NEdit is very easy to use, especially if you are familiar with the Macintosh(TM) or Microsoft(TM) Windows(TM) style of interface. @@ -40,11 +35,16 @@ Macintosh(TM) or Microsoft(TM) Windows(TM) style of interface. %patch4 -p1 -b .varfix %patch5 -p1 -b .nc-manfix %patch6 -p1 -b .visfix +%patch7 -p1 -b .nocsh +%patch8 -p1 -b .scroll +for file in README doc/nedit.doc; do + iconv -f latin1 -t utf8 < $file > $file.utf8 + touch -r $file $file.utf8 + mv $file.utf8 $file +done %build -make linux LIB=%{_lib} << EOF - -EOF +make linux C_OPT_FLAGS="$RPM_OPT_FLAGS" %install rm -rf $RPM_BUILD_ROOT @@ -53,39 +53,55 @@ install -d -m 755 $RPM_BUILD_ROOT%{_bindir} install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man1 mv source/nc source/nedit-client install -m 755 source/nedit source/nedit-client $RPM_BUILD_ROOT%{_bindir} -install -m 644 doc/nedit.man $RPM_BUILD_ROOT%{_mandir}/man1/nedit.1x +install -p -m 644 doc/nedit.man $RPM_BUILD_ROOT%{_mandir}/man1/nedit.1x mv doc/nc.man doc/nedit-client.man -install -m 644 doc/nedit-client.man $RPM_BUILD_ROOT%{_mandir}/man1/nedit-client.1x - -mkdir -p $RPM_BUILD_ROOT/etc/X11/applnk/Applications -install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/etc/X11/applnk/Applications -%if %{desktop_file} -mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps -install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/pixmaps -mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/applications -desktop-file-install --vendor fedora --delete-original \ - --dir $RPM_BUILD_ROOT%{_prefix}/share/applications \ - --add-category "Application;Development;X-Fedora" \ - $RPM_BUILD_ROOT/etc/X11/applnk/Applications/nedit.desktop -%endif +install -p -m 644 doc/nedit-client.man $RPM_BUILD_ROOT%{_mandir}/man1/nedit-client.1x + +mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps +install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/nedit.png +mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications +desktop-file-install --vendor fedora \ + --dir $RPM_BUILD_ROOT%{_datadir}/applications \ + --add-category "Development;" \ + %{SOURCE1} %clean rm -rf $RPM_BUILD_ROOT +%post +touch --no-create %{_datadir}/icons/hicolor || : +%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : + +%postun +touch --no-create %{_datadir}/icons/hicolor || : +%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : + %files %defattr(-,root,root) %doc doc/nedit.doc README ReleaseNotes %{_mandir}/*/* %{_bindir}/* -%if %{desktop_file} %{_prefix}/share/applications/* -%{_datadir}/pixmaps/nedit-icon.png -%else -%config /etc/X11/applnk/Applications/nedit.desktop -%endif +%{_datadir}/icons/hicolor/ %changelog -* Mon Jan 8 2007 Jindrich Novy 5.6-11 +* Sun Jan 6 2008 Patrice Dumas 5.5-16 +- minor cleanups + +* Tue Oct 30 2007 Jindrich Novy 5.5-15 +- make mouse wheel scrolling compatible with lesstif (#354591) + +* Mon Oct 29 2007 Jindrich Novy 5.5-14 +- don't use /bin/csh but /bin/sh as default shell (#355441) + +* Fri Oct 26 2007 Jindrich Novy 5.5-13 +- spec cleanup + +* Thu Aug 23 2007 Jindrich Novy 5.5-12 +- update License +- rebuild for BuildID + +* Mon Jan 8 2007 Jindrich Novy 5.5-11 - explicitly depend on lesstif to avoid nedit crashes (binary lesstif/openmotif incompatibilities) (#221535) - fix buildroot