Commit a068c514 authored by Jaromil's avatar Jaromil

Import from Debian jessie/main package colord-1.2.1

parents
This diff is collapsed.
Richard Hughes <richard@hughsie.com>
This diff is collapsed.
This diff is collapsed.
Richard Hughes <richard@hughsie.com>
AUTOMAKE_OPTIONS = 1.7
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
NULL =
SUBDIRS = \
policy \
man \
lib \
rules \
po
# this needs libcolord
SUBDIRS += \
client \
contrib \
doc \
examples
# this needs client/cd-create-profile
SUBDIRS += \
data
# this needs data/profiles/*.icc
SUBDIRS += \
src
snapshot:
$(MAKE) dist distdir=$(PACKAGE)-$(VERSION)-`date +"%Y%m%d"`
DISTCHECK_CONFIGURE_FLAGS = \
--enable-introspection \
--enable-fd-fallback \
--enable-gtk \
--enable-sane \
--enable-libcolordcompat \
--disable-print-profiles \
--disable-bash-completion \
--enable-gtk-doc \
--with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
--with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
EXTRA_DIST = \
COPYING \
MAINTAINERS \
AUTHORS \
README.md \
NEWS \
autogen.sh \
config.h \
intltool-extract.in \
intltool-merge.in \
intltool-update.in
MAINTAINERCLEANFILES = \
$(srcdir)/INSTALL \
$(srcdir)/ABOUT-NLS \
$(srcdir)/aclocal.m4 \
$(srcdir)/autoscan.log \
$(srcdir)/compile \
$(srcdir)/config.guess \
$(srcdir)/config.rpath \
$(srcdir)/config.h.in \
$(srcdir)/config.sub \
$(srcdir)/configure.scan \
$(srcdir)/depcomp \
$(srcdir)/install-sh \
$(srcdir)/ltmain.sh \
$(srcdir)/missing \
$(srcdir)/mkinstalldirs \
$(srcdir)/omf.make \
$(srcdir)/test-driver \
$(srcdir)/xmldocs.make \
$(srcdir)/gtk-doc.make \
$(srcdir)/ChangeLog \
$(srcdir)/po/Makefile.in.in~ \
$(srcdir)/colord-*.tar.* \
`find "$(srcdir)" -type f -name Makefile.in -print`
GITIGNOREFILES = \
.tx
clang:
$(MAKE) clean; \
rm -rf clang; \
scan-build --use-analyzer=/usr/bin/clang \
-o clang-report \
./autogen.sh \
--enable-introspection=no \
--disable-print-profiles; \
scan-build --use-analyzer=/usr/bin/clang \
-o clang-report make
coverity:
$(MAKE); \
cd src; $(MAKE) clean; cd -; \
cd lib; $(MAKE) clean; cd -; \
cd examples; $(MAKE) clean; cd -; \
cd client; $(MAKE) clean; cd -; \
cd contrib/session-helper; $(MAKE) clean; cd -; \
cov-build --dir cov-int $(MAKE); \
tar czvf colord-coverity.tgz cov-int; \
export COVERITY_EMAIL=`cat ~/.coverity | grep EMAIL | cut -f2`; \
export COVERITY_PASSWORD=`cat ~/.coverity | grep PASSWORD_colord | cut -f2`; \
curl --form file=@colord-coverity.tgz \
--form project=colord \
--form password=${COVERITY_PASSWORD} \
--form email=${COVERITY_EMAIL} \
http://scan5.coverity.com/cgi-bin/upload.py
distclean-local:
if test $(srdcir) = .; then :; else \
rm -f ChangeLog; \
fi
ChangeLog:
@echo Creating $@
@if test -d "$(srcdir)/.git"; then \
(GIT_DIR=$(top_srcdir)/.git ./missing --run git log e197d80c8937c622f21f569457d1bbd05746d951.. --stat -M -C --name-status --date=short --no-color) | fmt --split-only > $@.tmp \
&& mv -f $@.tmp $@ \
|| ($(RM) $@.tmp; \
echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
(test -f $@ || echo git-log is required to generate this file >> $@)); \
else \
test -f $@ || \
(echo A git checkout and git-log is required to generate ChangeLog >&2 && \
echo A git checkout and git-log is required to generate this file >> $@); \
fi
.PHONY: ChangeLog
-include $(top_srcdir)/git.mk
This diff is collapsed.
This diff is collapsed.
colord
======
colord is a system service that makes it easy to manage, install and generate
color profiles to accurately color manage input and output devices.
This functionality is implemented as a system activated daemon called colord.
Being system activated means that it's only started when the user is using a
text mode or graphical tool.
What colord does:
* Provides a DBus API for other programs to query, e.g.
"Get me the profiles for device $foo" or
"Create a device and assign it profile $bar"
* Provides a persistent database backed store for device -> profile mapping.
* Provides the session for a way to set system settings, for instance
setting the display profile for all users and all sessions.
See [the website](http://www.freedesktop.org/software/colord/) for more details.
This diff is collapsed.
#!/bin/sh
# Copyright (C) 2010 Richard Hughes <richard@hughsie.com>
#
# Run this to generate all the initial makefiles, etc.
#
# Licensed under the GNU General Public License Version 2
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
test -n "$srcdir" || srcdir=`dirname "$0"`
test -n "$srcdir" || srcdir=.
olddir=`pwd`
cd "$srcdir"
GTKDOCIZE=`which gtkdocize`
if test -z $GTKDOCIZE; then
echo "*** No GTK-Doc found, please install it ***"
exit 1
fi
AUTORECONF=`which autoreconf`
if test -z $AUTORECONF; then
echo "*** No autoreconf found, please install it ***"
exit 1
fi
gtkdocize --copy || exit $?
autopoint --force
ACLOCAL="${ACLOCAL-aclocal} $ACLOCAL_FLAGS" AUTOPOINT='intltoolize --automake --copy' autoreconf --force --install --verbose
cd "$olddir"
test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
AM_CPPFLAGS = \
$(PIE_CFLAGS) \
$(GLIB_CFLAGS) \
$(GTK_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/lib \
-I$(top_builddir)/lib \
-I$(top_srcdir)/lib/colord \
-DG_LOG_DOMAIN=\"Cd\" \
-DCD_COMPILATION \
-DCD_DISABLE_DEPRECATED \
-DLIBEXECDIR=\"$(libexecdir)\" \
-DDATADIR=\"$(datadir)\" \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
-DVERSION="\"$(VERSION)\"" \
-DLOCALEDIR=\""$(localedir)"\"
COLORD_LIBS = \
$(top_builddir)/lib/colord/libcolordprivate.la \
$(top_builddir)/lib/colord/libcolord.la
noinst_PROGRAMS = \
cd-it8 \
cd-find-broken
bin_PROGRAMS = \
colormgr \
cd-create-profile \
cd-iccdump \
cd-fix-profile
cd_find_broken_SOURCES = \
cd-find-broken.c
cd_find_broken_LDADD = \
$(COLORD_LIBS) \
$(GLIB_LIBS)
cd_find_broken_LDFLAGS = \
$(PIE_LDFLAGS)
cd_find_broken_CFLAGS = \
$(WARNINGFLAGS_C)
colormgr_SOURCES = \
cd-util.c
colormgr_LDADD = \
$(COLORD_LIBS) \
$(GLIB_LIBS)
colormgr_LDFLAGS = \
$(PIE_LDFLAGS)
colormgr_CFLAGS = \
$(WARNINGFLAGS_C)
cd_fix_profile_SOURCES = \
cd-fix-profile.c
cd_fix_profile_LDADD = \
$(GLIB_LIBS) \
$(LCMS_LIBS) \
$(COLORD_LIBS) \
-lm
cd_fix_profile_CFLAGS = \
$(WARNINGFLAGS_C)
cd_fix_profile_LDFLAGS = \
$(PIE_LDFLAGS)
cd_iccdump_SOURCES = \
cd-iccdump.c
cd_iccdump_LDADD = \
$(GLIB_LIBS) \
$(LCMS_LIBS) \
$(COLORD_LIBS) \
-lm
cd_iccdump_LDFLAGS = \
$(PIE_LDFLAGS)
cd_iccdump_CFLAGS = \
$(WARNINGFLAGS_C)
cd_it8_SOURCES = \
cd-it8.c
cd_it8_LDADD = \
$(GLIB_LIBS) \
$(LCMS_LIBS) \
$(COLORD_LIBS) \
-lm
cd_it8_LDFLAGS = \
$(PIE_LDFLAGS)
cd_it8_CFLAGS = \
$(WARNINGFLAGS_C)
cd_create_profile_SOURCES = \
cd-create-profile.c
cd_create_profile_LDADD = \
$(GLIB_LIBS) \
$(LCMS_LIBS) \
$(COLORD_LIBS) \
-lm
cd_create_profile_LDFLAGS = \
$(PIE_LDFLAGS)
cd_create_profile_CFLAGS = \
$(WARNINGFLAGS_C)
MAINTAINERCLEANFILES = *.a
-include $(top_srcdir)/git.mk
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
*
* Copyright (C) 2013 Richard Hughes <richard@hughsie.com>
*
* Licensed under the GNU General Public License Version 2
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include <glib/gi18n.h>
#include <locale.h>
#include <lcms2.h>
#include <lcms2_plugin.h>
#include <stdlib.h>
#include <math.h>
#include <colord-private.h>
static gint lcms_error_code = 0;
/**
* cd_fix_profile_error_cb:
**/
static void
cd_fix_profile_error_cb (cmsContext ContextID,
cmsUInt32Number errorcode,
const char *text)
{
g_warning ("LCMS error %i: %s", errorcode, text);
/* copy this sytemwide */
lcms_error_code = errorcode;
}
/**
* cd_iccdump_print_file:
**/
static gboolean
cd_iccdump_print_file (const gchar *filename, GError **error)
{
CdIcc *icc;
gboolean ret;
gchar *str = NULL;
GFile *file;
/* load the profile */
icc = cd_icc_new ();
file = g_file_new_for_path (filename);
ret = cd_icc_load_file (icc,
file,
CD_ICC_LOAD_FLAGS_NONE,
NULL,
error);
if (!ret)
goto out;
/* dump it to text on the console */
str = cd_icc_to_string (icc);
g_print ("%s\n", str);
out:
g_free (str);
g_object_unref (file);
g_object_unref (icc);
return ret;
}
/**
* main:
**/
int
main (int argc, char **argv)
{
gboolean ret;
GError *error = NULL;
GOptionContext *context;
gint i;
guint retval = EXIT_FAILURE;
setlocale (LC_ALL, "");
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
/* setup LCMS */
cmsSetLogErrorHandler (cd_fix_profile_error_cb);
context = g_option_context_new (NULL);
/* TRANSLATORS: program name */
g_set_application_name (_("ICC profile dump program"));
ret = g_option_context_parse (context, &argc, &argv, &error);
if (!ret) {
/* TRANSLATORS: the user didn't read the man page */
g_print ("%s: %s\n",
_("Failed to parse arguments"),
error->message);
g_error_free (error);
goto out;
}
/* dump each option */
for (i = 1; i < argc; i++) {
ret = cd_iccdump_print_file (argv[i], &error);
if (!ret) {
g_warning ("Failed to dump %s: %s",
argv[i], error->message);
g_error_free (error);
goto out;
}
}
/* success */
retval = EXIT_SUCCESS;
out:
g_option_context_free (context);
return retval;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
SUBDIRS = \
session-helper
if HAVE_SANE
SUBDIRS += \
colord-sane
endif
-include $(top_srcdir)/git.mk
This diff is collapsed.
if HAVE_SANE
AM_CPPFLAGS = \
$(PIE_CFLAGS) \
$(GLIB_CFLAGS) \
$(GUDEV_CFLAGS) \
$(SANE_CFLAGS) \
$(DBUS_CFLAGS) \