mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 03:30:05 +02:00
libharu: recipe for version 2.3.0
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
DESCRIPTION="C/C++ library for PDF generation"
|
||||
HOMEPAGE="http://www.libharu.org/"
|
||||
SRC_URI="http://libharu.org/files/libharu-2.1.0.tar.gz"
|
||||
REVISION="1"
|
||||
STATUS_HAIKU="stable"
|
||||
DEPEND="app-arch/zlib >= 1.25
|
||||
media-libs/libpng >= 1.2.44"
|
||||
CHECKSUM_MD5="0623b8fb08ae1b28af08b2cdbd66b662"
|
||||
BUILD()
|
||||
{
|
||||
cd libharu-2.1.0
|
||||
libtoolize --force --install --copy
|
||||
aclocal
|
||||
autoconf
|
||||
./configure --prefix=`finddir B_COMMON_DIRECTORY`
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd libharu-2.1.0
|
||||
make install
|
||||
}
|
||||
|
||||
#LICENSE=""
|
||||
#COPYRIGHT=""
|
||||
78
media-libs/libharu/libharu-2.3.0.recipe
Normal file
78
media-libs/libharu/libharu-2.3.0.recipe
Normal file
@@ -0,0 +1,78 @@
|
||||
SUMMARY="C/C++ library for PDF generation"
|
||||
DESCRIPTION="
|
||||
libpng is the official PNG reference library. It supports almost all PNG \
|
||||
features, is extensible, and has been extensively tested for over 17 years
|
||||
"
|
||||
HOMEPAGE="http://www.libharu.org/"
|
||||
COPYRIGHT="
|
||||
1998-2011 Glenn Randers-Pehrson
|
||||
1996-1997 Andreas Dilger
|
||||
1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
"
|
||||
LICENSE="Zlib"
|
||||
SRC_URI="https://github.com/libharu/libharu/archive/RELEASE_2_3_0.tar.gz"
|
||||
SRC_FILENAME="libharu-2.3.0.tar.gz"
|
||||
CHECKSUM_SHA256="8f9e68cc5d5f7d53d1bc61a1ed876add1faf4f91070dbc360d8b259f46d9a4d2"
|
||||
REVISION="1"
|
||||
ARCHITECTURES="x86_gcc2 x86 ?x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
|
||||
|
||||
PATCHES="libharu-$portVersion.patchset"
|
||||
|
||||
PROVIDES="
|
||||
libharu$secondaryArchSuffix = $portVersion compat >= 2
|
||||
lib:libhpdf$secondaryArchSuffix = 2.3.0 compat >= 2
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix >= $haikuVersion
|
||||
lib:libpng$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel >= $haikuVersion
|
||||
devel:libpng$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
SOURCE_DIR="libharu-RELEASE_2_3_0"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
rm -rf build
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
cmake -DCMAKE_INSTALL_PREFIX=$prefix ..
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd build
|
||||
make install
|
||||
|
||||
mv $libDir/libhpdfs.a $libDir/libhpdf.a
|
||||
mv $libDir/libhpdf.so $libDir/libhpdf.so.2.3
|
||||
ln -s libhpdf.so.2.3 $libDir/libhpdf.so
|
||||
prepareInstalledDevelLibs libhpdf
|
||||
|
||||
# devel package
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
}
|
||||
|
||||
# ----- devel package -------------------------------------------------------
|
||||
|
||||
PROVIDES_devel="
|
||||
libharu${secondaryArchSuffix}_devel = $portVersion compat >= 2
|
||||
devel:libhpdf$secondaryArchSuffix = 2.3.0 compat >= 2
|
||||
"
|
||||
REQUIRES_devel="
|
||||
libharu$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
@@ -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)*/
|
||||
47
media-libs/libharu/patches/libharu-2.3.0.patchset
Normal file
47
media-libs/libharu/patches/libharu-2.3.0.patchset
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user