Fix collision with dprintf(3)
While here, regenerate patches and move some post-patch into an already existing patch
This commit is contained in:
parent
60cbbe1dcf
commit
3c4a170b07
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=419273
12 changed files with 104 additions and 24 deletions
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
##
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- libelfsh/include/libelfsh.h Thu Aug 21 04:11:03 2003
|
||||
+++ libelfsh/include/libelfsh.h.patch Fri Oct 10 14:33:43 2003
|
||||
@@ -713,5 +713,17 @@
|
||||
--- 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);
|
||||
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- modules/modflow/Makefile Sat Aug 16 01:52:00 2003
|
||||
+++ modules/modflow/Makefile.patch Sat Aug 16 01:51:51 2003
|
||||
@@ -17,7 +17,7 @@
|
||||
--- 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
|
||||
|
11
devel/elfsh/files/patch-modules_modgraph.c
Normal file
11
devel/elfsh/files/patch-modules_modgraph.c
Normal file
|
@ -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);
|
|
@ -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)
|
||||
|
|
31
devel/elfsh/files/patch-vm_disasm.c
Normal file
31
devel/elfsh/files/patch-vm_disasm.c
Normal file
|
@ -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 */
|
11
devel/elfsh/files/patch-vm_include_elfsh.h
Normal file
11
devel/elfsh/files/patch-vm_include_elfsh.h
Normal file
|
@ -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);
|
|
@ -1,6 +1,6 @@
|
|||
--- vm/readln.c Wed Aug 13 16:31:55 2003
|
||||
+++ vm/readln.c.patch Sun Sep 14 00:58:08 2003
|
||||
@@ -43,7 +43,7 @@
|
||||
--- 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)
|
Loading…
Reference in a new issue