svn commit: r419273 - in head/devel/elfsh: . files

Baptiste Daroussin bapt at FreeBSD.org
Fri Jul 29 23:02:50 UTC 2016


Author: bapt
Date: Fri Jul 29 23:02:48 2016
New Revision: 419273
URL: https://svnweb.freebsd.org/changeset/ports/419273

Log:
  Fix collision with dprintf(3)
  
  While here, regenerate patches and move some post-patch into an already existing
  patch

Added:
  head/devel/elfsh/files/patch-libelfsh_include_libelfsh.h   (contents, props changed)
  head/devel/elfsh/files/patch-modules_modflow_Makefile   (contents, props changed)
  head/devel/elfsh/files/patch-modules_modgraph.c   (contents, props changed)
  head/devel/elfsh/files/patch-vm_disasm.c   (contents, props changed)
  head/devel/elfsh/files/patch-vm_include_elfsh.h   (contents, props changed)
  head/devel/elfsh/files/patch-vm_readln.c   (contents, props changed)
Deleted:
  head/devel/elfsh/files/patch-libelfsh__include__libelfsh.h
  head/devel/elfsh/files/patch-modules-modflow__Makefile
  head/devel/elfsh/files/patch-vm__readln.c
Modified:
  head/devel/elfsh/Makefile
  head/devel/elfsh/files/patch-Makefile
  head/devel/elfsh/files/patch-libelfsh__Makefile
  head/devel/elfsh/files/patch-libhash__Makefile
  head/devel/elfsh/files/patch-modules__Makefile
  head/devel/elfsh/files/patch-vm__Makefile

