diff options
author | Michael Weber <xmw@gentoo.org> | 2013-04-13 00:28:42 +0000 |
---|---|---|
committer | Michael Weber <xmw@gentoo.org> | 2013-04-13 00:28:42 +0000 |
commit | 7c8c430ff0d0585cd2631a1b201fe7001a62cb31 (patch) | |
tree | 3f0e1f309948b893a51b5f85eb2421f1d71a0bc6 /media-libs | |
parent | Revbump to address bug 463868, thanks Andreas Sturmlechner (diff) | |
download | gentoo-2-7c8c430ff0d0585cd2631a1b201fe7001a62cb31.tar.gz gentoo-2-7c8c430ff0d0585cd2631a1b201fe7001a62cb31.tar.bz2 gentoo-2-7c8c430ff0d0585cd2631a1b201fe7001a62cb31.zip |
Revbump fix RDEPEND on icc profiles (bug 464094), compiler/runtime issues (bug 463900), add fltk IUSE (bug 464102). Thanks to Andreas Sturmlechner.
(Portage version: 2.2.0_alpha171/cvs/Linux x86_64, signed Manifest commit with key 62EEF090)
Diffstat (limited to 'media-libs')
13 files changed, 1045 insertions, 1 deletions
diff --git a/media-libs/oyranos/ChangeLog b/media-libs/oyranos/ChangeLog index ff5d3dc5561f..b821d7eb3f8d 100644 --- a/media-libs/oyranos/ChangeLog +++ b/media-libs/oyranos/ChangeLog @@ -1,6 +1,23 @@ # ChangeLog for media-libs/oyranos # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/oyranos/ChangeLog,v 1.11 2013/04/12 23:54:12 xmw Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/oyranos/ChangeLog,v 1.12 2013/04/13 00:28:42 xmw Exp $ + +*oyranos-0.9.1-r2 (13 Apr 2013) + + 13 Apr 2013; Michael Weber <xmw@gentoo.org> +oyranos-0.9.1-r2.ebuild, + +files/oyranos-0.9.1-fix-array-access.patch, + +files/oyranos-0.9.1-fix-crash-over-missed-output-image.patch, + +files/oyranos-0.9.1-fix-double-object-release.patch, + +files/oyranos-0.9.1-fix-more-compiler-warnings.patch, + +files/oyranos-0.9.1-fix-oyRankMap-helper-functions-crashes.patch, + +files/oyranos-0.9.1-fix-oyStringSegment-crash.patch, + +files/oyranos-0.9.1-fix-pseq-crash.patch, + +files/oyranos-0.9.1-fix-real-compiler-warnings.patch, + +files/oyranos-0.9.1-initialise-memory-for-strtod.patch, + +files/oyranos-0.9.1-omit-profile-with-error.patch, + +files/oyranos-0.9.1-support-pur-xrandr-without-xinerama.patch: + Revbump fix RDEPEND on icc profiles (bug 464094), compiler/runtime issues + (bug 463900), add fltk IUSE (bug 464102). Thanks to Andreas Sturmlechner. 12 Apr 2013; Michael Weber <xmw@gentoo.org> oyranos-0.9.4.ebuild: Fix libXcm dependency (bug 463412 by Mario Kicherer) diff --git a/media-libs/oyranos/files/oyranos-0.9.1-fix-array-access.patch b/media-libs/oyranos/files/oyranos-0.9.1-fix-array-access.patch new file mode 100644 index 000000000000..8f8e2c1b9014 --- /dev/null +++ b/media-libs/oyranos/files/oyranos-0.9.1-fix-array-access.patch @@ -0,0 +1,29 @@ +From 11d848a38608deeeca61288d46cfca55c6916788 Mon Sep 17 00:00:00 2001 +From: Kai-Uwe Behrmann <ku.b@gmx.de> +Date: Mon, 18 Mar 2013 19:07:16 +0100 +Subject: [PATCH] * [oyX1]: fix array access + +--- + modules/devices/oyranos_monitor_x11.c | 7 +++++++ + 1 files changed, 7 insertions(+), 0 deletions(-) + +diff --git a/modules/devices/oyranos_monitor_x11.c b/modules/devices/oyranos_monitor_x11.c +index a530a81..bac09c1 100644 +--- a/modules/devices/oyranos_monitor_x11.c ++++ b/modules/devices/oyranos_monitor_x11.c +@@ -1329,6 +1329,13 @@ oyX1Monitor_s* oyX1Monitor_newFrom_ ( const char * display_name, + int n_scr_info = 0; + XineramaScreenInfo *scr_info = XineramaQueryScreens( display, + &n_scr_info ); ++ if(n_scr_info <= selected_screen) ++ { ++ XFree( scr_info ); ++ oyX1Monitor_release_( &disp ); ++ return 0; ++ } ++ + geo[0] = scr_info[selected_screen].x_org; + geo[1] = scr_info[selected_screen].y_org; + geo[2] = scr_info[selected_screen].width; +-- +1.5.6.5 diff --git a/media-libs/oyranos/files/oyranos-0.9.1-fix-crash-over-missed-output-image.patch b/media-libs/oyranos/files/oyranos-0.9.1-fix-crash-over-missed-output-image.patch new file mode 100644 index 000000000000..72b01dac0b06 --- /dev/null +++ b/media-libs/oyranos/files/oyranos-0.9.1-fix-crash-over-missed-output-image.patch @@ -0,0 +1,50 @@ +From 2b62b97d76ec64ebfd5ea3fe3a67ef7c3e4a017c Mon Sep 17 00:00:00 2001 +From: Kai-Uwe Behrmann <ku.b@gmx.de> +Date: Mon, 24 Dec 2012 10:34:53 +0100 +Subject: [PATCH] * [lcms]: fix crash over missed output image + +--- + modules/oyranos_cmm_lcm2.c | 4 ++-- + modules/oyranos_cmm_lcms.c | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/modules/oyranos_cmm_lcm2.c b/modules/oyranos_cmm_lcm2.c +index 56c2228..90f0bf9 100644 +--- a/modules/oyranos_cmm_lcm2.c ++++ b/modules/oyranos_cmm_lcm2.c +@@ -1494,11 +1494,11 @@ oyPointer lcm2FilterNode_CmmIccContextToMem ( + OY_DBG_FORMAT_" missed input image %d", OY_DBG_ARGS_, + image_input->type_ ); + } +- if(image_output->type_ != oyOBJECT_IMAGE_S) ++ if(!image_output || image_output->type_ != oyOBJECT_IMAGE_S) + { + oyFilterSocket_Callback( plug, oyCONNECTOR_EVENT_INCOMPATIBLE_DATA ); + lcm2_msg( oyMSG_WARN, (oyStruct_s*)node, +- OY_DBG_FORMAT_" missed output image %d", OY_DBG_ARGS_, image_input->type_ ); ++ OY_DBG_FORMAT_" missed output image %d", OY_DBG_ARGS_, image_output?image_output->type_:0 ); + } + + data_type = oyToDataType_m( oyImage_GetPixelLayout( image_input, oyLAYOUT ) ); +diff --git a/modules/oyranos_cmm_lcms.c b/modules/oyranos_cmm_lcms.c +index b42fc99..9352ea2 100644 +--- a/modules/oyranos_cmm_lcms.c ++++ b/modules/oyranos_cmm_lcms.c +@@ -1225,12 +1225,12 @@ oyPointer lcmsFilterNode_CmmIccContextToMem ( + OY_DBG_FORMAT_" missed input image %d", OY_DBG_ARGS_, + image_input->type_ ); + } +- if(image_output->type_ != oyOBJECT_IMAGE_S) ++ if(!image_output || image_output->type_ != oyOBJECT_IMAGE_S) + { + oyFilterSocket_Callback( plug, oyCONNECTOR_EVENT_INCOMPATIBLE_DATA ); + lcms_msg( oyMSG_WARN, (oyStruct_s*)node, + OY_DBG_FORMAT_" missed output image %d", OY_DBG_ARGS_, +- image_input->type_ ); ++ image_output?image_output->type_:0 ); + } + + data_type = oyToDataType_m( oyImage_GetPixelLayout( image_input, oyLAYOUT ) ); +-- +1.5.6.5 + diff --git a/media-libs/oyranos/files/oyranos-0.9.1-fix-double-object-release.patch b/media-libs/oyranos/files/oyranos-0.9.1-fix-double-object-release.patch new file mode 100644 index 000000000000..805c5ee3d904 --- /dev/null +++ b/media-libs/oyranos/files/oyranos-0.9.1-fix-double-object-release.patch @@ -0,0 +1,27 @@ +From 6214cf15fafae52d67233d27462488487091d8d6 Mon Sep 17 00:00:00 2001 +From: Kai-Uwe Behrmann <ku.b@gmx.de> +Date: Wed, 20 Mar 2013 18:15:17 +0100 +Subject: [PATCH 1/1] * [core]: fix double object release + +... which was revealed by valgrind + +2013-03-31: backport to oyranos-0.9.1, remove patch for nonexistent file +--- + API_generated/oyranos_devices.c | 1 - + +diff --git a/API_generated/oyranos_devices.c b/API_generated/oyranos_devices.c +index 4ed5138..8cee0c8 100644 +--- a/API_generated/oyranos_devices.c ++++ b/API_generated/oyranos_devices.c +@@ -1896,7 +1896,6 @@ OYAPI int OYEXPORT + oyConfigs_MoveIn( taxi_devices, &taxi_dev, -1 ); + } + oyConfigs_Release( &configs_ ); +- oyOptions_Release( &options ); + oyFree_m_(ranks); + } + +-- +1.5.6.5 + + diff --git a/media-libs/oyranos/files/oyranos-0.9.1-fix-more-compiler-warnings.patch b/media-libs/oyranos/files/oyranos-0.9.1-fix-more-compiler-warnings.patch new file mode 100644 index 000000000000..207589e3b0c4 --- /dev/null +++ b/media-libs/oyranos/files/oyranos-0.9.1-fix-more-compiler-warnings.patch @@ -0,0 +1,496 @@ +From c65685939185b4f1eced04f227dea72b249dd065 Mon Sep 17 00:00:00 2001 +From: Kai-Uwe Behrmann <ku.b@gmx.de> +Date: Fri, 14 Dec 2012 10:50:28 +0100 +Subject: [PATCH 1/1] * [core]: fix compiler warnings + +dereferencing type-punned pointer will break strict-aliasing rules + +set but unused variable + +possible use of uninitialised variables + +... + +2013-03-30: backport to oyranos-0.9.1 + +--- + examples/devices/test_device.c | 15 ++---------- + examples/taxi/taxi.c | 30 ++++++++++--------------- + modules/oyranos_cmm_lcm2.c | 32 +++++++++++++------------- + modules/oyranos_cmm_lcms.c | 32 +++++++++++++------------- + modules/oyranos_cmm_lraw.cpp | 5 ++- + modules/oyranos_cmm_oyIM_profile.c | 4 +- + oyjl/oyjl_tree_parse.c | 2 +- + test2.cpp | 6 ++-- + tests/test_oyranos.c | 2 +- + examples/oyranos_convert/oyranos_convert.c | 15 ++++++------ + oyranos_gamma.c | 2 +- + +diff --git a/examples/devices/test_device.c b/examples/devices/test_device.c +index 7ef2de8..016754b 100644 +--- a/examples/devices/test_device.c ++++ b/examples/devices/test_device.c +@@ -205,7 +205,7 @@ int main(int argc, char *argv[]) + oyConfig_s * oy_device = 0; + oyProfile_s * profile = 0; + const char * tmp = 0; +- icSignature profile_class; ++ icSignature profile_class = icSigDisplayClass; + oyOptions_s * options = 0; + oyOptions_SetFromText( &options, + "//"OY_TYPE_STD"/config/icc_profile.x_color_region_target", +@@ -331,7 +331,6 @@ int main(int argc, char *argv[]) + oyConfig_s * oy_device = 0; + oyProfile_s * profile = 0; + const char * tmp = 0; +- icSignature profile_class; + oyOptions_s * options = 0; + oyOptions_SetFromText( &options, + "//"OY_TYPE_STD"/config/icc_profile.x_color_region_target", +@@ -344,15 +343,9 @@ int main(int argc, char *argv[]) + oyConfDomain_s * d = oyConfDomain_FromReg( device_class, 0 ); + const char * icc_profile_class = oyConfDomain_GetText( d, + "icc_profile_class", oyNAME_NICK ); +- if(icc_profile_class && strcmp(icc_profile_class,"display") == 0) +- profile_class = icSigDisplayClass; +- else if(icc_profile_class && strcmp(icc_profile_class,"output") == 0) +- profile_class = icSigOutputClass; +- else if(icc_profile_class && strcmp(icc_profile_class,"input") == 0) +- profile_class = icSigInputClass; + +- printf("icc_profile_class: %s\n", icc_profile_class ); +- oyConfDomain_Release( &d ); ++ printf("icc_profile_class: %s\n", icc_profile_class ); ++ oyConfDomain_Release( &d ); + } + + error = oyDeviceGet( 0, device_class, device_name, 0, &oy_device ); +@@ -374,14 +367,12 @@ int main(int argc, char *argv[]) + oyProfile_s * profile = 0; + oyConfigs_s * taxi_devices = 0; + oyConfig_s * device = oy_device; +- const char * profile_file_name = 0; + + oyDevicesFromTaxiDB( device, 0, &taxi_devices, 0 ); + + size = oyConfigs_Count( taxi_devices ); + + error = oyDeviceGetProfile( device, options, &profile ); +- profile_file_name = oyProfile_GetFileName( profile, 0 ); + + int show_only_device_related = 1; + int empty_added = -1; +diff --git a/examples/taxi/taxi.c b/examples/taxi/taxi.c +index 81c415a..ae3953f 100644 +--- a/examples/taxi/taxi.c ++++ b/examples/taxi/taxi.c +@@ -7,9 +7,13 @@ + #include <oyConfigs_s.h> + #include <oyProfile_s.h> + ++#include "oyranos_config_internal.h" + #include <oyranos_devices.h> + #include "oyranos_helper_macros_cli.h" ++#include "oyranos_helper.h" ++#include "oyranos_i18n.h" + #include "oyranos_sentinel.h" ++#include "oyranos_string.h" + + #include "oyjl/oyjl_tree.h" + +@@ -86,7 +90,7 @@ int oyLowerStrcmpWrap (const void * a_, const void * b_) + #endif + } + +-int oyStrCmp(char * a, char * b) { return (a && b) ? strcmp(a,b) : 1; } ++int oyStrCmp(const char * a, const char * b) { return (a && b) ? strcmp(a,b) : 1; } + + #define OPENICC_DEVICE_JSON_HEADER_BASE \ + "{\n" \ +@@ -107,8 +111,8 @@ void storeTaxiProfile( const char * taxi_id, const char * taxi_full_id, const ch + { + oyOptions_s * options = 0; + oyProfile_s * profile; +- int error = oyOptions_SetFromText( &options, +- "//" OY_TYPE_STD "/argv/TAXI_id", ++ ++ oyOptions_SetFromText( &options, "//" OY_TYPE_STD "/argv/TAXI_id", + taxi_full_id, + OY_CREATE_NEW ); + +@@ -138,15 +142,9 @@ void storeTaxiProfile( const char * taxi_id, const char * taxi_full_id, const ch + + int main( int argc, char ** argv ) + { +- oyConfig_s * moni = NULL, +- * device = NULL; + int error = 0; +- oyConfigs_s * devices = NULL; +- oyOptions_s * options = NULL; +- oyProfile_s * profile = NULL; + char * profile_name = 0; /* the file to write to */ +- int32_t rank_value = 0, max_rank_value = 0; +- int i,n, max_device_pos = -1, ++ int i, + verbose = 0, + list_manufacturers = 0, + list_urls = 0; +@@ -156,11 +154,9 @@ int main( int argc, char ** argv ) + + size_t size = 0; + const char * short_name = NULL, +- * long_name = NULL, +- * name = NULL; ++ * long_name = NULL; + oyjl_value_s * root = 0; +- char * val = NULL, +- * key = NULL; ++ char * val = NULL; + oyjl_value_s * v = 0, * tv = 0; + int count; + +@@ -229,10 +225,8 @@ int main( int argc, char ** argv ) + error = oyjl_tree_from_json( manufacturers, &root, NULL ); + if(root) + { +- int level = 0; +- + int count = oyjl_value_count(root); +- char ** sort = calloc( sizeof(char**), 2*count + 2 ); ++ const char ** sort = calloc( sizeof(char**), 2*count + 2 ); + + for(i = 0; i < count; ++i) + { +@@ -392,5 +386,5 @@ int main( int argc, char ** argv ) + if(device_db) oyDeAllocateFunc_(device_db); device_db = 0; + } + +- return 0; ++ return error; + } +diff --git a/modules/oyranos_cmm_lcm2.c b/modules/oyranos_cmm_lcm2.c +index c50df87..56c2228 100644 +--- a/modules/oyranos_cmm_lcm2.c ++++ b/modules/oyranos_cmm_lcm2.c +@@ -215,8 +215,8 @@ lcm2ProfileWrap_s * lcm2CMMProfile_GetWrap_( oyPointer_s* cmm_ptr ) + { + lcm2ProfileWrap_s * s = 0; + +- char type_[4] = lcm2PROFILE; +- int type = *((int*)&type_); ++ char * type_ = lcm2PROFILE; ++ int type = *((int32_t*)type_); + + if(cmm_ptr && !lcm2CMMCheckPointer( cmm_ptr, lcm2PROFILE ) && + oyPointer_GetPointer(cmm_ptr)) +@@ -238,8 +238,8 @@ lcm2ProfileWrap_s * lcm2CMMProfile_GetWrap_( oyPointer_s* cmm_ptr ) + int lcm2CMMTransform_GetWrap_ ( oyPointer_s * cmm_ptr, + lcm2TransformWrap_s ** s ) + { +- char type_[4] = lcm2TRANSFORM; +- int type = *((int*)&type_); ++ char * type_ = lcm2TRANSFORM; ++ int type = *((int32_t*)type_); + + if(cmm_ptr && !lcm2CMMCheckPointer( cmm_ptr, lcm2TRANSFORM ) && + oyPointer_GetPointer(cmm_ptr)) +@@ -266,8 +266,8 @@ int lcm2CMMProfileReleaseWrap(oyPointer *p) + int error = !p; + lcm2ProfileWrap_s * s = 0; + +- char type_[4] = lcm2PROFILE; +- int type = *((int*)&type_); ++ char * type_ = lcm2PROFILE; ++ int type = *((int32_t*)type_); + char s_type[4]; + + if(!error && *p) +@@ -315,8 +315,8 @@ int lcm2CMMData_Open ( oyStruct_s * data, + + if(!error) + { +- char type_[4] = lcm2PROFILE; +- int type = *((int*)&type_); ++ char * type_ = lcm2PROFILE; ++ int type = *((int32_t*)type_); + size_t size = 0; + oyPointer block = 0; + lcm2ProfileWrap_s * s = calloc(sizeof(lcm2ProfileWrap_s), 1); +@@ -482,8 +482,8 @@ lcm2TransformWrap_s * lcm2TransformWrap_Set_ ( + + if(!error) + { +- char type_[4] = lcm2TRANSFORM; +- int type = *((int*)&type_); ++ char * type_ = lcm2TRANSFORM; ++ int type = *((int32_t*)type_); + lcm2TransformWrap_s * ltw = calloc(sizeof(lcm2TransformWrap_s), 1); + + ltw->type = type; +@@ -991,8 +991,8 @@ cmsHPROFILE lcm2AddProofProfile ( oyProfile_s * proof, + { + oyPointer_s * oy = cmm_ptr; + +- char type_[4] = lcm2PROFILE; +- uint32_t type = *((uint32_t*)&type_); ++ char * type_ = lcm2PROFILE; ++ uint32_t type = *((uint32_t*)type_); + cmsUInt32Number size = 0; + oyPointer block = 0; + lcm2ProfileWrap_s * s = calloc(sizeof(lcm2ProfileWrap_s), 1); +@@ -2182,10 +2182,10 @@ int lcm2FilterPlug_CmmIccRun ( oyFilterPlug_s * requestor_plug, + { + uint8_t * array_in_tmp = 0, + * array_out_tmp = 0; +- float * array_in_tmp_flt, +- * array_out_tmp_flt; +- double * array_in_tmp_dbl, +- * array_out_tmp_dbl; ++ float * array_in_tmp_flt = 0, ++ * array_out_tmp_flt = 0; ++ double * array_in_tmp_dbl = 0, ++ * array_out_tmp_dbl = 0; + uint8_t ** array_in_data = oyArray2d_GetData( array_in ), + ** array_out_data = oyArray2d_GetData( array_out ); + int threads_n = +diff --git a/modules/oyranos_cmm_lcms.c b/modules/oyranos_cmm_lcms.c +index bea56ed..b42fc99 100644 +--- a/modules/oyranos_cmm_lcms.c ++++ b/modules/oyranos_cmm_lcms.c +@@ -213,8 +213,8 @@ lcmsProfileWrap_s * lcmsCMMProfile_GetWrap_( oyPointer_s * cmm_ptr ) + { + lcmsProfileWrap_s * s = 0; + +- char type_[4] = lcmsPROFILE; +- int type = *((int*)&type_); ++ char * type_ = lcmsPROFILE; ++ int type = *((int32_t*)type_); + + if(cmm_ptr && !lcmsCMMCheckPointer( cmm_ptr, lcmsPROFILE ) && + oyPointer_GetPointer(cmm_ptr)) +@@ -236,8 +236,8 @@ lcmsProfileWrap_s * lcmsCMMProfile_GetWrap_( oyPointer_s * cmm_ptr ) + int lcmsCMMTransform_GetWrap_ ( oyPointer_s * cmm_ptr, + lcmsTransformWrap_s ** s ) + { +- char type_[4] = lcmsTRANSFORM; +- int type = *((int*)&type_); ++ char * type_ = lcmsTRANSFORM; ++ int type = *((int32_t*)type_); + + if(cmm_ptr && !lcmsCMMCheckPointer( cmm_ptr, lcmsTRANSFORM ) && + oyPointer_GetPointer(cmm_ptr)) +@@ -264,8 +264,8 @@ int lcmsCMMProfileReleaseWrap(oyPointer *p) + int error = !p; + lcmsProfileWrap_s * s = 0; + +- char type_[4] = lcmsPROFILE; +- int type = *((int*)&type_); ++ char * type_ = lcmsPROFILE; ++ int type = *((int32_t*)type_); + char s_type[4]; + + if(!error && *p) +@@ -313,8 +313,8 @@ int lcmsCMMData_Open ( oyStruct_s * data, + + if(!error) + { +- char type_[4] = lcmsPROFILE; +- int type = *((int*)&type_); ++ char * type_ = lcmsPROFILE; ++ int type = *((int32_t*)type_); + size_t size = 0; + oyPointer block = 0; + lcmsProfileWrap_s * s = calloc(sizeof(lcmsProfileWrap_s), 1); +@@ -466,8 +466,8 @@ lcmsTransformWrap_s * lcmsTransformWrap_Set_ ( + + if(!error) + { +- char type_[4] = lcmsTRANSFORM; +- int type = *((int*)&type_); ++ char * type_ = lcmsTRANSFORM; ++ int type = *((int32_t*)type_); + lcmsTransformWrap_s * ltw = calloc(sizeof(lcmsTransformWrap_s), 1); + + ltw->type = type; +@@ -879,8 +879,8 @@ cmsHPROFILE lcmsAddProofProfile ( oyProfile_s * proof, + { + oyPointer_s * oy = cmm_ptr; + +- char type_[4] = lcmsPROFILE; +- uint32_t type = *((uint32_t*)&type_); ++ char * type_ = lcmsPROFILE; ++ uint32_t type = *((uint32_t*)type_); + size_t size = 0; + oyPointer block = 0; + lcmsProfileWrap_s * s = calloc(sizeof(lcmsProfileWrap_s), 1); +@@ -1821,10 +1821,10 @@ int lcmsFilterPlug_CmmIccRun ( oyFilterPlug_s * requestor_plug, + { + uint8_t * array_in_tmp = 0, + * array_out_tmp = 0; +- float * array_in_tmp_flt, +- * array_out_tmp_flt; +- double * array_in_tmp_dbl, +- * array_out_tmp_dbl; ++ float * array_in_tmp_flt = 0, ++ * array_out_tmp_flt = 0; ++ double * array_in_tmp_dbl = 0, ++ * array_out_tmp_dbl = 0; + uint8_t ** array_in_data = oyArray2d_GetData( array_in ), + ** array_out_data = oyArray2d_GetData( array_out ); + int threads_n = +diff --git a/modules/oyranos_cmm_lraw.cpp b/modules/oyranos_cmm_lraw.cpp +index 5494091..eacbc46 100644 +--- a/modules/oyranos_cmm_lraw.cpp ++++ b/modules/oyranos_cmm_lraw.cpp +@@ -357,7 +357,7 @@ typedef struct { + oyCIExyY v[3]; + } oyCIExyYTriple; + +-void _oyMAT3toCIExyYTriple ( const oyMAT3* a,oyCIExyYTriple * triple ) ++int _oyMAT3toCIExyYTriple ( const oyMAT3* a,oyCIExyYTriple * triple ) + { + int i,j, + fail=0; +@@ -380,6 +380,7 @@ void _oyMAT3toCIExyYTriple ( const oyMAT3* a,oyCIExyYTriple * triple ) + triple->v[i].xy[1] = 1; + } + } ++ return fail; + } + const char * _oyMAT3show ( const oyMAT3* a ) + { +@@ -488,7 +489,7 @@ oyProfile_s * createMatrixProfile ( libraw_colordata_t & color ) + _oyMAT3per( &ab_cm, &cam_zyx, &pre_mul ); + if(_oyMAT3inverse( &ab_cm, &ab_cm_inverse )) + // convert to CIE*xyY +- _oyMAT3toCIExyYTriple( &ab_cm_inverse, &ab_cm_inverse_xyY ); ++ fail = _oyMAT3toCIExyYTriple( &ab_cm_inverse, &ab_cm_inverse_xyY ); + else + { + fail = 1; +diff --git a/modules/oyranos_cmm_oyIM_profile.c b/modules/oyranos_cmm_oyIM_profile.c +index 0bbb412..c98aba7 100644 +--- a/modules/oyranos_cmm_oyIM_profile.c ++++ b/modules/oyranos_cmm_oyIM_profile.c +@@ -249,9 +249,9 @@ int oyWriteIcSigLutAtoBType ( oyStructList_s * texts, + size_t tag_size ) + { + int error = 0; +- int size, i; ++ int size = 0, i; + size_t off; +- uint8_t * dimensions, precission, *u8; ++ uint8_t * dimensions = 0, precission = 1, *u8; + uint16_t u16; + char * tmp = 0; + char * text = oyAllocateFunc_(128); +diff --git a/oyjl/oyjl_tree_parse.c b/oyjl/oyjl_tree_parse.c +index 78c9882..e43117d 100644 +--- a/oyjl/oyjl_tree_parse.c ++++ b/oyjl/oyjl_tree_parse.c +@@ -684,7 +684,7 @@ yajl_status oyjl_tree_from_json ( const char * text, + #if YAJL_VERSION < 20000 + yajl_parser_config yconfig = { 1, 1 }; + #endif +- yajl_handle yhandle; ++ yajl_handle yhandle = 0; + + if(!error && context) + { +diff --git a/test2.cpp b/test2.cpp +index a71f484..476c3be 100644 +--- a/test2.cpp ++++ b/test2.cpp +@@ -3573,7 +3573,7 @@ oyTESTRESULT_e testImagePixel() + /* all other buffer pixels shall remain untouched */ + buf_16out2x2[3]==0 && buf_16out2x2[4]==0 && buf_16out2x2[5]==0 && + buf_16out2x2[6]==0 && buf_16out2x2[7]==0 && buf_16out2x2[8]==0 && +- buf_16out2x2[9]==0 && buf_16out2x2[10]==0 && buf_16out2x2[10]==0 ++ buf_16out2x2[9]==0 && buf_16out2x2[10]==0 && buf_16out2x2[11]==0 + ) + { PRINT_SUB( oyTESTRESULT_SUCCESS, + "lower right source pixel in 1 pixel RoI %s", +@@ -3621,7 +3621,7 @@ oyTESTRESULT_e testImagePixel() + buf_16in2x2[6]==0 && buf_16in2x2[7]==0 && buf_16in2x2[8]==0 && + buf_16in2x2[9]==65535 && buf_16in2x2[10]==65535 &&buf_16in2x2[11]==65535&& + /* the result shall appear in the lower right corner / last pixel */ +- buf_16out2x2[9]==65535 && buf_16out2x2[10]>20000&&buf_16out2x2[20]<40000&& ++ buf_16out2x2[9]==65535 && buf_16out2x2[10]>20000&&buf_16out2x2[11]<40000&& + /* all other buffer pixels shall remain untouched */ + buf_16out2x2[0]==0 && buf_16out2x2[1]==0 && buf_16out2x2[2]==0 && + buf_16out2x2[3]==0 && buf_16out2x2[4]==0 && buf_16out2x2[5]==0 && +@@ -3986,7 +3986,7 @@ oyTESTRESULT_e oyTestRun ( oyTESTRESULT_e (*test)(void), + /* main */ + int main(int argc, char** argv) + { +- int i, error; ++ int i, error = 0; + + if(getenv("OY_DEBUG")) + { +diff --git a/tests/test_oyranos.c b/tests/test_oyranos.c +index bb3f521..bccec7c 100644 +--- a/tests/test_oyranos.c ++++ b/tests/test_oyranos.c +@@ -1009,7 +1009,7 @@ oyTESTRESULT_e testObserver () + /* main */ + int main(int argc, char** argv) + { +- int i, error; ++ int i, error = 0; + + /* init */ + for(i = 0; i <= oyTESTRESULT_UNKNOWN; ++i) +diff --git a/examples/oyranos_convert/oyranos_convert.c b/examples/oyranos_convert/oyranos_convert.c +index 099b872..51dd59d 100644 +--- a/examples/oyranos_convert/oyranos_convert.c ++++ b/examples/oyranos_convert/oyranos_convert.c +@@ -135,16 +135,10 @@ int main( int argc , char** argv ) + + int levels = 0; + +- const char * result_xml = 0; +- char * text = 0, * t = 0; +- const char * opt_names = 0; +- oyFormsArgs_s * forms_args = oyFormsArgs_New( 0 ); +- const char * data = 0, * ct = 0; + char ** other_args = 0; + int other_args_n = 0; +- int i; ++ char * text = 0, * t = 0; + oyOptions_s * opts = 0; +- oyOption_s * o = 0; + oyImage_s * image = 0; + + #ifdef USE_GETTEXT +@@ -275,6 +269,13 @@ int main( int argc , char** argv ) + #if 0 + if(other_args) + { ++ const char * result_xml = 0; ++ const char * opt_names = 0; ++ oyFormsArgs_s * forms_args = oyFormsArgs_New( 0 ); ++ const char * data = 0, * ct = 0; ++ int i; ++ oyOption_s * o = 0; ++ + forms_args->print = 0; + + error = oyXFORMsRenderUi( text, oy_ui_cmd_line_handlers, forms_args ); +diff --git a/oyranos_gamma.c b/oyranos_gamma.c +index 598aa2d..0c5b09e 100644 +--- a/oyranos_gamma.c ++++ b/oyranos_gamma.c +@@ -172,7 +172,7 @@ int main( int argc , char** argv ) + else if(OY_IS_ARG("profile")) + { OY_PARSE_STRING_ARG2(prof_name, "profile"); break; } + else if(OY_IS_ARG("display")) +- { const char * t; OY_PARSE_STRING_ARG2(t, "display"); ++ { const char * t=0; OY_PARSE_STRING_ARG2(t, "display"); + if(t) display_name = strdup(t); break; } + else if(OY_IS_ARG("modules")) + { list_modules = 1; i=100; break; } +-- +1.5.6.5 + + diff --git a/media-libs/oyranos/files/oyranos-0.9.1-fix-oyRankMap-helper-functions-crashes.patch b/media-libs/oyranos/files/oyranos-0.9.1-fix-oyRankMap-helper-functions-crashes.patch new file mode 100644 index 000000000000..b97260b20f53 --- /dev/null +++ b/media-libs/oyranos/files/oyranos-0.9.1-fix-oyRankMap-helper-functions-crashes.patch @@ -0,0 +1,54 @@ +From c2feb3e1f1ab45702f98c8728898eab1ee849cd4 Mon Sep 17 00:00:00 2001 +From: Kai-Uwe Behrmann <ku.b@gmx.de> +Date: Fri, 22 Feb 2013 19:42:23 +0100 +Subject: [PATCH] * [sources]: fix counting in oyRankMap data + +2013-03-31: backport to oyranos-0.9.1, remove (duplicate) patch for nonexistent file + remove hunks for not yet existing parts of oyConfig_s.c + +This fixes crashes in several oyRankMap helper functions. +--- + API_generated/oyConfig_s.c | 86 ++++++++++++++++++++-- + +diff --git a/src/API_generated/oyConfig_s.c b/API_generated/oyConfig_s.c +index 8ec0ff6..7ea1f3b 100644 +--- a/API_generated/oyConfig_s.c ++++ b/API_generated/oyConfig_s.c +@@ -983,14 +983,14 @@ oyRankMap * oyRankMapCopy ( const oyRankMap * rank_map, + { + oyRankMap * map = 0; + int error = !rank_map; +- int n = 0, i; ++ int n = 0, i = 0; + + if(!allocateFunc) + allocateFunc = oyAllocateFunc_; + + if(error <= 0) + { +- while( rank_map[n++].key ) {} ++ while( rank_map[i++].key ) ++n; + + oyAllocHelper_m_( map, oyRankMap, n + 1, allocateFunc, error = 1 ); + } +@@ -1025,7 +1025,7 @@ OYAPI void OYEXPORT + oyDeAlloc_f deAllocateFunc ) + { + int error = !rank_map || !*rank_map; +- int n = 0, i; ++ int n = 0, i = 0; + + if(!deAllocateFunc) + deAllocateFunc = oyDeAllocateFunc_; +@@ -1033,7 +1033,7 @@ OYAPI void OYEXPORT + if(error <= 0) + { + oyRankMap * map = *rank_map; +- while( (*rank_map)[n++].key ) {} ++ while( (*rank_map)[i++].key ) ++n; + for(i = 0; i < n; ++i) + { + deAllocateFunc( map[i].key ); map[i].key = 0; +-- +1.5.6.5 + diff --git a/media-libs/oyranos/files/oyranos-0.9.1-fix-oyStringSegment-crash.patch b/media-libs/oyranos/files/oyranos-0.9.1-fix-oyStringSegment-crash.patch new file mode 100644 index 000000000000..b92be88fc236 --- /dev/null +++ b/media-libs/oyranos/files/oyranos-0.9.1-fix-oyStringSegment-crash.patch @@ -0,0 +1,26 @@ +From cf495d5ede29f7211e498217c4d06428f944bac3 Mon Sep 17 00:00:00 2001 +From: Kai-Uwe Behrmann <ku.b@gmx.de> +Date: Wed, 13 Mar 2013 14:59:19 +0100 +Subject: [PATCH] * [core]: fix oyStringSegment_() crash + +2013-03-31: backport to oyranos-0.9.1, remove unrelated oyStringReplace_ hunk + +--- + oyranos_string.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/oyranos_string.c b/oyranos_string.c +index 525ce7e..1d214c0 100644 +--- a/oyranos_string.c ++++ b/oyranos_string.c +@@ -499,7 +499,7 @@ char * oyStringSegment_ ( char * text, + for(; i < segment; ++i) + { + t = oyStrchr_( t, delimiter ); +- ++t; ++ if(t) ++t; + } + + end_pos = (uintptr_t) oyStrchr_(t, delimiter); +-- +1.5.6.5 diff --git a/media-libs/oyranos/files/oyranos-0.9.1-fix-pseq-crash.patch b/media-libs/oyranos/files/oyranos-0.9.1-fix-pseq-crash.patch new file mode 100644 index 000000000000..e59dd18feabf --- /dev/null +++ b/media-libs/oyranos/files/oyranos-0.9.1-fix-pseq-crash.patch @@ -0,0 +1,26 @@ +From 843b9cc4121cdb518b8f1a65e0207e4cceb2d2ae Mon Sep 17 00:00:00 2001 +From: Kai-Uwe Behrmann <ku.b@gmx.de> +Date: Wed, 21 Nov 2012 08:15:21 +0100 +Subject: [PATCH] * [oyIM]: fix pseq crash + +--- + modules/oyranos_cmm_oyIM_profile.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/modules/oyranos_cmm_oyIM_profile.c b/modules/oyranos_cmm_oyIM_profile.c +index 265feea..8de0491 100644 +--- a/modules/oyranos_cmm_oyIM_profile.c ++++ b/modules/oyranos_cmm_oyIM_profile.c +@@ -1958,7 +1958,8 @@ oyStructList_s * oyIMProfileTag_GetValues( + memcpy( model_local, model, 4 ); + model = model_local; + tech = oyICCTechnologyDescription( oyValueUInt32(desc->technology )); +- } ++ } else ++ continue; + + /* first mnf */ + tmptag = oyProfileTag_New(0); +-- +1.5.6.5 + diff --git a/media-libs/oyranos/files/oyranos-0.9.1-fix-real-compiler-warnings.patch b/media-libs/oyranos/files/oyranos-0.9.1-fix-real-compiler-warnings.patch new file mode 100644 index 000000000000..ad76042e4d94 --- /dev/null +++ b/media-libs/oyranos/files/oyranos-0.9.1-fix-real-compiler-warnings.patch @@ -0,0 +1,75 @@ +From 692f4d363033a419ea595f6be9ddda84dae4d20d Mon Sep 17 00:00:00 2001 +From: Kai-Uwe Behrmann <ku.b@gmx.de> +Date: Thu, 13 Dec 2012 18:04:50 +0100 +Subject: [PATCH] * [sources]: fix compiler warnings + +2013-03-30: Rip out typo patches, backport to oyranos-0.9.1 + +--- + API_generated/oyOption_s.c | 6 +++--- + oyranos_io_core.c | 2 +- + oyranos_string.c | 4 +--- + oyjl/oyjl_tree_parse.c | 2 +- + +diff --git a/API_generated/oyOption_s.c b/API_generated/oyOption_s.c +index ea78f01..c2bbf66 100644 +--- a/API_generated/oyOption_s.c ++++ b/API_generated/oyOption_s.c +@@ -372,7 +372,7 @@ const char * oyOption_GetValueString(oyOption_s * obj, + { + oyOption_s_ * s = (oyOption_s_*)obj; + int error = !s, +- n; ++ n = 0; + const char * result = 0; + + if(!s) +diff --git a/oyranos_io_core.c b/oyranos_io_core.c +index d28068b..7ce1a94 100644 +--- a/oyranos_io_core.c ++++ b/oyranos_io_core.c +@@ -262,7 +262,7 @@ char * oyReadUrlToMem_ ( const char * url, + { + char * text = 0; + char * command = 0; +- FILE * fp; ++ FILE * fp = 0; + + if(url && strlen(url) && size ) + { +diff --git a/oyranos_string.c b/oyranos_string.c +index 26adbe7..d43b0dd 100644 +--- a/oyranos_string.c ++++ b/oyranos_string.c +@@ -184,13 +184,11 @@ int oyStringFromData_ ( const oyPointer ptr, + { + const char * text = (const char*) ptr; + char * text_tmp = 0; +- int j, ++ int j = 0, + error = 0; + + if(ptr && size) + { +- j = 0; +- + while(j < size) + if(!isprint( text[j] ) && !isspace( text[j] )) + { +diff --git a/oyjl/oyjl_tree_parse.c b/oyjl/oyjl_tree_parse.c +index b969ede..78c9882 100644 +--- a/oyjl/oyjl_tree_parse.c ++++ b/oyjl/oyjl_tree_parse.c +@@ -213,7 +213,7 @@ oyjl_tree_parse_context_s * oyjl_tree_parse_context_new( void ) + if(!error) + { + memset(s, 0, sizeof(oyjl_tree_parse_context_s)); +- strcpy(s->type,"yopc"); ++ memcpy(s->type,"yopc",4); + } + return s; + } +-- +1.5.6.5 + + diff --git a/media-libs/oyranos/files/oyranos-0.9.1-initialise-memory-for-strtod.patch b/media-libs/oyranos/files/oyranos-0.9.1-initialise-memory-for-strtod.patch new file mode 100644 index 000000000000..9e127b289042 --- /dev/null +++ b/media-libs/oyranos/files/oyranos-0.9.1-initialise-memory-for-strtod.patch @@ -0,0 +1,62 @@ +From 996f512cca3d19f7408e6fb9a8e0c133a54561e4 Mon Sep 17 00:00:00 2001 +From: Kai-Uwe Behrmann <ku.b@gmx.de> +Date: Thu, 3 Jan 2013 16:38:52 +0100 +Subject: [PATCH] * [sources]: initialise memory for strtod + +fixes warnings in valgrind about uninitialised memory usage + +2013-03-31: backport to oyranos-0.9.1, remove patch for nonexistent file + +--- + API_generated/oyranos_object.c | 8 ++++---- + oyranos_string.c | 10 ++++++---- + +diff --git a/API_generated/oyranos_object.c b/API_generated/oyranos_object.c +index aacc2f5..1db9f42 100644 +--- a/API_generated/oyranos_object.c ++++ b/API_generated/oyranos_object.c +@@ -768,10 +768,10 @@ int oyTextIccDictMatch ( const char * text, + int n = 0, p_n = 0, i, j; + char ** texts = 0, * t; + char ** patterns = 0, * p; +- long num[2]; +- int num_valid[2]; +- double dbl[2]; +- int dbl_valid[2]; ++ long num[2] = {0,0}; ++ int num_valid[2] = {0,0}; ++ double dbl[2] = {0,0}; ++ int dbl_valid[2] = {0,0}; + + DBG_MEM_START + +diff --git a/oyranos_string.c b/oyranos_string.c +index d43b0dd..b9c9bc4 100644 +--- a/oyranos_string.c ++++ b/oyranos_string.c +@@ -68,15 +68,17 @@ int oyStringToDouble ( const char * text, + setlocale(LC_NUMERIC, "C"); + /* avoid irritating valgrind output of "Invalid read of size 8" + * might be a glibc error or a false positive in valgrind */ +- t = oyAllocateFunc_( len + 2*sizeof(long) + 1 ); ++ t = oyAllocateFunc_( len + 2*sizeof(double) + 1 ); ++ memset( t, 0, len + 2*sizeof(double) + 1 ); ++ + memcpy( t, text, len ); +- t[len] = 0; ++ + if(0 && oy_debug_memory) + { +- printf( OY_DBG_FORMAT_""OY_PRINT_POINTER" \"%s\" %d "OY_PRINT_POINTER" \"%s\"\n", ++ fprintf( stderr, OY_DBG_FORMAT_""OY_PRINT_POINTER" \"%s\" %d "OY_PRINT_POINTER" \"%s\"\n", + OY_DBG_ARGS_,(intptr_t)text, text, len, + t, t ); +- fflush( stdout ); ++ fflush( stderr ); + } + + *value = strtod( t, &p ); +-- +1.5.6.5 + + diff --git a/media-libs/oyranos/files/oyranos-0.9.1-omit-profile-with-error.patch b/media-libs/oyranos/files/oyranos-0.9.1-omit-profile-with-error.patch new file mode 100644 index 000000000000..c7605b40d0a3 --- /dev/null +++ b/media-libs/oyranos/files/oyranos-0.9.1-omit-profile-with-error.patch @@ -0,0 +1,40 @@ +From ecbfe88cf77863c7c925f61d0e69d11474059cb8 Mon Sep 17 00:00:00 2001 +From: Kai-Uwe Behrmann <ku.b@gmx.de> +Date: Tue, 26 Mar 2013 12:09:01 +0100 +Subject: [PATCH] * [source]: omit profile with error + +a proper return value would be more helpful +--- + API_generated/oyProfile_s_.c | 7 +++++-- + +diff --git a/API_generated/oyProfile_s_.c b/API_generated/oyProfile_s_.c +index 83629fe..338ed08 100644 +--- a/API_generated/oyProfile_s_.c ++++ b/API_generated/oyProfile_s_.c +@@ -8,12 +8,12 @@ + * Oyranos is an open source Colour Management System + * + * @par Copyright: +- * 2004-2012 (C) Kai-Uwe Behrmann ++ * 2004-2013 (C) Kai-Uwe Behrmann + * + * @author Kai-Uwe Behrmann <ku.b@gmx.de> + * @par License: + * new BSD - see: http://www.opensource.org/licenses/bsd-license.php +- * @date 2012/10/31 ++ * @date 2013/03/26 + */ + + +@@ -724,6 +724,9 @@ oyProfile_s_ * oyProfile_FromFile_ ( const char * name, + } + } + ++ if(error >= 1 && s) ++ oyProfile_Release( (oyProfile_s**)&s ); ++ + oyHash_Release_( &entry ); + + return s; +-- +1.5.6.5 diff --git a/media-libs/oyranos/files/oyranos-0.9.1-support-pur-xrandr-without-xinerama.patch b/media-libs/oyranos/files/oyranos-0.9.1-support-pur-xrandr-without-xinerama.patch new file mode 100644 index 000000000000..9c31fcb3ffc3 --- /dev/null +++ b/media-libs/oyranos/files/oyranos-0.9.1-support-pur-xrandr-without-xinerama.patch @@ -0,0 +1,44 @@ +From a4f157beb6c60855f64d011cb2ad2f93071da461 Mon Sep 17 00:00:00 2001 +From: Kai-Uwe Behrmann <ku.b@gmx.de> +Date: Sat, 15 Dec 2012 16:10:22 +0100 +Subject: [PATCH] * [oyX1]: support pur XRandR without Xinerama + +... as was seen with Intel's driver. +--- + src/modules/devices/oyranos_monitor_x11.c | 12 +++++++----- + 1 files changed, 7 insertions(+), 5 deletions(-) + +diff --git a/src/modules/devices/oyranos_monitor_x11.c b/src/modules/devices/oyranos_monitor_x11.c +index b79b2d6..f8546b3 100644 +--- a/src/modules/devices/oyranos_monitor_x11.c ++++ b/src/modules/devices/oyranos_monitor_x11.c +@@ -1278,6 +1278,8 @@ oyX1Monitor_s* oyX1Monitor_newFrom_ ( const char * display_name, + */ + } + ++ expensive = 1; ++ + if((major_versionp*100 + minor_versionp) >= 102 && expensive) + { + Window w = RootWindow(display, oyX1Monitor_screen_(disp)); +@@ -1347,11 +1349,11 @@ oyX1Monitor_s* oyX1Monitor_newFrom_ ( const char * display_name, + if(crtc_info) + { + /* compare with Xinerama geometry */ +- if( +- geo[0] == crtc_info->x && +- geo[1] == crtc_info->y && +- geo[2] == crtc_info->width && +- geo[3] == crtc_info->height ) ++ if(!(geo[0] != -1 && geo[1] != -1 && geo[2] != -1 && geo[3] != -1)|| ++ (geo[0] == crtc_info->x && ++ geo[1] == crtc_info->y && ++ geo[2] == crtc_info->width && ++ geo[3] == crtc_info->height ) ) + { + xrand_screen = monitors; + ++geo_monitors; +-- +1.5.6.5 + + diff --git a/media-libs/oyranos/oyranos-0.9.1-r2.ebuild b/media-libs/oyranos/oyranos-0.9.1-r2.ebuild new file mode 100644 index 000000000000..1fa6c113cbd5 --- /dev/null +++ b/media-libs/oyranos/oyranos-0.9.1-r2.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/oyranos/oyranos-0.9.1-r2.ebuild,v 1.1 2013/04/13 00:28:42 xmw Exp $ + +EAPI=4 + +inherit eutils toolchain-funcs + +DESCRIPTION="colour management system allowing to share various settings across applications and services" +HOMEPAGE="http://www.oyranos.org/" +SRC_URI="mirror://sourceforge/oyranos/Oyranos/Oyranos%200.4/${P}.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="X doc fltk static-libs test xinerama" + +RDEPEND="=app-admin/elektra-0.7.1-r3 + dev-libs/libxml2 + dev-libs/yajl + media-gfx/exiv2 + media-libs/icc-profiles-basiccolor-printing2009 + media-libs/icc-profiles-openicc + media-libs/lcms:0 + media-libs/libpng:0 + media-libs/libraw + >=media-libs/libXcm-0.5.1 + fltk? ( x11-libs/fltk:1 ) + X? ( x11-libs/libXfixes + x11-libs/libXrandr + x11-libs/libXxf86vm + xinerama? ( x11-libs/libXinerama ) )" +DEPEND="${RDEPEND} + app-doc/doxygen + media-gfx/graphviz" + +RESTRICT="test" +REQUIRED_USE="fltk? ( X )" + +src_prepare() { + einfo remove bundled elektra yajl + rm -rf elektra* yajl || die + #keep bundled libXNVCtrl + + epatch \ + "${FILESDIR}"/${PN}-0.9.0-buildsystem.patch \ + "${FILESDIR}"/${P}-buildsystem-2.patch \ + "${FILESDIR}"/${P}-fix-real-compiler-warnings.patch \ + "${FILESDIR}"/${P}-fix-more-compiler-warnings.patch \ + "${FILESDIR}"/${P}-support-pur-xrandr-without-xinerama.patch \ + "${FILESDIR}"/${P}-fix-pseq-crash.patch \ + "${FILESDIR}"/${P}-fix-oyStringSegment-crash.patch \ + "${FILESDIR}"/${P}-fix-crash-over-missed-output-image.patch \ + "${FILESDIR}"/${P}-fix-oyRankMap-helper-functions-crashes.patch \ + "${FILESDIR}"/${P}-initialise-memory-for-strtod.patch \ + "${FILESDIR}"/${P}-fix-double-object-release.patch \ + "${FILESDIR}"/${P}-fix-array-access.patch \ + "${FILESDIR}"/${P}-omit-profile-with-error.patch + + #fix typos + sed -e '/^ */s:triffers:triggers:' -i API_generated/*c || die + sed -e 's/Promt/Prompt/' -i oyranos_texts.c po/*.{po,pot} settings/*xml || die + + if ! use fltk ; then + sed -e '/FLTK_GUI =/s:=.*:=:' \ + -i makefile.in || die + sed -e '/all:/s:oyranos-xforms-fltk::' \ + -i oforms/oyranos_xforms.makefile || die + fi +} + +src_configure() { + tc-export CC CXX + econf --prefix=/usr \ + --enable-verbose \ + $(use_with X x) \ + $(use_enable X libX11) \ + $(use_enable X libXext) \ + $(use_enable X libXrandr) \ + $(use_enable X libXxf86vm) \ + $(use_enable fltk fltk) \ + $(use_enable static-libs static) \ + $(use_enable xinerama libXinerama) +} + +src_compile() { + emake all + use X && emake oforms + emake docu +} + +src_install() { + emake DESTDIR="${D}" docdir="${EPREFIX}"/usr/share/doc/${P} install-main + + if ! use doc ; then + rm -rf "${ED}/usr/share/doc/${P}/html" || die + fi +} |