Make this package build on Linux.

- Use lseek(2) instead of tell() on Linux.
  - Use "${RM} -f" instead of "rm" in @unexec.
This commit is contained in:
minskim 2004-06-09 16:17:47 +00:00
parent b7d409e6b0
commit 5417b95249
4 changed files with 23 additions and 11 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.18 2004/03/11 18:03:50 xtraeme Exp $
# $NetBSD: Makefile,v 1.19 2004/06/09 16:17:47 minskim Exp $
DISTNAME= hpack79src
PKGNAME= hpack-0.79
@ -16,10 +16,14 @@ CRYPTO= yes
MAKEFILE= makefile
ALL_TARGET= hpack
MAKE_FLAGS= CFLAGS="-c -DBSD386 -D__UNIX__ -DPREFIX=\\\"${PREFIX}\\\" -I. ${CFLAGS} -Icrypt"
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} == "Linux"
MAKE_FLAGS= CFLAGS="-c -DLINUX -D__UNIX__ -DPREFIX=\\\"${PREFIX}\\\" -I. ${CFLAGS} -Icrypt"
.else
MAKE_FLAGS= CFLAGS="-c -DBSD386 -D__UNIX__ -DPREFIX=\\\"${PREFIX}\\\" -I. ${CFLAGS} -Icrypt"
.endif
.if ${OPSYS} == "Darwin"
MAKE_FLAGS+= CMDL="${LDFLAGS} -lcurses"
.else

View file

@ -1,9 +1,9 @@
@comment $NetBSD: PLIST,v 1.3 2002/12/09 16:01:10 tron Exp $
@comment $NetBSD: PLIST,v 1.4 2004/06/09 16:17:47 minskim Exp $
bin/hpack
bin/keycvt
man/man1/hpack.1
share/doc/hpack/hpackext.doc
@unexec cmp -s %D/etc/hpack.cfg %D/share/hpack/hpack.cfg.example && rm %D/etc/hpack.cfg || ${TRUE}
@unexec cmp -s %D/etc/hpack.cfg %D/share/hpack/hpack.cfg.example && ${RM} -f %D/etc/hpack.cfg || ${TRUE}
share/hpack/hpack.cfg.example
@exec if [ ! %D/etc/hpack.cfg ]; then cp -p %F %D/etc/hpack.cfg; fi
share/hpack/language.dat

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.5 2002/03/09 03:27:51 yyamano Exp $
$NetBSD: distinfo,v 1.6 2004/06/09 16:17:47 minskim Exp $
SHA1 (hpack79src.tar.gz) = 5fb85346724e5d972ae809311d6571a9034ee5d5
Size (hpack79src.tar.gz) = 545648 bytes
@ -6,7 +6,7 @@ SHA1 (patch-aa) = d39d13ee6f99eb71ac3129c24942bf02d2527e1f
SHA1 (patch-ab) = 48fa56d17725d2b3de87955f09d82624d14e2f56
SHA1 (patch-ac) = cf399b72c990fc2a6583ab0abbb252075c2ceceb
SHA1 (patch-ad) = c07f5d0ec7e2dd18d518d5eafe64ff0ef9e81a91
SHA1 (patch-ae) = 2dc6e6be6d70bf46315707eab7c00f49b80332db
SHA1 (patch-ae) = 710e3a157555c5f34440a56310ebde8c746cffd8
SHA1 (patch-af) = 7809e665e108152689036c150afe3865a3848d31
SHA1 (patch-ag) = fd04724f6ab2bf1fa4f206d18c7235574a357c36
SHA1 (patch-ah) = 30e7a7e11b10ccb3510199c5e6b86eb77a8ec98d

View file

@ -1,8 +1,8 @@
$NetBSD: patch-ae,v 1.2 2002/03/09 03:27:52 yyamano Exp $
$NetBSD: patch-ae,v 1.3 2004/06/09 16:17:47 minskim Exp $
--- system.h.orig Sat Aug 28 02:16:40 1993
--- system.h.orig 1993-08-27 12:16:40.000000000 -0500
+++ system.h
@@ -779,6 +779,10 @@
@@ -779,6 +779,10 @@ void strlwr( char *string );
#if defined( AIX ) || defined( AIX370 ) || defined( AIX386 )
#define MAX_PATH ( 1023 + 1 )
#define MAX_FILENAME ( 254 + 1 )
@ -13,7 +13,7 @@ $NetBSD: patch-ae,v 1.2 2002/03/09 03:27:52 yyamano Exp $
#elif defined( BSD386 ) || defined( GENERIC ) || defined( HPUX ) || \
defined( IRIX ) || defined( LINUX ) || defined( NEXT ) || \
defined( OSF1 ) || defined( SUNOS ) || defined( ULTRIX ) || \
@@ -899,6 +903,13 @@
@@ -899,6 +903,13 @@ typedef struct {
#if defined( AIX ) || defined( AIX370 )
#define NEED_STRLWR /* AIX RS6000, AIX 370 */
#define NEED_STRICMP
@ -27,3 +27,11 @@ $NetBSD: patch-ae,v 1.2 2002/03/09 03:27:52 yyamano Exp $
#elif defined( AIX386 )
#define NEED_STRLWR /* AIX 386 */
#define NEED_STRICMP
@@ -919,6 +930,7 @@ typedef struct {
#define NEED_STRICMP
#elif defined( ISC ) /* ISC Unix */
#elif defined( LINUX ) /* Linux */
+ #define tell(fd) lseek((fd),(off_t)0,SEEK_CUR)
#define NEED_STRLWR
#define NEED_STRICMP
#elif defined( MINT ) /* MiNT */