pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/archivers/upx Fix build on SunOS.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0d0b75c58f80
branches:  trunk
changeset: 599461:0d0b75c58f80
user:      hans <hans%pkgsrc.org@localhost>
date:      Wed Feb 15 19:27:10 2012 +0000

description:
Fix build on SunOS.

diffstat:

 archivers/upx/Makefile                     |   9 +++++-
 archivers/upx/distinfo                     |   4 ++-
 archivers/upx/patches/patch-src_p__exe.cpp |  40 ++++++++++++++++++++++++++++++
 archivers/upx/patches/patch-src_p__exe.h   |  13 +++++++++
 4 files changed, 63 insertions(+), 3 deletions(-)

diffs (104 lines):

diff -r be478af6187e -r 0d0b75c58f80 archivers/upx/Makefile
--- a/archivers/upx/Makefile    Wed Feb 15 19:24:39 2012 +0000
+++ b/archivers/upx/Makefile    Wed Feb 15 19:27:10 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2008/11/18 21:07:30 rillig Exp $
+# $NetBSD: Makefile,v 1.17 2012/02/15 19:27:10 hans Exp $
 
 DISTNAME=      upx-1.25-src
 PKGNAME=       ${DISTNAME:S/-src//}
@@ -14,13 +14,18 @@
 
 WRKSRC=                ${WRKDIR}/${PKGNAME_NOREV}
 
-USE_TOOLS+=    gmake perl
+USE_TOOLS+=    gmake perl pod2man pod2html pod2text
 USE_LANGUAGES= c c++
 
 INSTALLATION_DIRS=     bin
 
 BUILDLINK_TRANSFORM=   rm:-mcpu=i686
 
+.include "../../mk/bsd.prefs.mk"
+.if ${OPSYS} == "SunOS"
+BUILDLINK_TRANSFORM=   rm:-Wl,-Map rm:-Wl,upx.map
+.endif
+
 do-build:
        cd ${WRKSRC}/src && ${SETENV} ${MAKE_ENV}                       \
                ${MAKE_PROGRAM} PREFIX=${PREFIX} target=netbsd  \
diff -r be478af6187e -r 0d0b75c58f80 archivers/upx/distinfo
--- a/archivers/upx/distinfo    Wed Feb 15 19:24:39 2012 +0000
+++ b/archivers/upx/distinfo    Wed Feb 15 19:27:10 2012 +0000
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.6 2007/08/05 17:38:47 joerg Exp $
+$NetBSD: distinfo,v 1.7 2012/02/15 19:27:10 hans Exp $
 
 SHA1 (upx-1.25-src.tar.gz) = 7ce05370efe969832d841a73dd165e6a4292f9d4
 RMD160 (upx-1.25-src.tar.gz) = 1c73a1eb8d98d32ef63ed351ca494526f895a9de
 Size (upx-1.25-src.tar.gz) = 250849 bytes
 SHA1 (patch-aa) = d638e86e98e16b629179b188acfccac6cd3140de
 SHA1 (patch-ab) = 5bd7cf8c5deb07d833b48587a95e48eb547d10ac
+SHA1 (patch-src_p__exe.cpp) = 49a57413ad12b0dbf536078d72c220ab0a0cc881
+SHA1 (patch-src_p__exe.h) = 05f2fceeafb1ccb9ebec5905e251790cae1e56e2
diff -r be478af6187e -r 0d0b75c58f80 archivers/upx/patches/patch-src_p__exe.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/archivers/upx/patches/patch-src_p__exe.cpp        Wed Feb 15 19:27:10 2012 +0000
@@ -0,0 +1,40 @@
+$NetBSD: patch-src_p__exe.cpp,v 1.1 2012/02/15 19:27:10 hans Exp $
+
+--- src/p_exe.cpp.orig 2004-03-25 06:36:19.000000000 +0100
++++ src/p_exe.cpp      2012-01-11 15:35:13.755302407 +0100
+@@ -347,7 +347,7 @@ void PackExe::pack(OutputFile *fo)
+     {
+         set_le16(extra_info+eisize,ih.ss);
+         eisize += 2;
+-        flag |= SS;
++        flag |= upx_SS;
+     }
+     if (oh.sp != ih.sp)
+     {
+@@ -413,7 +413,7 @@ void PackExe::pack(OutputFile *fo)
+                   NULL
+                  );
+     addLoader("EXEMAIN8",
+-              (flag & SS) ? "EXESTACK" : "",
++              (flag & upx_SS) ? "EXESTACK" : "",
+               (flag & SP) ? "EXESTASP" : "",
+               (flag & USEJUMP) ? "EXEJUMPF" : "",
+               NULL
+@@ -480,7 +480,7 @@ void PackExe::pack(OutputFile *fo)
+     }
+     if (flag & SP)
+         patch_le16(loader,lsize,"SP",ih.sp);
+-    if (flag & SS)
++    if (flag & upx_SS)
+         patch_le16(loader,lsize,"SS",ih.ss);
+     if (relocsize)
+         patch_le16(loader,lsize,"RS",(ph.u_len <= DI_LIMIT || (ph.u_len & 0x7fff) >= relocsize ? 0 : MAXRELOCS) - relocsize);
+@@ -654,7 +654,7 @@ void PackExe::unpack(OutputFile *fo)
+         { imagesize -= 2; oh.min = get_le16(ibuf+imagesize); }
+     if (flag & SP)
+         { imagesize -= 2; oh.sp = get_le16(ibuf+imagesize); }
+-    if (flag & SS)
++    if (flag & upx_SS)
+         { imagesize -= 2; oh.ss = get_le16(ibuf+imagesize); }
+ 
+     unsigned ip = (flag & USEJUMP) ? get_le32(ibuf+imagesize-4) : (unsigned) ih.firstreloc;
diff -r be478af6187e -r 0d0b75c58f80 archivers/upx/patches/patch-src_p__exe.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/archivers/upx/patches/patch-src_p__exe.h  Wed Feb 15 19:27:10 2012 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_p__exe.h,v 1.1 2012/02/15 19:27:10 hans Exp $
+
+--- src/p_exe.h.orig   2002-06-01 13:20:17.000000000 +0200
++++ src/p_exe.h        2012-01-11 15:33:21.472848400 +0100
+@@ -96,7 +96,7 @@ protected:
+     enum {
+         NORELOC = 1,
+         USEJUMP = 2,
+-        SS = 4,
++        upx_SS = 4,
+         SP = 8,
+         MINMEM = 16,
+         MAXMEM = 32



Home | Main Index | Thread Index | Old Index