tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

USE_FEATURES=nbcompat and cvsdiff2patch



Wanted to see if cvsdiff2patch was interesting, but on SunOS fgetln() isn't provided.

So I tried to see if USE_FEATURES= nbcompat would work, as with pax...

The following patch permits the build to succeed and seems to work okay:
> richard@dev64:/home/richard/src/pkgsrc/devel/cvsdiff2patch$ cvs diff |cvsdiff2patch 
> Cvsdiff2patch (c) 2003 Research Engineering Development
> --- Makefile
> +++ Makefile
> @@ -10,9 +10,10 @@
>  HOMEPAGE=	http://people.freebsd.org/~alfred/sources/cvsdiff2patch/
>  COMMENT=	Convert CVS diffs into something that patch(1) understands
>  
> -NO_CONFIGURE=	yes
>  USE_LIBTOOL=	yes
>  
> +USE_FEATURES=	nbcompat # specifically fgetln
> +
>  INSTALLATION_DIRS+=	bin
>  
>  do-extract:
> @@ -20,7 +21,7 @@
>  
>  do-build:
>  	${RUN} cd ${WRKSRC} && \
> -	${LIBTOOL} --mode=link ${CC} -o ${PKGBASE} ${PKGBASE}.c
> +	${LIBTOOL} --mode=link ${CC} ${CPPFLAGS} ${LDFLAGS} ${LIBS} -o ${PKGBASE} ${PKGBASE}.c
>  
>  do-install:
>  	${RUN} cd ${WRKSRC} && \
> --- files/cvsdiff2patch.c
> +++ files/cvsdiff2patch.c
> @@ -32,11 +32,14 @@
>  /*
>   * Convert crappy CVS diffs into something that patch(1) understands.
>   */
> -
> +#ifdef HAVE_NBCOMPAT_H
> +#include <nbcompat.h>
> +#else
>  #include <stdio.h>
>  #include <string.h>
>  #include <stdlib.h>
>  #include <err.h>
> +#endif
>  
>  char *	xstrdup(const char *str);
>  int	fileline(const char *line, int ch);

Am I missing something, or is this more or less the way it should be used?

cheers,
-- 
Richard PALO




Home | Main Index | Thread Index | Old Index