From 4c138a9ba864576ffd9d860c00f91eb7a93fbd9b Mon Sep 17 00:00:00 2001 From: jolan Date: Sun, 16 Aug 2009 19:58:31 +0000 Subject: [PATCH] dont run jas_cleanup via atexit. fixes a crash on exit seen with php cli + pecl-imagick caused by atexit running when jasper has been unloaded via dlclose. --- graphics/jasper/Makefile | 4 ++-- .../patches/patch-src_libjasper_base_jas_init_c | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 graphics/jasper/patches/patch-src_libjasper_base_jas_init_c diff --git a/graphics/jasper/Makefile b/graphics/jasper/Makefile index 42c20d3036f..69a3b635f6c 100644 --- a/graphics/jasper/Makefile +++ b/graphics/jasper/Makefile @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile,v 1.10 2008/05/17 09:32:15 espie Exp $ +# $OpenBSD: Makefile,v 1.11 2009/08/16 19:58:31 jolan Exp $ COMMENT = reference implementation of JPEG-2000 DISTNAME = jasper-1.900.1 -PKGNAME = ${DISTNAME}p0 +PKGNAME = ${DISTNAME}p1 SHARED_LIBS = jasper 2.1 CATEGORIES = graphics diff --git a/graphics/jasper/patches/patch-src_libjasper_base_jas_init_c b/graphics/jasper/patches/patch-src_libjasper_base_jas_init_c new file mode 100644 index 00000000000..ab622928020 --- /dev/null +++ b/graphics/jasper/patches/patch-src_libjasper_base_jas_init_c @@ -0,0 +1,14 @@ +$OpenBSD: patch-src_libjasper_base_jas_init_c,v 1.1 2009/08/16 19:58:31 jolan Exp $ +--- src/libjasper/base/jas_init.c.orig Fri Jan 19 15:43:05 2007 ++++ src/libjasper/base/jas_init.c Sun Aug 16 07:41:36 2009 +@@ -150,8 +150,8 @@ int jas_init() + /* We must not register the JasPer library exit handler until after + at least one memory allocation is performed. This is desirable + as it ensures that the JasPer exit handler is called before the +- debug memory allocator exit handler. */ +- atexit(jas_cleanup); ++ debug memory allocator exit handler. ++ atexit(jas_cleanup);*/ + + return 0; + }