diff options
-rw-r--r-- | print/hplip/Makefile | 4 | ||||
-rw-r--r-- | print/hplip/distinfo | 1 | ||||
-rw-r--r-- | print/hplip/files/extrapatch-strnlen | 32 |
3 files changed, 36 insertions, 1 deletions
diff --git a/print/hplip/Makefile b/print/hplip/Makefile index 9f7b62dec2bf..dda9288e6f95 100644 --- a/print/hplip/Makefile +++ b/print/hplip/Makefile @@ -84,6 +84,10 @@ OPTIONS= QT "Graphical User Interface (Qt4)" on \ .include <bsd.port.options.mk> +.if ${OSVERSION} < 800067 +EXTRA_PATCHES+= ${PATCHDIR}/extrapatch-strnlen +.endif + .if ${OSVERSION} < 800069 LIB_DEPENDS+= usb:${PORTSDIR}/devel/libusb USB_INCLUDE= ${LOCALBASE}/include diff --git a/print/hplip/distinfo b/print/hplip/distinfo index 770294177fa7..f879a88879ca 100644 --- a/print/hplip/distinfo +++ b/print/hplip/distinfo @@ -1,3 +1,2 @@ -MD5 (hplip-3.10.9.tar.gz) = 609718830a26874fc0ea84a47b8132f3 SHA256 (hplip-3.10.9.tar.gz) = 1d34630084eccfcc80c08065becdf9313fd8f5a09a4cf523dbd9d3ec724206b9 SIZE (hplip-3.10.9.tar.gz) = 21818298 diff --git a/print/hplip/files/extrapatch-strnlen b/print/hplip/files/extrapatch-strnlen new file mode 100644 index 000000000000..ef95333c40ec --- /dev/null +++ b/print/hplip/files/extrapatch-strnlen @@ -0,0 +1,32 @@ +--- ./prnt/hpijs/context2.cpp.orig 2010-09-26 21:03:26.000000000 +0400 ++++ ./prnt/hpijs/context2.cpp 2010-10-30 02:35:47.889256370 +0400 +@@ -38,6 +38,18 @@ + #include "colormatch.h" + //#include "bug.h" + ++size_t ++strnlen(const char *s, size_t maxlen) ++{ ++ size_t len; ++ ++ for (len = 0; len < maxlen; len++, s++) { ++ if (!*s) ++ break; ++ } ++ return (len); ++}; ++ + APDK_BEGIN_NAMESPACE + extern ColorMatcher* Create_ColorMatcher + ( +--- ./prnt/hpijs/ljzjscolor.cpp.orig 2010-09-26 21:10:31.000000000 +0400 ++++ ./prnt/hpijs/ljzjscolor.cpp 2010-10-30 02:35:49.443533239 +0400 +@@ -38,6 +38,8 @@ + #include "ljzjs.h" + #include "ljzjscolor.h" + ++extern size_t strnlen(const char *s, size_t maxlen); ++ + APDK_BEGIN_NAMESPACE + + extern uint32_t ulMapGRAY_K_6x6x1[9 * 9 * 9]; |