pkgsrc-Bugs archive

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

pkg/51445: new package: devel/dumpet



>Number:         51445
>Category:       pkg
>Synopsis:       new package: devel/dumpet
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 26 16:25:00 +0000 2016
>Originator:     Kimihiro Nonaka
>Release:        HEAD (20160826)
>Organization:
>Environment:
NetBSD koharu.myhome.nonakap.org 7.99.36 NetBSD 7.99.36 (GENERIC) #0: Wed Aug 24 22:41:18 JST 2016  nonaka%build.myhome.nonakap.org@localhost:/home/snapshot/NetBSD/HEAD-20160824/obj.NetBSD-amd64/amd64/sys/arch/amd64/compile/GENERIC amd64
>Description:
dumpet is a tool to dump information about bootable CDs and other similar.
>How-To-Repeat:

>Fix:
Extract the following shar file.

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	devel/dumpet
#	devel/dumpet/DESCR
#	devel/dumpet/Makefile
#	devel/dumpet/PLIST
#	devel/dumpet/distinfo
#	devel/dumpet/patches
#	devel/dumpet/patches/patch-Makefile
#	devel/dumpet/patches/patch-dumpet.c
#	devel/dumpet/patches/patch-dumpet.h
#	devel/dumpet/patches/patch-endian.h
#
echo c - devel/dumpet
mkdir -p devel/dumpet > /dev/null 2>&1
echo x - devel/dumpet/DESCR
sed 's/^X//' >devel/dumpet/DESCR << 'END-of-devel/dumpet/DESCR'
Xdumpet is a tool to dump information about bootable CDs and other similar
Xformats. 
END-of-devel/dumpet/DESCR
echo x - devel/dumpet/Makefile
sed 's/^X//' >devel/dumpet/Makefile << 'END-of-devel/dumpet/Makefile'
X# $NetBSD$
X
XDISTNAME=	dumpet-2.1
XCATEGORIES=	devel
XMASTER_SITES=	https://fedorahosted.org/releases/d/u/dumpet/
XEXTRACT_SUFX=	.tar.bz2
X
XMAINTAINER=	nonakap%gmail.com@localhost
XHOMEPAGE=	https://fedorahosted.org/dumpet/
XCOMMENT=	Dump information about bootable CDs and other similar formats
XLICENSE=	gnu-gpl-v2
X
XUSE_TOOLS+=	gmake pkg-config
X
XINSTALLATION_DIRS+=	bin ${PKGMANDIR}/man1
X
X.include "../../devel/popt/buildlink3.mk"
X.include "../../textproc/libxml2/buildlink3.mk"
X.include "../../mk/bsd.pkg.mk"
END-of-devel/dumpet/Makefile
echo x - devel/dumpet/PLIST
sed 's/^X//' >devel/dumpet/PLIST << 'END-of-devel/dumpet/PLIST'
X@comment $NetBSD$
Xbin/dumpet
Xman/man1/dumpet.1
END-of-devel/dumpet/PLIST
echo x - devel/dumpet/distinfo
sed 's/^X//' >devel/dumpet/distinfo << 'END-of-devel/dumpet/distinfo'
X$NetBSD$
X
XSHA1 (dumpet-2.1.tar.bz2) = 56fc8a52a8df12083912496d6d7de993f2063ec1
XRMD160 (dumpet-2.1.tar.bz2) = cf1a0923c658ef285176fca59c97a3e04636b4ef
XSHA512 (dumpet-2.1.tar.bz2) = ca12d0852594acabda6a97b91e072872a6d83cd29b9c549a2f03120a8e92b19d1254ac229e27b562c5b0439b92daeec54e95df0282af4cd346e66b876d4a33b3
XSize (dumpet-2.1.tar.bz2) = 14681 bytes
XSHA1 (patch-Makefile) = e8cf230065cd7127ef10228347f9ff4f73f039e9
XSHA1 (patch-dumpet.c) = c46e6a20888d02f4877f836e155879b0c74b946b
XSHA1 (patch-dumpet.h) = b0fee038370552bbaab8c1c12f2db13ddd57edfd
XSHA1 (patch-endian.h) = a229f3410287fe277fea52baea69e73f5089bbec
END-of-devel/dumpet/distinfo
echo c - devel/dumpet/patches
mkdir -p devel/dumpet/patches > /dev/null 2>&1
echo x - devel/dumpet/patches/patch-Makefile
sed 's/^X//' >devel/dumpet/patches/patch-Makefile << 'END-of-devel/dumpet/patches/patch-Makefile'
X$NetBSD$
X
X--- Makefile.orig	2010-08-25 16:54:11.000000000 +0000
X+++ Makefile	2016-08-25 06:34:15.000000000 +0000
X@@ -2,9 +2,8 @@
X VERSION=2.1
X GITVERSION=$(shell [ -d .git ] && git rev-list  --abbrev-commit  -n 1 HEAD  |cut -b 1-8)
X 
X-CFLAGS:=-g3 -O2 -Wall -Werror
X+CFLAGS:=-O2 -Wall -Werror
X LFLAGS:=
X-CC:=gcc
X 
X CFLAGS += $(shell pkg-config --cflags libxml-2.0)
X LFLAGS += -lpopt $(shell pkg-config --libs libxml-2.0)
X@@ -21,8 +20,8 @@ clean : 
X 	@rm -vf *.o dumpet
X 
X install : all
X-	install -D -m 0755 dumpet ${DESTDIR}/usr/bin/dumpet
X-	install -D -m 0644 dumpet.1 ${DESTDIR}/usr/share/man/man1/dumpet.1
X+	${BSD_INSTALL_PROGRAM} dumpet ${DESTDIR}${PREFIX}/bin/dumpet
X+	${BSD_INSTALL_MAN} dumpet.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/dumpet.1
X 
X test-archive: clean all dumpet-$(VERSION)-$(GITVERSION).tar.bz2
X 
END-of-devel/dumpet/patches/patch-Makefile
echo x - devel/dumpet/patches/patch-dumpet.c
sed 's/^X//' >devel/dumpet/patches/patch-dumpet.c << 'END-of-devel/dumpet/patches/patch-dumpet.c'
X$NetBSD$
X
X--- dumpet.c.orig	2010-08-25 16:54:11.000000000 +0000
X+++ dumpet.c	2016-08-26 00:17:46.000000000 +0000
X@@ -285,7 +285,8 @@ static int dumpBootImage(struct context 
X 		image = fopen(filename, "w+");
X 		if (!image) {
X 			int errnum;
X-			fprintf(stderr, "Could not open \"%s\": %m\n", filename);
X+			fprintf(stderr, "Could not open \"%s\": %s\n",
X+			    filename, strerror(errno));
X 			errnum = errno;
X 			free(filename);
X 			return -errnum;
X@@ -781,14 +782,16 @@ int main(int argc, char *argv[])
X 
X 	context.iso = fopen(context.filename, "r");
X 	if (!context.iso) {
X-		fprintf(stderr, "Could not open \"%s\": %m\n", context.filename);
X+		fprintf(stderr, "Could not open \"%s\": %s\n",
X+		    context.filename, strerror(errno));
X 		exit(2);
X 	}
X 
X 	if (context.dumpXml) {
X 		xml = xmlBufferCreate();
X 		if (!xml) {
X-			fprintf(stderr, "Error creating XML buffer: %m\n");
X+			fprintf(stderr, "Error creating XML buffer: %s\n",
X+			    strerror(errno));
X 			exit(3);
X 		}
X 		context.writer = xmlNewTextWriterMemory(xml, 0);
END-of-devel/dumpet/patches/patch-dumpet.c
echo x - devel/dumpet/patches/patch-dumpet.h
sed 's/^X//' >devel/dumpet/patches/patch-dumpet.h << 'END-of-devel/dumpet/patches/patch-dumpet.h'
X$NetBSD$
X
X--- dumpet.h.orig	2010-08-25 16:54:11.000000000 +0000
X+++ dumpet.h	2016-08-26 00:18:41.000000000 +0000
X@@ -39,7 +39,8 @@ static inline int read_sector(FILE *iso,
X 
X 	if (n != 1) {
X 		int errnum = errno;
X-		fprintf(stderr, "dumpet: Error reading image: %m\n");
X+		fprintf(stderr, "dumpet: Error reading image: %s\n",
X+		    strerror(errno));
X 		errno = errnum;
X 		return -errno;
X 	}
X@@ -54,7 +55,8 @@ static inline int write_sector(FILE *iso
X 
X 	if (n != 1) {
X 		int errnum = errno;
X-		fprintf(stderr, "dumpet: Error writing image: %m\n");
X+		fprintf(stderr, "dumpet: Error writing image: %s\n",
X+		    strerror(errno));
X 		errno = errnum;
X 		return -errno;
X 	}
END-of-devel/dumpet/patches/patch-dumpet.h
echo x - devel/dumpet/patches/patch-endian.h
sed 's/^X//' >devel/dumpet/patches/patch-endian.h << 'END-of-devel/dumpet/patches/patch-endian.h'
X$NetBSD$
X
X--- endian.h.orig	2010-08-25 16:54:11.000000000 +0000
X+++ endian.h	2016-08-25 06:19:59.000000000 +0000
X@@ -19,6 +19,7 @@
X #ifndef ENDIAN_H
X #define ENDIAN_H
X 
X+#if defined(__linux__)
X #include <endian.h>
X 
X #if __BYTE_ORDER == __LITTLE_ENDIAN
X@@ -48,6 +49,63 @@
X #define le32_to_cpu(x) __bswap_32(x)
X #define le64_to_cpu(x) __bswap_64(x)
X #endif
X+#elif defined(__APPLE__)
X+#include <libkern/OSByteOrder.h>
X+#define cpu_to_be16(x) OSSwapHostToBigInt16(x)
X+#define cpu_to_be32(x) OSSwapHostToBigInt32(x)
X+#define cpu_to_be64(x) OSSwapHostToBigInt64(x)
X+#define be16_to_cpu(x) OSSwapBigToHostInt16(x)
X+#define be32_to_cpu(x) OSSwapBigToHostInt32(x)
X+#define be64_to_cpu(x) OSSwapBigToHostInt64(x)
X+#define cpu_to_le16(x) OSSwapHostToLittleInt16(x)
X+#define cpu_to_le32(x) OSSwapHostToLittleInt32(x)
X+#define cpu_to_le64(x) OSSwapHostToLittleInt64(x)
X+#define le16_to_cpu(x) OSSwapLittleToHostInt16(x)
X+#define le32_to_cpu(x) OSSwapLittleToHostInt32(x)
X+#define le64_to_cpu(x) OSSwapLittleToHostInt64(x)
X+#elif defined(__sun__)
X+#include <sys/byteorder.h>
X+#define cpu_to_be16(x) BE_16(x)
X+#define cpu_to_be32(x) BE_32(x)
X+#define cpu_to_be64(x) BE_64(x)
X+#define be16_to_cpu(x) BE_IN16(x)
X+#define be32_to_cpu(x) BE_IN32(x)
X+#define be64_to_cpu(x) BE_IN64(x)
X+#define cpu_to_le16(x) LE_16(x)
X+#define cpu_to_le32(x) LE_32(x)
X+#define cpu_to_le64(x) LE_64(x)
X+#define le16_to_cpu(x) LE_IN16(x)
X+#define le32_to_cpu(x) LE_IN32(x)
X+#define le64_to_cpu(x) LE_IN64(x)
X+#elif defined(__OpenBSD__)
X+#include <sys/endian.h>
X+#define cpu_to_be16(x) htobe16(x)
X+#define cpu_to_be32(x) htobe32(x)
X+#define cpu_to_be64(x) htobe64(x)
X+#define be16_to_cpu(x) betoh16(x)
X+#define be32_to_cpu(x) betoh32(x)
X+#define be64_to_cpu(x) betoh64(x)
X+#define cpu_to_le16(x) htole16(x)
X+#define cpu_to_le32(x) htole32(x)
X+#define cpu_to_le64(x) htole64(x)
X+#define le16_to_cpu(x) letoh16(x)
X+#define le32_to_cpu(x) letoh32(x)
X+#define le64_to_cpu(x) letoh64(x)
X+#else /* *BSD */
X+#include <sys/endian.h>
X+#define cpu_to_be16(x) htobe16(x)
X+#define cpu_to_be32(x) htobe32(x)
X+#define cpu_to_be64(x) htobe64(x)
X+#define be16_to_cpu(x) be16toh(x)
X+#define be32_to_cpu(x) be32toh(x)
X+#define be64_to_cpu(x) be64toh(x)
X+#define cpu_to_le16(x) htole16(x)
X+#define cpu_to_le32(x) htole32(x)
X+#define cpu_to_le64(x) htole64(x)
X+#define le16_to_cpu(x) le16toh(x)
X+#define le32_to_cpu(x) le32toh(x)
X+#define le64_to_cpu(x) le64toh(x)
X+#endif
X 
X #endif /* ENDIAN_H */
X /* vim:set shiftwidth=8 softtabstop=8: */
END-of-devel/dumpet/patches/patch-endian.h
exit




Home | Main Index | Thread Index | Old Index