diff options
author | sunpoet <sunpoet@FreeBSD.org> | 2015-11-29 07:00:42 +0000 |
---|---|---|
committer | sunpoet <sunpoet@FreeBSD.org> | 2015-11-29 07:00:42 +0000 |
commit | 8c4381b420429dc30f2314a9213e9a0607064a14 (patch) | |
tree | 714fecc47fc43944ef40bae1d02ab5abb514682f | |
parent | 3aae0b4e761a47a8e8961ac808b35f65d55834b0 (diff) | |
download | FreeBSD-ports-8c4381b420429dc30f2314a9213e9a0607064a14.zip FreeBSD-ports-8c4381b420429dc30f2314a9213e9a0607064a14.tar.gz |
- Fix build on armv6
- Bump PORTREVISION for package change
PR: 201226
Submitted by: Mikael Urankar <mikael.urankar@gmail.com>
Tested by: mmoll
-rw-r--r-- | graphics/lcms2/Makefile | 2 | ||||
-rw-r--r-- | graphics/lcms2/files/patch-src-cmsnamed.c | 116 |
2 files changed, 117 insertions, 1 deletions
diff --git a/graphics/lcms2/Makefile b/graphics/lcms2/Makefile index f784f9e..0f43f24 100644 --- a/graphics/lcms2/Makefile +++ b/graphics/lcms2/Makefile @@ -3,7 +3,7 @@ PORTNAME= lcms2 PORTVERSION= 2.7 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= graphics MASTER_SITES= SF/lcms/lcms/${PORTVERSION} diff --git a/graphics/lcms2/files/patch-src-cmsnamed.c b/graphics/lcms2/files/patch-src-cmsnamed.c new file mode 100644 index 0000000..ed14a2c --- /dev/null +++ b/graphics/lcms2/files/patch-src-cmsnamed.c @@ -0,0 +1,116 @@ +--- 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; + |