Modified: head/devel/elfsh/Makefile
==============================================================================
--- head/devel/elfsh/Makefile	Fri Jul 29 22:56:17 2016	(r419272)
+++ head/devel/elfsh/Makefile	Fri Jul 29 23:02:48 2016	(r419273)
@@ -16,10 +16,6 @@ USE_LDCONFIG=	yes
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
-post-patch:
-	@${REINPLACE_CMD} -E 's,(BIN|INC|LIB|MOD)PATH),DESTDIR)$$(&,g' \
-		${WRKSRC}/Makefile
-
 pre-install:
 	@(cd ${WRKSRC} && ${STRIP_CMD} vm/elfsh libelfsh/libelfsh.so modules/*.so)
 

Modified: head/devel/elfsh/files/patch-Makefile
==============================================================================
--- head/devel/elfsh/files/patch-Makefile	Fri Jul 29 22:56:17 2016	(r419272)
+++ head/devel/elfsh/files/patch-Makefile	Fri Jul 29 23:02:48 2016	(r419273)
@@ -1,5 +1,5 @@
---- Makefile	Wed Aug 13 16:31:55 2003
-+++ Makefile.patch	Sat Aug 16 02:11:52 2003
+--- Makefile.orig	2003-08-21 01:11:03 UTC
++++ Makefile
 @@ -7,10 +7,10 @@
  
  RM	= rm -f
@@ -15,3 +15,34 @@
  
  all	:
  	@echo 'Builting libelfsh...'
+@@ -32,22 +32,22 @@ all	:
+ 	#$(MAKE) -s tags
+ 
+ install	: mod_install
+-	@cp vm/elfsh $(BINPATH)/
+-	@cp libelfsh/libelfsh.a libelfsh/libelfsh.so $(LIBPATH)
+-	@cp libelfsh/include/libelfsh*.h $(INCPATH)
+-	@chmod 755 $(BINPATH)/elfsh $(LIBPATH)libelfsh.so $(LIBPATH)libelfsh.a $(INCPATH)libelfsh*.h
++	@cp vm/elfsh $(DESTDIR)$(BINPATH)/
++	@cp libelfsh/libelfsh.a libelfsh/libelfsh.so $(DESTDIR)$(LIBPATH)
++	@cp libelfsh/include/libelfsh*.h $(DESTDIR)$(INCPATH)
++	@chmod 755 $(DESTDIR)$(BINPATH)/elfsh $(DESTDIR)$(LIBPATH)libelfsh.so $(DESTDIR)$(LIBPATH)libelfsh.a $(DESTDIR)$(INCPATH)libelfsh*.h
+ 	@echo 'ELFsh and Libelfsh installed successfully .'
+ 
+ mod_install:
+-	@mkdir $(MODPATH) 2>/dev/null || true
+-	@cp modules/*.so $(MODPATH)
+-	@chmod -R 755 $(MODPATH)
++	@mkdir $(DESTDIR)$(MODPATH) 2>/dev/null || true
++	@cp modules/*.so $(DESTDIR)$(MODPATH)
++	@chmod -R 755 $(DESTDIR)$(MODPATH)
+ 
+ uninstall:
+ 	rm -f /usr/bin/elfsh
+ 	rm -f /usr/lib/libelfsh*
+ 	rm -f /usr/include/libelfsh*.h
+-	rm -fr $(MODPATH)
++	rm -fr $(DESTDIR)$(MODPATH)
+ 	@echo 'ELFsh and Libelfsh uninstalled successfully'
+ 
+ clean	: cleandoc

Modified: head/devel/elfsh/files/patch-libelfsh__Makefile
==============================================================================
--- head/devel/elfsh/files/patch-libelfsh__Makefile	Fri Jul 29 22:56:17 2016	(r419272)
+++ head/devel/elfsh/files/patch-libelfsh__Makefile	Fri Jul 29 23:02:48 2016	(r419273)
@@ -1,5 +1,5 @@
---- libelfsh/Makefile.orig	2003-08-21 09:11:03.000000000 +0800
-+++ libelfsh/Makefile	2011-10-03 16:33:33.000000000 +0800
+--- libelfsh/Makefile.orig	2003-08-21 01:11:03 UTC
++++ libelfsh/Makefile
 @@ -5,10 +5,10 @@
  ## Last update Tue Jun  3 09:30:50 2003 mayhem
  ##

Added: head/devel/elfsh/files/patch-libelfsh_include_libelfsh.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/elfsh/files/patch-libelfsh_include_libelfsh.h	Fri Jul 29 23:02:48 2016	(r419273)
@@ -0,0 +1,20 @@
+--- libelfsh/include/libelfsh.h.orig	2003-08-21 01:11:03 UTC
++++ libelfsh/include/libelfsh.h
+@@ -713,5 +713,17 @@ int		elfsh_inject_etrel(elfshobj_t *file
+ int		elfsh_sync_sorted_symtab(elfshsect_t *sect);
+ int		elfsh_sort_symtab(Elf32_Sym *symtab, int size, int type);
+ 
++#define R_386_NONE      0	/* No reloc */
++#define R_386_32        1	/* Direct 32 bit  */
++#define R_386_PC32      2	/* PC relative 32 bit */
++#define R_386_GOT32     3	/* 32 bit GOT entry */
++#define R_386_PLT32     4	/* 32 bit PLT address */
++#define R_386_COPY      5	/* Copy symbol at runtime */
++#define R_386_GLOB_DAT  6	/* Create GOT entry */
++#define R_386_JMP_SLOT  7	/* Create PLT entry */
++#define R_386_RELATIVE  8	/* Adjust by program base */
++#define R_386_GOTOFF    9	/* 32 bit offset to GOT */
++#define R_386_GOTPC     10	/* 32 bit PC relative offset to GOT */
++
+ 
+ #endif /* __LIBELFSH_H_ */

Modified: head/devel/elfsh/files/patch-libhash__Makefile
==============================================================================
--- head/devel/elfsh/files/patch-libhash__Makefile	Fri Jul 29 22:56:17 2016	(r419272)
+++ head/devel/elfsh/files/patch-libhash__Makefile	Fri Jul 29 23:02:48 2016	(r419273)
@@ -1,5 +1,5 @@
---- libhash/Makefile.orig	2003-08-21 09:11:03.000000000 +0800
-+++ libhash/Makefile	2011-10-03 16:33:58.000000000 +0800
+--- libhash/Makefile.orig	2003-08-21 01:11:03 UTC
++++ libhash/Makefile
 @@ -7,8 +7,8 @@
  
  SRC	= hash.c

Modified: head/devel/elfsh/files/patch-modules__Makefile
==============================================================================
--- head/devel/elfsh/files/patch-modules__Makefile	Fri Jul 29 22:56:17 2016	(r419272)
+++ head/devel/elfsh/files/patch-modules__Makefile	Fri Jul 29 23:02:48 2016	(r419273)
@@ -1,5 +1,5 @@
---- modules/Makefile.orig	2003-08-21 09:11:03.000000000 +0800
-+++ modules/Makefile	2011-10-03 16:34:46.000000000 +0800
+--- modules/Makefile.orig	2003-08-21 01:11:03 UTC
++++ modules/Makefile
 @@ -18,9 +18,9 @@ SRC3	= modremap.c
  OBJ3	= $(SRC3:.c=.o)
  NAM3	= modremap.so

Added: head/devel/elfsh/files/patch-modules_modflow_Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/elfsh/files/patch-modules_modflow_Makefile	Fri Jul 29 23:02:48 2016	(r419273)
@@ -0,0 +1,11 @@
+--- modules/modflow/Makefile.orig	2003-08-21 01:11:03 UTC
++++ modules/modflow/Makefile
+@@ -17,7 +17,7 @@ OBJS = $(SRCS:.c=.o)
+ 
+ NAME = modflow.so
+ 
+-CFLAGS = -Wall -Werror -ggdb -I../../vm/include \
++CFLAGS += -Wall -Werror -ggdb -I../../vm/include \
+ 	-I../../libelfsh/include -I../../libhash/include \
+ 	-fPIC -rdynamic -DELFSH_INTERN
+ 

Added: head/devel/elfsh/files/patch-modules_modgraph.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/elfsh/files/patch-modules_modgraph.c	Fri Jul 29 23:02:48 2016	(r419273)
@@ -0,0 +1,11 @@
+--- modules/modgraph.c.orig	2003-08-21 01:11:03 UTC
++++ modules/modgraph.c
+@@ -183,7 +183,7 @@ void	dump_assembly(int fd, elfshblk_t *b
+   else
+     {
+       name = elfsh_reverse_metasym(world.current, blk->vaddr, &off);
+-      dprintf(fd, "%s_%08x", name, off);
++      _dprintf(fd, "%s_%08x", name, off);
+ 
+       }
+   free(buffer);

Modified: head/devel/elfsh/files/patch-vm__Makefile
==============================================================================
--- head/devel/elfsh/files/patch-vm__Makefile	Fri Jul 29 22:56:17 2016	(r419272)
+++ head/devel/elfsh/files/patch-vm__Makefile	Fri Jul 29 23:02:48 2016	(r419273)
@@ -1,5 +1,5 @@
---- vm/Makefile.orig	2003-08-20 21:23:17.000000000 -0400
-+++ vm/Makefile	2014-08-15 13:03:43.000000000 -0400
+--- vm/Makefile.orig	2003-08-21 01:23:17 UTC
++++ vm/Makefile
 @@ -19,8 +19,8 @@
  #LDASMOPT		= -lasm
  
@@ -11,7 +11,7 @@
  
  
  # End of configurable Makefile
-@@ -36,15 +36,15 @@
+@@ -36,15 +36,15 @@ SRC			= grammar.c disasm.c dyn.c hdr.c m
  OBJ			= $(SRC:.c=.o)
  SRC_DYN			= elfsh_etdyn.c
  OBJ_DYN			= $(SRC_DYN:.c=.o)

Added: head/devel/elfsh/files/patch-vm_disasm.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/elfsh/files/patch-vm_disasm.c	Fri Jul 29 23:02:48 2016	(r419273)
@@ -0,0 +1,31 @@
+--- vm/disasm.c.orig	2003-08-21 01:11:03 UTC
++++ vm/disasm.c
+@@ -82,13 +82,13 @@ u_int		display_instr(int fd, u_int index
+   if (world.state.vm_quiet)
+     {
+       snprintf(buf, sizeof(buf), " %08X %s + %u", vaddr + index, name, nindex);
+-      dprintf(fd, "%-40s %-30s ", buf, s);
++      _dprintf(fd, "%-40s %-30s ", buf, s);
+     }
+   else
+     {
+       snprintf(buf, sizeof(buf), " %08X [foff: %u] %s + %u", 
+ 	      vaddr + index, foffset + index, name, nindex);
+-      dprintf(fd, "%-60s %-50s ", buf, s);
++      _dprintf(fd, "%-60s %-50s ", buf, s);
+     }
+   
+   /* Print bytes in hexa for this instruction */
+@@ -98,10 +98,10 @@ u_int		display_instr(int fd, u_int index
+   
+   if (!world.state.vm_quiet)
+     for (idx_bytes = 0; idx_bytes < ret; idx_bytes++)
+-      dprintf(fd, "%c%c ", 
++      _dprintf(fd, "%c%c ", 
+ 	     base[(buff[index + idx_bytes] >> 4) & 0x0F], 
+ 	     base[buff[index + idx_bytes] & 0x0F]);
+-  dprintf(fd, "\n");
++  _dprintf(fd, "\n");
+   return (ret);
+ }
+ #endif	/* USE_LIBASM */

Added: head/devel/elfsh/files/patch-vm_include_elfsh.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/elfsh/files/patch-vm_include_elfsh.h	Fri Jul 29 23:02:48 2016	(r419273)
@@ -0,0 +1,11 @@
+--- vm/include/elfsh.h.orig	2003-08-21 01:11:02 UTC
++++ vm/include/elfsh.h
+@@ -471,7 +471,7 @@ int		vm_getdisasm(u_int index, u_int arg
+ int		vm_gethexa(u_int index, u_int argc, char **argv);
+ int		vm_getvarparams(u_int index, u_int argc, char **argv);
+ 
+-int		dprintf(int fd, char *format, ...);
++int		_dprintf(int fd, char *format, ...);
+ 
+ /* Libasm resolve handler */
+ void		do_resolve(void *data, u_int vaddr, char *, u_int);

Added: head/devel/elfsh/files/patch-vm_readln.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/elfsh/files/patch-vm_readln.c	Fri Jul 29 23:02:48 2016	(r419273)
@@ -0,0 +1,11 @@
+--- vm/readln.c.orig	2003-08-21 01:11:03 UTC
++++ vm/readln.c
+@@ -43,7 +43,7 @@ char** coustom_completion(const char* te
+   char** matches=(char**) NULL;
+   
+   if (start == 0)
+-    matches = rl_completion_matches (text, command_generator);
++    matches = (char **)completion_matches (text, command_generator);
+ 
+   return (matches);
+ }


More information about the svn-ports-all mailing list