libharu: recipe for version 2.3.0

This commit is contained in:
Jerome Duval
2014-06-04 21:00:01 +00:00
parent f022a0d6e7
commit 0b0a03322b
4 changed files with 125 additions and 75 deletions

View File

@@ -1,49 +0,0 @@
diff -urN libharu-2.1.0/configure.in libharu-2.1.0-haiku/configure.in
--- libharu-2.1.0/configure.in 2008-05-27 18:23:31.013107200 +0000
+++ libharu-2.1.0-haiku/configure.in 2010-09-25 20:01:55.000000000 +0000
@@ -21,10 +21,10 @@
dnl Check for header files
AC_CHECK_HEADERS(string.h strings.h unistd.h stdint.h)
-AC_CHECK_LIB([m], [floor], [LIBS="$LIBS -lm"], [AC_MSG_ERROR([can't continue without libm])])
+AC_CHECK_LIB([m], [floor], [LIBS="$LIBS -lm"], [LIBS="$LIBS"])
DEFAULT_INSTALL_PREFIX="/usr/local"
-STANDARD_PREFIXES="/usr /usr/local /opt /local"
+STANDARD_PREFIXES="/usr /usr/local /opt /local /boot/common"
HPDF_MAJOR_VERSION=2
HPDF_MINOR_VERSION=1
diff -urN libharu-2.1.0/src/hpdf_u3d.c libharu-2.1.0-haiku/src/hpdf_u3d.c
--- libharu-2.1.0/src/hpdf_u3d.c 2008-05-27 18:23:31.051904512 +0000
+++ libharu-2.1.0-haiku/src/hpdf_u3d.c 2010-09-25 20:13:02.000000000 +0000
@@ -542,18 +542,19 @@
return ret;
}
-#define normalize(x, y, z) \
-{ \
- HPDF_REAL modulo; \
- modulo = sqrtf(x*x + y*y + z*z); \
- if (modulo != 0.0) \
- { \
- x = x/modulo; \
- y = y/modulo; \
- z = z/modulo; \
- } \
+void normalize(x, y, z)
+{
+ HPDF_REAL modulo;
+ modulo = sqrtf(x*x + y*y + z*z);
+ if (modulo != 0.0)
+ {
+ x = x/modulo;
+ y = y/modulo;
+ z = z/modulo;
+ }
}
+
/* building the transformation matrix*/
/* #1,#2,#3 centre of orbit coordinates (coo)*/
/* #4,#5,#6 centre of orbit to camera direction vector (c2c)*/

View File

@@ -0,0 +1,47 @@
From 3ad4249e4222d11b2a919e8174a3de01c147f97c Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Wed, 4 Jun 2014 17:26:56 +0000
Subject: haiku patch
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 354ca75..cc1fef7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -207,13 +207,9 @@ set(
)
# install header files
-install(FILES ${haru_HDRS} DESTINATION include)
+install(FILES ${haru_HDRS} DESTINATION "develop/headers")
# install various files
-install(FILES README CHANGES INSTALL DESTINATION .)
-if(NOT DEVPAK)
- install(DIRECTORY if DESTINATION .)
-endif(NOT DEVPAK)
if(DEVPAK)
install(FILES ${CMAKE_BINARY_DIR}/libharu.DevPackage DESTINATION .)
endif(DEVPAK)
diff --git a/cmake/modules/haru.cmake b/cmake/modules/haru.cmake
index 95647b9..0495d6c 100644
--- a/cmake/modules/haru.cmake
+++ b/cmake/modules/haru.cmake
@@ -27,11 +27,11 @@ check_include_files(unistd.h LIBHPDF_HAVE_UNISTD_H)
# =======================================================================
# On windows systems the math library is not separated so do not specify
# it unless you are on a non-windows system.
-if(NOT WIN32)
+if(NOT WIN32 AND NOT HAIKU)
find_library(MATH_LIB NAMES m PATHS /usr/local/lib /usr/lib)
if(NOT MATH_LIB)
message(FATAL_ERROR "Cannot find required math library")
endif(NOT MATH_LIB)
-else(NOT WIN32)
+else(NOT WIN32 AND NOT HAIKU)
set(MATH_LIB)
-endif(NOT WIN32)
+endif(NOT WIN32 AND NOT HAIKU)
--
1.8.3.4