svn commit: r418507 - in head/devel/elfutils: . files

Conrad E. Meyer cem at FreeBSD.org
Wed Jul 13 22:03:12 UTC 2016


Author: cem (src committer)
Date: Wed Jul 13 22:03:10 2016
New Revision: 418507
URL: https://svnweb.freebsd.org/changeset/ports/418507

Log:
  elfutils:
  
  - Fix MASTER_SITES URL.
  - Install included elf.h, until base elf.h can be updated to include
    Elf_Section and Elf_auxv_t.
  - Patch installed libelf.h to use off_t instead of loff_t.  Perhaps base should
    add loff_t as an alias for compatibility.
  
  Reviewed by:	portlint
  Sponsored by:	EMC / Isilon Storage Division

Added:
  head/devel/elfutils/files/patch-libelf_Makefile.am   (contents, props changed)
  head/devel/elfutils/files/patch-libelf_libelf.h   (contents, props changed)
Modified:
  head/devel/elfutils/Makefile
  head/devel/elfutils/pkg-plist

Modified: head/devel/elfutils/Makefile
==============================================================================
--- head/devel/elfutils/Makefile	Wed Jul 13 21:22:13 2016	(r418506)
+++ head/devel/elfutils/Makefile	Wed Jul 13 22:03:10 2016	(r418507)
@@ -3,8 +3,9 @@
 
 PORTNAME=	elfutils
 PORTVERSION=	0.163
+PORTREVISION=	1
 CATEGORIES=	devel
-MASTER_SITES=	https://fedorahosted.org/releases/e/l/elfutils/
+MASTER_SITES=	https://fedorahosted.org/releases/e/l/elfutils/$(PORTVERSION)/
 
 MAINTAINER=	cem at FreeBSD.org
 COMMENT=	Library for manipulating ELF files and partial implementation of binutils
@@ -38,5 +39,6 @@ post-patch:
 	    $(LOCALBASE)/share/gnulib/lib/obstack.h \
 	    $(LOCALBASE)/share/gnulib/lib/obstack_printf.c \
 	    $(WRKSRC)/lib
+	@cd $(WRKSRC) && ${LN} -s libelf elfutils
 
 .include <bsd.port.mk>

Added: head/devel/elfutils/files/patch-libelf_Makefile.am
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/elfutils/files/patch-libelf_Makefile.am	Wed Jul 13 22:03:10 2016	(r418507)
@@ -0,0 +1,20 @@
+--- libelf/Makefile.am.orig	2014-12-22 15:04:49 UTC
++++ libelf/Makefile.am
+@@ -39,7 +39,7 @@ noinst_LIBRARIES = libelf_pic.a
+ noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so)
+ include_HEADERS = libelf.h gelf.h nlist.h
+ 
+-pkginclude_HEADERS = elf-knowledge.h
++pkginclude_HEADERS = elf-knowledge.h elf.h
+ 
+ libelf_a_SOURCES = elf_version.c elf_hash.c elf_error.c elf_fill.c \
+ 		   elf_begin.c elf_next.c elf_rand.c elf_end.c elf_kind.c \
+@@ -117,7 +117,7 @@ uninstall: uninstall-am
+ 	rm -f $(DESTDIR)$(libdir)/libelf.so.$(VERSION)
+ 	rm -f $(DESTDIR)$(libdir)/libelf.so
+ 
+-noinst_HEADERS = elf.h abstract.h common.h exttypes.h gelf_xlate.h libelfP.h \
++noinst_HEADERS = abstract.h common.h exttypes.h gelf_xlate.h libelfP.h \
+ 		 version_xlate.h gnuhash_xlate.h note_xlate.h dl-hash.h
+ EXTRA_DIST = libelf.map
+ 

Added: head/devel/elfutils/files/patch-libelf_libelf.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/elfutils/files/patch-libelf_libelf.h	Wed Jul 13 22:03:10 2016	(r418507)
@@ -0,0 +1,63 @@
+--- libelf/libelf.h.orig	2014-08-18 19:48:26 UTC
++++ libelf/libelf.h
+@@ -32,7 +32,7 @@
+ #include <sys/types.h>
+ 
+ /* Get the ELF types.  */
+-#include <elf.h>
++#include <elfutils/elf.h>
+ 
+ 
+ /* Known translation types.  */
+@@ -74,7 +74,7 @@ typedef struct
+   Elf_Type d_type;		/* Type of this piece of data.  */
+   unsigned int d_version;	/* ELF version.  */
+   size_t d_size;		/* Size in bytes.  */
+-  loff_t d_off;			/* Offset into section.  */
++  off_t d_off;			/* Offset into section.  */
+   size_t d_align;		/* Alignment in section.  */
+ } Elf_Data;
+ 
+@@ -136,7 +136,7 @@ typedef struct
+   uid_t ar_uid;			/* User ID.  */
+   gid_t ar_gid;			/* Group ID.  */
+   mode_t ar_mode;		/* File mode.  */
+-  loff_t ar_size;		/* File size.  */
++  off_t ar_size;		/* File size.  */
+   char *ar_rawname;		/* Original name of archive member.  */
+ } Elf_Arhdr;
+ 
+@@ -177,13 +177,13 @@ extern Elf_Cmd elf_next (Elf *__elf);
+ extern int elf_end (Elf *__elf);
+ 
+ /* Update ELF descriptor and write file to disk.  */
+-extern loff_t elf_update (Elf *__elf, Elf_Cmd __cmd);
++extern off_t elf_update (Elf *__elf, Elf_Cmd __cmd);
+ 
+ /* Determine what kind of file is associated with ELF.  */
+ extern Elf_Kind elf_kind (Elf *__elf) __attribute__ ((__pure__));
+ 
+ /* Get the base offset for an object file.  */
+-extern loff_t elf_getbase (Elf *__elf);
++extern off_t elf_getbase (Elf *__elf);
+ 
+ 
+ /* Retrieve file identification data.  */
+@@ -301,7 +301,7 @@ extern Elf_Data *elf_newdata (Elf_Scn *_
+    would be for TYPE.  The resulting Elf_Data pointer is valid until
+    elf_end (ELF) is called.  */
+ extern Elf_Data *elf_getdata_rawchunk (Elf *__elf,
+-				       loff_t __offset, size_t __size,
++				       off_t __offset, size_t __size,
+ 				       Elf_Type __type);
+ 
+ 
+@@ -313,7 +313,7 @@ extern char *elf_strptr (Elf *__elf, siz
+ extern Elf_Arhdr *elf_getarhdr (Elf *__elf);
+ 
+ /* Return offset in archive for current file ELF.  */
+-extern loff_t elf_getaroff (Elf *__elf);
++extern off_t elf_getaroff (Elf *__elf);
+ 
+ /* Select archive element at OFFSET.  */
+ extern size_t elf_rand (Elf *__elf, size_t __offset);

Modified: head/devel/elfutils/pkg-plist
==============================================================================
--- head/devel/elfutils/pkg-plist	Wed Jul 13 21:22:13 2016	(r418506)
+++ head/devel/elfutils/pkg-plist	Wed Jul 13 22:03:10 2016	(r418507)
@@ -16,6 +16,7 @@ bin/eu-strip
 bin/eu-unstrip
 include/dwarf.h
 include/elfutils/elf-knowledge.h
+include/elfutils/elf.h
 include/elfutils/known-dwarf.h
 include/elfutils/libasm.h
 include/elfutils/libdw.h


More information about the svn-ports-head mailing list