Wed May 18 22:18:43 2016 UTC ()
Import redshift-1.11 as x11/redshift.

Redshift adjusts the color temperature of your screen according to the
position of the sun.  A different color temperature is set during night and
daytime.  During twilight and early morning, the color temperature
transitions smoothly from night to daytime temperature to allow your eyes to
slowly adapt.  At night the color temperature should be set to match the
lamps in your room.  This is typically a low temperature at around
3000K-4000K.  During the day, the color temperature should match the light
from outside, typically around 5500K-6500K.


(snj)
diff -r0 -r1.1 pkgsrc/x11/redshift/DESCR
diff -r0 -r1.1 pkgsrc/x11/redshift/Makefile
diff -r0 -r1.1 pkgsrc/x11/redshift/PLIST
diff -r0 -r1.1 pkgsrc/x11/redshift/distinfo
diff -r0 -r1.1 pkgsrc/x11/redshift/options.mk
diff -r0 -r1.1 pkgsrc/x11/redshift/patches/patch-src_gamma-drm.c

File Added: pkgsrc/x11/redshift/DESCR
Redshift adjusts the color temperature of your screen according to the
position of the sun.  A different color temperature is set during night and
daytime.  During twilight and early morning, the color temperature
transitions smoothly from night to daytime temperature to allow your eyes to
slowly adapt.  At night the color temperature should be set to match the
lamps in your room.  This is typically a low temperature at around
3000K-4000K.  During the day, the color temperature should match the light
from outside, typically around 5500K-6500K.

File Added: pkgsrc/x11/redshift/Makefile
# $NetBSD: Makefile,v 1.1 2016/05/18 22:18:43 snj Exp $

DISTNAME=	redshift-1.11
CATEGORIES=	x11
MASTER_SITES=	${MASTER_SITE_GITHUB:=jonls/}
GITHUB_RELEASE=	v1.11
EXTRACT_SUFX=	.tar.xz

MAINTAINER=	snj@NetBSD.org
HOMEPAGE=	http://jonls.dk/redshift/
COMMENT=	Adjust screen color temperature based on the position of the sun

LICENSE=	gnu-gpl-v3

BUILD_DEPENDS+=	gettext-tools-[0-9]*:../../devel/gettext-tools
GNU_CONFIGURE=	yes
CONFIGURE_ARGS+=--disable-gui
USE_LIBTOOL=	yes
USE_TOOLS+=	intltool pkg-config

.include "options.mk"

.include "../../x11/libXxf86vm/buildlink3.mk"
.include "../../x11/libxcb/buildlink3.mk"

.include "../../mk/bsd.pkg.mk"

File Added: pkgsrc/x11/redshift/PLIST
@comment $NetBSD: PLIST,v 1.1 2016/05/18 22:18:43 snj Exp $
bin/redshift
man/man1/redshift.1

File Added: pkgsrc/x11/redshift/distinfo
$NetBSD: distinfo,v 1.1 2016/05/18 22:18:43 snj Exp $

SHA1 (redshift-1.11.tar.xz) = 759f1619c7ff0ab1cadda267343ef3665229d935
RMD160 (redshift-1.11.tar.xz) = 692e6e1a430895169971d8744a38e24eb4094971
SHA512 (redshift-1.11.tar.xz) = 88d7a4aabfaf3073f88673bc77df19d7bd79cb19aa8e647670cc52c02443475a4602f109fc4a06bf1639d1829d16a2644854039f90a614fc1a51c9cb4c81de16
Size (redshift-1.11.tar.xz) = 377372 bytes
SHA1 (patch-src_gamma-drm.c) = c7785a4896ac7a0d80b7b64b56b04a71b1932a04

File Added: pkgsrc/x11/redshift/options.mk
# $NetBSD: options.mk,v 1.1 2016/05/18 22:18:43 snj Exp $

PKG_OPTIONS_VAR=	PKG_OPTIONS.redshift

.include "../../mk/bsd.prefs.mk"

.if ${OPSYS} == "Linux" || ${OPSYS} == "NetBSD" || ${OPSYS} == "DragonFly" \
    || ${OPSYS} == "FreeBSD" || ${OPSYS} == "OpenBSD" || ${OPSYS} == "SunOS"
PKG_SUPPORTED_OPTIONS+=	libdrm
PKG_SUGGESTED_OPTIONS+=	libdrm

.endif

.include "../../mk/bsd.options.mk"

.if !empty(PKG_OPTIONS:Mlibdrm)
.include "../../x11/libdrm/buildlink3.mk"
CONFIGURE_ARGS+=	--enable-drm
.else
CONFIGURE_ARGS+=	--disable-drm
.endif

File Added: pkgsrc/x11/redshift/patches/Attic/patch-src_gamma-drm.c
$NetBSD: patch-src_gamma-drm.c,v 1.1 2016/05/18 22:18:43 snj Exp $

No alloca.h on non-Linux/non-SunOS systems.

--- src/gamma-drm.c.orig	2015-05-20 00:07:57.000000000 -0700
+++ src/gamma-drm.c	2015-05-20 00:08:01.000000000 -0700
@@ -21,7 +21,9 @@
 #include <stdlib.h>
 #include <stdint.h>
 #include <string.h>
+#if defined(__linux__) || defined(__sun)
 #include <alloca.h>
+#endif
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>