diff options
author | dholland <dholland@pkgsrc.org> | 2011-10-02 23:50:56 +0000 |
---|---|---|
committer | dholland <dholland@pkgsrc.org> | 2011-10-02 23:50:56 +0000 |
commit | 0f3df082bb8694af7714ef9be11280a9fc8d38ae (patch) | |
tree | d9d84ef1a6e795c5eab7b5f89728d857956cbe26 /devel | |
parent | 36a55abee4b68b62c5e6bc73a34ebfbf850de4f0 (diff) | |
download | pkgsrc-0f3df082bb8694af7714ef9be11280a9fc8d38ae.tar.gz |
- Work around symbol name conflict with dprintf in current.
- The makefile's substitution of PREFIX and SH accidentally got rolled
into patch-ac at some point and thereby hardcoded. Since all patch-ac
was doing was setting these, make the substitution work without a
patch and remove patch-ac entirely.
- Commit some LP64 fixes I've had sitting in my tree since 2008 for
some reason.
- Fix some pkglint.
- PKGREVISION -> 4.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/elfsh/Makefile | 37 | ||||
-rw-r--r-- | devel/elfsh/distinfo | 7 | ||||
-rw-r--r-- | devel/elfsh/patches/patch-ac | 17 | ||||
-rw-r--r-- | devel/elfsh/patches/patch-libelfsh_debug_c | 28 | ||||
-rw-r--r-- | devel/elfsh/patches/patch-libelfsh_reloc_c | 15 | ||||
-rw-r--r-- | devel/elfsh/patches/patch-libelfsh_symbol_c | 15 | ||||
-rw-r--r-- | devel/elfsh/patches/patch-vm_include_elfsh_h | 22 |
7 files changed, 107 insertions, 34 deletions
diff --git a/devel/elfsh/Makefile b/devel/elfsh/Makefile index e08f010b771..fdf7c19bd2a 100644 --- a/devel/elfsh/Makefile +++ b/devel/elfsh/Makefile @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.20 2010/03/17 15:32:18 joerg Exp $ +# $NetBSD: Makefile,v 1.21 2011/10/02 23:50:56 dholland Exp $ # VERS= 0.51b3 DISTNAME= elfsh-${VERS}-portable PKGNAME= elfsh-${VERS} -PKGREVISION= 3 +PKGREVISION= 4 CATEGORIES= devel MASTER_SITES= http://elfsh.asgardlabs.org/files/ EXTRACT_SUFX= .tgz @@ -22,26 +22,33 @@ USE_GNU_READLINE= yes SUBST_CLASSES+= elfsh SUBST_STAGE.elfsh= post-patch -SUBST_MESSAGE.elfsh= Filling placeholders. +SUBST_MESSAGE.elfsh= Fixing hardcoded paths. SUBST_FILES.elfsh= vm/include/elfsh.h -SUBST_SED.elfsh= -e s,@@SH@@,${SH}, -SUBST_SED.elfsh+= -e s,@@PREFIX@@,${PREFIX}, +SUBST_SED.elfsh= -e '/ELFSH_SHELL/s,/bin/bash,${SH},' +SUBST_SED.elfsh+= -e '/ELFSH_MODPATH/s,/usr/share/,${PREFIX}/lib/,' # XXX This package should be converted to use libtool INSTALLATION_DIRS= bin include lib do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/vm/elfsh ${DESTDIR:Q}${PREFIX:Q}/bin/elfsh - ${INSTALL_DATA} ${WRKSRC}/libelfsh/libelfsh.a ${DESTDIR:Q}${PREFIX:Q}/lib/libelfsh.a - ${INSTALL_DATA} ${WRKSRC}/libelfsh/libelfsh.so ${DESTDIR:Q}${PREFIX:Q}/lib/libelfsh.so - ${INSTALL_DATA} ${WRKSRC}/libelfsh/include/libelfsh.h ${DESTDIR:Q}${PREFIX:Q}/include/libelfsh.h - ${INSTALL_DATA_DIR} ${DESTDIR:Q}${PREFIX:Q}/lib/elfsh - ${INSTALL_DATA} ${WRKSRC}/modules/modremap.so ${DESTDIR:Q}${PREFIX:Q}/lib/elfsh - ${INSTALL_DATA} ${WRKSRC}/modules/modtest.so ${DESTDIR:Q}${PREFIX:Q}/lib/elfsh - ${INSTALL_DATA_DIR} ${DESTDIR:Q}${PREFIX:Q}/share/doc/elfsh - ${INSTALL_DATA} ${WRKSRC}/doc/elfsh-ref.txt ${DESTDIR:Q}${PREFIX:Q}/share/doc/elfsh/elfsh-ref.txt - ${INSTALL_DATA} ${WRKSRC}/doc/libelfsh-ref.txt ${DESTDIR:Q}${PREFIX:Q}/share/doc/elfsh/libelfsh-ref.txt + ${INSTALL_PROGRAM} ${WRKSRC}/vm/elfsh ${DESTDIR}${PREFIX}/bin/elfsh + ${INSTALL_DATA} ${WRKSRC}/libelfsh/libelfsh.a \ + ${DESTDIR}${PREFIX}/lib/libelfsh.a + ${INSTALL_DATA} ${WRKSRC}/libelfsh/libelfsh.so \ + ${DESTDIR}${PREFIX}/lib/libelfsh.so + ${INSTALL_DATA} ${WRKSRC}/libelfsh/include/libelfsh.h \ + ${DESTDIR}${PREFIX}/include/libelfsh.h + ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/lib/elfsh + ${INSTALL_DATA} ${WRKSRC}/modules/modremap.so \ + ${DESTDIR}${PREFIX}/lib/elfsh + ${INSTALL_DATA} ${WRKSRC}/modules/modtest.so \ + ${DESTDIR}${PREFIX}/lib/elfsh + ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/elfsh + ${INSTALL_DATA} ${WRKSRC}/doc/elfsh-ref.txt \ + ${DESTDIR}${PREFIX}/share/doc/elfsh/elfsh-ref.txt + ${INSTALL_DATA} ${WRKSRC}/doc/libelfsh-ref.txt \ + ${DESTDIR}${PREFIX}/share/doc/elfsh/libelfsh-ref.txt .include "../../devel/readline/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/devel/elfsh/distinfo b/devel/elfsh/distinfo index 4528670ae2e..7c853cb6067 100644 --- a/devel/elfsh/distinfo +++ b/devel/elfsh/distinfo @@ -1,9 +1,12 @@ -$NetBSD: distinfo,v 1.5 2010/03/17 15:32:18 joerg Exp $ +$NetBSD: distinfo,v 1.6 2011/10/02 23:50:56 dholland Exp $ SHA1 (elfsh-0.51b3-portable.tgz) = d8afc99cb2966710aa4b6a781ad9008bf0baaeb9 RMD160 (elfsh-0.51b3-portable.tgz) = 278b2c846335d14953b27fa8946763622acb6303 Size (elfsh-0.51b3-portable.tgz) = 136679 bytes SHA1 (patch-aa) = 0494158b7daf4d1b55984bf98c161bf70e114430 SHA1 (patch-ab) = 4db74e87f1505e4bd0334060019944eccd9f5cd3 -SHA1 (patch-ac) = e60e109b4e2664619defc9a56616d1c7b7c3b35a SHA1 (patch-ad) = 4fffefc0cddd6817eba3b0812bcf6935c0fcd438 +SHA1 (patch-libelfsh_debug_c) = 26faaf1c37b842c20b418bf840c2f27fa828fefc +SHA1 (patch-libelfsh_reloc_c) = e0cbd7c4f58c9ff63d2a082bdda1032d484df980 +SHA1 (patch-libelfsh_symbol_c) = 56080dc75d94cfc3b19ded4635219ca9f6bbe62e +SHA1 (patch-vm_include_elfsh_h) = 2d06047a20863b94b5a8911fd089e92eb97c8214 diff --git a/devel/elfsh/patches/patch-ac b/devel/elfsh/patches/patch-ac deleted file mode 100644 index 3719e715e0a..00000000000 --- a/devel/elfsh/patches/patch-ac +++ /dev/null @@ -1,17 +0,0 @@ -$NetBSD: patch-ac,v 1.2 2004/02/17 12:45:56 cube Exp $ - ---- vm/include/elfsh.h.orig 2003-08-21 03:11:02.000000000 +0200 -+++ vm/include/elfsh.h -@@ -91,10 +91,10 @@ - #define ELFSH_SPACE ' ' - #define ELFSH_VERSION "0.51b3" - #define ELFSH_PROMPT "[ELFsh-"ELFSH_VERSION"]$ " --#define ELFSH_SHELL "/bin/bash" -+#define ELFSH_SHELL "@@SH@@" - #define ELFSH_INIT "elfsh_init" - #define ELFSH_FINI "elfsh_fini" --#define ELFSH_MODPATH "/usr/share/elfsh/" -+#define ELFSH_MODPATH "@@PREFIX@@/lib/elfsh/" - - /* For elfsh/elfsh/disasm.c:display_object() */ - #define ELFSH_HEXA_VIEW 0 diff --git a/devel/elfsh/patches/patch-libelfsh_debug_c b/devel/elfsh/patches/patch-libelfsh_debug_c new file mode 100644 index 00000000000..20a346f422f --- /dev/null +++ b/devel/elfsh/patches/patch-libelfsh_debug_c @@ -0,0 +1,28 @@ +$NetBSD: patch-libelfsh_debug_c,v 1.1 2011/10/02 23:50:56 dholland Exp $ + +- LP64 fixes + +--- libelfsh/debug.c~ 2003-08-20 21:11:03.000000000 -0400 ++++ libelfsh/debug.c 2008-08-02 18:19:15.000000000 -0400 +@@ -25,16 +25,16 @@ int elfsh_print_sectlist(elfshobj_t *ob + if (sctname == NULL) + sctname = "UNK"; + data = (actual->data == NULL ? "\xFF\xFF\xFF" : actual->data); +- printf(" [%03u] %-15s HDRNAM: %-15s BYTES[%02X %02X %02X] P(%08X) " +- "A(%08X) N(%08X) SCTIDX(%03u) HDRFOFF:%08x SZ:%08x VADDR:%08X \n", ++ printf(" [%03u] %-15s HDRNAM: %-15s BYTES[%02X %02X %02X] P(%08lX) " ++ "A(%08lX) N(%08lX) SCTIDX(%03u) HDRFOFF:%08x SZ:%08x VADDR:%08X \n", + index, (actual->name != NULL ? actual->name : "UNK"), + sctname, + (u_int) data[0], + (u_int) data[1], + (u_int) data[2], +- (u_int) actual->prev, +- (u_int) actual, +- (u_int) actual->next, ++ (u_long)(uintptr_t) actual->prev, ++ (u_long)(uintptr_t) actual, ++ (u_long)(uintptr_t) actual->next, + actual->index, + (u_int) actual->shdr->sh_offset, + (u_int) actual->shdr->sh_size, diff --git a/devel/elfsh/patches/patch-libelfsh_reloc_c b/devel/elfsh/patches/patch-libelfsh_reloc_c new file mode 100644 index 00000000000..5387362b775 --- /dev/null +++ b/devel/elfsh/patches/patch-libelfsh_reloc_c @@ -0,0 +1,15 @@ +$NetBSD: patch-libelfsh_reloc_c,v 1.1 2011/10/02 23:50:56 dholland Exp $ + +- LP64 fixes + +--- libelfsh/reloc.c~ 2003-08-20 21:28:41.000000000 -0400 ++++ libelfsh/reloc.c 2008-08-02 18:10:19.000000000 -0400 +@@ -304,7 +304,7 @@ elfshrel_t *elfsh_find_rel(elfshsect_t * + target = elfsh_get_parent_section(sect->parent, *dword, NULL); + if (target != NULL) + { +- vaddr = sect->shdr->sh_addr + (u_int) str - (u_int) sect->data; ++ vaddr = sect->shdr->sh_addr + (uintptr_t) str - (uintptr_t) sect->data; + rel[index].idx_src = sect->index; + rel[index].off_src = vaddr - sect->shdr->sh_addr; + rel[index].idx_dst = target->index; diff --git a/devel/elfsh/patches/patch-libelfsh_symbol_c b/devel/elfsh/patches/patch-libelfsh_symbol_c new file mode 100644 index 00000000000..697be270412 --- /dev/null +++ b/devel/elfsh/patches/patch-libelfsh_symbol_c @@ -0,0 +1,15 @@ +$NetBSD: patch-libelfsh_symbol_c,v 1.1 2011/10/02 23:50:56 dholland Exp $ + +- LP64 fixes + +--- libelfsh/symbol.c~ 2003-08-20 21:11:03.000000000 -0400 ++++ libelfsh/symbol.c 2008-08-02 18:09:35.000000000 -0400 +@@ -277,7 +277,7 @@ int elfsh_insert_symbol(elfshsect_t *se + /* Check if symbol already exists */ + orig = elfsh_get_symbol_by_name(sect->parent, name); + if (orig != NULL && sym->st_value == orig->st_value) +- return (((u_int) orig - (u_int) sect->data) / ELFSH_SYMTAB_ENTRY_SIZE); ++ return (((uintptr_t) orig - (uintptr_t) sect->data) / ELFSH_SYMTAB_ENTRY_SIZE); + + /* Shift some special symbols */ + elfsh_shift_usualsyms(sect, sym); diff --git a/devel/elfsh/patches/patch-vm_include_elfsh_h b/devel/elfsh/patches/patch-vm_include_elfsh_h new file mode 100644 index 00000000000..ca9608e1db6 --- /dev/null +++ b/devel/elfsh/patches/patch-vm_include_elfsh_h @@ -0,0 +1,22 @@ +$NetBSD: patch-vm_include_elfsh_h,v 1.1 2011/10/02 23:50:56 dholland Exp $ + +- wrap decl of dprintf in the same conditional that covers the uses +(there is no definition that I can find, so probably the package won't +build if someone turns that conditional on; not our problem though. + +Note that some defs in elfsh.h are substituted by the package Makefile +in the post-patch phase. Don't accidentally roll that change into this +patch. + +--- vm/include/elfsh.h.orig 2003-08-21 01:11:02.000000000 +0000 ++++ vm/include/elfsh.h +@@ -471,7 +471,9 @@ 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); + ++#if defined(USE_LIBASM) + int dprintf(int fd, char *format, ...); ++#endif + + /* Libasm resolve handler */ + void do_resolve(void *data, u_int vaddr, char *, u_int); |