Bug#734331: mg-20131118 sans clens
Hi Trent, Peter,
Finaly I got some time! Thanks for the input and the great patches. I
rolled a new release just now.
Peter, util.h is not dead code on bsd systems. I try to make mg work on
all platforms, not just on Linux. So I didn't remove the include, I just
made it conditional on libbsd being used.
Trent Buck wrote:
> Han,
>
> Peter (another Debian packager) made mg works with libbsd alone; no clens.
>
> Is this likely to bite us on the ass later?
>
> Adding clens to Debian is work we'd rather avoid if possible.
> Date: Tue, 14 Jan 2014 23:10:18 +0100
> From: Peter De Wachter <pdewacht@gmail.com>
> To: trentbuck@gmail.com
> CC: 734331@bugs.debian.org
> Subject: Re: 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"
# Han
--
(I hate large) \||/ Nothing happens.
(sigs) Oo. | @___oo
/\ /\ / (__,,,,|
) /^\) ^\/ _)
) /^\/ _)
) _ / / _)
/\ )/\/ || | )_)
< > |(,,) )__)
|| / \)___)\
| \____( )___) )___
\______(_______;;; __;;;
Reply to: