diff options
author | obache <obache> | 2010-04-09 01:54:20 +0000 |
---|---|---|
committer | obache <obache> | 2010-04-09 01:54:20 +0000 |
commit | 6f27341bf92bb9eeb648f2dc44c61c40f251f8bc (patch) | |
tree | 2a226c67b751cdcf4851b97a3875b7dc23cc1773 /lang | |
parent | 3bbc791c66f92968fa3048bb343d5ed56e67447c (diff) | |
download | pkgsrc-6f27341bf92bb9eeb648f2dc44c61c40f251f8bc.tar.gz |
* fixes build with gmp-5 (patch-ai).
* apply CVE-2009-3376 patch (patch-aj).
* drop dependency on libltdl, not used
Bump PKGREVISION.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/smalltalk/Makefile | 5 | ||||
-rw-r--r-- | lang/smalltalk/distinfo | 4 | ||||
-rw-r--r-- | lang/smalltalk/patches/patch-ai | 70 | ||||
-rw-r--r-- | lang/smalltalk/patches/patch-aj | 95 |
4 files changed, 170 insertions, 4 deletions
diff --git a/lang/smalltalk/Makefile b/lang/smalltalk/Makefile index 8db1aa371cc..7a0f2c80ead 100644 --- a/lang/smalltalk/Makefile +++ b/lang/smalltalk/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.50 2010/03/24 19:43:26 asau Exp $ +# $NetBSD: Makefile,v 1.51 2010/04/09 01:54:20 obache Exp $ DISTNAME= smalltalk-3.1 -PKGREVISION= 5 +PKGREVISION= 6 CATEGORIES= lang MASTER_SITES= ${MASTER_SITE_GNU:=smalltalk/} @@ -60,7 +60,6 @@ post-extract: .include "../../databases/gdbm/buildlink3.mk" .include "../../devel/libsigsegv/buildlink3.mk" .include "../../devel/libffi/buildlink3.mk" -.include "../../devel/libltdl/buildlink3.mk" .include "../../devel/gmp/buildlink3.mk" .include "../../devel/gettext-lib/buildlink3.mk" .include "../../devel/readline/buildlink3.mk" diff --git a/lang/smalltalk/distinfo b/lang/smalltalk/distinfo index a96f29a017d..44d0f090afd 100644 --- a/lang/smalltalk/distinfo +++ b/lang/smalltalk/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.20 2010/01/21 06:26:35 asau Exp $ +$NetBSD: distinfo,v 1.21 2010/04/09 01:54:20 obache Exp $ SHA1 (smalltalk-3.1.tar.gz) = 9b1602bf29d1483d9200d83419dc3cd0fc0d397b RMD160 (smalltalk-3.1.tar.gz) = cc9a593c1773ba66f2f999b1369944eebd722ef9 @@ -9,3 +9,5 @@ SHA1 (patch-ae) = 57d3949a8842607eb9518185482a6e7a107a3c65 SHA1 (patch-af) = 76744e495b5bb180b5acdbcc450d7090ed708113 SHA1 (patch-ag) = 5eec4c1f315e05dea00f33d8f31b6b17f32e557a SHA1 (patch-ah) = 96920e18c56bb6454a2d01136b2de7c6303ee5fc +SHA1 (patch-ai) = c53b4ab5881737febe6036e0c89198e94d14953f +SHA1 (patch-aj) = e737d61017d2760e465c81ead7bdf3aeda2f9001 diff --git a/lang/smalltalk/patches/patch-ai b/lang/smalltalk/patches/patch-ai new file mode 100644 index 00000000000..45a8da8b071 --- /dev/null +++ b/lang/smalltalk/patches/patch-ai @@ -0,0 +1,70 @@ +$NetBSD: patch-ai,v 1.1 2010/04/09 01:54:21 obache Exp $ + +hack to build with GMP 5 +http://git.savannah.gnu.org/gitweb/?p=smalltalk.git;a=commit;h=04ac00a8126a0b328e231e01ab4b257b28c5da3c + +--- libgst/mpz.c.orig 2008-09-18 07:50:57.000000000 +0000 ++++ libgst/mpz.c +@@ -1511,13 +1511,21 @@ _gst_mpz_xor (gst_mpz *res, const gst_mp + } + } + ++#if __GNU_MP_VERSION >= 5 ++extern void __gmpn_divexact (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); ++#endif ++ + void + _gst_mpz_divexact (gst_mpz *quot, const gst_mpz *num, const gst_mpz *den) + { +- mp_ptr qp, tp; ++ mp_ptr qp; + mp_srcptr np, dp; +- mp_size_t nsize, dsize, qsize, d_zero_limbs; ++ mp_size_t nsize, dsize, qsize; ++#if __GNU_MP_VERSION < 5 ++ mp_ptr tp; ++ mp_size_t d_zero_limbs; + int d_zero_bits; ++#endif + + nsize = ABS (num->size); + dsize = ABS (den->size); +@@ -1540,6 +1548,7 @@ _gst_mpz_divexact (gst_mpz *quot, const + return; + } + ++#if __GNU_MP_VERSION < 5 + /* Avoid quadratic behaviour, but do it conservatively. */ + if (nsize - dsize > 1500) + { +@@ -1558,6 +1567,7 @@ _gst_mpz_divexact (gst_mpz *quot, const + dsize -= d_zero_limbs; + np += d_zero_limbs; + nsize -= d_zero_limbs; ++#endif + + /* Allocate where we place the result. It must be nsize limbs big + because it also acts as a temporary area. */ +@@ -1565,6 +1575,7 @@ _gst_mpz_divexact (gst_mpz *quot, const + gst_mpz_realloc (quot, nsize); + qp = quot->d; + ++#if __GNU_MP_VERSION < 5 + if (d_zero_bits != 0) + { + tp = (mp_ptr) alloca (dsize * SIZEOF_MP_LIMB_T); +@@ -1577,9 +1588,14 @@ _gst_mpz_divexact (gst_mpz *quot, const + } + else + MPN_COPY(qp, np, nsize); ++#endif + + qsize = nsize - dsize + 1; ++#if __GNU_MP_VERSION < 5 + mpn_bdivmod (qp, qp, nsize, dp, dsize, qsize * GMP_NUMB_BITS); ++#else ++ __gmpn_divexact (qp, np, nsize, dp, dsize); ++#endif + quot->size = (num->size ^ den->size) >= 0 ? qsize : -qsize; + } + diff --git a/lang/smalltalk/patches/patch-aj b/lang/smalltalk/patches/patch-aj new file mode 100644 index 00000000000..2df771077bd --- /dev/null +++ b/lang/smalltalk/patches/patch-aj @@ -0,0 +1,95 @@ +$NetBSD: patch-aj,v 1.1 2010/04/09 01:54:21 obache Exp $ + +apply CVE-2009-3736 patch +http://git.savannah.gnu.org/gitweb/?p=smalltalk.git;a=commit;h=232557c9e5a24f5dbd18ad9a2106cafb74e4e0cf + +--- lib-src/ltdl.c ++++ lib-src/ltdl.c +@@ -2164,7 +2164,8 @@ static int trim LT_PARAMS((char **dest, + static int try_dlopen LT_PARAMS((lt_dlhandle *handle, + const char *filename)); + static int tryall_dlopen LT_PARAMS((lt_dlhandle *handle, +- const char *filename)); ++ const char *filename, ++ const char * useloader)); + static int unload_deplibs LT_PARAMS((lt_dlhandle handle)); + static int lt_argz_insert LT_PARAMS((char **pargz, + size_t *pargz_len, +@@ -2350,9 +2351,10 @@ lt_dlexit () + } + + static int +-tryall_dlopen (handle, filename) ++tryall_dlopen (handle, filename, useloader) + lt_dlhandle *handle; + const char *filename; ++ const char *useloader; + { + lt_dlhandle cur; + lt_dlloader *loader; +@@ -2419,6 +2421,11 @@ tryall_dlopen (handle, filename) + + while (loader) + { ++ if (useloader && strcmp(loader->loader_name, useloader)) ++ { ++ loader = loader->next; ++ continue; ++ } + lt_user_data data = loader->dlloader_data; + + cur->module = loader->module_open (data, filename); +@@ -2488,7 +2495,7 @@ tryall_dlopen_module (handle, prefix, dirname, dlname) + error += tryall_dlopen_module (handle, + (const char *) 0, prefix, filename); + } +- else if (tryall_dlopen (handle, filename) != 0) ++ else if (tryall_dlopen (handle, filename, NULL) != 0) + { + ++error; + } +@@ -2509,7 +2516,7 @@ find_module (handle, dir, libdir, dlname, old_name, installed) + /* Try to open the old library first; if it was dlpreopened, + we want the preopened version of it, even if a dlopenable + module is available. */ +- if (old_name && tryall_dlopen (handle, old_name) == 0) ++ if (old_name && tryall_dlopen (handle, old_name, "dlpreload") == 0) + { + return 0; + } +@@ -2773,7 +2780,7 @@ find_handle_callback (filename, data, ignored) + + /* Try to dlopen the file, but do not continue searching in any + case. */ +- if (tryall_dlopen (handle, filename) != 0) ++ if (tryall_dlopen (handle, filename,NULL) != 0) + *handle = 0; + + return 1; +@@ -3058,7 +3065,7 @@ try_dlopen (phandle, filename) + /* lt_dlclose()ing yourself is very bad! Disallow it. */ + LT_DLSET_FLAG (*phandle, LT_DLRESIDENT_FLAG); + +- if (tryall_dlopen (&newhandle, 0) != 0) ++ if (tryall_dlopen (&newhandle, 0, NULL) != 0) + { + LT_DLFREE (*phandle); + return 1; +@@ -3180,7 +3187,7 @@ try_dlopen (phandle, filename) + } + #endif + } +- if (!file) ++ else + { + file = fopen (filename, LT_READTEXT_MODE); + } +@@ -3364,7 +3371,7 @@ try_dlopen (phandle, filename) + #endif + ))) + { +- if (tryall_dlopen (&newhandle, filename) != 0) ++ if (tryall_dlopen (&newhandle, filename, NULL) != 0) + { + newhandle = NULL; + } |