From d07c1c0f2334aa38719d5965bc16cb0475f0f912 Mon Sep 17 00:00:00 2001 From: Max Brazhnikov Date: Sat, 30 Oct 2010 13:13:50 +0000 Subject: Fix build on 7.x Remove md5 sum --- print/hplip/Makefile | 4 ++++ print/hplip/distinfo | 1 - print/hplip/files/extrapatch-strnlen | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 print/hplip/files/extrapatch-strnlen (limited to 'print/hplip') 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 +.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]; -- cgit v1.2.3