Fix bug in gEDA footprint library parser and OpenSSL version CMake file. (fixes lp:1427917)
* Fixed incorrect parameter ordering in gEDA footprint library parser which read drill diameter, pad clearance and solder mask clearance. * Fix FindOpenSSL.cmake version detect bug which was exposed by OpenSSL version 1.0.2.
This commit is contained in:
parent
8d6e75fce6
commit
d13912c26a
|
@ -294,6 +294,8 @@ if (OPENSSL_INCLUDE_DIR)
|
||||||
# indicates the bug fix state, which 00 -> nothing, 01 -> a, 02 -> b and so
|
# indicates the bug fix state, which 00 -> nothing, 01 -> a, 02 -> b and so
|
||||||
# on.
|
# on.
|
||||||
|
|
||||||
|
message(STATUS "OPENSSL_VERSION_STR=${openssl_version_str}")
|
||||||
|
|
||||||
string(REGEX REPLACE "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F]).*$"
|
string(REGEX REPLACE "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F]).*$"
|
||||||
"\\1;\\2;\\3;\\4;\\5" OPENSSL_VERSION_LIST "${openssl_version_str}")
|
"\\1;\\2;\\3;\\4;\\5" OPENSSL_VERSION_LIST "${openssl_version_str}")
|
||||||
list(GET OPENSSL_VERSION_LIST 0 OPENSSL_VERSION_MAJOR)
|
list(GET OPENSSL_VERSION_LIST 0 OPENSSL_VERSION_MAJOR)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net>
|
* Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net>
|
||||||
* Copyright (C) 1992-2012 KiCad Developers, see change_log.txt for contributors.
|
* Copyright (C) 1992-2015 KiCad Developers, see change_log.txt for contributors.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
|
@ -495,6 +495,9 @@ MODULE* GPCB_FPL_CACHE::parseMODULE( LINE_READER* aLineReader ) throw( IO_ERROR,
|
||||||
conv_unit = NEW_GPCB_UNIT_CONV;
|
conv_unit = NEW_GPCB_UNIT_CONV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxLogTrace( traceFootprintLibrary, wxT( "%s parameter count = %d." ),
|
||||||
|
GetChars( parameters[0] ), paramCnt );
|
||||||
|
|
||||||
// Parse a line with format: ElementLine [X1 Y1 X2 Y2 Thickness]
|
// Parse a line with format: ElementLine [X1 Y1 X2 Y2 Thickness]
|
||||||
if( parameters[0].CmpNoCase( wxT( "ElementLine" ) ) == 0 )
|
if( parameters[0].CmpNoCase( wxT( "ElementLine" ) ) == 0 )
|
||||||
{
|
{
|
||||||
|
@ -681,20 +684,25 @@ MODULE* GPCB_FPL_CACHE::parseMODULE( LINE_READER* aLineReader ) throw( IO_ERROR,
|
||||||
wxPoint padPos( parseInt( parameters[2], conv_unit ),
|
wxPoint padPos( parseInt( parameters[2], conv_unit ),
|
||||||
parseInt( parameters[3], conv_unit ) );
|
parseInt( parameters[3], conv_unit ) );
|
||||||
|
|
||||||
int drillSize = parseInt( parameters[5], conv_unit );
|
int padSize = padSize = parseInt( parameters[4], conv_unit );
|
||||||
|
|
||||||
pad->SetDrillSize( wxSize( drillSize, drillSize ) );
|
pad->SetSize( wxSize( padSize, padSize ) );
|
||||||
|
|
||||||
int padSize = parseInt( parameters[4], conv_unit );
|
int drillSize = 0;
|
||||||
|
|
||||||
// Get the pad clearance and the solder mask clearance.
|
// Get the pad clearance, solder mask clearance, and drill size.
|
||||||
if( paramCnt == 13 )
|
if( paramCnt == 12 )
|
||||||
{
|
{
|
||||||
pad->SetLocalClearance( parseInt( parameters[5], conv_unit ) );
|
pad->SetLocalClearance( parseInt( parameters[5], conv_unit ) );
|
||||||
pad->SetLocalSolderMaskMargin( parseInt( parameters[6], conv_unit ) );
|
pad->SetLocalSolderMaskMargin( parseInt( parameters[6], conv_unit ) );
|
||||||
|
drillSize = parseInt( parameters[7], conv_unit );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
drillSize = parseInt( parameters[5], conv_unit );
|
||||||
}
|
}
|
||||||
|
|
||||||
pad->SetSize( wxSize( padSize, padSize ) );
|
pad->SetDrillSize( wxSize( drillSize, drillSize ) );
|
||||||
padPos += module->GetPosition();
|
padPos += module->GetPosition();
|
||||||
pad->SetPos0( padPos );
|
pad->SetPos0( padPos );
|
||||||
pad->SetPosition( padPos );
|
pad->SetPosition( padPos );
|
||||||
|
|
Loading…
Reference in New Issue