pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/graphics/openjpeg Check for aligned memory functions w...
details: https://anonhg.NetBSD.org/pkgsrc/rev/150ac75bde40
branches: trunk
changeset: 645134:150ac75bde40
user: pho <pho%pkgsrc.org@localhost>
date: Fri Jan 23 17:15:09 2015 +0000
description:
Check for aligned memory functions with cmake
Not all platforms have posix_memalign(3) so we need to check if it
exists. This fixes build failure on Darwin 9. See:
https://www.gnu.org/software/gnulib/manual/html_node/posix_005fmemalign.html
diffstat:
graphics/openjpeg/Makefile | 4 +-
graphics/openjpeg/distinfo | 6 +-
graphics/openjpeg/patches/patch-CMakeLists.txt | 20 ++++++++
graphics/openjpeg/patches/patch-aa | 5 +-
graphics/openjpeg/patches/patch-src_lib_openjp2_opj__config__private.h.cmake.in | 25 ++++++++++
5 files changed, 54 insertions(+), 6 deletions(-)
diffs (99 lines):
diff -r e9ea2cfbda0f -r 150ac75bde40 graphics/openjpeg/Makefile
--- a/graphics/openjpeg/Makefile Fri Jan 23 16:19:35 2015 +0000
+++ b/graphics/openjpeg/Makefile Fri Jan 23 17:15:09 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2014/05/15 14:14:54 adam Exp $
+# $NetBSD: Makefile,v 1.11 2015/01/23 17:15:09 pho Exp $
DISTNAME= openjpeg-2.1.0
CATEGORIES= graphics
@@ -12,8 +12,6 @@
USE_CMAKE= yes
CMAKE_ARGS+= -DOPENJPEG_INSTALL_MAN_DIR=${PKGMANDIR}
-CFLAGS+= -DHAVE_POSIX_MEMALIGN
-
.include "../../devel/zlib/buildlink3.mk"
.include "../../graphics/lcms2/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
diff -r e9ea2cfbda0f -r 150ac75bde40 graphics/openjpeg/distinfo
--- a/graphics/openjpeg/distinfo Fri Jan 23 16:19:35 2015 +0000
+++ b/graphics/openjpeg/distinfo Fri Jan 23 17:15:09 2015 +0000
@@ -1,8 +1,10 @@
-$NetBSD: distinfo,v 1.7 2014/05/15 14:14:54 adam Exp $
+$NetBSD: distinfo,v 1.8 2015/01/23 17:15:09 pho Exp $
SHA1 (openjpeg-2.1.0.tar.gz) = c2a255f6b51ca96dc85cd6e85c89d300018cb1cb
RMD160 (openjpeg-2.1.0.tar.gz) = dc6e77a2539ab4071cf1a1b62f653fea13707b54
Size (openjpeg-2.1.0.tar.gz) = 1789675 bytes
-SHA1 (patch-aa) = 29025aa1db85cfaf483ca92fdfba7343a9a1b84f
+SHA1 (patch-CMakeLists.txt) = 3738946db63df4d623c6ce486bd22fa4d57336e2
+SHA1 (patch-aa) = 6201b76c91edd88ba23e18218f2951b5fb65eb24
SHA1 (patch-src_bin_jp2_CMakeLists.txt) = cbb8e9f33fe781af54a1b7e44694413220d114a2
SHA1 (patch-src_lib_openjp2_CMakeLists.txt) = 85d7729bdebbc5ce520c69df7541575547b49708
+SHA1 (patch-src_lib_openjp2_opj__config__private.h.cmake.in) = 6b0b3ca45bfb80c586edeef81920a03e9d5eef2a
diff -r e9ea2cfbda0f -r 150ac75bde40 graphics/openjpeg/patches/patch-CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/openjpeg/patches/patch-CMakeLists.txt Fri Jan 23 17:15:09 2015 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2015/01/23 17:15:09 pho Exp $
+
+Move checks for aligned malloc function from opj_malloc.h to cmake.
+See also patch-aa
+
+--- CMakeLists.txt.orig 2015-01-23 16:40:21.000000000 +0000
++++ CMakeLists.txt
+@@ -213,6 +213,12 @@ CHECK_INCLUDE_FILE("sys/stat.h" HAVE
+ CHECK_INCLUDE_FILE("sys/types.h" HAVE_SYS_TYPES_H)
+ CHECK_INCLUDE_FILE("unistd.h" HAVE_UNISTD_H)
+
++# Check for functions
++include (${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake)
++CHECK_SYMBOL_EXISTS(_mm_malloc "malloc.h" HAVE_MM_MALLOC )
++CHECK_SYMBOL_EXISTS(memalign "malloc.h" HAVE_MEMALIGN )
++CHECK_SYMBOL_EXISTS(posix_memalign "stdlib.h" HAVE_POSIX_MEMALIGN)
++
+ # Enable Large file support
+ include(TestLargeFiles)
+ OPJ_TEST_LARGE_FILES(OPJ_HAVE_LARGEFILES)
diff -r e9ea2cfbda0f -r 150ac75bde40 graphics/openjpeg/patches/patch-aa
--- a/graphics/openjpeg/patches/patch-aa Fri Jan 23 16:19:35 2015 +0000
+++ b/graphics/openjpeg/patches/patch-aa Fri Jan 23 17:15:09 2015 +0000
@@ -1,4 +1,7 @@
-$NetBSD: patch-aa,v 1.3 2012/12/06 17:09:18 adam Exp $
+$NetBSD: patch-aa,v 1.4 2015/01/23 17:15:09 pho Exp $
+
+Move checks for aligned malloc function from opj_malloc.h to cmake.
+See also patch-CMakeLists.txt
--- src/lib/openjp2/opj_malloc.h.orig 2012-11-19 14:26:08.000000000 +0000
+++ src/lib/openjp2/opj_malloc.h
diff -r e9ea2cfbda0f -r 150ac75bde40 graphics/openjpeg/patches/patch-src_lib_openjp2_opj__config__private.h.cmake.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/openjpeg/patches/patch-src_lib_openjp2_opj__config__private.h.cmake.in Fri Jan 23 17:15:09 2015 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-src_lib_openjp2_opj__config__private.h.cmake.in,v 1.1 2015/01/23 17:15:09 pho Exp $
+
+Add #cmakedefine for aligned malloc functions.
+See also patch-CMakeLists.txt
+
+--- src/lib/openjp2/opj_config_private.h.cmake.in.orig 2014-04-29 07:15:02.000000000 +0000
++++ src/lib/openjp2/opj_config_private.h.cmake.in
+@@ -12,6 +12,10 @@
+ /*#cmakedefine HAVE_SYS_TYPES_H @HAVE_SYS_TYPES_H@ */
+ /*#cmakedefine HAVE_UNISTD_H @HAVE_UNISTD_H@*/
+
++#cmakedefine HAVE_MM_MALLOC
++#cmakedefine HAVE_MEMALIGN
++#cmakedefine HAVE_POSIX_MEMALIGN
++
+ #cmakedefine _LARGEFILE_SOURCE
+ #cmakedefine _LARGE_FILES
+ #cmakedefine _FILE_OFFSET_BITS @_FILE_OFFSET_BITS@
+@@ -28,4 +32,4 @@ On other platforms we use the result of
+ #cmakedefine OPJ_BIG_ENDIAN
+ #elif defined(__BIG_ENDIAN__)
+ # define OPJ_BIG_ENDIAN
+-#endif
+\ No newline at end of file
++#endif
Home |
Main Index |
Thread Index |
Old Index