Received: by mail.netbsd.org (Postfix, from userid 605) id CF82884D8C; Sun, 3 Dec 2017 03:57:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 5B9D584D37 for ; Sun, 3 Dec 2017 03:57:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id TWsR6BkHejYg for ; Sun, 3 Dec 2017 03:57:31 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id BD67084CFB for ; Sun, 3 Dec 2017 03:57:31 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id B3A3AFB40; Sun, 3 Dec 2017 03:57:31 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1512273451154620" MIME-Version: 1.0 Date: Sun, 3 Dec 2017 03:57:31 +0000 From: "Maya Rashish" Subject: CVS commit: pkgsrc/graphics/libcaca To: pkgsrc-changes@NetBSD.org Reply-To: maya@netbsd.org X-Mailer: log_accum Message-Id: <20171203035731.B3A3AFB40@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1512273451154620 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: maya Date: Sun Dec 3 03:57:31 UTC 2017 Modified Files: pkgsrc/graphics/libcaca: Makefile distinfo Added Files: pkgsrc/graphics/libcaca/patches: patch-caca_dither.c patch-examples_font.c Log Message: libcaca: assume & handle newly POSIX style endian.h (decision in 2011) Provide fallback definition that acts the same as the old code that existed. Add test target. Fixes build failure reported by John D Baker in pkgsrc-users To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 pkgsrc/graphics/libcaca/Makefile cvs rdiff -u -r1.8 -r1.9 pkgsrc/graphics/libcaca/distinfo cvs rdiff -u -r0 -r1.1 pkgsrc/graphics/libcaca/patches/patch-caca_dither.c \ pkgsrc/graphics/libcaca/patches/patch-examples_font.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1512273451154620 Content-Disposition: inline Content-Length: 4172 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/graphics/libcaca/Makefile diff -u pkgsrc/graphics/libcaca/Makefile:1.35 pkgsrc/graphics/libcaca/Makefile:1.36 --- pkgsrc/graphics/libcaca/Makefile:1.35 Thu Feb 25 13:37:47 2016 +++ pkgsrc/graphics/libcaca/Makefile Sun Dec 3 03:57:31 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.35 2016/02/25 13:37:47 jperkin Exp $ +# $NetBSD: Makefile,v 1.36 2017/12/03 03:57:31 maya Exp $ DISTNAME= libcaca-0.99.beta18 PKGNAME= ${DISTNAME:S/beta//} @@ -11,6 +11,7 @@ HOMEPAGE= http://caca.zoy.org/ COMMENT= Graphics library that outputs text instead of pixels, in colour # LICENSE= wtfpl +TEST_TARGET= check USE_LIBTOOL= yes USE_LANGUAGES= c c++ USE_TOOLS+= pkg-config Index: pkgsrc/graphics/libcaca/distinfo diff -u pkgsrc/graphics/libcaca/distinfo:1.8 pkgsrc/graphics/libcaca/distinfo:1.9 --- pkgsrc/graphics/libcaca/distinfo:1.8 Tue Nov 3 21:34:07 2015 +++ pkgsrc/graphics/libcaca/distinfo Sun Dec 3 03:57:31 2017 @@ -1,7 +1,9 @@ -$NetBSD: distinfo,v 1.8 2015/11/03 21:34:07 agc Exp $ +$NetBSD: distinfo,v 1.9 2017/12/03 03:57:31 maya Exp $ SHA1 (libcaca-0.99.beta18.tar.gz) = 0cbf8075c01d59b53c3cdfec7df9818696a41128 RMD160 (libcaca-0.99.beta18.tar.gz) = e7fe45bce798926789e48662038f1eb3ad2bece1 SHA512 (libcaca-0.99.beta18.tar.gz) = b2a8264ec36b74a01ff415a1fd7cb1806c76e28795b73607d4f8fa5ed5cc776b215f2817f45f06c672688f010622ee5c5e2f9dc4d0c43417dedbff545d575ca5 Size (libcaca-0.99.beta18.tar.gz) = 1168552 bytes SHA1 (patch-caca_caca.h) = 758527c49aa6f27eb82fa645bd80e8a87f4f4b96 +SHA1 (patch-caca_dither.c) = d2285e75eaec09840c38c2c54ce5e942d0a2e820 +SHA1 (patch-examples_font.c) = cc3e32a41c941e2c11a380e4e811ac4ba8b14f1d Added files: Index: pkgsrc/graphics/libcaca/patches/patch-caca_dither.c diff -u /dev/null pkgsrc/graphics/libcaca/patches/patch-caca_dither.c:1.1 --- /dev/null Sun Dec 3 03:57:31 2017 +++ pkgsrc/graphics/libcaca/patches/patch-caca_dither.c Sun Dec 3 03:57:31 2017 @@ -0,0 +1,29 @@ +$NetBSD: patch-caca_dither.c,v 1.1 2017/12/03 03:57:31 maya Exp $ + +Assume POSIX style endian.h (POSIX introduced this in 2011) +Provide fallback definitions for the older code that has existed before. + +--- caca/dither.c.orig 2010-02-15 23:45:36.000000000 +0000 ++++ caca/dither.c +@@ -19,6 +19,12 @@ + #if !defined(__KERNEL__) + # if defined(HAVE_ENDIAN_H) + # include ++# ifndef BYTE_ORDER ++# define BYTE_ORDER __BYTE_ORDER ++# endif ++# ifndef BIG_ENDIAN ++# define BIG_ENDIAN __BIG_ENDIAN ++# endif + # endif + # include + # include +@@ -1324,7 +1330,7 @@ static void get_rgba_default(caca_dither + case 3: + { + #if defined(HAVE_ENDIAN_H) +- if(__BYTE_ORDER == __BIG_ENDIAN) ++ if(BYTE_ORDER == BIG_ENDIAN) + #else + /* This is compile-time optimised with at least -O1 or -Os */ + uint32_t const tmp = 0x12345678; Index: pkgsrc/graphics/libcaca/patches/patch-examples_font.c diff -u /dev/null pkgsrc/graphics/libcaca/patches/patch-examples_font.c:1.1 --- /dev/null Sun Dec 3 03:57:31 2017 +++ pkgsrc/graphics/libcaca/patches/patch-examples_font.c Sun Dec 3 03:57:31 2017 @@ -0,0 +1,31 @@ +$NetBSD: patch-examples_font.c,v 1.1 2017/12/03 03:57:31 maya Exp $ + +Assume POSIX style endian.h (POSIX introduced this in 2011) +Provide fallback definitions for the older code that has existed before. + +--- examples/font.c.orig 2010-02-15 23:40:44.000000000 +0000 ++++ examples/font.c +@@ -15,8 +15,13 @@ + #if !defined(__KERNEL__) + # if defined(HAVE_ENDIAN_H) + # include ++# ifndef BYTE_ORDER ++# define BYTE_ORDER __BYTE_ORDER ++# endif ++# ifndef BIG_ENDIAN ++# define BIG_ENDIAN __BIG_ENDIAN ++# endif + # endif +- + # include + # include + # include +@@ -79,7 +84,7 @@ int main(int argc, char *argv[]) + + { + #if defined(HAVE_ENDIAN_H) +- if(__BYTE_ORDER == __BIG_ENDIAN) ++ if(BYTE_ORDER == BIG_ENDIAN) + #else + /* This is compile-time optimised with at least -O1 or -Os */ + uint32_t const tmp = 0x12345678; --_----------=_1512273451154620--