From owner-svn-ports-head@FreeBSD.ORG Mon Jan 19 19:13:37 2015 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3A4BAE2; Mon, 19 Jan 2015 19:13:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DE8BA81; Mon, 19 Jan 2015 19:13:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0JJDbh6092481; Mon, 19 Jan 2015 19:13:37 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0JJDX94092461; Mon, 19 Jan 2015 19:13:33 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501191913.t0JJDX94092461@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 19 Jan 2015 19:13:33 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r377450 - in head/devel: . efivar efivar/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 19:13:37 -0000 Author: trasz Date: Mon Jan 19 19:13:33 2015 New Revision: 377450 URL: https://svnweb.freebsd.org/changeset/ports/377450 QAT: https://qat.redports.org/buildarchive/r377450/ Log: New port: devel/efivar Tools and library to manipulate EFI variables. Sponsored by: The FreeBSD Foundation Added: head/devel/efivar/ head/devel/efivar/Makefile (contents, props changed) head/devel/efivar/distinfo (contents, props changed) head/devel/efivar/files/ head/devel/efivar/files/patch-src-Makefile (contents, props changed) head/devel/efivar/files/patch-src-efivar.c (contents, props changed) head/devel/efivar/files/patch-src-efivar.h (contents, props changed) head/devel/efivar/files/patch-src-efivar.pc.in (contents, props changed) head/devel/efivar/files/patch-src-efivarfs.c (contents, props changed) head/devel/efivar/files/patch-src-guid.c (contents, props changed) head/devel/efivar/files/patch-src-guid.h (contents, props changed) head/devel/efivar/files/patch-src-test-tester.c (contents, props changed) head/devel/efivar/files/patch-src-vars.c (contents, props changed) head/devel/efivar/pkg-descr (contents, props changed) head/devel/efivar/pkg-plist (contents, props changed) Modified: head/devel/Makefile Modified: head/devel/Makefile ============================================================================== --- head/devel/Makefile Mon Jan 19 18:46:51 2015 (r377449) +++ head/devel/Makefile Mon Jan 19 19:13:33 2015 (r377450) @@ -387,6 +387,7 @@ SUBDIR += ebnf2yacc SUBDIR += ecgi SUBDIR += edb + SUBDIR += efivar SUBDIR += efl SUBDIR += eggdbus SUBDIR += egypt Added: head/devel/efivar/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/efivar/Makefile Mon Jan 19 19:13:33 2015 (r377450) @@ -0,0 +1,51 @@ +# Created by: Edward Tomasz Napierala +# $FreeBSD$ + +PORTNAME= efivar +PORTVERSION= 0.15 +CATEGORIES= devel + +MAINTAINER= trasz@FreeBSD.org +COMMENT= Tools and library to manipulate EFI variables + +LICENSE= LGPL21 + +LIB_DEPENDS= libpopt.so:${PORTSDIR}/devel/popt + +USE_GCC= 4.8+ +USE_GITHUB= yes +GH_ACCOUNT= vathpela +GH_COMMIT= 5776088 + +USES= gmake pkgconfig +USE_LDCONFIG= yes + +.include + +post-patch: + @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/src/efivar.pc.in + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/src/efivar ${STAGEDIR}${PREFIX}/bin + ${INSTALL_LIB} ${WRKSRC}/src/libefivar.so ${STAGEDIR}${PREFIX}/lib + ${INSTALL_LIB} ${WRKSRC}/src/libefivar.so.0 ${STAGEDIR}${PREFIX}/lib + ${INSTALL_DATA} ${WRKSRC}/src/efivar.h ${STAGEDIR}${PREFIX}/include + ${INSTALL_DATA} ${WRKSRC}/src/efivar-guids.h ${STAGEDIR}${PREFIX}/include + ${INSTALL_DATA} ${WRKSRC}/src/efivar.pc ${STAGEDIR}${PREFIX}/libdata/pkgconfig + ${INSTALL_MAN} ${WRKSRC}/docs/efivar.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 + ${INSTALL_MAN} ${WRKSRC}/docs/efi_append_variable.3 ${STAGEDIR}${MAN1PREFIX}/man/man3 + ${INSTALL_MAN} ${WRKSRC}/docs/efi_del_variable.3 ${STAGEDIR}${MAN1PREFIX}/man/man3 + ${INSTALL_MAN} ${WRKSRC}/docs/efi_get_next_variable_name.3 ${STAGEDIR}${MAN1PREFIX}/man/man3 + ${INSTALL_MAN} ${WRKSRC}/docs/efi_get_variable.3 ${STAGEDIR}${MAN1PREFIX}/man/man3 + ${INSTALL_MAN} ${WRKSRC}/docs/efi_get_variable_attributes.3 ${STAGEDIR}${MAN1PREFIX}/man/man3 + ${INSTALL_MAN} ${WRKSRC}/docs/efi_get_variable_size.3 ${STAGEDIR}${MAN1PREFIX}/man/man3 + ${INSTALL_MAN} ${WRKSRC}/docs/efi_guid_to_name.3 ${STAGEDIR}${MAN1PREFIX}/man/man3 + ${INSTALL_MAN} ${WRKSRC}/docs/efi_guid_to_str.3 ${STAGEDIR}${MAN1PREFIX}/man/man3 + ${INSTALL_MAN} ${WRKSRC}/docs/efi_guid_to_symbol.3 ${STAGEDIR}${MAN1PREFIX}/man/man3 + ${INSTALL_MAN} ${WRKSRC}/docs/efi_name_to_guid.3 ${STAGEDIR}${MAN1PREFIX}/man/man3 + ${INSTALL_MAN} ${WRKSRC}/docs/efi_set_variable.3 ${STAGEDIR}${MAN1PREFIX}/man/man3 + ${INSTALL_MAN} ${WRKSRC}/docs/efi_str_to_guid.3 ${STAGEDIR}${MAN1PREFIX}/man/man3 + ${INSTALL_MAN} ${WRKSRC}/docs/efi_symbol_to_guid.3 ${STAGEDIR}${MAN1PREFIX}/man/man3 + ${INSTALL_MAN} ${WRKSRC}/docs/efi_variables_supported.3 ${STAGEDIR}${MAN1PREFIX}/man/man3 + +.include Added: head/devel/efivar/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/efivar/distinfo Mon Jan 19 19:13:33 2015 (r377450) @@ -0,0 +1,2 @@ +SHA256 (efivar-0.15.tar.gz) = 1ca09c58b4071f96783f53aa14d123489d910f6f3a9a12996ea57d0ea5b9f8dc +SIZE (efivar-0.15.tar.gz) = 30079 Added: head/devel/efivar/files/patch-src-Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/efivar/files/patch-src-Makefile Mon Jan 19 19:13:33 2015 (r377450) @@ -0,0 +1,10 @@ +--- src/Makefile.orig 2015-01-19 15:35:31.000000000 +0100 ++++ src/Makefile 2015-01-19 15:35:42.000000000 +0100 +@@ -15,7 +15,6 @@ all : $(LIBTARGETS) $(PCTARGETS) $(BINTA + OBJECTS = lib.o vars.o efivarfs.o guid.o guidlist.o guid-symbols.o + DEPS = .lib.c.P .efivar.c.P .efivar.h.P .vars.c.P .lib.h.P \ + .generics.h.P .guid.h.P .guid.c.P +-LIBS = dl + + libefivar.a :: $(OBJECTS) + Added: head/devel/efivar/files/patch-src-efivar.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/efivar/files/patch-src-efivar.c Mon Jan 19 19:13:33 2015 (r377450) @@ -0,0 +1,51 @@ +--- src/efivar.c.orig 2014-10-15 15:48:49.000000000 +0200 ++++ src/efivar.c 2015-01-19 15:41:34.000000000 +0100 +@@ -16,11 +16,11 @@ + * along with this library. If not, see . + */ + +-#include + #include + #include + #include + #include ++#include + #include + #include + #include +@@ -53,7 +53,7 @@ list_all_variables(void) + int rc; + while ((rc = efi_get_next_variable_name(&guid, &name)) > 0) + printf(GUID_FORMAT "-%s\n", +- guid->a, guid->b, guid->c, bswap_16(guid->d), ++ guid->a, guid->b, guid->c, bswap16(guid->d), + guid->e[0], guid->e[1], guid->e[2], guid->e[3], + guid->e[4], guid->e[5], name); + +@@ -142,7 +142,7 @@ show_variable(char *guid_name) + } + + printf("GUID: "GUID_FORMAT "\n", +- guid.a, guid.b, guid.c, bswap_16(guid.d), ++ guid.a, guid.b, guid.c, bswap16(guid.d), + guid.e[0], guid.e[1], guid.e[2], guid.e[3], + guid.e[4], guid.e[5]); + printf("Name: \"%s\"\n", name); +@@ -240,7 +240,7 @@ prepare_data(const char *filename, void + goto err; + + buflen = statbuf.st_size; +- buf = mmap(NULL, buflen, PROT_READ, MAP_PRIVATE|MAP_POPULATE, fd, 0); ++ buf = mmap(NULL, buflen, PROT_READ, MAP_PRIVATE, fd, 0); + if (!buf) + goto err; + +@@ -338,7 +338,7 @@ int main(int argc, char *argv[]) + { + printf("{"GUID_FORMAT"} {%s} %s %s\n", + guid->guid.a, guid->guid.b, +- guid->guid.c, bswap_16(guid->guid.d), ++ guid->guid.c, bswap16(guid->guid.d), + guid->guid.e[0], guid->guid.e[1], + guid->guid.e[2], guid->guid.e[3], + guid->guid.e[4], guid->guid.e[5], Added: head/devel/efivar/files/patch-src-efivar.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/efivar/files/patch-src-efivar.h Mon Jan 19 19:13:33 2015 (r377450) @@ -0,0 +1,28 @@ +--- src/efivar.h.orig 2014-10-15 15:48:49.000000000 +0200 ++++ src/efivar.h 2015-01-19 15:32:22.000000000 +0100 +@@ -25,7 +25,6 @@ + #include + #include + #include +-#include + + typedef struct { + uint32_t a; +@@ -40,7 +39,7 @@ typedef struct { + #endif + + #define EFI_GUID(a,b,c,d,e0,e1,e2,e3,e4,e5) \ +-((efi_guid_t) {(a), (b), (c), bswap_16(d), { (e0), (e1), (e2), (e3), (e4), (e5) }}) ++((efi_guid_t) {(a), (b), (c), bswap16(d), { (e0), (e1), (e2), (e3), (e4), (e5) }}) + + #define EFI_GLOBAL_GUID EFI_GUID(0x8be4df61,0x93ca,0x11d2,0xaa0d,0x00,0xe0,0x98,0x03,0x2b,0x8c) + +@@ -85,7 +84,7 @@ efi_set_variable(efi_guid_t guid, const + return -1; + } + +- if (__va_arg_pack_len() == 0) ++ if (__builtin_va_arg_pack_len() == 0) + return _efi_set_variable(guid, name, data, data_size, + attributes, 0644); + Added: head/devel/efivar/files/patch-src-efivar.pc.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/efivar/files/patch-src-efivar.pc.in Mon Jan 19 19:13:33 2015 (r377450) @@ -0,0 +1,19 @@ +--- src/efivar.pc.in.orig 2014-10-15 15:48:49.000000000 +0200 ++++ src/efivar.pc.in 2015-01-19 16:23:12.000000000 +0100 +@@ -1,10 +1,11 @@ +-prefix=/usr +-exec_prefix=/usr +-libdir=@@LIBDIR@@ +-includedir=/usr/include ++prefix=%%PREFIX%% ++exec_prefix=${prefix} ++libdir=${exec_prefix}/lib ++includedir=${prefix}/include + + Name: efivar + Description: UEFI Variable Management + Version: @@VERSION@@ + Requires: +-Libs: -L${libdir} -lefivar -ldl ++Libs: -L${libdir} -lefivar ++Cflags: -I${includedir} Added: head/devel/efivar/files/patch-src-efivarfs.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/efivar/files/patch-src-efivarfs.c Mon Jan 19 19:13:33 2015 (r377450) @@ -0,0 +1,29 @@ +--- src/efivarfs.c.orig 2015-01-19 15:38:34.000000000 +0100 ++++ src/efivarfs.c 2015-01-19 15:40:15.000000000 +0100 +@@ -18,15 +18,15 @@ + + #include + #include +-#include + #include + #include + #include + #include ++#include + #include ++#include + #include + #include +-#include + #include + + #include "lib.h" +@@ -66,7 +66,7 @@ efivarfs_probe(void) + #define make_efivarfs_path(str, guid, name) ({ \ + asprintf(str, EFIVARS_PATH "%s-" GUID_FORMAT, \ + name, (guid).a, (guid).b, (guid).c, \ +- bswap_16((guid).d), \ ++ bswap16((guid).d), \ + (guid).e[0], (guid).e[1], (guid).e[2], \ + (guid).e[3], (guid).e[4], (guid).e[5]); \ + }) Added: head/devel/efivar/files/patch-src-guid.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/efivar/files/patch-src-guid.c Mon Jan 19 19:13:33 2015 (r377450) @@ -0,0 +1,44 @@ +--- src/guid.c.orig 2015-01-19 15:37:01.000000000 +0100 ++++ src/guid.c 2015-01-19 15:37:10.000000000 +0100 +@@ -41,17 +41,17 @@ efi_guid_to_str(const efi_guid_t *guid, + + if (!sp) { + return snprintf(NULL, 0, GUID_FORMAT, +- guid->a, guid->b, guid->c, bswap_16(guid->d), ++ guid->a, guid->b, guid->c, bswap16(guid->d), + guid->e[0], guid->e[1], guid->e[2], guid->e[3], + guid->e[4], guid->e[5]); + } else if (sp && *sp) { + return snprintf(*sp, GUID_LENGTH_WITH_NUL, GUID_FORMAT, +- guid->a, guid->b, guid->c, bswap_16(guid->d), ++ guid->a, guid->b, guid->c, bswap16(guid->d), + guid->e[0], guid->e[1], guid->e[2], guid->e[3], + guid->e[4], guid->e[5]); + } else { + rc = asprintf(&ret, GUID_FORMAT, +- guid->a, guid->b, guid->c, bswap_16(guid->d), ++ guid->a, guid->b, guid->c, bswap16(guid->d), + guid->e[0], guid->e[1], guid->e[2], guid->e[3], + guid->e[4], guid->e[5]); + if (rc >= 0) +@@ -161,17 +161,17 @@ efi_guid_to_id_guid(const efi_guid_t *gu + } + if (!sp) { + return snprintf(NULL, 0, "{"GUID_FORMAT"}", +- guid->a, guid->b, guid->c, bswap_16(guid->d), ++ guid->a, guid->b, guid->c, bswap16(guid->d), + guid->e[0], guid->e[1], guid->e[2], guid->e[3], + guid->e[4], guid->e[5]); + } else if (sp && *sp) { + return snprintf(*sp, GUID_LENGTH_WITH_NUL+2, "{"GUID_FORMAT"}", +- guid->a, guid->b, guid->c, bswap_16(guid->d), ++ guid->a, guid->b, guid->c, bswap16(guid->d), + guid->e[0], guid->e[1], guid->e[2], guid->e[3], + guid->e[4], guid->e[5]); + } + rc = asprintf(&ret, "{"GUID_FORMAT"}", +- guid->a, guid->b, guid->c, bswap_16(guid->d), ++ guid->a, guid->b, guid->c, bswap16(guid->d), + guid->e[0], guid->e[1], guid->e[2], guid->e[3], + guid->e[4], guid->e[5]); + if (rc >= 0) Added: head/devel/efivar/files/patch-src-guid.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/efivar/files/patch-src-guid.h Mon Jan 19 19:13:33 2015 (r377450) @@ -0,0 +1,20 @@ +--- src/guid.h.orig 2014-10-15 15:48:49.000000000 +0200 ++++ src/guid.h 2015-01-19 15:34:12.000000000 +0100 +@@ -19,7 +19,7 @@ + #ifndef LIBEFIVAR_GUID_H + #define LIBEFIVAR_GUID_H 1 + +-#include ++#include + #include + #include + #include +@@ -111,7 +111,7 @@ text_to_guid(const char *text, efi_guid_ + strncpy(fourbytes, text+19, 4); + if (check_segment_sanity(fourbytes, 4) < 0) + return -1; +- guid->d = bswap_16((uint16_t)strtoul(fourbytes, NULL, 16)); ++ guid->d = bswap16((uint16_t)strtoul(fourbytes, NULL, 16)); + + /* 84be9c3e-8a32-42c0-891c-4cd3b072becc + * ^ */ Added: head/devel/efivar/files/patch-src-test-tester.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/efivar/files/patch-src-test-tester.c Mon Jan 19 19:13:33 2015 (r377450) @@ -0,0 +1,14 @@ +--- src/test/tester.c.orig 2015-01-19 15:43:11.000000000 +0100 ++++ src/test/tester.c 2015-01-19 15:43:31.000000000 +0100 +@@ -1,10 +1,10 @@ +-#include + #include + #include + #include + #include + #include + #include ++#include + #include + #include + #include Added: head/devel/efivar/files/patch-src-vars.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/efivar/files/patch-src-vars.c Mon Jan 19 19:13:33 2015 (r377450) @@ -0,0 +1,47 @@ +--- src/vars.c.orig 2015-01-19 15:36:23.000000000 +0100 ++++ src/vars.c 2015-01-19 15:36:36.000000000 +0100 +@@ -94,7 +94,7 @@ vars_get_variable_size(efi_guid_t guid, + + char *path = NULL; + int rc = asprintf(&path, VARS_PATH "%s-"GUID_FORMAT"/size", +- name, guid.a, guid.b, guid.c, bswap_16(guid.d), ++ name, guid.a, guid.b, guid.c, bswap16(guid.d), + guid.e[0], guid.e[1], guid.e[2], guid.e[3], + guid.e[4], guid.e[5]); + if (rc < 0) +@@ -146,7 +146,7 @@ vars_get_variable(efi_guid_t guid, const + size_t bufsize = -1; + char *path; + int rc = asprintf(&path, VARS_PATH "%s-" GUID_FORMAT "/raw_var", +- name, guid.a, guid.b, guid.c, bswap_16(guid.d), ++ name, guid.a, guid.b, guid.c, bswap16(guid.d), + guid.e[0], guid.e[1], guid.e[2], + guid.e[3], guid.e[4], guid.e[5]); + if (rc < 0) +@@ -193,7 +193,7 @@ vars_del_variable(efi_guid_t guid, const + int ret = -1; + char *path; + int rc = asprintf(&path, VARS_PATH "%s-" GUID_FORMAT "/raw_var", +- name, guid.a, guid.b, guid.c, bswap_16(guid.d), ++ name, guid.a, guid.b, guid.c, bswap16(guid.d), + guid.e[0], guid.e[1], guid.e[2], + guid.e[3], guid.e[4], guid.e[5]); + if (rc < 0) +@@ -280,7 +280,7 @@ vars_chmod_variable(efi_guid_t guid, con + + char *path; + int rc = asprintf(&path, VARS_PATH "%s-" GUID_FORMAT, +- name, guid.a, guid.b, guid.c, bswap_16(guid.d), ++ name, guid.a, guid.b, guid.c, bswap16(guid.d), + guid.e[0], guid.e[1], guid.e[2], guid.e[3], + guid.e[4], guid.e[5]); + if (rc < 0) +@@ -312,7 +312,7 @@ vars_set_variable(efi_guid_t guid, const + + char *path; + int rc = asprintf(&path, VARS_PATH "%s-" GUID_FORMAT "/data", +- name, guid.a, guid.b, guid.c, bswap_16(guid.d), ++ name, guid.a, guid.b, guid.c, bswap16(guid.d), + guid.e[0], guid.e[1], guid.e[2], guid.e[3], + guid.e[4], guid.e[5]); + if (rc < 0) Added: head/devel/efivar/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/efivar/pkg-descr Mon Jan 19 19:13:33 2015 (r377450) @@ -0,0 +1,3 @@ +Tools and library to manipulate EFI variables. + +WWW: https://github.com/vathpela/efivar Added: head/devel/efivar/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/efivar/pkg-plist Mon Jan 19 19:13:33 2015 (r377450) @@ -0,0 +1,21 @@ +bin/efivar +include/efivar-guids.h +include/efivar.h +lib/libefivar.so +lib/libefivar.so.0 +libdata/pkgconfig/efivar.pc +man/man1/efivar.1.gz +man/man3/efi_append_variable.3.gz +man/man3/efi_del_variable.3.gz +man/man3/efi_get_next_variable_name.3.gz +man/man3/efi_get_variable.3.gz +man/man3/efi_get_variable_attributes.3.gz +man/man3/efi_get_variable_size.3.gz +man/man3/efi_guid_to_name.3.gz +man/man3/efi_guid_to_str.3.gz +man/man3/efi_guid_to_symbol.3.gz +man/man3/efi_name_to_guid.3.gz +man/man3/efi_set_variable.3.gz +man/man3/efi_str_to_guid.3.gz +man/man3/efi_symbol_to_guid.3.gz +man/man3/efi_variables_supported.3.gz