Skip to content

Commit 1fb214d

Browse files
authored
Merge pull request #1 from trofi/master
2 gentoo patches
2 parents 48f9ce8 + 5e774c4 commit 1fb214d

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

src/Makefile.in

+14-9
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ LIBS= @LIBS@
2525
LDFLAGS=@LDFLAGS@
2626
INSTALL=@INSTALL@
2727
PERL= @PERL@
28+
DESTDIR=
2829

2930
OBJS= itable.o ctable.o uty.o istr.o stream.o file.o guess.o decode.o \
3031
encode.o escape.o iso2022.o iso8859.o iso2cn.o iso2jp.o iso2kr.o \
@@ -64,18 +65,22 @@ depend::
6465
#
6566

6667
install::
67-
$(INSTALL) -s -m 555 lv $(bindir)
68-
if test -f $(bindir)/lgrep; then \
69-
/bin/rm -f $(bindir)/lgrep; \
68+
if test ! -d $(DESTDIR)$(bindir); then \
69+
mkdir -p $(DESTDIR)$(bindir); \
7070
fi
71-
(cd $(bindir); ln lv lgrep)
72-
if test ! -d $(lvlibdir); then \
73-
mkdir -p $(lvlibdir); \
71+
$(INSTALL) -m 555 lv $(DESTDIR)$(bindir)
72+
if test -f $(DESTDIR)$(bindir)/lgrep; then \
73+
/bin/rm -f $(DESTDIR)$(bindir)/lgrep; \
7474
fi
75-
$(INSTALL) -m 444 $(srcdir)/../lv.hlp $(lvlibdir)
76-
if test -d $(mandir) -a -d $(mandir)/man1; then \
77-
$(INSTALL) -m 444 $(srcdir)/../lv.1 $(mandir)/man1; \
75+
(cd $(DESTDIR)$(bindir); ln -s lv lgrep)
76+
if test ! -d $(DESTDIR)$(lvlibdir); then \
77+
mkdir -p $(DESTDIR)$(lvlibdir); \
7878
fi
79+
$(INSTALL) -m 444 $(srcdir)/../lv.hlp $(DESTDIR)$(lvlibdir)
80+
if test ! -d $(DESTDIR)$(mandir)/man1; then \
81+
mkdir -p $(DESTDIR)$(mandir)/man1; \
82+
fi
83+
$(INSTALL) -m 444 $(srcdir)/../lv.1 $(DESTDIR)$(mandir)/man1; \
7984

8085
uninstall::
8186
for i in $(bindir)/lv $(bindir)/lgrep $(lvlibdir)/lv.hlp $(mandir)/man1/lv.1; do \

src/guess.c

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
*/
2222

2323
#include <stdio.h>
24+
#include <string.h> /* strcmp */
2425

2526
#include <import.h>
2627
#include <decode.h>

src/guesslocale.c

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include <langinfo.h>
3030
#endif
3131

32+
#include <ctype.h> /* toupper */
3233
#include <import.h>
3334
#include <ctable.h>
3435
#include <begin.h>

0 commit comments

Comments
 (0)