diff options
Diffstat (limited to 'app-text/lv/files')
-rw-r--r-- | app-text/lv/files/lv-gentoo.patch | 39 | ||||
-rw-r--r-- | app-text/lv/files/lv-headers.patch | 26 | ||||
-rw-r--r-- | app-text/lv/files/lv-tinfo.patch | 20 | ||||
-rw-r--r-- | app-text/lv/files/lv-xz.patch | 43 |
4 files changed, 128 insertions, 0 deletions
diff --git a/app-text/lv/files/lv-gentoo.patch b/app-text/lv/files/lv-gentoo.patch new file mode 100644 index 000000000000..99724ef9c69e --- /dev/null +++ b/app-text/lv/files/lv-gentoo.patch @@ -0,0 +1,39 @@ +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -25,6 +25,7 @@ + LDFLAGS=@LDFLAGS@ + INSTALL=@INSTALL@ + PERL= @PERL@ ++DESTDIR= + + OBJS= itable.o ctable.o uty.o istr.o stream.o file.o guess.o decode.o \ + encode.o escape.o iso2022.o iso8859.o iso2cn.o iso2jp.o iso2kr.o \ +@@ -64,18 +65,19 @@ + # + + install:: +- $(INSTALL) -s -m 555 lv $(bindir) +- if test -f $(bindir)/lgrep; then \ +- /bin/rm -f $(bindir)/lgrep; \ ++ if test ! -d $(DESTDIR)$(bindir); then \ ++ mkdir -p $(DESTDIR)$(bindir); \ + fi +- (cd $(bindir); ln lv lgrep) +- if test ! -d $(lvlibdir); then \ +- mkdir -p $(lvlibdir); \ ++ $(INSTALL) -m 555 lv $(DESTDIR)$(bindir) ++ (cd $(DESTDIR)$(bindir); ln -s lv lgrep) ++ if test ! -d $(DESTDIR)$(lvlibdir); then \ ++ mkdir -p $(DESTDIR)$(lvlibdir); \ + fi +- $(INSTALL) -m 444 $(srcdir)/../lv.hlp $(lvlibdir) +- if test -d $(mandir) -a -d $(mandir)/man1; then \ +- $(INSTALL) -m 444 $(srcdir)/../lv.1 $(mandir)/man1; \ ++ $(INSTALL) -m 444 $(srcdir)/../lv.hlp $(DESTDIR)$(lvlibdir) ++ if test ! -d $(DESTDIR)$(mandir)/man1; then \ ++ mkdir -p $(DESTDIR)$(mandir)/man1; \ + fi ++ $(INSTALL) -m 444 $(srcdir)/../lv.1 $(DESTDIR)$(mandir)/man1; \ + + uninstall:: + for i in $(bindir)/lv $(bindir)/lgrep $(lvlibdir)/lv.hlp $(mandir)/man1/lv.1; do \ diff --git a/app-text/lv/files/lv-headers.patch b/app-text/lv/files/lv-headers.patch new file mode 100644 index 000000000000..5207ec07cbee --- /dev/null +++ b/app-text/lv/files/lv-headers.patch @@ -0,0 +1,26 @@ +Add missing string protos. + + * src/guess.c:150:12: warning: implicit declaration of function ‘strncmp’ [-Wimplicit-function-declaration] + * src/guess.c:218:22: warning: implicit declaration of function ‘strcmp’ [-Wimplicit-function-declaration] + * src/guesslocale.c:42:9: warning: implicit declaration of function ‘toupper’ [-Wimplicit-function-declaration] + +--- a/src/guess.c ++++ b/src/guess.c +@@ -21,6 +21,7 @@ + */ + + #include <stdio.h> ++#include <string.h> /* strcmp */ + + #include <import.h> + #include <decode.h> +--- a/src/guesslocale.c ++++ b/src/guesslocale.c +@@ -29,6 +29,7 @@ + #include <langinfo.h> + #endif + ++#include <ctype.h> /* toupper */ + #include <import.h> + #include <ctable.h> + #include <begin.h> diff --git a/app-text/lv/files/lv-tinfo.patch b/app-text/lv/files/lv-tinfo.patch new file mode 100644 index 000000000000..7da23d474951 --- /dev/null +++ b/app-text/lv/files/lv-tinfo.patch @@ -0,0 +1,20 @@ +--- a/src/configure.in ++++ b/src/configure.in +@@ -24,7 +24,16 @@ AC_ARG_ENABLE(purify, + dnl Checks for libraries. + AC_DEFINE(UNIX) + AC_DEFINE(TERMCAP) +-AC_CHECK_LIB(terminfo, tgetstr,, [AC_CHECK_LIB(termcap, tgetstr,, [AC_CHECK_LIB(ncurses, tgetstr,, [AC_CHECK_LIB(curses, tgetstr)])])]) ++PKG_CHECK_MODULES( ++ CURSES, ++ ncurses, ++ [ ++ CPPFLAGS="$CURSES_CFLAGS $CPPFLAGS" ++ LIBS="$CURSES_LIBS $LIBS" ++ ], ++ [ ++ AC_CHECK_LIB(terminfo, tgetstr,, [AC_CHECK_LIB(termcap, tgetstr,, [AC_CHECK_LIB(ncurses, tgetstr,, [AC_CHECK_LIB(curses, tgetstr)])])]) ++ ]) + + dnl Checks for header files. + AC_HEADER_STDC diff --git a/app-text/lv/files/lv-xz.patch b/app-text/lv/files/lv-xz.patch new file mode 100644 index 000000000000..1b6ad8a91659 --- /dev/null +++ b/app-text/lv/files/lv-xz.patch @@ -0,0 +1,43 @@ +--- a/index.html ++++ b/index.html +@@ -301,8 +301,11 @@ + <P> + Compressed files that have suffix ``gz'', ``z'', or ``GZ'', ``Z'' are + extracted by lv using <I>zcat</I> (1), +- and ``bz2'' or ``BZ2'' with <I>bzcat</I> (1). +- Please install <I>zcat</I> and <I>bzcat</I> that can expand all of them. ++ ``bz2'' or ``BZ2'' with <I>bzcat</I> (1). ++ ``lzma'' or ``LZMA'' with <I>lzcat</I> (1). ++ and ``xz'' or ``XZ'' with <I>xzcat</I> (1). ++ Please install <I>zcat</I>, <I>bzcat</I>, <I>lzcat</I> and <I>xzcat</I> ++ that can expand all of them. + <P> + In case that standard output is not connected to an ordinal terminal + but to redirect or pipe-line, +--- a/src/stream.c ++++ b/src/stream.c +@@ -43,6 +43,8 @@ + + private byte *gz_filter = "zcat"; + private byte *bz2_filter = "bzcat"; ++private byte *lzma_filter = "lzcat"; ++private byte *xz_filter = "xzcat"; + + private stream_t *StreamAlloc() + { +@@ -75,10 +77,14 @@ + filter = gz_filter; + else if( !strcmp( "bz2", exts ) || !strcmp( "BZ2", exts ) ) + filter = bz2_filter; ++ else if( !strcmp( "lzma", exts ) || !strcmp( "LZMA", exts ) ) ++ filter = lzma_filter; ++ else if( !strcmp( "xz", exts ) || !strcmp( "XZ", exts ) ) ++ filter = xz_filter; + } + if( NULL != filter ){ + /* +- * zcat or bzcat ++ * zcat, bzcat, lzcat or xzcat + */ + if( NULL == (st->fp = (FILE *)tmpfile()) ) + perror( "temporary file" ), exit( -1 ); |