pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/dumpet PR/51445: Import dumpet 2.1 as devel/dumpet.
details: https://anonhg.NetBSD.org/pkgsrc/rev/7b92c237afb2
branches: trunk
changeset: 351767:7b92c237afb2
user: nonaka <nonaka%pkgsrc.org@localhost>
date: Sat Aug 27 11:53:39 2016 +0000
description:
PR/51445: Import dumpet 2.1 as devel/dumpet.
dumpet is a tool to dump information about bootable CDs and other similar.
diffstat:
devel/dumpet/DESCR | 2 +
devel/dumpet/Makefile | 19 +++++++++
devel/dumpet/PLIST | 3 +
devel/dumpet/distinfo | 10 ++++
devel/dumpet/patches/patch-Makefile | 26 ++++++++++++
devel/dumpet/patches/patch-dumpet.c | 33 ++++++++++++++++
devel/dumpet/patches/patch-dumpet.h | 24 +++++++++++
devel/dumpet/patches/patch-endian.h | 76 +++++++++++++++++++++++++++++++++++++
8 files changed, 193 insertions(+), 0 deletions(-)
diffs (225 lines):
diff -r 53e7cd21f597 -r 7b92c237afb2 devel/dumpet/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/dumpet/DESCR Sat Aug 27 11:53:39 2016 +0000
@@ -0,0 +1,2 @@
+dumpet is a tool to dump information about bootable CDs and other similar
+formats.
diff -r 53e7cd21f597 -r 7b92c237afb2 devel/dumpet/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/dumpet/Makefile Sat Aug 27 11:53:39 2016 +0000
@@ -0,0 +1,19 @@
+# $NetBSD: Makefile,v 1.1 2016/08/27 11:53:39 nonaka Exp $
+
+DISTNAME= dumpet-2.1
+CATEGORIES= devel
+MASTER_SITES= https://fedorahosted.org/releases/d/u/dumpet/
+EXTRACT_SUFX= .tar.bz2
+
+MAINTAINER= nonakap%gmail.com@localhost
+HOMEPAGE= https://fedorahosted.org/dumpet/
+COMMENT= Dump information about bootable CDs and other similar formats
+LICENSE= gnu-gpl-v2
+
+USE_TOOLS+= gmake pkg-config
+
+INSTALLATION_DIRS+= bin ${PKGMANDIR}/man1
+
+.include "../../devel/popt/buildlink3.mk"
+.include "../../textproc/libxml2/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 53e7cd21f597 -r 7b92c237afb2 devel/dumpet/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/dumpet/PLIST Sat Aug 27 11:53:39 2016 +0000
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2016/08/27 11:53:39 nonaka Exp $
+bin/dumpet
+man/man1/dumpet.1
diff -r 53e7cd21f597 -r 7b92c237afb2 devel/dumpet/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/dumpet/distinfo Sat Aug 27 11:53:39 2016 +0000
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.1 2016/08/27 11:53:39 nonaka Exp $
+
+SHA1 (dumpet-2.1.tar.bz2) = 56fc8a52a8df12083912496d6d7de993f2063ec1
+RMD160 (dumpet-2.1.tar.bz2) = cf1a0923c658ef285176fca59c97a3e04636b4ef
+SHA512 (dumpet-2.1.tar.bz2) = ca12d0852594acabda6a97b91e072872a6d83cd29b9c549a2f03120a8e92b19d1254ac229e27b562c5b0439b92daeec54e95df0282af4cd346e66b876d4a33b3
+Size (dumpet-2.1.tar.bz2) = 14681 bytes
+SHA1 (patch-Makefile) = 23c20aa9c1c9a278344270a8930506387b8de908
+SHA1 (patch-dumpet.c) = c46e6a20888d02f4877f836e155879b0c74b946b
+SHA1 (patch-dumpet.h) = b0fee038370552bbaab8c1c12f2db13ddd57edfd
+SHA1 (patch-endian.h) = a229f3410287fe277fea52baea69e73f5089bbec
diff -r 53e7cd21f597 -r 7b92c237afb2 devel/dumpet/patches/patch-Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/dumpet/patches/patch-Makefile Sat Aug 27 11:53:39 2016 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-Makefile,v 1.1 2016/08/27 11:53:39 nonaka Exp $
+
+--- Makefile.orig 2010-08-25 16:54:11.000000000 +0000
++++ Makefile 2016-08-27 11:42:25.542635771 +0000
+@@ -2,9 +2,7 @@
+ VERSION=2.1
+ GITVERSION=$(shell [ -d .git ] && git rev-list --abbrev-commit -n 1 HEAD |cut -b 1-8)
+
+-CFLAGS:=-g3 -O2 -Wall -Werror
+-LFLAGS:=
+-CC:=gcc
++CFLAGS += -Wall
+
+ CFLAGS += $(shell pkg-config --cflags libxml-2.0)
+ LFLAGS += -lpopt $(shell pkg-config --libs libxml-2.0)
+@@ -21,8 +19,8 @@ clean :
+ @rm -vf *.o dumpet
+
+ install : all
+- install -D -m 0755 dumpet ${DESTDIR}/usr/bin/dumpet
+- install -D -m 0644 dumpet.1 ${DESTDIR}/usr/share/man/man1/dumpet.1
++ ${BSD_INSTALL_PROGRAM} dumpet ${DESTDIR}${PREFIX}/bin/dumpet
++ ${BSD_INSTALL_MAN} dumpet.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/dumpet.1
+
+ test-archive: clean all dumpet-$(VERSION)-$(GITVERSION).tar.bz2
+
diff -r 53e7cd21f597 -r 7b92c237afb2 devel/dumpet/patches/patch-dumpet.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/dumpet/patches/patch-dumpet.c Sat Aug 27 11:53:39 2016 +0000
@@ -0,0 +1,33 @@
+$NetBSD: patch-dumpet.c,v 1.1 2016/08/27 11:53:39 nonaka Exp $
+
+--- dumpet.c.orig 2010-08-25 16:54:11.000000000 +0000
++++ dumpet.c 2016-08-26 00:17:46.000000000 +0000
+@@ -285,7 +285,8 @@ static int dumpBootImage(struct context
+ image = fopen(filename, "w+");
+ if (!image) {
+ int errnum;
+- fprintf(stderr, "Could not open \"%s\": %m\n", filename);
++ fprintf(stderr, "Could not open \"%s\": %s\n",
++ filename, strerror(errno));
+ errnum = errno;
+ free(filename);
+ return -errnum;
+@@ -781,14 +782,16 @@ int main(int argc, char *argv[])
+
+ context.iso = fopen(context.filename, "r");
+ if (!context.iso) {
+- fprintf(stderr, "Could not open \"%s\": %m\n", context.filename);
++ fprintf(stderr, "Could not open \"%s\": %s\n",
++ context.filename, strerror(errno));
+ exit(2);
+ }
+
+ if (context.dumpXml) {
+ xml = xmlBufferCreate();
+ if (!xml) {
+- fprintf(stderr, "Error creating XML buffer: %m\n");
++ fprintf(stderr, "Error creating XML buffer: %s\n",
++ strerror(errno));
+ exit(3);
+ }
+ context.writer = xmlNewTextWriterMemory(xml, 0);
diff -r 53e7cd21f597 -r 7b92c237afb2 devel/dumpet/patches/patch-dumpet.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/dumpet/patches/patch-dumpet.h Sat Aug 27 11:53:39 2016 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-dumpet.h,v 1.1 2016/08/27 11:53:39 nonaka Exp $
+
+--- dumpet.h.orig 2010-08-25 16:54:11.000000000 +0000
++++ dumpet.h 2016-08-26 00:18:41.000000000 +0000
+@@ -39,7 +39,8 @@ static inline int read_sector(FILE *iso,
+
+ if (n != 1) {
+ int errnum = errno;
+- fprintf(stderr, "dumpet: Error reading image: %m\n");
++ fprintf(stderr, "dumpet: Error reading image: %s\n",
++ strerror(errno));
+ errno = errnum;
+ return -errno;
+ }
+@@ -54,7 +55,8 @@ static inline int write_sector(FILE *iso
+
+ if (n != 1) {
+ int errnum = errno;
+- fprintf(stderr, "dumpet: Error writing image: %m\n");
++ fprintf(stderr, "dumpet: Error writing image: %s\n",
++ strerror(errno));
+ errno = errnum;
+ return -errno;
+ }
diff -r 53e7cd21f597 -r 7b92c237afb2 devel/dumpet/patches/patch-endian.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/dumpet/patches/patch-endian.h Sat Aug 27 11:53:39 2016 +0000
@@ -0,0 +1,76 @@
+$NetBSD: patch-endian.h,v 1.1 2016/08/27 11:53:39 nonaka Exp $
+
+--- endian.h.orig 2010-08-25 16:54:11.000000000 +0000
++++ endian.h 2016-08-25 06:19:59.000000000 +0000
+@@ -19,6 +19,7 @@
+ #ifndef ENDIAN_H
+ #define ENDIAN_H
+
++#if defined(__linux__)
+ #include <endian.h>
+
+ #if __BYTE_ORDER == __LITTLE_ENDIAN
+@@ -48,6 +49,63 @@
+ #define le32_to_cpu(x) __bswap_32(x)
+ #define le64_to_cpu(x) __bswap_64(x)
+ #endif
++#elif defined(__APPLE__)
++#include <libkern/OSByteOrder.h>
++#define cpu_to_be16(x) OSSwapHostToBigInt16(x)
++#define cpu_to_be32(x) OSSwapHostToBigInt32(x)
++#define cpu_to_be64(x) OSSwapHostToBigInt64(x)
++#define be16_to_cpu(x) OSSwapBigToHostInt16(x)
++#define be32_to_cpu(x) OSSwapBigToHostInt32(x)
++#define be64_to_cpu(x) OSSwapBigToHostInt64(x)
++#define cpu_to_le16(x) OSSwapHostToLittleInt16(x)
++#define cpu_to_le32(x) OSSwapHostToLittleInt32(x)
++#define cpu_to_le64(x) OSSwapHostToLittleInt64(x)
++#define le16_to_cpu(x) OSSwapLittleToHostInt16(x)
++#define le32_to_cpu(x) OSSwapLittleToHostInt32(x)
++#define le64_to_cpu(x) OSSwapLittleToHostInt64(x)
++#elif defined(__sun__)
++#include <sys/byteorder.h>
++#define cpu_to_be16(x) BE_16(x)
++#define cpu_to_be32(x) BE_32(x)
++#define cpu_to_be64(x) BE_64(x)
++#define be16_to_cpu(x) BE_IN16(x)
++#define be32_to_cpu(x) BE_IN32(x)
++#define be64_to_cpu(x) BE_IN64(x)
++#define cpu_to_le16(x) LE_16(x)
++#define cpu_to_le32(x) LE_32(x)
++#define cpu_to_le64(x) LE_64(x)
++#define le16_to_cpu(x) LE_IN16(x)
++#define le32_to_cpu(x) LE_IN32(x)
++#define le64_to_cpu(x) LE_IN64(x)
++#elif defined(__OpenBSD__)
++#include <sys/endian.h>
++#define cpu_to_be16(x) htobe16(x)
++#define cpu_to_be32(x) htobe32(x)
++#define cpu_to_be64(x) htobe64(x)
++#define be16_to_cpu(x) betoh16(x)
++#define be32_to_cpu(x) betoh32(x)
++#define be64_to_cpu(x) betoh64(x)
++#define cpu_to_le16(x) htole16(x)
++#define cpu_to_le32(x) htole32(x)
++#define cpu_to_le64(x) htole64(x)
++#define le16_to_cpu(x) letoh16(x)
++#define le32_to_cpu(x) letoh32(x)
++#define le64_to_cpu(x) letoh64(x)
++#else /* *BSD */
++#include <sys/endian.h>
++#define cpu_to_be16(x) htobe16(x)
++#define cpu_to_be32(x) htobe32(x)
++#define cpu_to_be64(x) htobe64(x)
++#define be16_to_cpu(x) be16toh(x)
++#define be32_to_cpu(x) be32toh(x)
++#define be64_to_cpu(x) be64toh(x)
++#define cpu_to_le16(x) htole16(x)
++#define cpu_to_le32(x) htole32(x)
++#define cpu_to_le64(x) htole64(x)
++#define le16_to_cpu(x) le16toh(x)
++#define le32_to_cpu(x) le32toh(x)
++#define le64_to_cpu(x) le64toh(x)
++#endif
+
+ #endif /* ENDIAN_H */
+ /* vim:set shiftwidth=8 softtabstop=8: */
Home |
Main Index |
Thread Index |
Old Index