summaryrefslogtreecommitdiff
path: root/archivers
diff options
context:
space:
mode:
authorhans <hans@pkgsrc.org>2012-02-15 19:27:10 +0000
committerhans <hans@pkgsrc.org>2012-02-15 19:27:10 +0000
commit846eba646269e48653959bd52e17204dd2f5472a (patch)
tree8d612d7080b54c1df12662683a57b4696c1e7b26 /archivers
parent2a63e8100f45c78ebf03d979d8d027e29cff46e0 (diff)
downloadpkgsrc-846eba646269e48653959bd52e17204dd2f5472a.tar.gz
Fix build on SunOS.
Diffstat (limited to 'archivers')
-rw-r--r--archivers/upx/Makefile9
-rw-r--r--archivers/upx/distinfo4
-rw-r--r--archivers/upx/patches/patch-src_p__exe.cpp40
-rw-r--r--archivers/upx/patches/patch-src_p__exe.h13
4 files changed, 63 insertions, 3 deletions
diff --git a/archivers/upx/Makefile b/archivers/upx/Makefile
index fd7c8586dc3..7e1cce59656 100644
--- a/archivers/upx/Makefile
+++ b/archivers/upx/Makefile
@@ -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 @@ PKG_DESTDIR_SUPPORT= user-destdir
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 --git a/archivers/upx/distinfo b/archivers/upx/distinfo
index 227b6f7838a..5f50f17c6de 100644
--- a/archivers/upx/distinfo
+++ b/archivers/upx/distinfo
@@ -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 --git a/archivers/upx/patches/patch-src_p__exe.cpp b/archivers/upx/patches/patch-src_p__exe.cpp
new file mode 100644
index 00000000000..3fee5128033
--- /dev/null
+++ b/archivers/upx/patches/patch-src_p__exe.cpp
@@ -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 --git a/archivers/upx/patches/patch-src_p__exe.h b/archivers/upx/patches/patch-src_p__exe.h
new file mode 100644
index 00000000000..2118982c6cc
--- /dev/null
+++ b/archivers/upx/patches/patch-src_p__exe.h
@@ -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