Bug#734331: RFH: mg -- microscopic GNU Emacs-style editor
On 13-01-14 00:19, Trent W. Buck wrote:
> I'm usually in #debian-mentors on irc.oftc.net from ca. 10AM to 6PM
> Australia/Melbourne time.
I rarely IRC. If necessary I can come online but that's midnight to 8AM
Europe/Brussels time...
> The mg stuff probably still says it's maintained in darcs, but the
> repo (inc. history) was migrated to git, at
> git.debian.org:/git/collab-maint/mg.git
>
> It's a repo of just debian/, which appears to be an unusual workflow
> among the git people. I'm open to changing that if you feel strongly.
No problem. I actually still keep all my packages in Subversion...
> As I said in the RFH, the next step should be to get clens into a
> finished state, then get it sponsored.
>
> I've rsynced what I've currently got to ~twb-guest/Desktop/mg/ on
> git.debian.org; you should have read access.
Ok, I've taken a look, and I think we don't need to bother with clens at
all. As far as I can tell it only duplicates stuff that's already in
libbsd. I've attached a trivial patch to use that library and it seems
to work fine. Can you check if that's okay with upstream?
diff --git a/GNUmakefile b/GNUmakefile
index f9a02da..eac73c5 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -13,13 +13,15 @@ libdir= $(prefix)/lib
includedir= $(prefix)/include
mandir= $(prefix)/man
+BSD_CFLAGS:= $(shell pkg-config --cflags libbsd-overlay)
+BSD_LIBS:= $(shell pkg-config --libs libbsd-overlay)
CC= gcc
CFLAGS?= -O2 -pipe
CFLAGS+= -g -Wall -Werror -Wno-error=unused-but-set-variable -Wno-error=maybe-uninitialized
CFLAGS+= -DFKEYS -DREGEX -DXKEYS
-CFLAGS+= -I$(includedir)/clens
-LIBS= -lcurses -lclens
+CFLAGS+= $(BSD_CFLAGS) -D__dead=__dead2
+LIBS= -lcurses $(BSD_LIBS)
INSTALL= /usr/bin/install
STRIP= /usr/bin/strip
diff --git a/def.h b/def.h
index c7dc24e..1ef0edc 100644
--- a/def.h
+++ b/def.h
@@ -13,7 +13,6 @@
#include "sysdef.h" /* Order is critical. */
#include "ttydef.h"
#include "chrdef.h"
-#include <clens.h>
typedef int (*PF)(int, int); /* generally useful type */
diff --git a/theo.c b/theo.c
index a5cf284..fadac2a 100644
--- a/theo.c
+++ b/theo.c
@@ -24,6 +24,7 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <sys/time.h>
#include "def.h"
#include "kbd.h"
#include "funmap.h"
Reply to: