forked from pool/argyllcms
Accepting request 125962 from home:fcrozat:branches:multimedia:color_management
- Release 1.4.0: + various bug fixes + add support for ICC profiles in embedded JPEG + fix CVE-2012-1616 (bnc#768322) - drop autotools patches, switch back to original Jam based build - add ajam (argyll patched version of Jam, BSD-license) to source package (needed only for build) - drop shared libraries and corresponding subpackages, not used by anything. - drop cologhug patch, merged upstream. - Add argyllcms-fixbuild.patch: fix build with system tiff/jpeg libraries - Add ajam-include.patch: add missing headers - Add argyllcms-1.4.0-warnings.patch: fix gcc warnings - Add bison as BuildRequires (needed to build ajam) - Compile with -f-no-strict-aliasing to prevent potential issues with gcc 4.7 OBS-URL: https://build.opensuse.org/request/show/125962 OBS-URL: https://build.opensuse.org/package/show/multimedia:color_management/argyllcms?expand=0&rev=11
This commit is contained in:
parent
d1c6583bdb
commit
72b76c2b56
File diff suppressed because it is too large
Load Diff
@ -1,57 +0,0 @@
|
||||
diff -wruN ../orig-Argyll_V1.3.5/profile/Makefile.am ./profile/Makefile.am
|
||||
--- ../orig-Argyll_V1.3.5/profile/Makefile.am 2012-01-11 20:53:56.448041068 +0100
|
||||
+++ ./profile/Makefile.am 2012-01-11 21:43:19.152803748 +0100
|
||||
@@ -11,8 +11,8 @@
|
||||
../numlib/libargyllnum.la ../spectro/libinsttypes.la \
|
||||
../xicc/libxutils.la ../libargyll.la
|
||||
|
||||
-LDADD = ./libprof.la ../xicc/libxutils.la ../spectro/libinst.la \
|
||||
- ../xicc/libxicc.la ../spectro/libinsttypes.la \
|
||||
+LDADD = ./libprof.la ../xicc/libxutils.la ../xicc/libxicc.la \
|
||||
+ ../spectro/libinst.la ../spectro/libinsttypes.la \
|
||||
../gamut/libgamut.la ../gamut/libgammap.la ../plot/libvrml.la \
|
||||
../plot/libplot.la ../rspl/librspl.la \
|
||||
../numlib/libargyllnum.la $(ICC_LIBS) ../cgats/libcgats.la \
|
||||
diff -wruN ../orig-Argyll_V1.3.5/spectro/Makefile.am ./spectro/Makefile.am
|
||||
--- ../orig-Argyll_V1.3.5/spectro/Makefile.am 2012-01-11 20:53:56.448041068 +0100
|
||||
+++ ./spectro/Makefile.am 2012-01-11 21:51:16.265039580 +0100
|
||||
@@ -10,6 +10,8 @@
|
||||
|
||||
libinst_la_SOURCES = inst.h inst.c insttypes.c dtp20.c dtp20.h dtp22.c \
|
||||
dtp22.h dtp41.c dtp41.h dtp51.c dtp51.h dtp92.c dtp92.h \
|
||||
+ i1d3.c i1d3.h \
|
||||
+ colorhug.c colorhug.h \
|
||||
i1disp.c i1disp.h i1pro.c i1pro.h i1pro_imp.c i1pro_imp.h \
|
||||
munki.c munki_imp.c ss.c ss.h ss_imp.c ss_imp.h hcfr.c hcfr.h \
|
||||
spyd2.c spyd2.h spyd2setup.h spyd2PLD.h huey.c huey.h unixio.c \
|
||||
@@ -33,7 +35,7 @@
|
||||
../libargyllusb.la ../libargyll.la
|
||||
|
||||
bin_PROGRAMS = synthcal dispwin dispread dispcal fakeread synthread \
|
||||
- chartread spotread illumread ccmxmake spec2cie average spyd2en
|
||||
+ chartread spotread illumread ccxxmake spec2cie average spyd2en
|
||||
|
||||
dispwin_CFLAGS = $(AM_CFLAGS) -DSTANDALONE_TEST
|
||||
|
||||
diff -wruN ../orig-Argyll_V1.3.5/target/Makefile.am ./target/Makefile.am
|
||||
--- ../orig-Argyll_V1.3.5/target/Makefile.am 2012-01-11 20:53:56.448041068 +0100
|
||||
+++ ./target/Makefile.am 2012-01-11 21:19:48.114575843 +0100
|
||||
@@ -11,6 +11,7 @@
|
||||
$(ICC_LIBS) ../render/librender.la ../cgats/libcgats.la \
|
||||
../xicc/libxicc.la ../gamut/libgamut.la \
|
||||
../spectro/libinsttypes.la ../spectro/libconv.la \
|
||||
+ ../spectro/libinst.la \
|
||||
../numlib/libargyllnum.la $(TIFF_LIBS)
|
||||
|
||||
bin_PROGRAMS = targen printtarg
|
||||
diff -wruN ../orig-Argyll_V1.3.5/xicc/Makefile.am ./xicc/Makefile.am
|
||||
--- ../orig-Argyll_V1.3.5/xicc/Makefile.am 2012-01-11 20:53:56.448041068 +0100
|
||||
+++ ./xicc/Makefile.am 2012-01-11 20:53:22.997984221 +0100
|
||||
@@ -8,6 +8,7 @@
|
||||
libxicc_la_SOURCES = xicc.h xicc.c xlutfix.c xspect.c xspect.h xsep.c \
|
||||
xsep.h xdevlin.c xdevlin.h xcam.c xcam.h cam97s3.c cam97s3.h \
|
||||
cam02.c cam02.h mpp.c ccmx.c xfit.c xfit.h moncurve.c \
|
||||
+ ccss.h ccss.c \
|
||||
moncurve.h mpp.h xdgb.c
|
||||
libxicc_la_LIBADD = $(ICC_LIBS) ../gamut/libgamut.la \
|
||||
../numlib/libargyllnum.la ../spectro/libinsttypes.la \
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:905dc6b5493e02eee76ef7384d619d1135704650a14d27b13c549002a1d9908c
|
||||
size 12892085
|
3
Argyll_V1.4.0_src.zip
Normal file
3
Argyll_V1.4.0_src.zip
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d33134704d2964db69f9e61eb73188632fe2058cdf57aeaa56e64a264e02b1a8
|
||||
size 15242860
|
@ -1,959 +0,0 @@
|
||||
diff -wruN ../orig-Argyll_V1.3.5/libusb1/55-Argyll.rules ./libusb1/55-Argyll.rules
|
||||
--- ../orig-Argyll_V1.3.5/libusb1/55-Argyll.rules 2012-01-11 21:54:38.365302389 +0100
|
||||
+++ ./libusb1/55-Argyll.rules 2012-01-11 21:56:39.478274483 +0100
|
||||
@@ -46,6 +46,9 @@
|
||||
# Huey
|
||||
ATTRS{idVendor}=="0971", ATTRS{idProduct}=="2005", ENV{COLOR_MEASUREMENT_DEVICE}="1"
|
||||
|
||||
+# ColorHug
|
||||
+ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="f8dA", ENV{COLOR_MEASUREMENT_DEVICE}="1"
|
||||
+
|
||||
# Set ID_VENDOR and ID_MODEL acording to VID and PID
|
||||
IMPORT{program}="usb-db %p"
|
||||
|
||||
diff -wruN ../orig-Argyll_V1.3.5/spectro/afiles ./spectro/afiles
|
||||
--- ../orig-Argyll_V1.3.5/spectro/afiles 2011-10-24 14:10:26.000000000 +0200
|
||||
+++ ./spectro/afiles 2012-01-11 21:56:05.116268005 +0100
|
||||
@@ -60,6 +60,8 @@
|
||||
LzmaDec.c
|
||||
huey.c
|
||||
huey.h
|
||||
+colorhug.c
|
||||
+colorhug.h
|
||||
spec2cie.c
|
||||
average.c
|
||||
conv.h
|
||||
diff -wruN ../orig-Argyll_V1.3.5/spectro/colorhug.c ./spectro/colorhug.c
|
||||
--- ../orig-Argyll_V1.3.5/spectro/colorhug.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ ./spectro/colorhug.c 2012-01-11 21:56:05.116268005 +0100
|
||||
@@ -0,0 +1,752 @@
|
||||
+/*
|
||||
+ * Argyll Color Correction System
|
||||
+ *
|
||||
+ * Hughski ColorHug related functions
|
||||
+ *
|
||||
+ * Author: Richard Hughes
|
||||
+ * Date: 30/11/2011
|
||||
+ *
|
||||
+ * Copyright 2006 - 2007, Graeme W. Gill
|
||||
+ * Copyright 2011, Richard Hughes
|
||||
+ * All rights reserved.
|
||||
+ *
|
||||
+ * (Based on huey.c)
|
||||
+ *
|
||||
+ * This material is licenced under the GNU GENERAL PUBLIC LICENSE Version 2 or later :-
|
||||
+ * see the License2.txt file for licencing details.
|
||||
+ */
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <ctype.h>
|
||||
+#include <string.h>
|
||||
+#include <time.h>
|
||||
+#include <stdarg.h>
|
||||
+#include <math.h>
|
||||
+#ifndef SALONEINSTLIB
|
||||
+#include "copyright.h"
|
||||
+#include "aconfig.h"
|
||||
+#include "numlib.h"
|
||||
+#else /* SALONEINSTLIB */
|
||||
+#include "sa_config.h"
|
||||
+#include "numsup.h"
|
||||
+#endif /* SALONEINSTLIB */
|
||||
+#include "xspect.h"
|
||||
+#include "insttypes.h"
|
||||
+#include "icoms.h"
|
||||
+#include "conv.h"
|
||||
+#include "colorhug.h"
|
||||
+
|
||||
+static inst_code colorhug_interp_code(inst *pp, int ec);
|
||||
+
|
||||
+/* Interpret an icoms error into a ColorHug error */
|
||||
+static int icoms2colorhug_err(int se) {
|
||||
+ if (se & ICOM_USERM) {
|
||||
+ se &= ICOM_USERM;
|
||||
+ if (se == ICOM_USER)
|
||||
+ return COLORHUG_USER_ABORT;
|
||||
+ if (se == ICOM_TERM)
|
||||
+ return COLORHUG_USER_TERM;
|
||||
+ if (se == ICOM_TRIG)
|
||||
+ return COLORHUG_USER_TRIG;
|
||||
+ if (se == ICOM_CMND)
|
||||
+ return COLORHUG_USER_CMND;
|
||||
+ }
|
||||
+ if (se != ICOM_OK)
|
||||
+ return COLORHUG_COMS_FAIL;
|
||||
+ return COLORHUG_OK;
|
||||
+}
|
||||
+
|
||||
+/* ColorHug commands that we care about */
|
||||
+typedef enum {
|
||||
+ ch_set_mult = 0x04, /* Set multiplier value */
|
||||
+ ch_set_integral = 0x06, /* Set integral time */
|
||||
+ ch_get_serial = 0x0b, /* Gets the serial number */
|
||||
+ ch_set_leds = 0x0e, /* Sets the LEDs */
|
||||
+ ch_take_reading = 0x23 /* Takes an XYZ reading */
|
||||
+} ColorHugCmd;
|
||||
+
|
||||
+/* Diagnostic - return a description given the instruction code */
|
||||
+static char *inst_desc(int cc) {
|
||||
+ static char buf[40];
|
||||
+ switch(cc) {
|
||||
+ case 0x04:
|
||||
+ return "SetMultiplier";
|
||||
+ case 0x06:
|
||||
+ return "SetIntegral";
|
||||
+ case 0x0b:
|
||||
+ return "GetSerial";
|
||||
+ case 0x0e:
|
||||
+ return "SetLeds";
|
||||
+ case 0x23:
|
||||
+ return "TakeReadingXYZ";
|
||||
+ }
|
||||
+ sprintf(buf,"Unknown %02x",cc);
|
||||
+ return buf;
|
||||
+}
|
||||
+
|
||||
+/* Error codes interpretation */
|
||||
+static char *
|
||||
+colorhug_interp_error(inst *pp, int ec) {
|
||||
+ ec &= inst_imask;
|
||||
+ switch (ec) {
|
||||
+ case COLORHUG_INTERNAL_ERROR:
|
||||
+ return "Internal software error";
|
||||
+ case COLORHUG_COMS_FAIL:
|
||||
+ return "Communications failure";
|
||||
+ case COLORHUG_UNKNOWN_MODEL:
|
||||
+ return "Not a known ColorHug Model";
|
||||
+ case COLORHUG_USER_ABORT:
|
||||
+ return "User hit Abort key";
|
||||
+ case COLORHUG_USER_TERM:
|
||||
+ return "User hit Terminate key";
|
||||
+ case COLORHUG_USER_TRIG:
|
||||
+ return "User hit Trigger key";
|
||||
+ case COLORHUG_USER_CMND:
|
||||
+ return "User hit a Command key";
|
||||
+
|
||||
+ case COLORHUG_OK:
|
||||
+ return "OK";
|
||||
+ case COLORHUG_UNKNOWN_CMD:
|
||||
+ return "Unknown connamd";
|
||||
+ case COLORHUG_WRONG_UNLOCK_CODE:
|
||||
+ return "Wrong unlock code";
|
||||
+ case COLORHUG_NOT_IMPLEMENTED:
|
||||
+ return "Not implemented";
|
||||
+ case COLORHUG_UNDERFLOW_SENSOR:
|
||||
+ return "Sensor underflow";
|
||||
+ case COLORHUG_NO_SERIAL:
|
||||
+ return "No serial";
|
||||
+ case COLORHUG_WATCHDOG:
|
||||
+ return "Watchdog";
|
||||
+ case COLORHUG_INVALID_ADDRESS:
|
||||
+ return "Invalid address";
|
||||
+ case COLORHUG_INVALID_LENGTH:
|
||||
+ return "Invalid length";
|
||||
+ case COLORHUG_INVALID_CHECKSUM:
|
||||
+ return "Invlid checksum";
|
||||
+ case COLORHUG_INVALID_VALUE:
|
||||
+ return "Invalid value";
|
||||
+ case COLORHUG_UNKNOWN_CMD_FOR_BOOTLOADER:
|
||||
+ return "Unknown command for bootloader";
|
||||
+ case COLORHUG_NO_CALIBRATION:
|
||||
+ return "No calibration";
|
||||
+ case COLORHUG_OVERFLOW_MULTIPLY:
|
||||
+ return "Multiply overflow";
|
||||
+ case COLORHUG_OVERFLOW_ADDITION:
|
||||
+ return "Addition overflow";
|
||||
+ case COLORHUG_OVERFLOW_SENSOR:
|
||||
+ return "Sensor overflow";
|
||||
+ case COLORHUG_OVERFLOW_STACK:
|
||||
+ return "Stack overflow";
|
||||
+
|
||||
+ /* Internal errors */
|
||||
+ case COLORHUG_NO_COMS:
|
||||
+ return "Communications hasn't been established";
|
||||
+ case COLORHUG_NOT_INITED:
|
||||
+ return "Insrument hasn't been initialised";
|
||||
+ default:
|
||||
+ return "Unknown error code";
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/* Do a command/response exchange with the colorhug */
|
||||
+static inst_code
|
||||
+colorhug_command(colorhug *p,
|
||||
+ ColorHugCmd cmd,
|
||||
+ unsigned char *in, uint in_size,
|
||||
+ unsigned char *out, uint out_size,
|
||||
+ double timeout)
|
||||
+{
|
||||
+ int i;
|
||||
+ unsigned char buf[64];
|
||||
+ int wbytes;
|
||||
+ int rbytes;
|
||||
+ int se, ua = 0, rv = inst_ok;
|
||||
+ int isdeb = 0;
|
||||
+
|
||||
+ /* Turn off low level debug messages, and sumarise them here */
|
||||
+ isdeb = p->icom->debug;
|
||||
+ if (isdeb <= 2)
|
||||
+ p->icom->debug = 0;
|
||||
+
|
||||
+ if (isdeb) {
|
||||
+ fprintf(stderr,"colorhug: Sending cmd '%s' args '%s'\n",
|
||||
+ inst_desc(cmd), icoms_tohex(in, in_size));
|
||||
+ }
|
||||
+
|
||||
+ /* Send the command with any specified data */
|
||||
+ buf[0] = cmd;
|
||||
+ if (in != NULL)
|
||||
+ memcpy(buf + 1, in, in_size);
|
||||
+ if (p->icom->is_hid) {
|
||||
+ se = p->icom->hid_write(p->icom, buf, in_size + 1, &wbytes, timeout);
|
||||
+ } else {
|
||||
+ se = p->icom->usb_write(p->icom, 0x01, buf, in_size + 1, &wbytes, timeout);
|
||||
+ }
|
||||
+ if (se != 0) {
|
||||
+ if (se & ICOM_USERM) {
|
||||
+ ua = (se & ICOM_USERM);
|
||||
+ }
|
||||
+ if (se & ~ICOM_USERM) {
|
||||
+ if (isdeb)
|
||||
+ fprintf(stderr,"colorhug: Command send failed with ICOM err 0x%x\n", se);
|
||||
+ p->icom->debug = isdeb;
|
||||
+ return colorhug_interp_code((inst *)p, COLORHUG_COMS_FAIL);
|
||||
+ }
|
||||
+ }
|
||||
+ rv = colorhug_interp_code((inst *)p, icoms2colorhug_err(ua));
|
||||
+ if (isdeb)
|
||||
+ fprintf(stderr,"colorhug: ICOM err 0x%x\n",ua);
|
||||
+ if (wbytes != in_size + 1)
|
||||
+ rv = colorhug_interp_code((inst *)p, COLORHUG_BAD_WR_LENGTH);
|
||||
+ if (rv != inst_ok) {
|
||||
+ p->icom->debug = isdeb;
|
||||
+ return rv;
|
||||
+ }
|
||||
+
|
||||
+ /* Now fetch the response */
|
||||
+ if (isdeb)
|
||||
+ fprintf(stderr,"colorhug: Reading response\n");
|
||||
+
|
||||
+ if (p->icom->is_hid) {
|
||||
+ se = p->icom->hid_read(p->icom, buf, out_size + 2, &rbytes, timeout);
|
||||
+ } else {
|
||||
+ se = p->icom->usb_read(p->icom, 0x81, buf, out_size + 2, &rbytes, timeout);
|
||||
+ }
|
||||
+
|
||||
+ if (isdeb && rbytes >= 2) {
|
||||
+ fprintf(stderr,"Recieved cmd '%s' error '%s' args '%s'\n",
|
||||
+ inst_desc(buf[1]),
|
||||
+ colorhug_interp_error((inst *) p, buf[0]),
|
||||
+ icoms_tohex(buf, rbytes - 2));
|
||||
+ }
|
||||
+
|
||||
+ if (se != 0) {
|
||||
+
|
||||
+ /* deal with command error */
|
||||
+ if (rbytes == 2 && buf[0] != COLORHUG_OK) {
|
||||
+ rv = colorhug_interp_code((inst *)p, buf[0]);
|
||||
+ return rv;
|
||||
+ }
|
||||
+
|
||||
+ /* deal with underrun or overrun */
|
||||
+ if (rbytes != out_size + 2) {
|
||||
+ rv = colorhug_interp_code((inst *)p, COLORHUG_BAD_RD_LENGTH);
|
||||
+ return rv;
|
||||
+ }
|
||||
+
|
||||
+ /* there's another reason it failed */
|
||||
+ if (se & ICOM_USERM) {
|
||||
+ ua = (se & ICOM_USERM);
|
||||
+ }
|
||||
+ if (se & ~ICOM_USERM) {
|
||||
+ if (isdeb)
|
||||
+ fprintf(stderr,"colorhug: Response read failed with ICOM err 0x%x\n",se);
|
||||
+ p->icom->debug = isdeb;
|
||||
+ return colorhug_interp_code((inst *)p, COLORHUG_COMS_FAIL);
|
||||
+ }
|
||||
+ }
|
||||
+ rv = colorhug_interp_code((inst *)p, icoms2colorhug_err(ua));
|
||||
+ if (rv != inst_ok)
|
||||
+ return rv;
|
||||
+
|
||||
+ /* check the command was the same */
|
||||
+ if (buf[1] != cmd) {
|
||||
+ rv = colorhug_interp_code((inst *)p, COLORHUG_BAD_RET_CMD);
|
||||
+ return rv;
|
||||
+ }
|
||||
+ if (out != NULL) {
|
||||
+ memcpy(out, buf + 2, out_size);
|
||||
+ }
|
||||
+ if (isdeb) {
|
||||
+ fprintf(stderr,"colorhug: '%s' ICOM err 0x%x\n",
|
||||
+ icoms_tohex(buf + 2, out_size),ua);
|
||||
+ }
|
||||
+ p->icom->debug = isdeb;
|
||||
+ return rv;
|
||||
+}
|
||||
+
|
||||
+/* Take a short, and convert it into a byte buffer */
|
||||
+static void short2buf(unsigned char *buf, int inv)
|
||||
+{
|
||||
+ buf[0] = (inv >> 0) & 0xff;
|
||||
+ buf[1] = (inv >> 8) & 0xff;
|
||||
+}
|
||||
+
|
||||
+/* Converts a packed float to a double */
|
||||
+static double packed_float_to_double (int32_t pf)
|
||||
+{
|
||||
+ return (double) pf / (double) 0x10000;
|
||||
+}
|
||||
+
|
||||
+/* Set the device LED state */
|
||||
+static inst_code
|
||||
+colorhug_set_LEDs(colorhug *p, int mask)
|
||||
+{
|
||||
+ int i;
|
||||
+ unsigned char ibuf[4];
|
||||
+ inst_code ev;
|
||||
+
|
||||
+ mask &= 0x3;
|
||||
+ p->led_state = mask;
|
||||
+
|
||||
+ ibuf[0] = mask;
|
||||
+ ibuf[1] = 0; /* repeat */
|
||||
+ ibuf[2] = 0; /* on */
|
||||
+ ibuf[3] = 0; /* off */
|
||||
+
|
||||
+ /* Do command */
|
||||
+ ev = colorhug_command(p, ch_set_leds,
|
||||
+ ibuf, sizeof (ibuf), /* input */
|
||||
+ NULL, 0, /* output */
|
||||
+ 1.0);
|
||||
+ return ev;
|
||||
+}
|
||||
+
|
||||
+/* Take a XYZ measurement from the device */
|
||||
+static inst_code
|
||||
+colorhug_take_XYZ_measurement(colorhug *p, double XYZ[3])
|
||||
+{
|
||||
+ inst_code ev;
|
||||
+ int i;
|
||||
+ uint8_t ibuf[2];
|
||||
+ uint32_t obuf[3];
|
||||
+
|
||||
+ if (!p->inited)
|
||||
+ return colorhug_interp_code((inst *)p, COLORHUG_NOT_INITED);
|
||||
+
|
||||
+ /* Choose the calibration matrix */
|
||||
+ short2buf(ibuf + 0, p->crt ? 65 : 64);
|
||||
+
|
||||
+ /* Do the measurement, and return the values */
|
||||
+ ev = colorhug_command(p, ch_take_reading,
|
||||
+ ibuf, sizeof (ibuf),
|
||||
+ (unsigned char *) obuf, sizeof (obuf),
|
||||
+ 5.0);
|
||||
+ if (ev != inst_ok)
|
||||
+ return ev;
|
||||
+
|
||||
+ /* Convert to doubles */
|
||||
+ for (i = 0; i < 3; i++)
|
||||
+ XYZ[i] = packed_float_to_double (obuf[i]);
|
||||
+
|
||||
+ /* Apply the colorimeter correction matrix */
|
||||
+ icmMulBy3x3(XYZ, p->ccmat, XYZ);
|
||||
+
|
||||
+ if (p->debug) {
|
||||
+ fprintf(stderr,"colorhug: returning XYZ = %f %f %f\n",
|
||||
+ XYZ[0],XYZ[1],XYZ[2]);
|
||||
+ }
|
||||
+ return inst_ok;
|
||||
+}
|
||||
+
|
||||
+/* Establish communications with a ColorHug */
|
||||
+static inst_code
|
||||
+colorhug_init_coms(inst *pp, int port, baud_rate br, flow_control fc, double tout) {
|
||||
+ colorhug *p = (colorhug *) pp;
|
||||
+
|
||||
+ if (p->debug) {
|
||||
+ p->icom->debug = p->debug; /* Turn on debugging */
|
||||
+ fprintf(stderr,"colorhug: About to init coms\n");
|
||||
+ }
|
||||
+
|
||||
+ /* Open as an HID if available */
|
||||
+ if (p->icom->is_hid_portno(p->icom, port) != instUnknown) {
|
||||
+
|
||||
+ if (p->debug)
|
||||
+ fprintf(stderr,"colorhug: About to init HID\n");
|
||||
+
|
||||
+ /* Set config, interface */
|
||||
+ p->icom->set_hid_port(p->icom, port, icomuf_none, 0, NULL);
|
||||
+
|
||||
+ } else if (p->icom->is_usb_portno(p->icom, port) != instUnknown) {
|
||||
+
|
||||
+ if (p->debug)
|
||||
+ fprintf(stderr,"colorhug: About to init USB\n");
|
||||
+
|
||||
+ /* Set config, interface, write end point, read end point */
|
||||
+ p->icom->set_usb_port(p->icom, port, 1, 0x00, 0x00, icomuf_detach, 0, NULL);
|
||||
+
|
||||
+ } else {
|
||||
+ if (p->debug)
|
||||
+ fprintf(stderr,"colorhug: init_coms called to wrong device!\n");
|
||||
+ return colorhug_interp_code((inst *)p, COLORHUG_UNKNOWN_MODEL);
|
||||
+ }
|
||||
+
|
||||
+ if (p->debug)
|
||||
+ fprintf(stderr,"colorhug: init coms has suceeded\n");
|
||||
+
|
||||
+ p->gotcoms = 1;
|
||||
+ return inst_ok;
|
||||
+}
|
||||
+
|
||||
+/* Set the device multiplier */
|
||||
+static inst_code
|
||||
+colorhug_set_multiplier (colorhug *p, int multiplier)
|
||||
+{
|
||||
+ inst_code ev;
|
||||
+ unsigned char ibuf[1];
|
||||
+
|
||||
+ /* Set the desired multiplier */
|
||||
+ ibuf[0] = multiplier;
|
||||
+ ev = colorhug_command(p, ch_set_mult,
|
||||
+ ibuf, sizeof (ibuf),
|
||||
+ NULL, 0,
|
||||
+ 1.0);
|
||||
+ return ev;
|
||||
+}
|
||||
+
|
||||
+/* Set the device integral time */
|
||||
+static inst_code
|
||||
+colorhug_set_integral (colorhug *p, int integral)
|
||||
+{
|
||||
+ inst_code ev;
|
||||
+ unsigned char ibuf[2];
|
||||
+
|
||||
+ /* Set the desired integral time */
|
||||
+ short2buf(ibuf + 0, integral);
|
||||
+ ev = colorhug_command(p, ch_set_integral,
|
||||
+ ibuf, sizeof (ibuf),
|
||||
+ NULL, 0,
|
||||
+ 1.0);
|
||||
+ return ev;
|
||||
+}
|
||||
+
|
||||
+/* Initialise the ColorHug */
|
||||
+static inst_code
|
||||
+colorhug_init_inst(inst *pp)
|
||||
+{
|
||||
+ colorhug *p = (colorhug *)pp;
|
||||
+ inst_code ev;
|
||||
+
|
||||
+ if (p->debug)
|
||||
+ fprintf(stderr,"colorhug: About to init instrument\n");
|
||||
+
|
||||
+ /* Must establish coms first */
|
||||
+ if (p->gotcoms == 0)
|
||||
+ return colorhug_interp_code((inst *)p, COLORHUG_NO_COMS);
|
||||
+
|
||||
+ /* Turn the LEDs off */
|
||||
+ ev = colorhug_set_LEDs(p, 0x0);
|
||||
+ if (ev != inst_ok)
|
||||
+ return ev;
|
||||
+
|
||||
+ /* Turn the sensor on */
|
||||
+ ev = colorhug_set_multiplier(p, 0x03);
|
||||
+ if (ev != inst_ok)
|
||||
+ return ev;
|
||||
+
|
||||
+ /* Set the integral time to maximum precision */
|
||||
+ ev = colorhug_set_integral(p, 0xffff);
|
||||
+ if (ev != inst_ok)
|
||||
+ return ev;
|
||||
+
|
||||
+ p->itype = instColorHug;
|
||||
+ p->trig = inst_opt_trig_keyb;
|
||||
+ p->inited = 1;
|
||||
+ if (p->debug)
|
||||
+ fprintf(stderr,"colorhug: instrument inited OK\n");
|
||||
+
|
||||
+ /* Flash the LEDs */
|
||||
+ ev = colorhug_set_LEDs(p, 0x1);
|
||||
+ if (ev != inst_ok)
|
||||
+ return ev;
|
||||
+ msec_sleep(50);
|
||||
+ ev = colorhug_set_LEDs(p, 0x2);
|
||||
+ if (ev != inst_ok)
|
||||
+ return ev;
|
||||
+ msec_sleep(50);
|
||||
+ ev = colorhug_set_LEDs(p, 0x1);
|
||||
+ if (ev != inst_ok)
|
||||
+ return ev;
|
||||
+ msec_sleep(50);
|
||||
+ ev = colorhug_set_LEDs(p, 0x0);
|
||||
+ if (ev != inst_ok)
|
||||
+ return ev;
|
||||
+
|
||||
+ return ev;
|
||||
+}
|
||||
+
|
||||
+/* Read a single sample */
|
||||
+static inst_code
|
||||
+colorhug_read_sample(
|
||||
+inst *pp,
|
||||
+char *name, /* Strip name (7 chars) */
|
||||
+ipatch *val) { /* Pointer to instrument patch value */
|
||||
+ colorhug *p = (colorhug *)pp;
|
||||
+ int user_trig = 0;
|
||||
+ int rv = inst_protocol_error;
|
||||
+
|
||||
+ if (p->trig == inst_opt_trig_keyb) {
|
||||
+ int se;
|
||||
+ if ((se = icoms_poll_user(p->icom, 1)) != ICOM_TRIG) {
|
||||
+ /* Abort, term or command */
|
||||
+ return colorhug_interp_code((inst *)p, icoms2colorhug_err(se));
|
||||
+ }
|
||||
+ user_trig = 1;
|
||||
+ if (p->trig_return)
|
||||
+ printf("\n");
|
||||
+ }
|
||||
+
|
||||
+ /* Read the XYZ value */
|
||||
+ if ((rv = colorhug_take_XYZ_measurement(p, val->aXYZ)) != inst_ok) {
|
||||
+ return rv;
|
||||
+ }
|
||||
+
|
||||
+ val->XYZ_v = 0;
|
||||
+ val->aXYZ_v = 1; /* These are absolute XYZ readings ? */
|
||||
+ val->Lab_v = 0;
|
||||
+ val->sp.spec_n = 0;
|
||||
+ val->duration = 0.0;
|
||||
+
|
||||
+ if (user_trig)
|
||||
+ return inst_user_trig;
|
||||
+ return rv;
|
||||
+}
|
||||
+
|
||||
+/* Insert a colorimetric correction matrix */
|
||||
+inst_code colorhug_col_cor_mat(
|
||||
+inst *pp,
|
||||
+double mtx[3][3]
|
||||
+) {
|
||||
+ colorhug *p = (colorhug *)pp;
|
||||
+
|
||||
+ if (mtx == NULL)
|
||||
+ icmSetUnity3x3(p->ccmat);
|
||||
+ else
|
||||
+ icmCpy3x3(p->ccmat, mtx);
|
||||
+
|
||||
+ return inst_ok;
|
||||
+}
|
||||
+
|
||||
+/* Determine if a calibration is needed */
|
||||
+inst_cal_type colorhug_needs_calibration(inst *pp) {
|
||||
+ return inst_ok;
|
||||
+}
|
||||
+
|
||||
+/* Request an instrument calibration */
|
||||
+inst_code colorhug_calibrate(
|
||||
+inst *pp,
|
||||
+inst_cal_type calt, /* Calibration type. inst_calt_all for all neeeded */
|
||||
+inst_cal_cond *calc, /* Current condition/desired condition */
|
||||
+char id[CALIDLEN] /* Condition identifier (ie. white reference ID) */
|
||||
+) {
|
||||
+ id[0] = '\000';
|
||||
+ return inst_unsupported;
|
||||
+}
|
||||
+
|
||||
+/* Convert a machine specific error code into an abstract dtp code */
|
||||
+static inst_code
|
||||
+colorhug_interp_code(inst *pp, int ec) {
|
||||
+ ec &= inst_imask;
|
||||
+ switch (ec) {
|
||||
+
|
||||
+ case COLORHUG_OK:
|
||||
+ return inst_ok;
|
||||
+
|
||||
+ case COLORHUG_INTERNAL_ERROR:
|
||||
+ case COLORHUG_NO_COMS:
|
||||
+ case COLORHUG_NOT_INITED:
|
||||
+ return inst_internal_error | ec;
|
||||
+
|
||||
+ case COLORHUG_COMS_FAIL:
|
||||
+ return inst_coms_fail | ec;
|
||||
+
|
||||
+ case COLORHUG_UNKNOWN_MODEL:
|
||||
+ return inst_unknown_model | ec;
|
||||
+
|
||||
+ case COLORHUG_UNKNOWN_CMD:
|
||||
+ case COLORHUG_WRONG_UNLOCK_CODE:
|
||||
+ case COLORHUG_NOT_IMPLEMENTED:
|
||||
+ case COLORHUG_UNDERFLOW_SENSOR:
|
||||
+ case COLORHUG_NO_SERIAL:
|
||||
+ case COLORHUG_WATCHDOG:
|
||||
+ case COLORHUG_INVALID_ADDRESS:
|
||||
+ case COLORHUG_INVALID_LENGTH:
|
||||
+ case COLORHUG_INVALID_CHECKSUM:
|
||||
+ case COLORHUG_INVALID_VALUE:
|
||||
+ case COLORHUG_UNKNOWN_CMD_FOR_BOOTLOADER:
|
||||
+ case COLORHUG_NO_CALIBRATION:
|
||||
+ case COLORHUG_OVERFLOW_MULTIPLY:
|
||||
+ case COLORHUG_OVERFLOW_ADDITION:
|
||||
+ case COLORHUG_OVERFLOW_SENSOR:
|
||||
+ case COLORHUG_OVERFLOW_STACK:
|
||||
+ case COLORHUG_BAD_WR_LENGTH:
|
||||
+ case COLORHUG_BAD_RD_LENGTH:
|
||||
+ case COLORHUG_BAD_RET_CMD:
|
||||
+ case COLORHUG_BAD_RET_STAT:
|
||||
+ return inst_protocol_error | ec;
|
||||
+
|
||||
+ case COLORHUG_USER_ABORT:
|
||||
+ return inst_user_abort | ec;
|
||||
+ case COLORHUG_USER_TERM:
|
||||
+ return inst_user_term | ec;
|
||||
+ case COLORHUG_USER_TRIG:
|
||||
+ return inst_user_trig | ec;
|
||||
+ case COLORHUG_USER_CMND:
|
||||
+ return inst_user_cmnd | ec;
|
||||
+ }
|
||||
+ return inst_other_error | ec;
|
||||
+}
|
||||
+
|
||||
+/* Destroy ourselves */
|
||||
+static void
|
||||
+colorhug_del(inst *pp) {
|
||||
+ colorhug *p = (colorhug *)pp;
|
||||
+ if (p->icom != NULL)
|
||||
+ p->icom->del(p->icom);
|
||||
+ free(p);
|
||||
+}
|
||||
+
|
||||
+/* Return the instrument capabilities */
|
||||
+inst_capability colorhug_capabilities(inst *pp) {
|
||||
+ colorhug *p = (colorhug *)pp;
|
||||
+ inst_capability rv;
|
||||
+
|
||||
+ rv = inst_emis_spot
|
||||
+ | inst_emis_disp
|
||||
+ | inst_emis_disp_lcd
|
||||
+ | inst_colorimeter
|
||||
+ | inst_ccmx
|
||||
+ ;
|
||||
+
|
||||
+ return rv;
|
||||
+}
|
||||
+
|
||||
+/* Return the instrument capabilities 2 */
|
||||
+inst2_capability colorhug_capabilities2(inst *pp) {
|
||||
+ colorhug *p = (colorhug *)pp;
|
||||
+ inst2_capability rv = 0;
|
||||
+
|
||||
+ rv |= inst2_prog_trig;
|
||||
+ rv |= inst2_keyb_trig;
|
||||
+ rv |= inst2_has_leds;
|
||||
+
|
||||
+ return rv;
|
||||
+}
|
||||
+
|
||||
+/* Set device measurement mode */
|
||||
+inst_code colorhug_set_mode(inst *pp, inst_mode m)
|
||||
+{
|
||||
+ colorhug *p = (colorhug *)pp;
|
||||
+ inst_mode mm; /* Measurement mode */
|
||||
+
|
||||
+ /* The measurement mode portion of the mode */
|
||||
+ mm = m & inst_mode_measurement_mask;
|
||||
+
|
||||
+ /* only display emission mode and ambient supported */
|
||||
+ if (mm != inst_mode_emis_spot
|
||||
+ && mm != inst_mode_emis_disp
|
||||
+ && mm != inst_mode_emis_ambient) {
|
||||
+ return inst_unsupported;
|
||||
+ }
|
||||
+
|
||||
+ /* Spectral mode is not supported */
|
||||
+ if (m & inst_mode_spectral)
|
||||
+ return inst_unsupported;
|
||||
+
|
||||
+ p->mode = m;
|
||||
+ return inst_ok;
|
||||
+}
|
||||
+
|
||||
+/* Set or reset an optional mode */
|
||||
+static inst_code
|
||||
+colorhug_set_opt_mode(inst *pp, inst_opt_mode m, ...)
|
||||
+{
|
||||
+ colorhug *p = (colorhug *)pp;
|
||||
+ inst_code ev = inst_ok;
|
||||
+
|
||||
+ /* Select CRT/LCD */
|
||||
+ if (m == inst_opt_disp_crt) {
|
||||
+ if (p->crt == 0)
|
||||
+ p->crt = 1;
|
||||
+ return inst_ok;
|
||||
+ } else if (m == inst_opt_disp_lcd) {
|
||||
+ if (p->crt != 0)
|
||||
+ p->crt = 0;
|
||||
+ return inst_ok;
|
||||
+
|
||||
+ }
|
||||
+ /* Record the trigger mode */
|
||||
+ if (m == inst_opt_trig_prog
|
||||
+ || m == inst_opt_trig_keyb) {
|
||||
+ p->trig = m;
|
||||
+ return inst_ok;
|
||||
+ }
|
||||
+ if (m == inst_opt_trig_return) {
|
||||
+ p->trig_return = 1;
|
||||
+ return inst_ok;
|
||||
+ } else if (m == inst_opt_trig_no_return) {
|
||||
+ p->trig_return = 0;
|
||||
+ return inst_ok;
|
||||
+ }
|
||||
+
|
||||
+ /* Operate the LEDs */
|
||||
+ if (m == inst_opt_get_gen_ledmask) {
|
||||
+ va_list args;
|
||||
+ int *mask = NULL;
|
||||
+
|
||||
+ va_start(args, m);
|
||||
+ mask = va_arg(args, int *);
|
||||
+ va_end(args);
|
||||
+ *mask = 0x3; /* Two general LEDs */
|
||||
+ return inst_ok;
|
||||
+ } else if (m == inst_opt_get_led_state) {
|
||||
+ va_list args;
|
||||
+ int *mask = NULL;
|
||||
+
|
||||
+ va_start(args, m);
|
||||
+ mask = va_arg(args, int *);
|
||||
+ va_end(args);
|
||||
+ *mask = p->led_state;
|
||||
+ return inst_ok;
|
||||
+ } else if (m == inst_opt_set_led_state) {
|
||||
+ va_list args;
|
||||
+ int mask = 0;
|
||||
+
|
||||
+ va_start(args, m);
|
||||
+ mask = va_arg(args, int);
|
||||
+ va_end(args);
|
||||
+ return colorhug_set_LEDs(p, mask);
|
||||
+ }
|
||||
+
|
||||
+ return inst_unsupported;
|
||||
+}
|
||||
+
|
||||
+/* Constructor */
|
||||
+extern colorhug *new_colorhug(icoms *icom, int debug, int verb)
|
||||
+{
|
||||
+ colorhug *p;
|
||||
+ if ((p = (colorhug *)calloc(sizeof(colorhug),1)) == NULL)
|
||||
+ error("colorhug: malloc failed!");
|
||||
+
|
||||
+ if (icom == NULL)
|
||||
+ p->icom = new_icoms();
|
||||
+ else
|
||||
+ p->icom = icom;
|
||||
+
|
||||
+ p->debug = debug;
|
||||
+ p->verb = verb;
|
||||
+
|
||||
+ /* Set the colorimeter correction matrix to do nothing */
|
||||
+ icmSetUnity3x3(p->ccmat);
|
||||
+
|
||||
+ p->init_coms = colorhug_init_coms;
|
||||
+ p->init_inst = colorhug_init_inst;
|
||||
+ p->capabilities = colorhug_capabilities;
|
||||
+ p->capabilities2 = colorhug_capabilities2;
|
||||
+ p->set_mode = colorhug_set_mode;
|
||||
+ p->set_opt_mode = colorhug_set_opt_mode;
|
||||
+ p->read_sample = colorhug_read_sample;
|
||||
+ p->needs_calibration = colorhug_needs_calibration;
|
||||
+ p->col_cor_mat = colorhug_col_cor_mat;
|
||||
+ p->calibrate = colorhug_calibrate;
|
||||
+ p->interp_error = colorhug_interp_error;
|
||||
+ p->del = colorhug_del;
|
||||
+
|
||||
+ /* Until initalisation */
|
||||
+ p->itype = instUnknown;
|
||||
+
|
||||
+ return p;
|
||||
+}
|
||||
diff -wruN ../orig-Argyll_V1.3.5/spectro/colorhug.h ./spectro/colorhug.h
|
||||
--- ../orig-Argyll_V1.3.5/spectro/colorhug.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ ./spectro/colorhug.h 2012-01-11 21:56:05.116268005 +0100
|
||||
@@ -0,0 +1,85 @@
|
||||
+/*
|
||||
+ * Argyll Color Correction System
|
||||
+ *
|
||||
+ * Hughski ColorHug related defines
|
||||
+ *
|
||||
+ * Author: Richard Hughes
|
||||
+ * Date: 30/11/2011
|
||||
+ *
|
||||
+ * Copyright 2006 - 2007, Graeme W. Gill
|
||||
+ * Copyright 2011, Richard Hughes
|
||||
+ * All rights reserved.
|
||||
+ *
|
||||
+ * (Based on huey.h)
|
||||
+ *
|
||||
+ * This material is licenced under the GNU GENERAL PUBLIC LICENSE Version 2 or later :-
|
||||
+ * see the License2.txt file for licencing details.
|
||||
+ */
|
||||
+
|
||||
+#ifndef COLORHUG_H
|
||||
+
|
||||
+#include "inst.h"
|
||||
+
|
||||
+/* Note: update colorhug_interp_error() and colorhug_interp_code() in colorhug.c */
|
||||
+/* if anything of these #defines are added or subtracted */
|
||||
+
|
||||
+/* Fake Error codes */
|
||||
+#define COLORHUG_INTERNAL_ERROR 0x61 /* Internal software error */
|
||||
+#define COLORHUG_COMS_FAIL 0x62 /* Communication failure */
|
||||
+#define COLORHUG_UNKNOWN_MODEL 0x63 /* Not an colorhug */
|
||||
+#define COLORHUG_DATA_PARSE_ERROR 0x64 /* Read data parsing error */
|
||||
+#define COLORHUG_USER_ABORT 0x65 /* User hit abort */
|
||||
+#define COLORHUG_USER_TERM 0x66 /* User hit terminate */
|
||||
+#define COLORHUG_USER_TRIG 0x67 /* User hit trigger */
|
||||
+#define COLORHUG_USER_CMND 0x68 /* User hit command */
|
||||
+
|
||||
+/* Real error codes */
|
||||
+#define COLORHUG_OK 0x00
|
||||
+#define COLORHUG_UNKNOWN_CMD 0x01
|
||||
+#define COLORHUG_WRONG_UNLOCK_CODE 0x02
|
||||
+#define COLORHUG_NOT_IMPLEMENTED 0x03
|
||||
+#define COLORHUG_UNDERFLOW_SENSOR 0x04
|
||||
+#define COLORHUG_NO_SERIAL 0x05
|
||||
+#define COLORHUG_WATCHDOG 0x06
|
||||
+#define COLORHUG_INVALID_ADDRESS 0x07
|
||||
+#define COLORHUG_INVALID_LENGTH 0x08
|
||||
+#define COLORHUG_INVALID_CHECKSUM 0x09
|
||||
+#define COLORHUG_INVALID_VALUE 0x0a
|
||||
+#define COLORHUG_UNKNOWN_CMD_FOR_BOOTLOADER 0x0b
|
||||
+#define COLORHUG_NO_CALIBRATION 0x0c
|
||||
+#define COLORHUG_OVERFLOW_MULTIPLY 0x0d
|
||||
+#define COLORHUG_OVERFLOW_ADDITION 0x0e
|
||||
+#define COLORHUG_OVERFLOW_SENSOR 0x0f
|
||||
+#define COLORHUG_OVERFLOW_STACK 0x10
|
||||
+
|
||||
+/* Internal errors */
|
||||
+#define COLORHUG_NO_COMS 0x22
|
||||
+#define COLORHUG_NOT_INITED 0x23
|
||||
+#define COLORHUG_BAD_WR_LENGTH 0x25
|
||||
+#define COLORHUG_BAD_RD_LENGTH 0x26
|
||||
+#define COLORHUG_BAD_RET_CMD 0x27
|
||||
+#define COLORHUG_BAD_RET_STAT 0x28
|
||||
+
|
||||
+
|
||||
+/* COLORHUG communication object */
|
||||
+struct _colorhug {
|
||||
+ INST_OBJ_BASE
|
||||
+
|
||||
+ inst_mode mode; /* Currently selected mode */
|
||||
+
|
||||
+ inst_opt_mode trig; /* Reading trigger mode */
|
||||
+ int trig_return; /* Emit "\n" after trigger */
|
||||
+
|
||||
+ int ser_no; /* Serial number */
|
||||
+ int crt; /* NZ if set to CRT */
|
||||
+ double ccmat[3][3]; /* Colorimeter correction matrix */
|
||||
+ int led_state; /* Current LED state */
|
||||
+
|
||||
+}; typedef struct _colorhug colorhug;
|
||||
+
|
||||
+/* Constructor */
|
||||
+extern colorhug *new_colorhug(icoms *icom, int debug, int verb);
|
||||
+
|
||||
+
|
||||
+#define COLORHUG_H
|
||||
+#endif /* COLORHUG_H */
|
||||
diff -wruN ../orig-Argyll_V1.3.5/spectro/inst.c ./spectro/inst.c
|
||||
--- ../orig-Argyll_V1.3.5/spectro/inst.c 2011-10-24 14:10:27.000000000 +0200
|
||||
+++ ./spectro/inst.c 2012-01-11 21:56:05.116268005 +0100
|
||||
@@ -476,6 +476,8 @@
|
||||
p = (inst *)new_spyd2(icom, debug, verb);
|
||||
else if (itype == instHuey)
|
||||
p = (inst *)new_huey(icom, debug, verb);
|
||||
+ else if (itype == instColorHug)
|
||||
+ p = (inst *)new_colorhug(icom, debug, verb);
|
||||
else {
|
||||
return NULL;
|
||||
}
|
||||
diff -wruN ../orig-Argyll_V1.3.5/spectro/instlib.ksh ./spectro/instlib.ksh
|
||||
--- ../orig-Argyll_V1.3.5/spectro/instlib.ksh 2011-10-24 14:10:26.000000000 +0200
|
||||
+++ ./spectro/instlib.ksh 2012-01-11 21:56:05.116268005 +0100
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
echo "Making standalone GPLv2 instrument archive instlib.zip "
|
||||
|
||||
-FILES="License2.txt Makefile.OSX Makefile.UNIX Makefile.WNT pollem.h pollem.c conv.h conv.c hidio.h hidio.c icoms.h inst.h inst.c insttypes.c insttypes.h insttypeinst.h dtp20.c dtp20.h dtp22.c dtp22.h dtp41.c dtp41.h dtp51.c dtp51.h dtp92.c dtp92.h ss.h ss.c ss_imp.h ss_imp.c i1disp.c i1disp.h i1d3.h i1d3.c i1pro.h i1pro.c i1pro_imp.h i1pro_imp.c munki.h munki.c munki_imp.h munki_imp.c hcfr.c hcfr.h huey.c huey.h spyd2.c spyd2.h spyd2setup.h spyd2PLD.h spyd2en.c i1d3ccss.c vinflate.c inflate.c LzmaDec.c LzmaDec.h LzmaTypes.h ntio.c unixio.c usbio.h usbio.c xdg_bds.c xdg_bds.h ../xicc/xspect.h ../xicc/xspect.c ../xicc/ccss.h ../xicc/ccss.c ../rspl/rspl1.h ../rspl/rspl1.c ../h/sort.h ../numlib/numsup.h ../numlib/numsup.c ../cgats/pars.h ../cgats/pars.c ../cgats/parsstd.c ../cgats/cgats.h ../cgats/cgats.c ../cgats/cgatsstd.c spotread.c"
|
||||
+FILES="License2.txt Makefile.OSX Makefile.UNIX Makefile.WNT pollem.h pollem.c conv.h conv.c hidio.h hidio.c icoms.h inst.h inst.c insttypes.c insttypes.h insttypeinst.h dtp20.c dtp20.h dtp22.c dtp22.h dtp41.c dtp41.h dtp51.c dtp51.h dtp92.c dtp92.h ss.h ss.c ss_imp.h ss_imp.c i1disp.c i1disp.h i1d3.h i1d3.c i1pro.h i1pro.c i1pro_imp.h i1pro_imp.c munki.h munki.c munki_imp.h munki_imp.c hcfr.c hcfr.h huey.c huey.h colorhug.c colorhug.h spyd2.c spyd2.h spyd2setup.h spyd2PLD.h spyd2en.c i1d3ccss.c vinflate.c inflate.c LzmaDec.c LzmaDec.h LzmaTypes.h ntio.c unixio.c usbio.h usbio.c xdg_bds.c xdg_bds.h ../xicc/xspect.h ../xicc/xspect.c ../xicc/ccss.h ../xicc/ccss.c ../rspl/rspl1.h ../rspl/rspl1.c ../h/sort.h ../numlib/numsup.h ../numlib/numsup.c ../cgats/pars.h ../cgats/pars.c ../cgats/parsstd.c ../cgats/cgats.h ../cgats/cgats.c ../cgats/cgatsstd.c spotread.c"
|
||||
|
||||
rm -f instlib.zip
|
||||
rm -rf _zipdir
|
||||
diff -wruN ../orig-Argyll_V1.3.5/spectro/insttypes.c ./spectro/insttypes.c
|
||||
--- ../orig-Argyll_V1.3.5/spectro/insttypes.c 2011-10-24 14:10:27.000000000 +0200
|
||||
+++ ./spectro/insttypes.c 2012-01-11 21:56:05.116268005 +0100
|
||||
@@ -73,6 +73,8 @@
|
||||
return "Datacolor Spyder3";
|
||||
case instHuey:
|
||||
return "GretagMacbeth Huey";
|
||||
+ case instColorHug:
|
||||
+ return "Hughski ColorHug";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -124,6 +126,8 @@
|
||||
return instSpyder3;
|
||||
else if (strcmp(name, "GretagMacbeth Huey") == 0)
|
||||
return instHuey;
|
||||
+ else if (strcmp(name, "Hughski ColorHug") == 0)
|
||||
+ return instColorHug;
|
||||
|
||||
return instUnknown;
|
||||
}
|
||||
@@ -183,6 +187,11 @@
|
||||
return instSpyder3;
|
||||
}
|
||||
|
||||
+ if (idVendor == 0x04d8) { /* Microchip */
|
||||
+ if (idProduct == 0xf8da) /* Hughski ColorHug */
|
||||
+ return instColorHug;
|
||||
+ }
|
||||
+
|
||||
/* Add other instruments here */
|
||||
|
||||
return instUnknown;
|
||||
@@ -260,6 +269,8 @@
|
||||
case instHuey:
|
||||
return 1; /* Not applicable */
|
||||
|
||||
+ case instColorHug:
|
||||
+ return 1; /* Not applicable */
|
||||
|
||||
default:
|
||||
break;
|
||||
diff -wruN ../orig-Argyll_V1.3.5/spectro/insttypes.h ./spectro/insttypes.h
|
||||
--- ../orig-Argyll_V1.3.5/spectro/insttypes.h 2011-10-24 14:10:26.000000000 +0200
|
||||
+++ ./spectro/insttypes.h 2012-01-11 21:56:05.116268005 +0100
|
||||
@@ -44,6 +44,7 @@
|
||||
instSpyder2, /* Datacolor/ColorVision Spyder2 */
|
||||
instSpyder3, /* Datacolor Spyder3 */
|
||||
instHuey, /* GretagMacbeth Huey */
|
||||
+ instColorHug, /* Hughski ColorHug */
|
||||
|
||||
} instType;
|
||||
|
||||
diff -wruN ../orig-Argyll_V1.3.5/spectro/Jamfile ./spectro/Jamfile
|
||||
--- ../orig-Argyll_V1.3.5/spectro/Jamfile 2011-10-24 14:10:26.000000000 +0200
|
||||
+++ ./spectro/Jamfile 2012-01-11 21:56:05.116268005 +0100
|
||||
@@ -69,7 +69,7 @@
|
||||
../plot $(LIBUSBHDRS) $(CMMHDRS) ;
|
||||
|
||||
# Instrument access library library
|
||||
-Library libinst : inst.c insttypes.c dtp20.c dtp22.c dtp41.c dtp51.c dtp92.c i1disp.c i1d3.c i1pro.c i1pro_imp.c munki.c munki_imp.c ss.c ss_imp.c hcfr.c spyd2.c huey.c $(IOFILE) usbio.c hidio.c ;
|
||||
+Library libinst : inst.c insttypes.c dtp20.c dtp22.c dtp41.c dtp51.c dtp92.c i1disp.c i1d3.c i1pro.c i1pro_imp.c munki.c munki_imp.c ss.c ss_imp.c hcfr.c spyd2.c huey.c colorhug.c $(IOFILE) usbio.c hidio.c ;
|
||||
|
||||
# Display access library
|
||||
Library libdisp : dispsup.c dispwin.c : : : $(LibWinH) ;
|
BIN
ajam-2.5.2-1.3.3.tgz
(Stored with Git LFS)
Normal file
BIN
ajam-2.5.2-1.3.3.tgz
(Stored with Git LFS)
Normal file
Binary file not shown.
42
ajam-include.patch
Normal file
42
ajam-include.patch
Normal file
@ -0,0 +1,42 @@
|
||||
diff -up ajam-2.5.2-1.3.3/execunix.c.include ajam-2.5.2-1.3.3/execunix.c
|
||||
--- ajam-2.5.2-1.3.3/execunix.c.include 2012-06-22 17:53:16.769405802 +0200
|
||||
+++ ajam-2.5.2-1.3.3/execunix.c 2012-06-22 17:59:09.697662990 +0200
|
||||
@@ -42,6 +42,10 @@
|
||||
# include "lists.h"
|
||||
# include "execcmd.h"
|
||||
# include <errno.h>
|
||||
+# include <unistd.h>
|
||||
+# include <sys/types.h>
|
||||
+# include <sys/wait.h>
|
||||
+
|
||||
|
||||
# ifdef USE_EXECUNIX
|
||||
|
||||
diff -up ajam-2.5.2-1.3.3/fileunix.c.include ajam-2.5.2-1.3.3/fileunix.c
|
||||
--- ajam-2.5.2-1.3.3/fileunix.c.include 2012-06-22 17:53:56.998694847 +0200
|
||||
+++ ajam-2.5.2-1.3.3/fileunix.c 2012-06-22 17:54:41.828845967 +0200
|
||||
@@ -51,12 +51,12 @@
|
||||
# include <sys/stat.h>
|
||||
# endif
|
||||
|
||||
+# include <unistd.h>
|
||||
# if defined( OS_RHAPSODY ) || \
|
||||
defined( OS_MACOSX ) || \
|
||||
defined( OS_NEXT )
|
||||
/* need unistd for rhapsody's proper lseek */
|
||||
# include <sys/dir.h>
|
||||
-# include <unistd.h>
|
||||
# define STRUCT_DIRENT struct direct
|
||||
# else
|
||||
# include <dirent.h>
|
||||
diff -up ajam-2.5.2-1.3.3/make1.c.include ajam-2.5.2-1.3.3/make1.c
|
||||
--- ajam-2.5.2-1.3.3/make1.c.include 2012-06-22 17:59:36.178959199 +0200
|
||||
+++ ajam-2.5.2-1.3.3/make1.c 2012-06-22 18:00:04.299195472 +0200
|
||||
@@ -50,6 +50,7 @@
|
||||
*/
|
||||
|
||||
# include "jam.h"
|
||||
+# include <unistd.h>
|
||||
|
||||
# include "lists.h"
|
||||
# include "parse.h"
|
@ -1,9 +1,9 @@
|
||||
diff -up Argyll_V1.3.0/libusb1/55-Argyll.rules.udev151 Argyll_V1.3.0/libusb1/55-Argyll.rules
|
||||
--- Argyll_V1.3.0/libusb1/55-Argyll.rules.udev151 2010-09-23 11:42:00.784827088 +0200
|
||||
+++ Argyll_V1.3.0/libusb1/55-Argyll.rules 2010-09-23 11:42:10.586231594 +0200
|
||||
@@ -43,12 +43,6 @@ ATTRS{idVendor}=="085c", ATTRS{idProduct
|
||||
# Huey
|
||||
ATTRS{idVendor}=="0971", ATTRS{idProduct}=="2005", ENV{COLOR_MEASUREMENT_DEVICE}="1"
|
||||
diff -up Argyll_V1.4.0/libusb1/55-Argyll.rules.udev151 Argyll_V1.4.0/libusb1/55-Argyll.rules
|
||||
--- Argyll_V1.4.0/libusb1/55-Argyll.rules.udev151 2012-04-19 09:50:45.000000000 +0200
|
||||
+++ Argyll_V1.4.0/libusb1/55-Argyll.rules 2012-06-22 11:54:55.973016401 +0200
|
||||
@@ -52,12 +52,6 @@ ATTRS{idVendor}=="0971", ATTRS{idProduct
|
||||
# ColorHug
|
||||
ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="f8da", ENV{COLOR_MEASUREMENT_DEVICE}="1"
|
||||
|
||||
-# Let udev-acl and ConsoleKit manage these devices, if applicable
|
||||
-TEST=="/lib/udev/udev-acl", TEST=="/var/run/ConsoleKit/database", ENV{COLOR_MEASUREMENT_DEVICE}=="*?", ENV{ACL_MANAGE}="1"
|
||||
@ -14,4 +14,3 @@ diff -up Argyll_V1.3.0/libusb1/55-Argyll.rules.udev151 Argyll_V1.3.0/libusb1/55-
|
||||
# Set ID_VENDOR and ID_MODEL acording to VID and PID
|
||||
IMPORT{program}="usb-db %p"
|
||||
|
||||
diff -up Argyll_V1.3.0/libusb/55-Argyll.rules.udev151 Argyll_V1.3.0/libusb/55-Argyll.rules
|
||||
|
23
argyllcms-1.4.0-warnings.patch
Normal file
23
argyllcms-1.4.0-warnings.patch
Normal file
@ -0,0 +1,23 @@
|
||||
diff -up Argyll_V1.4.0/gamut/maptest.c.warning Argyll_V1.4.0/gamut/maptest.c
|
||||
--- Argyll_V1.4.0/gamut/maptest.c.warning 2012-06-22 18:03:25.113289700 +0200
|
||||
+++ Argyll_V1.4.0/gamut/maptest.c 2012-06-22 18:10:57.615637380 +0200
|
||||
@@ -99,7 +99,7 @@ main(int argc, char *argv[]) {
|
||||
else if (argv[fa][1] == 'i' || argv[fa][1] == 'I') {
|
||||
if (na == NULL) usage();
|
||||
fa = nfa;
|
||||
- strncpy(img_name,na,MAXNAMEL); img_name[MAXNAMEL] = '\000';
|
||||
+ strncpy(img_name,na,MAXNAMEL); img_name[MAXNAMEL-1] = '\000';
|
||||
}
|
||||
|
||||
else
|
||||
diff -up Argyll_V1.4.0/jcnf/test.c.warning Argyll_V1.4.0/jcnf/test.c
|
||||
--- Argyll_V1.4.0/jcnf/test.c.warning 2012-06-22 18:02:57.401148828 +0200
|
||||
+++ Argyll_V1.4.0/jcnf/test.c 2012-06-22 18:03:11.177723389 +0200
|
||||
@@ -144,6 +144,7 @@ main(int argc, char *argv[]) {
|
||||
jco->del(jco);
|
||||
|
||||
printf("We're done\n");
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
void
|
63
argyllcms-fixbuild.patch
Normal file
63
argyllcms-fixbuild.patch
Normal file
@ -0,0 +1,63 @@
|
||||
diff -up Argyll_V1.4.0/Jamtop.fixbuild Argyll_V1.4.0/Jamtop
|
||||
--- Argyll_V1.4.0/Jamtop.fixbuild 2012-06-22 14:00:29.139451312 +0200
|
||||
+++ Argyll_V1.4.0/Jamtop 2012-05-11 01:57:54.000000000 +0200
|
||||
@@ -67,6 +67,8 @@ if $(UNIX) {
|
||||
LibWinD = /usr/lib/x86_64-linux-gnu ;
|
||||
} else if [ GLOB /usr/lib64 : libX11.so ] {
|
||||
LibWinD = /usr/lib64 ;
|
||||
+ } else if [ GLOB /usr/lib : libX11.so ] {
|
||||
+ LibWinD = /usr/lib ;
|
||||
} else {
|
||||
ECHO Unable to locate the 64 bit X11 library files ;
|
||||
}
|
||||
@@ -91,9 +93,9 @@ if $(UNIX) {
|
||||
# See if we have a system TIFF library.
|
||||
if ! $(BUILTIN_TIFF) && $(UNIX) {
|
||||
if [ GLOB /usr/include : tiffio.h ] {
|
||||
- if ! $(HOST64) && ( [ GLOB /usr/lib : libtiff.so ] || [ GLOB /usr/lib : libtiff.a ] )
|
||||
- || $(HOST64) && ( [ GLOB /usr/lib64 : libtiff.so ] || [ GLOB /usr/lib64 : libtiff.a ] )
|
||||
- || $(HOST64) && ( [ GLOB /usr/lib/x86_64-linux-gnu : libtiff.so ] || [ GLOB /usr/lib/x86_64-linux-gnu : libtiff.a ] ) {
|
||||
+ if [ GLOB /usr/lib : libtiff.so ] || [ GLOB /usr/lib : libtiff.a ]
|
||||
+ || [ GLOB /usr/lib64 : libtiff.so ] || [ GLOB /usr/lib64 : libtiff.a ]
|
||||
+ || [ GLOB /usr/lib/x86_64-linux-gnu : libtiff.so ] || [ GLOB /usr/lib/x86_64-linux-gnu : libtiff.a ] {
|
||||
echo "Using system TIFF library" ;
|
||||
TIFFLIB = ;
|
||||
TIFFINC = ;
|
||||
@@ -105,7 +107,7 @@ if ! $(BUILTIN_TIFF) && $(UNIX) {
|
||||
|
||||
# If nothing else, use Argyll supplied TIFF library
|
||||
if ! $(HAVE_TIFF) || $(BUILTIN_TIFF) {
|
||||
- echo "Using built in TIFF library" ;
|
||||
+ echo "Using Argyll TIFF library" ;
|
||||
TIFFLIB = ../tiff/libtiff.lib ;
|
||||
TIFFINC = ../tiff ;
|
||||
}
|
||||
@@ -113,13 +115,13 @@ if ! $(HAVE_TIFF) || $(BUILTIN_TIFF) {
|
||||
# See if we have a system JPEG library.
|
||||
if ! $(BUILTIN_JPEG) && $(UNIX) {
|
||||
if [ GLOB /usr/include : jpeglib.h ] {
|
||||
- if ! $(HOST64) && ( [ GLOB /usr/lib : libjpg.so ] || [ GLOB /usr/lib : libjpg.a ] )
|
||||
- || $(HOST64) && ( [ GLOB /usr/lib64 : libjpg.so ] || [ GLOB /usr/lib64 : libjpg.a ] )
|
||||
- || $(HOST64) && ( [ GLOB /usr/lib/x86_64-linux-gnu : libjpg.so ] || [ GLOB /usr/lib/x86_64-linux-gnu : libjpg.a ] ) {
|
||||
+ if [ GLOB /usr/lib : libjpeg.so ] || [ GLOB /usr/lib : libjpeg.a ]
|
||||
+ || [ GLOB /usr/lib64 : libjpeg.so ] || [ GLOB /usr/lib64 : libjpeg.a ]
|
||||
+ || [ GLOB /usr/lib/x86_64-linux-gnu : libjpeg.so ] || [ GLOB /usr/lib/x86_64-linux-gnu : libjpeg.a ] {
|
||||
echo "Using system JPEG library" ;
|
||||
JPEGLIB = ;
|
||||
JPEGINC = ;
|
||||
- LINKFLAGS += $(LINKFLAG)tiff ;
|
||||
+ LINKFLAGS += $(LINKFLAG)jpeg ;
|
||||
HAVE_JPEG = true ;
|
||||
}
|
||||
}
|
||||
@@ -127,8 +129,8 @@ if ! $(BUILTIN_JPEG) && $(UNIX) {
|
||||
|
||||
# If nothing else, use Argyll supplied JPEG library
|
||||
if ! $(HAVE_JPEG) || $(BUILTIN_JPEG) {
|
||||
- echo "Using built in JPEG library" ;
|
||||
- JPEGLIB = ../jpg/libjpg.lib ;
|
||||
+ echo "Using Argyll JPEG library" ;
|
||||
+ JPEGLIB = ../jpg/libjpeg.lib ;
|
||||
JPEGINC = ../jpg ;
|
||||
}
|
||||
|
@ -1,3 +1,24 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 25 13:21:04 CEST 2012 - fcrozat@suse.com
|
||||
|
||||
- Release 1.4.0:
|
||||
+ various bug fixes
|
||||
+ add support for ICC profiles in embedded JPEG
|
||||
+ fix CVE-2012-1616 (bnc#768322)
|
||||
- drop autotools patches, switch back to original Jam based build
|
||||
- add ajam (argyll patched version of Jam, BSD-license) to source
|
||||
package (needed only for build)
|
||||
- drop shared libraries and corresponding subpackages, not used by
|
||||
anything.
|
||||
- drop cologhug patch, merged upstream.
|
||||
- Add argyllcms-fixbuild.patch: fix build with system tiff/jpeg
|
||||
libraries
|
||||
- Add ajam-include.patch: add missing headers
|
||||
- Add argyllcms-1.4.0-warnings.patch: fix gcc warnings
|
||||
- Add bison as BuildRequires (needed to build ajam)
|
||||
- Compile with -f-no-strict-aliasing to prevent potential issues
|
||||
with gcc 4.7
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 27 08:21:17 UTC 2012 - mcihar@suse.cz
|
||||
|
||||
|
107
argyllcms.spec
107
argyllcms.spec
@ -19,32 +19,32 @@
|
||||
%define archivename Argyll_V%{version}%{?alphaversion}_src.zip
|
||||
|
||||
Name: argyllcms
|
||||
Version: 1.3.5
|
||||
Release: 1
|
||||
Version: 1.4.0
|
||||
Release: 0
|
||||
Summary: ICC compatible color management system
|
||||
|
||||
License: AGPL-3.0 and GPL-2.0+ and MIT
|
||||
Url: http://www.%{name}.com/
|
||||
Group: System/X11/Utilities
|
||||
|
||||
Url: http://www.%{name}.com/
|
||||
|
||||
Source0: %{url}%{archivename}
|
||||
Source1: 19-color.fdi
|
||||
Source2: color-device-file.policy
|
||||
# Many thanks to Alastair M. Robinson and Roland Mas (debian)
|
||||
Patch1: Argyll_V1.3.0_autotools.patch
|
||||
# new and changed files in 1.3.5
|
||||
Patch2: Argyll_V1.3.5_autotools.patch
|
||||
Source3: ajam-2.5.2-1.3.3.tgz
|
||||
# drop udev-acl stuff, handled by udev directly (Mandriva)
|
||||
Patch5: argyllcms-1.3.0-udev151.patch
|
||||
# add support for colorhug (http://hughski.com)
|
||||
Patch6: ColorHug-sensor-driver.patch
|
||||
# fix build (upstream)
|
||||
Patch6: argyllcms-fixbuild.patch
|
||||
Patch7: ajam-include.patch
|
||||
Patch8: argyllcms-1.4.0-warnings.patch
|
||||
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: libjpeg-devel
|
||||
BuildRequires: libtiff-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: unzip
|
||||
BuildRequires: xorg-x11-devel
|
||||
#needed for ajam
|
||||
BuildRequires: bison
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
BuildRequires: udev
|
||||
@ -82,54 +82,47 @@ displays.
|
||||
|
||||
This package contains the Argyll color management system documentation.
|
||||
|
||||
%package -n libicc2
|
||||
Summary: Libraries for icclib
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n libicc2
|
||||
The icclib is a set of routines which implement the reading and
|
||||
writing of color profile files that conform to the International
|
||||
Color Consortium (ICC) Profile Format Specification, Version 3.4.
|
||||
|
||||
%package -n libicc-devel
|
||||
Summary: Development libraries, header files for icclib
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: libicc2 = %{version}
|
||||
|
||||
%description -n libicc-devel
|
||||
The icclib is a set of routines which implement the reading and
|
||||
writing of color profile files that conform to the International
|
||||
Color Consortium (ICC) Profile Format Specification, Version 3.4.
|
||||
|
||||
%prep
|
||||
%setup -q -n Argyll_V%{version}
|
||||
# Autotools support
|
||||
%patch1 -p1 -b .auto
|
||||
%patch2 -p1
|
||||
%if 0%{?suse_version} >= 1120
|
||||
%patch5 -p1 -b .udev151
|
||||
%if 0%{?suse_version} >= 1140
|
||||
# colorhug is for openSUSE >= 11.4 only
|
||||
%patch6 -p1
|
||||
%endif
|
||||
%endif
|
||||
%patch6 -p1 -b .fixbuild
|
||||
%patch8 -p1 -b .warnings
|
||||
|
||||
tar xvf %{SOURCE3}
|
||||
cd ajam-2.5.2-1.3.3
|
||||
%patch7 -p1 -b .include
|
||||
cd ..
|
||||
|
||||
# remove unused source code
|
||||
rm -fr libusb libusbw
|
||||
rm -fr libusb1/{*.inf,*.rtf,*.inf,*.cat,*.vcproj,*.sys,*.sed,*.dsw,*.sln,*.dsp,*template*,WinCo*,winsub*,*kext*,KDRIVER_LICENSE,README_MSVC.txt,msvc,*.cmd}
|
||||
rm -fr libusb1/{*.inf,*.rtf,*.inf,*.cat,*.vcproj,*.sys,*.dsw,*.sln,*.dsp,*template*,WinCo*,winsub*,*kext*,KDRIVER_LICENSE,README_MSVC.txt,msvc,*.cmd}}
|
||||
|
||||
%build
|
||||
#needed by patches 1 & 2
|
||||
autoreconf -i
|
||||
cd ajam-2.5.2-1.3.3
|
||||
make CFLAGS="${RPM_OPT_FLAGS}"
|
||||
ln -s $PWD/bin.unix/jam ../jam
|
||||
cd ..
|
||||
|
||||
%configure
|
||||
make
|
||||
echo "CCFLAGS += ${RPM_OPT_FLAGS} -fno-strict-aliasing ;" >> Jamtop
|
||||
# Evil hack to get --as-needed working. The build system unfortunately lists all
|
||||
# the shared libraries by default on the command line _before_ the object to be built...
|
||||
echo "STDLIBS += -ldl -lrt -lX11 -lXext -lXxf86vm -lXinerama -lXrandr -lXau -lXdmcp -lXss -ltiff -ljpeg ;" >> Jamtop
|
||||
|
||||
./jam -fJambase %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
%make_install
|
||||
jam -q -fJambase install
|
||||
|
||||
# remove unpackaged files
|
||||
rm -f %{buildroot}/%{_libdir}/argyll/*.{la,a,so} %{buildroot}/%{_libdir}/*.{la,a}
|
||||
rm bin/License.txt
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT/{%{_bindir},lib/udev/rules.d,%{_datadir}/color/argyll}
|
||||
|
||||
install -m 0755 -D bin/* $RPM_BUILD_ROOT/%{_bindir}
|
||||
|
||||
install -m 0644 -D ref/* $RPM_BUILD_ROOT/%{_datadir}/color/argyll
|
||||
rm -f $RPM_BUILD_ROOT/%{_datadir}/color/argyll/License.txt
|
||||
|
||||
%if 0%{?suse_version} < 1120
|
||||
# Do some device permission magic
|
||||
@ -141,24 +134,19 @@ install -d -m 0755 %{buildroot}%{_datadir}/PolicyKit/policy/
|
||||
install -p -m 0644 %{SOURCE2} \
|
||||
%{buildroot}%{_datadir}/PolicyKit/policy/
|
||||
%else
|
||||
install -d -m 0755 %{buildroot}%{_sysconfdir}/udev/rules.d
|
||||
install -d -m 0755 %{buildroot}/lib/udev/rules.d
|
||||
install -p -m 0644 libusb1/55-Argyll.rules \
|
||||
%{buildroot}%{_sysconfdir}/udev/rules.d
|
||||
%{buildroot}/lib/udev/rules.d
|
||||
%endif
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%post -n libicc2 -p /sbin/ldconfig
|
||||
|
||||
%postun -n libicc2 -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc *.txt
|
||||
|
||||
%{_bindir}/*
|
||||
%{_libdir}/argyll
|
||||
%dir %{_datadir}/color
|
||||
%{_datadir}/color/argyll
|
||||
|
||||
@ -166,22 +154,11 @@ rm -rf %{buildroot}
|
||||
%{_datadir}/hal/fdi/policy/10osvendor/19-color.fdi
|
||||
%{_datadir}/PolicyKit/policy/color-device-file.policy
|
||||
%else
|
||||
%{_sysconfdir}/udev/rules.d/55-Argyll.rules
|
||||
/lib/udev/rules.d/55-Argyll.rules
|
||||
%endif
|
||||
|
||||
%exclude %{_datadir}/doc
|
||||
|
||||
%files doc
|
||||
%defattr(-,root,root,-)
|
||||
%doc doc/*.html doc/*.jpg doc/*.txt
|
||||
|
||||
%files -n libicc2
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/*.so.2*
|
||||
|
||||
%files -n libicc-devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/*.so
|
||||
%{_includedir}/*
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user