diff --git a/app-text/htmldoc/htmldoc-1.8.27.recipe b/app-text/htmldoc/htmldoc-1.8.27.recipe
index 73f843df9..3286f627c 100644
--- a/app-text/htmldoc/htmldoc-1.8.27.recipe
+++ b/app-text/htmldoc/htmldoc-1.8.27.recipe
@@ -8,9 +8,11 @@ LICENSE="GNU GPL v2"
COPYRIGHT="1997-2006 Easy Software Products"
SRC_URI="http://www.msweet.org/files/project1/htmldoc-1.8.27-source.tar.bz2"
CHECKSUM_MD5="35589e7b8fe9c54e11be87cd5aec4dcc"
-REVISION="2"
+REVISION="3"
ARCHITECTURES="x86_gcc2 ?x86"
+PATCHES="htmldoc-1.8.27.patchset"
+
PROVIDES="
htmldoc = $portVersion compat >= 1.8
cmd:htmldoc = $portVersion compat >= 1.8
@@ -18,6 +20,9 @@ PROVIDES="
REQUIRES="
haiku >= $haikuVersion
+ lib:libjpeg
+ lib:libpng
+ lib:libz
"
BUILD_REQUIRES="
cmd:autoconf
@@ -25,6 +30,9 @@ BUILD_REQUIRES="
cmd:ld
cmd:make
cmd:sed
+ devel:libjpeg
+ devel:libpng
+ devel:libz
"
BUILD_PREREQUIRES="
haiku_devel >= $haikuVersion
@@ -36,8 +44,8 @@ BUILD()
{
autoconf
chmod 755 configure
- ./configure $configureDirArgs
- make
+ runConfigure ./configure
+ make $jobArgs
}
INSTALL()
diff --git a/app-text/htmldoc/patches/htmldoc-1.8.27.patch b/app-text/htmldoc/patches/htmldoc-1.8.27.patch
deleted file mode 100644
index a0d81716c..000000000
--- a/app-text/htmldoc/patches/htmldoc-1.8.27.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-diff -urN htmldoc-1.8.27-orig/configure.in htmldoc-1.8.27/configure.in
---- htmldoc-1.8.27-orig/configure.in 2006-08-02 19:36:53.000000000 +0000
-+++ htmldoc-1.8.27/configure.in 2011-05-23 09:05:32.608174080 +0000
-@@ -109,7 +109,7 @@
- AC_SUBST(LDFLAGS)
-
- AC_CHECK_LIB(m,pow)
--AC_SEARCH_LIBS(socket, socket)
-+AC_SEARCH_LIBS(socket, network socket)
- AC_SEARCH_LIBS(gethostbyaddr, nsl)
- AC_SEARCH_LIBS(getaddrinfo, nsl, AC_DEFINE(HAVE_GETADDRINFO))
- AC_SEARCH_LIBS(getnameinfo, nsl, AC_DEFINE(HAVE_GETNAMEINFO))
-@@ -316,8 +316,8 @@
- bindir="$exec_prefix/bin"
- fi
-
--AC_DEFINE_UNQUOTED(DOCUMENTATION, "$prefix/share/doc/htmldoc")
--AC_DEFINE_UNQUOTED(HTML_DATA, "$prefix/share/htmldoc")
-+AC_DEFINE_UNQUOTED(DOCUMENTATION, "$prefix/data/doc/htmldoc")
-+AC_DEFINE_UNQUOTED(HTML_DATA, "$prefix/data/htmldoc")
-
- dnl Update compiler options...
- if test -n "$GXX"; then
-diff -urN htmldoc-1.8.27-orig/data/Makefile htmldoc-1.8.27/data/Makefile
---- htmldoc-1.8.27-orig/data/Makefile 2004-05-10 01:14:53.000000000 +0000
-+++ htmldoc-1.8.27/data/Makefile 2011-05-23 09:03:53.007602176 +0000
-@@ -53,11 +53,11 @@
- #
-
- install:
-- if [ ! -d $(datadir)/htmldoc/data ]; then\
-- $(MKDIR) $(datadir)/htmldoc/data;\
-+ if [ ! -d $(DESTDIR)$(datadir)/htmldoc/data ]; then\
-+ $(MKDIR) $(DESTDIR)$(datadir)/htmldoc/data;\
- fi
-- $(CP) $(FILES) $(datadir)/htmldoc/data
-- $(CHMOD) ugo+r $(datadir)/htmldoc/data/*
-+ $(CP) $(FILES) $(DESTDIR)$(datadir)/htmldoc/data
-+ $(CHMOD) ugo+r $(DESTDIR)$(datadir)/htmldoc/data/*
-
-
- #
-diff -urN htmldoc-1.8.27-orig/doc/Makefile htmldoc-1.8.27/doc/Makefile
---- htmldoc-1.8.27-orig/doc/Makefile 2005-10-28 20:32:59.000000000 +0000
-+++ htmldoc-1.8.27/doc/Makefile 2011-05-23 09:03:57.148897792 +0000
-@@ -57,16 +57,16 @@
- #
-
- install: $(DOCUMENTS)
-- if [ ! -d $(datadir)/doc/htmldoc ]; then\
-- $(MKDIR) $(datadir)/doc/htmldoc;\
-+ if [ ! -d $(DESTDIR)$(mandir)/doc/htmldoc ]; then\
-+ $(MKDIR) $(DESTDIR)$(mandir)/doc/htmldoc;\
- fi
-- $(CP) $(DOCFILES) $(datadir)/doc/htmldoc
-- $(CHMOD) ugo+r $(datadir)/doc/htmldoc/*
-- if [ ! -d $(mandir)/man1 ]; then\
-- $(MKDIR) $(mandir)/man1;\
-+ $(CP) $(DOCFILES) $(DESTDIR)/$(mandir)/doc/htmldoc
-+ $(CHMOD) ugo+r $(DESTDIR)/$(mandir)/doc/htmldoc/*
-+ if [ ! -d $(DESTDIR)$(mandir)/man1 ]; then\
-+ $(MKDIR) $(DESTDIR)/$(mandir)/man1;\
- fi
-- $(CP) htmldoc.man $(mandir)/man1/htmldoc.1
-- $(CHMOD) ugo+r $(mandir)/man1/htmldoc.1
-+ $(CP) htmldoc.man $(DESTDIR)/$(mandir)/man1/htmldoc.1
-+ $(CHMOD) ugo+r $(DESTDIR)/$(mandir)/man1/htmldoc.1
-
-
- #
-diff -urN htmldoc-1.8.27-orig/fonts/Makefile htmldoc-1.8.27/fonts/Makefile
---- htmldoc-1.8.27-orig/fonts/Makefile 2005-10-28 20:32:59.000000000 +0000
-+++ htmldoc-1.8.27/fonts/Makefile 2011-05-23 09:04:00.721682432 +0000
-@@ -75,14 +75,14 @@
-
- install:
- echo "Installing font files in $(datadir)/htmldoc/fonts..."
-- if [ ! -d $(datadir)/htmldoc/fonts ]; then\
-- $(MKDIR) $(datadir)/htmldoc/fonts;\
-+ if [ ! -d $(DESTDIR)/$(datadir)/htmldoc/fonts ]; then\
-+ $(MKDIR) $(DESTDIR)/$(datadir)/htmldoc/fonts;\
- fi
- for font in $(FONTS); do \
-- $(CP) $$font.afm $(datadir)/htmldoc/fonts; \
-- $(CP) $$font.pfa $(datadir)/htmldoc/fonts; \
-+ $(CP) $$font.afm $(DESTDIR)/$(datadir)/htmldoc/fonts; \
-+ $(CP) $$font.pfa $(DESTDIR)/$(datadir)/htmldoc/fonts; \
- done
-- $(CHMOD) ugo+r $(datadir)/htmldoc/fonts/*
-+ $(CHMOD) ugo+r $(DESTDIR)/$(datadir)/htmldoc/fonts/*
-
-
- #
-diff -urN htmldoc-1.8.27-orig/htmldoc/Makefile htmldoc-1.8.27/htmldoc/Makefile
---- htmldoc-1.8.27-orig/htmldoc/Makefile 2005-10-28 20:32:59.000000000 +0000
-+++ htmldoc-1.8.27/htmldoc/Makefile 2011-05-23 09:04:04.563609600 +0000
-@@ -50,11 +50,11 @@
- #
-
- install: all
-- if [ ! -d $(bindir) ]; then\
-- $(MKDIR) $(bindir);\
-+ if [ ! -d $(DESTDIR)/$(bindir) ]; then\
-+ $(MKDIR) $(DESTDIR)/$(bindir);\
- fi
-- cp htmldoc$(EXEEXT) $(bindir)
-- chmod ugo+rx $(bindir)/htmldoc$(EXEEXT)
-+ cp htmldoc$(EXEEXT) $(DESTDIR)/$(bindir)
-+ chmod ugo+rx $(DESTDIR)/$(bindir)/htmldoc$(EXEEXT)
-
-
- #
-diff -urN htmldoc-1.8.27-orig/htmldoc/http.h htmldoc-1.8.27/htmldoc/http.h
---- htmldoc-1.8.27-orig/htmldoc/http.h 2006-04-03 15:41:08.000000000 +0000
-+++ htmldoc-1.8.27/htmldoc/http.h 2011-05-23 09:04:08.438304768 +0000
-@@ -102,6 +102,8 @@
- # define s6_addr32 _S6_un._S6_u32
- # elif defined(__FreeBSD__) || defined(__APPLE__)
- # define s6_addr32 __u6_addr.__u6_addr32
-+# elif defined(__HAIKU__)
-+# define s6_addr32 s6_addr
- # elif defined(__osf__)
- # define s6_addr32 s6_un.sa6_laddr
- # elif defined(WIN32)
diff --git a/app-text/htmldoc/patches/htmldoc-1.8.27.patchset b/app-text/htmldoc/patches/htmldoc-1.8.27.patchset
new file mode 100644
index 000000000..750c0a19a
--- /dev/null
+++ b/app-text/htmldoc/patches/htmldoc-1.8.27.patchset
@@ -0,0 +1,273 @@
+From 71b6617cdb5042458030b3aec5bfce81273e6de0 Mon Sep 17 00:00:00 2001
+From: Scott McCreary
+Date: Mon May 23 16:13:13 2011 +0000
+Subject: Fixed directories for htmldoc.
+
+
+diff --git a/configure.in b/configure.in
+index 640f8ac..5ef51a8 100644
+--- a/configure.in
++++ b/configure.in
+@@ -109,7 +109,7 @@ LDFLAGS="${LDFLAGS:=}"
+ AC_SUBST(LDFLAGS)
+
+ AC_CHECK_LIB(m,pow)
+-AC_SEARCH_LIBS(socket, socket)
++AC_SEARCH_LIBS(socket, network socket)
+ AC_SEARCH_LIBS(gethostbyaddr, nsl)
+ AC_SEARCH_LIBS(getaddrinfo, nsl, AC_DEFINE(HAVE_GETADDRINFO))
+ AC_SEARCH_LIBS(getnameinfo, nsl, AC_DEFINE(HAVE_GETNAMEINFO))
+@@ -316,8 +316,8 @@ if test "$bindir" = "\${exec_prefix}/bin"; then
+ bindir="$exec_prefix/bin"
+ fi
+
+-AC_DEFINE_UNQUOTED(DOCUMENTATION, "$prefix/share/doc/htmldoc")
+-AC_DEFINE_UNQUOTED(HTML_DATA, "$prefix/share/htmldoc")
++AC_DEFINE_UNQUOTED(DOCUMENTATION, "$prefix/data/doc/htmldoc")
++AC_DEFINE_UNQUOTED(HTML_DATA, "$prefix/data/htmldoc")
+
+ dnl Update compiler options...
+ if test -n "$GXX"; then
+diff --git a/data/Makefile b/data/Makefile
+index ee9b7de..f416fad 100644
+--- a/data/Makefile
++++ b/data/Makefile
+@@ -53,11 +53,11 @@ all:
+ #
+
+ install:
+- if [ ! -d $(datadir)/htmldoc/data ]; then\
+- $(MKDIR) $(datadir)/htmldoc/data;\
++ if [ ! -d $(DESTDIR)$(datadir)/htmldoc/data ]; then\
++ $(MKDIR) $(DESTDIR)$(datadir)/htmldoc/data;\
+ fi
+- $(CP) $(FILES) $(datadir)/htmldoc/data
+- $(CHMOD) ugo+r $(datadir)/htmldoc/data/*
++ $(CP) $(FILES) $(DESTDIR)$(datadir)/htmldoc/data
++ $(CHMOD) ugo+r $(DESTDIR)$(datadir)/htmldoc/data/*
+
+
+ #
+diff --git a/doc/Makefile b/doc/Makefile
+index 87292f6..666c80d 100644
+--- a/doc/Makefile
++++ b/doc/Makefile
+@@ -57,16 +57,16 @@ all: $(DOCUMENTS)
+ #
+
+ install: $(DOCUMENTS)
+- if [ ! -d $(datadir)/doc/htmldoc ]; then\
+- $(MKDIR) $(datadir)/doc/htmldoc;\
++ if [ ! -d $(DESTDIR)$(mandir)/doc/htmldoc ]; then\
++ $(MKDIR) $(DESTDIR)$(mandir)/doc/htmldoc;\
+ fi
+- $(CP) $(DOCFILES) $(datadir)/doc/htmldoc
+- $(CHMOD) ugo+r $(datadir)/doc/htmldoc/*
+- if [ ! -d $(mandir)/man1 ]; then\
+- $(MKDIR) $(mandir)/man1;\
++ $(CP) $(DOCFILES) $(DESTDIR)/$(mandir)/doc/htmldoc
++ $(CHMOD) ugo+r $(DESTDIR)/$(mandir)/doc/htmldoc/*
++ if [ ! -d $(DESTDIR)$(mandir)/man1 ]; then\
++ $(MKDIR) $(DESTDIR)/$(mandir)/man1;\
+ fi
+- $(CP) htmldoc.man $(mandir)/man1/htmldoc.1
+- $(CHMOD) ugo+r $(mandir)/man1/htmldoc.1
++ $(CP) htmldoc.man $(DESTDIR)/$(mandir)/man1/htmldoc.1
++ $(CHMOD) ugo+r $(DESTDIR)/$(mandir)/man1/htmldoc.1
+
+
+ #
+diff --git a/fonts/Makefile b/fonts/Makefile
+index 3afefa3..a0a396a 100644
+--- a/fonts/Makefile
++++ b/fonts/Makefile
+@@ -75,14 +75,14 @@ all:
+
+ install:
+ echo "Installing font files in $(datadir)/htmldoc/fonts..."
+- if [ ! -d $(datadir)/htmldoc/fonts ]; then\
+- $(MKDIR) $(datadir)/htmldoc/fonts;\
++ if [ ! -d $(DESTDIR)/$(datadir)/htmldoc/fonts ]; then\
++ $(MKDIR) $(DESTDIR)/$(datadir)/htmldoc/fonts;\
+ fi
+ for font in $(FONTS); do \
+- $(CP) $$font.afm $(datadir)/htmldoc/fonts; \
+- $(CP) $$font.pfa $(datadir)/htmldoc/fonts; \
++ $(CP) $$font.afm $(DESTDIR)/$(datadir)/htmldoc/fonts; \
++ $(CP) $$font.pfa $(DESTDIR)/$(datadir)/htmldoc/fonts; \
+ done
+- $(CHMOD) ugo+r $(datadir)/htmldoc/fonts/*
++ $(CHMOD) ugo+r $(DESTDIR)/$(datadir)/htmldoc/fonts/*
+
+
+ #
+diff --git a/htmldoc/Makefile b/htmldoc/Makefile
+index 9ebc412..c17b6d0 100644
+--- a/htmldoc/Makefile
++++ b/htmldoc/Makefile
+@@ -50,11 +50,11 @@ all: htmldoc$(EXEEXT)
+ #
+
+ install: all
+- if [ ! -d $(bindir) ]; then\
+- $(MKDIR) $(bindir);\
++ if [ ! -d $(DESTDIR)/$(bindir) ]; then\
++ $(MKDIR) $(DESTDIR)/$(bindir);\
+ fi
+- cp htmldoc$(EXEEXT) $(bindir)
+- chmod ugo+rx $(bindir)/htmldoc$(EXEEXT)
++ cp htmldoc$(EXEEXT) $(DESTDIR)/$(bindir)
++ chmod ugo+rx $(DESTDIR)/$(bindir)/htmldoc$(EXEEXT)
+
+
+ #
+diff --git a/htmldoc/http.h b/htmldoc/http.h
+index 4012f92..b3b9b09 100644
+--- a/htmldoc/http.h
++++ b/htmldoc/http.h
+@@ -102,6 +102,8 @@ extern "C" {
+ # define s6_addr32 _S6_un._S6_u32
+ # elif defined(__FreeBSD__) || defined(__APPLE__)
+ # define s6_addr32 __u6_addr.__u6_addr32
++# elif defined(__HAIKU__)
++# define s6_addr32 s6_addr
+ # elif defined(__osf__)
+ # define s6_addr32 s6_un.sa6_laddr
+ # elif defined(WIN32)
+--
+1.7.5
+
+
+From 33b0369d77315b32c03d311112add0df8eb63fad Mon Sep 17 00:00:00 2001
+From: Ingo Weinhold
+Date: Sun, 16 Jun 2013 02:59:17 +0200
+Subject: image.cxx: libpng 1.5 fixes
+
+
+diff --git a/htmldoc/image.cxx b/htmldoc/image.cxx
+index 574ff7c..9a35db2 100644
+--- a/htmldoc/image.cxx
++++ b/htmldoc/image.cxx
+@@ -55,6 +55,7 @@ extern "C" { /* Workaround for JPEG header problems... */
+ #include /* JPEG/JFIF image definitions */
+ }
+
++#define PNG_SETJMP_SUPPORTED
+ #include /* Portable Network Graphics (PNG) definitions */
+
+
+@@ -1472,6 +1473,9 @@ image_load_png(image_t *img, /* I - Image pointer */
+ png_bytep *rows; /* PNG row pointers */
+ uchar *inptr, /* Input pixels */
+ *outptr; /* Output pixels */
++ png_bytep trans_alpha;
++ png_color_16p trans_color;
++ int num_trans = 0;
+
+
+ /*
+@@ -1499,7 +1503,7 @@ image_load_png(image_t *img, /* I - Image pointer */
+
+ rows = NULL;
+
+- if (setjmp(pp->jmpbuf))
++ if (setjmp(png_jmpbuf(pp)))
+ {
+ progress_error(HD_ERROR_BAD_FORMAT, "PNG file contains errors!");
+
+@@ -1526,7 +1530,7 @@ image_load_png(image_t *img, /* I - Image pointer */
+
+ png_read_info(pp, info);
+
+- if (info->color_type & PNG_COLOR_MASK_PALETTE)
++ if (png_get_color_type(pp, info) & PNG_COLOR_MASK_PALETTE)
+ {
+ png_set_expand(pp);
+
+@@ -1535,15 +1539,15 @@ image_load_png(image_t *img, /* I - Image pointer */
+ if (Encryption)
+ img->use ++;
+ }
+- else if (info->bit_depth < 8)
++ else if (png_get_bit_depth(pp, info) < 8)
+ {
+ png_set_packing(pp);
+ png_set_expand(pp);
+ }
+- else if (info->bit_depth == 16)
++ else if (png_get_bit_depth(pp, info) == 16)
+ png_set_strip_16(pp);
+
+- if (info->color_type & PNG_COLOR_MASK_COLOR)
++ if (png_get_color_type(pp, info) & PNG_COLOR_MASK_COLOR)
+ {
+ depth = 3;
+ img->depth = gray ? 1 : 3;
+@@ -1554,10 +1558,12 @@ image_load_png(image_t *img, /* I - Image pointer */
+ img->depth = 1;
+ }
+
+- img->width = info->width;
+- img->height = info->height;
++ img->width = png_get_image_width(pp, info);
++ img->height = png_get_image_height(pp, info);
+
+- if ((info->color_type & PNG_COLOR_MASK_ALPHA) || info->num_trans)
++ png_get_tRNS(pp, info, &trans_alpha, &num_trans, &trans_color);
++
++ if ((png_get_color_type(pp, info) & PNG_COLOR_MASK_ALPHA) || num_trans)
+ {
+ if ((PSLevel == 0 && PDFVersion >= 14) || PSLevel == 3)
+ image_need_mask(img, 8);
+@@ -1571,14 +1577,14 @@ image_load_png(image_t *img, /* I - Image pointer */
+
+ #ifdef DEBUG
+ printf("color_type=0x%04x, depth=%d, img->width=%d, img->height=%d, img->depth=%d\n",
+- info->color_type, depth, img->width, img->height, img->depth);
+- if (info->color_type & PNG_COLOR_MASK_COLOR)
++ png_get_color_type(pp, info), depth, img->width, img->height, img->depth);
++ if (png_get_color_type(pp, info) & PNG_COLOR_MASK_COLOR)
+ puts(" COLOR");
+ else
+ puts(" GRAYSCALE");
+- if ((info->color_type & PNG_COLOR_MASK_ALPHA) || info->num_trans)
++ if ((png_get_color_type(pp, info) & PNG_COLOR_MASK_ALPHA) || num_trans)
+ puts(" ALPHA");
+- if (info->color_type & PNG_COLOR_MASK_PALETTE)
++ if (png_get_color_type(pp, info) & PNG_COLOR_MASK_PALETTE)
+ puts(" PALETTE");
+ #endif // DEBUG
+
+@@ -1594,9 +1600,9 @@ image_load_png(image_t *img, /* I - Image pointer */
+ * Allocate pointers...
+ */
+
+- rows = (png_bytep *)calloc(info->height, sizeof(png_bytep));
++ rows = (png_bytep *)calloc(img->height, sizeof(png_bytep));
+
+- for (i = 0; i < (int)info->height; i ++)
++ for (i = 0; i < (int)img->height; i ++)
+ rows[i] = img->pixels + i * img->width * depth;
+
+ /*
+@@ -1610,7 +1616,7 @@ image_load_png(image_t *img, /* I - Image pointer */
+ * Generate the alpha mask as necessary...
+ */
+
+- if ((info->color_type & PNG_COLOR_MASK_ALPHA) || info->num_trans)
++ if ((png_get_color_type(pp, info) & PNG_COLOR_MASK_ALPHA) || num_trans)
+ {
+ #ifdef DEBUG
+ for (inptr = img->pixels, i = 0; i < img->height; i ++)
+@@ -1639,7 +1645,7 @@ image_load_png(image_t *img, /* I - Image pointer */
+ * Reformat the data as necessary for the reader...
+ */
+
+- if (gray && info->color_type & PNG_COLOR_MASK_COLOR)
++ if (gray && png_get_color_type(pp, info) & PNG_COLOR_MASK_COLOR)
+ {
+ /*
+ * Greyscale output needed...
+--
+1.7.5
+