1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-29 01:13:08 +00:00

- Update to 2.8

Changes:	https://github.com/mm2/Little-CMS/blob/master/ChangeLog
This commit is contained in:
Sunpoet Po-Chuan Hsieh 2016-11-19 17:03:13 +00:00
parent 3c5f887574
commit d8aeaf5d91
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=426402
3 changed files with 4 additions and 120 deletions

View File

@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= lcms2
PORTVERSION= 2.7
PORTREVISION= 2
PORTVERSION= 2.8
CATEGORIES= graphics
MASTER_SITES= SF/lcms/lcms/${PORTVERSION} \
http://www.littlecms.com/ \

View File

@ -1,2 +1,3 @@
SHA256 (lcms2-2.7.tar.gz) = 4524234ae7de185e6b6da5d31d6875085b2198bc63b1211f7dde6e2d197d6a53
SIZE (lcms2-2.7.tar.gz) = 6497867
TIMESTAMP = 1479482600
SHA256 (lcms2-2.8.tar.gz) = 66d02b229d2ea9474e62c2b6cd6720fde946155cd1d0d2bffdab829790a0fb22
SIZE (lcms2-2.8.tar.gz) = 6687005

View File

@ -1,116 +0,0 @@
--- src/cmsnamed.c.orig 2015-03-17 11:19:51 UTC
+++ src/cmsnamed.c
@@ -185,8 +185,19 @@ cmsBool CMSEXPORT cmsMLUsetASCII(cmsMLU*
cmsUInt32Number i, len = (cmsUInt32Number) strlen(ASCIIString)+1;
wchar_t* WStr;
cmsBool rc;
- cmsUInt16Number Lang = _cmsAdjustEndianess16(*(cmsUInt16Number*) LanguageCode);
- cmsUInt16Number Cntry = _cmsAdjustEndianess16(*(cmsUInt16Number*) CountryCode);
+ union {
+ cmsUInt16Number uint16;
+ char str[2];
+ } code_convert;
+ cmsUInt16Number Lang;
+ cmsUInt16Number Cntry;
+
+ code_convert.str[0] = LanguageCode[0];
+ code_convert.str[1] = LanguageCode[1];
+ Lang = _cmsAdjustEndianess16(code_convert.uint16);
+ code_convert.str[0] = CountryCode[0];
+ code_convert.str[1] = CountryCode[1];
+ Cntry = _cmsAdjustEndianess16(code_convert.uint16);
if (mlu == NULL) return FALSE;
@@ -220,10 +231,22 @@ cmsUInt32Number mywcslen(const wchar_t *
// Add a wide entry
cmsBool CMSEXPORT cmsMLUsetWide(cmsMLU* mlu, const char Language[3], const char Country[3], const wchar_t* WideString)
{
- cmsUInt16Number Lang = _cmsAdjustEndianess16(*(cmsUInt16Number*) Language);
- cmsUInt16Number Cntry = _cmsAdjustEndianess16(*(cmsUInt16Number*) Country);
cmsUInt32Number len;
+ union {
+ cmsUInt16Number uint16;
+ char str[2];
+ } code_convert;
+ cmsUInt16Number Lang;
+ cmsUInt16Number Cntry;
+
+ code_convert.str[0] = Language[0];
+ code_convert.str[1] = Language[1];
+ Lang = _cmsAdjustEndianess16(code_convert.uint16);
+ code_convert.str[0] = Country[0];
+ code_convert.str[1] = Country[1];
+ Cntry = _cmsAdjustEndianess16(code_convert.uint16);
+
if (mlu == NULL) return FALSE;
if (WideString == NULL) return FALSE;
@@ -350,8 +373,19 @@ cmsUInt32Number CMSEXPORT cmsMLUgetASCII
cmsUInt32Number StrLen = 0;
cmsUInt32Number ASCIIlen, i;
- cmsUInt16Number Lang = _cmsAdjustEndianess16(*(cmsUInt16Number*) LanguageCode);
- cmsUInt16Number Cntry = _cmsAdjustEndianess16(*(cmsUInt16Number*) CountryCode);
+ union {
+ cmsUInt16Number uint16;
+ char str[2];
+ } code_convert;
+ cmsUInt16Number Lang;
+ cmsUInt16Number Cntry;
+
+ code_convert.str[0] = LanguageCode[0];
+ code_convert.str[1] = LanguageCode[1];
+ Lang = _cmsAdjustEndianess16(code_convert.uint16);
+ code_convert.str[0] = CountryCode[0];
+ code_convert.str[1] = CountryCode[1];
+ Cntry = _cmsAdjustEndianess16(code_convert.uint16);
// Sanitize
if (mlu == NULL) return 0;
@@ -394,8 +428,19 @@ cmsUInt32Number CMSEXPORT cmsMLUgetWide(
const wchar_t *Wide;
cmsUInt32Number StrLen = 0;
- cmsUInt16Number Lang = _cmsAdjustEndianess16(*(cmsUInt16Number*) LanguageCode);
- cmsUInt16Number Cntry = _cmsAdjustEndianess16(*(cmsUInt16Number*) CountryCode);
+ union {
+ cmsUInt16Number uint16;
+ char str[2];
+ } code_convert;
+ cmsUInt16Number Lang;
+ cmsUInt16Number Cntry;
+
+ code_convert.str[0] = LanguageCode[0];
+ code_convert.str[1] = LanguageCode[1];
+ Lang = _cmsAdjustEndianess16(code_convert.uint16);
+ code_convert.str[0] = CountryCode[0];
+ code_convert.str[1] = CountryCode[1];
+ Cntry = _cmsAdjustEndianess16(code_convert.uint16);
// Sanitize
if (mlu == NULL) return 0;
@@ -427,10 +472,20 @@ CMSAPI cmsBool CMSEXPORT cmsMLUgetTransl
{
const wchar_t *Wide;
- cmsUInt16Number Lang = _cmsAdjustEndianess16(*(cmsUInt16Number*) LanguageCode);
- cmsUInt16Number Cntry = _cmsAdjustEndianess16(*(cmsUInt16Number*) CountryCode);
cmsUInt16Number ObtLang, ObtCode;
+ union {
+ cmsUInt16Number uint16;
+ char str[3];
+ } code_convert;
+ cmsUInt16Number Lang;
+ cmsUInt16Number Cntry;
+
+ strcpy(code_convert.str, LanguageCode);
+ Lang = _cmsAdjustEndianess16(code_convert.uint16);
+ strcpy(code_convert.str, CountryCode);
+ Cntry = _cmsAdjustEndianess16(code_convert.uint16);
+
// Sanitize
if (mlu == NULL) return FALSE;