From 9d2052dcc01e660c6832d3106592988769d175f8 Mon Sep 17 00:00:00 2001 From: rillig Date: Sun, 14 Jan 2007 16:28:40 +0000 Subject: Fixed the build for sunpro on Solaris 10. --- archivers/advancecomp/Makefile | 8 +++++++- archivers/advancecomp/distinfo | 5 ++++- archivers/advancecomp/patches/patch-aa | 18 ++++++++++++++++++ archivers/advancecomp/patches/patch-ab | 26 ++++++++++++++++++++++++++ archivers/advancecomp/patches/patch-ac | 17 +++++++++++++++++ 5 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 archivers/advancecomp/patches/patch-aa create mode 100644 archivers/advancecomp/patches/patch-ab create mode 100644 archivers/advancecomp/patches/patch-ac (limited to 'archivers') diff --git a/archivers/advancecomp/Makefile b/archivers/advancecomp/Makefile index fc3fdeb1f62..dde7622d678 100644 --- a/archivers/advancecomp/Makefile +++ b/archivers/advancecomp/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2006/07/22 04:46:13 rillig Exp $ +# $NetBSD: Makefile,v 1.12 2007/01/14 16:28:40 rillig Exp $ DISTNAME= advancecomp-1.15 CATEGORIES= archivers @@ -13,5 +13,11 @@ PKG_INSTALLATION_TYPES= overwrite pkgviews GNU_CONFIGURE= yes USE_LANGUAGES= c c++ +.include "../../mk/compiler.mk" + +.if !empty(PKGSRC_COMPILER:Msunpro) +CFLAGS+= -features=extensions +.endif + .include "../../devel/zlib/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/archivers/advancecomp/distinfo b/archivers/advancecomp/distinfo index a69b764e030..685eec58131 100644 --- a/archivers/advancecomp/distinfo +++ b/archivers/advancecomp/distinfo @@ -1,5 +1,8 @@ -$NetBSD: distinfo,v 1.4 2006/04/12 20:12:56 rillig Exp $ +$NetBSD: distinfo,v 1.5 2007/01/14 16:28:40 rillig Exp $ SHA1 (advancecomp-1.15.tar.gz) = 74fed754841efadcb8dd156d2c5e095bfaff83e6 RMD160 (advancecomp-1.15.tar.gz) = 13468f350e15e7f23778d8351819a792fbf07c9a Size (advancecomp-1.15.tar.gz) = 259340 bytes +SHA1 (patch-aa) = bb74883968ec79e3f5f62085668cf3341c46570c +SHA1 (patch-ab) = 1e6e10943bd2a414d4f704bd94b1de3d1036dd90 +SHA1 (patch-ac) = d08d44224c4351c66c920b26bacc3f749a54d31a diff --git a/archivers/advancecomp/patches/patch-aa b/archivers/advancecomp/patches/patch-aa new file mode 100644 index 00000000000..85569cfc0a4 --- /dev/null +++ b/archivers/advancecomp/patches/patch-aa @@ -0,0 +1,18 @@ +$NetBSD: patch-aa,v 1.1 2007/01/14 16:28:40 rillig Exp $ + +--- portable.h.orig 2004-08-09 15:04:02.000000000 +0200 ++++ portable.h 2007-01-14 17:05:21.524063100 +0100 +@@ -148,5 +148,13 @@ int vsnprintf(char *str, size_t count, c + } + #endif + ++#if !defined(__GNUC__) && !defined(__PRETTY_FUNCTION__) ++# define __PRETTY_FUNCTION__ __func__ ++#endif ++ ++#if !defined(__GNUC__) && !defined(__attribute__) ++# define __attribute__(x) /**/ ++#endif ++ + #endif + diff --git a/archivers/advancecomp/patches/patch-ab b/archivers/advancecomp/patches/patch-ab new file mode 100644 index 00000000000..9f8a05893cd --- /dev/null +++ b/archivers/advancecomp/patches/patch-ab @@ -0,0 +1,26 @@ +$NetBSD: patch-ab,v 1.1 2007/01/14 16:28:40 rillig Exp $ + +SunPro complains about an overloading abiguity when std::log(2) is +called. It doesn't know whether to take log(double) or log(long double). + +There also seems to be some namespace issues, maybe an #include +directive for a standard header has been placed into a namespace? + +--- 7z/AriBitCoder.cc.orig 2003-02-10 20:25:06.000000000 +0100 ++++ 7z/AriBitCoder.cc 2007-01-14 17:00:56.250636464 +0100 +@@ -10,10 +10,12 @@ static const double kDummyMultMid = (1.0 + + CPriceTables::CPriceTables() + { +- double aLn2 = log(2); +- double aLnAll = log(kBitModelTotal >> kNumMoveReducingBits); ++ using ::std::log; ++ using ::std::fabs; ++ double aLn2 = log(2.0); ++ double aLnAll = log((double)(kBitModelTotal >> kNumMoveReducingBits)); + for(UINT32 i = 1; i < (kBitModelTotal >> kNumMoveReducingBits) - 1; i++) +- m_StatePrices[i] = UINT32((fabs(aLnAll - log(i)) / aLn2 + kDummyMultMid) * kBitPrice); ++ m_StatePrices[i] = UINT32((fabs(aLnAll - log((double)i)) / aLn2 + kDummyMultMid) * kBitPrice); + } + + CPriceTables g_PriceTables; diff --git a/archivers/advancecomp/patches/patch-ac b/archivers/advancecomp/patches/patch-ac new file mode 100644 index 00000000000..15b5fa96d19 --- /dev/null +++ b/archivers/advancecomp/patches/patch-ac @@ -0,0 +1,17 @@ +$NetBSD: patch-ac,v 1.1 2007/01/14 16:28:40 rillig Exp $ + +- A string cannot be initialized with an unsigned char *. +- There is no constructor string(const char *, const char *). + +--- zip.cc.orig 2004-11-07 21:14:28.000000000 +0100 ++++ zip.cc 2007-01-14 17:11:15.104504656 +0100 +@@ -452,7 +452,8 @@ void zip_entry::name_set(const string& A + + string zip_entry::name_get() const + { +- return string(file_name, file_name + info.filename_length); ++ /* file_name is an unsigned char *. */ ++ return string(reinterpret_cast(file_name), info.filename_length); + } + + /** Check central directory entry. */ -- cgit v1.2.3