From 0e63148c867b30dabfce4d4138dc7f1e0c4e02f1 Mon Sep 17 00:00:00 2001 From: Scott McCreary Date: Sat, 25 Sep 2010 20:26:59 +0000 Subject: [PATCH] Initial .bep and .patch files for libharu --- media-libs/libharu/libharu-2.1.0.bep | 24 +++++++++ .../libharu/patches/libharu-2.1.0.patch | 49 +++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 media-libs/libharu/libharu-2.1.0.bep create mode 100644 media-libs/libharu/patches/libharu-2.1.0.patch diff --git a/media-libs/libharu/libharu-2.1.0.bep b/media-libs/libharu/libharu-2.1.0.bep new file mode 100644 index 000000000..4d16209e5 --- /dev/null +++ b/media-libs/libharu/libharu-2.1.0.bep @@ -0,0 +1,24 @@ +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="" diff --git a/media-libs/libharu/patches/libharu-2.1.0.patch b/media-libs/libharu/patches/libharu-2.1.0.patch new file mode 100644 index 000000000..bd0f628fc --- /dev/null +++ b/media-libs/libharu/patches/libharu-2.1.0.patch @@ -0,0 +1,49 @@ +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)*/