pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/rpm2pkg Update "rpm2pkg" package to version 2...
details: https://anonhg.NetBSD.org/pkgsrc/rev/c7df558669a0
branches: trunk
changeset: 391989:c7df558669a0
user: tron <tron%pkgsrc.org@localhost>
date: Thu Apr 23 21:38:02 2009 +0000
description:
Update "rpm2pkg" package to version 2.2. Changes since version 2.1.1:
- Switch to 2-clause BSD license.
- Compile with extra warnings (again) if GCC is used as the compiler.
- Fix build warnings reported by "-Wsign-compare".
diffstat:
pkgtools/rpm2pkg/Makefile | 13 +++++++------
pkgtools/rpm2pkg/files/rpm2pkg.c | 18 ++++++++----------
2 files changed, 15 insertions(+), 16 deletions(-)
diffs (100 lines):
diff -r 31b13059b402 -r c7df558669a0 pkgtools/rpm2pkg/Makefile
--- a/pkgtools/rpm2pkg/Makefile Thu Apr 23 20:11:31 2009 +0000
+++ b/pkgtools/rpm2pkg/Makefile Thu Apr 23 21:38:02 2009 +0000
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.40 2009/04/09 00:48:14 joerg Exp $
+# $NetBSD: Makefile,v 1.41 2009/04/23 21:38:02 tron Exp $
-DISTNAME= rpm2pkg-2.1.1
-PKGREVISION= 2
+DISTNAME= rpm2pkg-2.2
CATEGORIES= pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
@@ -12,6 +11,8 @@
CONFLICTS+= suse-base<=6.4
+LICENSE= modified-bsd
+
PKG_DESTDIR_SUPPORT= user-destdir
WRKSRC= ${WRKDIR}
@@ -20,10 +21,10 @@
${BUILDLINK_CPPFLAGS.zlib}
LIBS+= -lrpm -lintl -lz -lbz2
-.include "../../mk/bsd.prefs.mk"
+.include "../../mk/compiler.mk"
-.if (${CC} == gcc)
-CFLAGS+= -Wall
+.if !empty(CC_VERSION:Mgcc-*)
+CFLAGS+= -Wall -Wshadow -Wsign-compare -Wunused-value
.endif
INSTALLATION_DIRS= ${PKGMANDIR}/man8 sbin
diff -r 31b13059b402 -r c7df558669a0 pkgtools/rpm2pkg/files/rpm2pkg.c
--- a/pkgtools/rpm2pkg/files/rpm2pkg.c Thu Apr 23 20:11:31 2009 +0000
+++ b/pkgtools/rpm2pkg/files/rpm2pkg.c Thu Apr 23 21:38:02 2009 +0000
@@ -1,7 +1,7 @@
-/* $NetBSD: rpm2pkg.c,v 1.6 2006/01/21 20:46:29 tron Exp $ */
+/* $NetBSD: rpm2pkg.c,v 1.7 2009/04/23 21:38:02 tron Exp $ */
/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
+ * Copyright (c) 2004-2009 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
@@ -15,9 +15,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
@@ -128,10 +125,10 @@
} FileHandle;
static int
-InitBuffer(void **Buffer, int *BufferSizePtr)
+InitBuffer(void **Buffer, size_t *BufferSizePtr)
{
if (*Buffer == NULL) {
- int BufferSize;
+ size_t BufferSize;
BufferSize = sysconf(_SC_PAGESIZE) * 256;
while ((*Buffer = malloc(BufferSize)) == NULL) {
@@ -236,7 +233,7 @@
return FALSE;
} else {
static void *Buffer = NULL;
- static int BufferSize = 0;
+ static size_t BufferSize = 0;
if (!InitBuffer(&Buffer, &BufferSize))
return FALSE;
@@ -246,7 +243,8 @@
int Chunk;
Length = NewPos - fh->fh_Pos;
- Chunk = (Length > BufferSize) ? BufferSize : Length;
+ Chunk = (Length > (off_t)BufferSize) ?
+ (off_t)BufferSize : Length;
if (!Read(fh, Buffer, Chunk))
return FALSE;
}
@@ -559,7 +557,7 @@
int Out;
struct stat Stat;
static void *Buffer = NULL;
- static int BufferSize = 0;
+ static size_t BufferSize = 0;
if ((lstat(Name, &Stat) == 0) &&
(!S_ISREG(Stat.st_mode) || (unlink(Name) < 0))) {
Home |
Main Index |
Thread Index |
Old Index