Due to huge amount of bots taking interest in registering here registration is now invite-only. Any user can make an invite, you need to create it here and give resulting link to someone to register.
avatar
dsilakov has added c93e3d9911
Updated to 2015.03.21 snapshot
... ... --- a/.abf.yml
... ... +++ b/.abf.yml
... ... @@ -1,4 +1,10 @@
1 1
sources:
2
  "kicad-doc-bzr303.tar.bz2": 3503587bd091f8c15f2633f168c90514f63b8a50
3
  "kicad-library-bzr114.tar.bz2": 19662fef6745d49f959290b50b7f7d9bea29e104
4
  "kicad-sources-bzr3256.tar.bz2": 742cb2b99c7e99fabfe50397c0573743dc013542
2
  Epcos-MKT-1.0.tar.bz2: 99dd9e99814a8c2664c76bc6376f2121e21058ae
3
  kicad-2015.03.21.tar.xz: ddfa3b1c20c847b930458cc43e1a4dafeac14e87
4
  kicad-doc-2015.03.21.tar.xz: c5d4aa5f689e20d5931fd81c31ba36b02b7917ee
5
  kicad-doc-bzr303.tar.bz2: 3503587bd091f8c15f2633f168c90514f63b8a50
6
  kicad-footprints-2015.03.21.tar.xz: 1145acbc7364afa47fd1dc7cab928c4294fd981f
7
  kicad-libraries-2015.03.21.tar.xz: d4cbf42cea39166c23320312d05e85210e6b2c4b
8
  kicad-library-bzr114.tar.bz2: 19662fef6745d49f959290b50b7f7d9bea29e104
9
  kicad-sources-bzr3256.tar.bz2: 742cb2b99c7e99fabfe50397c0573743dc013542
10
  kicad-walter-libraries-2015.03.21.tar.xz: c34c7c18a858923e8cd327a6b7b27d9ae6949e85
view file @ 41e24a2cd0
... ... --- a/kicad-2011.07.12-boost-polygon-declare-gtlsort-earlier.patch
... ... +++ /dev/null
... ... @@ -1,11 +0,0 @@
0
--- include/boost/polygon/polygon.hpp.orig	2011-07-12 19:16:41.000000000 +0200
1
+++ include/boost/polygon/polygon.hpp	2012-01-25 19:34:06.000000000 +0100
2
@@ -24,6 +24,8 @@
3
 #include "transform.hpp"
4
 #include "detail/transform_detail.hpp"
5
 
6
+#include "detail/polygon_sort_adaptor.hpp"
7
+
8
 //interval
9
 #include "interval_data.hpp"
10
 #include "interval_traits.hpp"
view file @ 41e24a2cd0
... ... --- a/kicad-2011.07.12-fix-linking.patch
... ... +++ /dev/null
... ... @@ -1,10 +0,0 @@
0
--- common/CMakeLists.txt.orig	2011-06-17 18:15:55.000000000 +0200
1
+++ common/CMakeLists.txt	2011-07-12 19:26:20.000000000 +0200
2
@@ -67,6 +67,7 @@
3
     wxwineda.cpp
4
     xnode.cpp
5
     zoom.cpp
6
+    ../pcbnew/class_drc_item.cpp
7
 )
8
 
9
 add_library(common ${COMMON_SRCS})
view file @ 41e24a2cd0
... ... --- a/kicad-2012.01.19-cvpcb-preview.rev3303.patch
... ... +++ /dev/null
... ... @@ -1,152 +0,0 @@
0
diff -ru kicad-2012.01.19-3.rev3256/cvpcb/cvframe.cpp kicad-2012.01.19-4.rev3256/cvpcb/cvframe.cpp
1
--- kicad-2012.01.19-3.rev3256/cvpcb/cvframe.cpp	2012-01-22 17:23:37.000000000 +0100
2
+++ kicad-2012.01.19-4.rev3256/cvpcb/cvframe.cpp	2012-01-27 17:41:38.000000000 +0100
3
@@ -525,6 +525,25 @@
4
     }
5
 
6
     m_FootprintList->SetFootprintFilteredList( &m_components[ selection ], m_footprints );
7
+
8
+    // Preview of the already assigned footprint.
9
+    // Find the footprint that was already choosen for this component and select it.
10
+    wxString module = *(&m_components[ selection ].m_Module);
11
+
12
+    for( int ii = 0; ii < m_FootprintList->GetCount(); ii++ )
13
+    {
14
+        wxString footprintName;
15
+        wxString msg = (*m_FootprintList->m_ActiveFootprintList)[ii];
16
+        msg.Trim( true );
17
+        msg.Trim( false );
18
+        footprintName = msg.AfterFirst( wxChar( ' ' ) );
19
+
20
+        if( module.Cmp( footprintName ) == 0 )
21
+            m_FootprintList->SetSelection( ii, true );
22
+        else
23
+            m_FootprintList->SetSelection( ii, false );
24
+    }
25
+
26
     SendMessageToEESCHEMA();
27
     DisplayStatus();
28
 }
29
@@ -660,13 +679,13 @@
30
 
31
     selection = m_ListCmp->GetSelection();
32
 
33
-	if ( selection < 0 )
34
-		selection = 0;
35
+    if ( selection < 0 )
36
+        selection = 0;
37
 
38
     if( &m_components[ selection ] == NULL )
39
-    	return;
40
+        return;
41
 
42
-	Component = &m_components[ selection ];
43
+    Component = &m_components[ selection ];
44
 
45
     sprintf( cmd, "$PART: \"%s\"", TO_UTF8( Component->m_Reference ) );
46
 
47
diff -ru kicad-2012.01.19-3.rev3256/pcbnew/basepcbframe.cpp kicad-2012.01.19-4.rev3256/pcbnew/basepcbframe.cpp
48
--- kicad-2012.01.19-3.rev3256/pcbnew/basepcbframe.cpp	2012-01-22 17:23:38.000000000 +0100
49
+++ kicad-2012.01.19-4.rev3256/pcbnew/basepcbframe.cpp	2012-01-27 17:44:46.000000000 +0100
50
@@ -390,6 +390,8 @@
51
     guide.SetIgnoreModulesOnCmp( ! m_Pcb->IsElementVisible( MOD_FR_VISIBLE ) );
52
     guide.SetIgnorePadsOnBack( ! m_Pcb->IsElementVisible( PAD_BK_VISIBLE ) );
53
     guide.SetIgnorePadsOnFront( ! m_Pcb->IsElementVisible( PAD_FR_VISIBLE ) );
54
+    guide.SetIgnoreModulesVals( ! m_Pcb->IsElementVisible( MOD_VALUES_VISIBLE ) );
55
+    guide.SetIgnoreModulesRefs( ! m_Pcb->IsElementVisible( MOD_REFERENCES_VISIBLE ) );
56
 
57
     return guide;
58
 }
59
diff -ru kicad-2012.01.19-3.rev3256/pcbnew/collectors.cpp kicad-2012.01.19-4.rev3256/pcbnew/collectors.cpp
60
--- kicad-2012.01.19-3.rev3256/pcbnew/collectors.cpp	2012-01-22 17:23:38.000000000 +0100
61
+++ kicad-2012.01.19-4.rev3256/pcbnew/collectors.cpp	2012-01-27 17:45:33.000000000 +0100
62
@@ -280,6 +280,12 @@
63
 
64
             if( m_Guide->IgnoreMTextsOnCmp() && module->GetLayer()==LAYER_N_FRONT )
65
                 goto exit;
66
+
67
+            if( m_Guide->IgnoreModulesVals() && item == module->m_Value )
68
+                goto exit;
69
+
70
+            if( m_Guide->IgnoreModulesRefs() && item == module->m_Reference )
71
+                goto exit;
72
         }
73
         break;
74
 
75
diff -ru kicad-2012.01.19-3.rev3256/pcbnew/collectors.h kicad-2012.01.19-4.rev3256/pcbnew/collectors.h
76
--- kicad-2012.01.19-3.rev3256/pcbnew/collectors.h	2012-01-22 17:23:38.000000000 +0100
77
+++ kicad-2012.01.19-4.rev3256/pcbnew/collectors.h	2012-01-27 17:47:12.000000000 +0100
78
@@ -176,6 +176,18 @@
79
     }
80
 
81
     /**
82
+     * Function IgnoreModulesVals
83
+     * @return bool - true if should ignore modules values.
84
+     */
85
+    virtual     bool IgnoreModulesVals() const = 0;
86
+
87
+    /**
88
+     * Function IgnoreModulesRefs
89
+     * @return bool - true if should ignore module references.
90
+     */
91
+    virtual     bool IgnoreModulesRefs() const = 0;
92
+
93
+    /**
94
      * Function UseHitTesting
95
      * @return bool - true if Inspect() should use BOARD_ITEM::HitTest()
96
      *             or false if Inspect() should use BOARD_ITEM::BoundsTest().
97
@@ -383,6 +395,8 @@
98
     bool    m_IgnoreModulesOnCmp;
99
     bool    m_IgnorePadsOnFront;
100
     bool    m_IgnorePadsOnBack;
101
+    bool    m_IgnoreModulesVals;
102
+    bool    m_IgnoreModulesRefs;
103
 
104
 public:
105
 
106
@@ -419,6 +433,9 @@
107
 
108
         m_IgnorePadsOnFront         = false;
109
         m_IgnorePadsOnBack          = false;
110
+
111
+        m_IgnoreModulesVals         = false;
112
+        m_IgnoreModulesRefs         = false;
113
     }
114
 
115
 
116
@@ -550,6 +567,20 @@
117
      */
118
     bool IgnorePadsOnFront() const { return m_IgnorePadsOnFront; }
119
     void SetIgnorePadsOnFront(bool ignore) { m_IgnorePadsOnFront = ignore; }
120
+
121
+    /**
122
+     * Function IgnoreModulesVals
123
+     * @return bool - true if should ignore modules values.
124
+     */
125
+    bool IgnoreModulesVals() const { return m_IgnoreModulesVals; }
126
+    void SetIgnoreModulesVals(bool ignore) { m_IgnoreModulesVals = ignore; }
127
+
128
+    /**
129
+     * Function IgnoreModulesRefs
130
+     * @return bool - true if should ignore modules references.
131
+     */
132
+    bool IgnoreModulesRefs() const { return m_IgnoreModulesRefs; }
133
+    void SetIgnoreModulesRefs(bool ignore) { m_IgnoreModulesRefs = ignore; }
134
 };
135
 
136
 
137
diff -ru kicad-2012.01.19-3.rev3256/TODO.txt kicad-2012.01.19-4.rev3256/TODO.txt
138
--- kicad-2012.01.19-3.rev3256/TODO.txt	2012-01-22 17:23:38.000000000 +0100
139
+++ kicad-2012.01.19-4.rev3256/TODO.txt	2012-01-27 17:39:15.000000000 +0100
140
@@ -26,11 +26,6 @@
141
   but is now in scripts/python/ky temporarily.
142
 
143
 
144
-CvPCB
145
------
146
-* Preview of the already assigned footprint.
147
-
148
-
149
 EESchema
150
 --------
151
 * Drag and drop between two EESchema windows.
view file @ 41e24a2cd0
... ... --- a/kicad-2012.01.19-fix-bom-in-python.patch
... ... +++ /dev/null
... ... @@ -1,17 +0,0 @@
0
diff -r -u old/scripts/bom-in-python/ky/ky.py new/scripts/bom-in-python/ky/ky.py
1
--- old/scripts/bom-in-python/ky/ky.py	2012-01-21 19:01:36.000000000 +0100
2
+++ new/scripts/bom-in-python/ky/ky.py	2012-01-21 21:43:23.464126596 +0100
3
@@ -298,11 +298,11 @@
4
             self.libparts.append(part(self._curr_element))
5
 
6
         # If this element is a net, add it to the nets list
7
-        if self._curr_element.name = "net"
8
+        if self._curr_element.name == "net":
9
             self.nets.append(self._curr_element)
10
         
11
         # If this element is a library, add it to the libraries list
12
-        if self._curr_element.name = "library"
13
+        if self._curr_element.name == "library":
14
             self.libraries.append(self._curr_element)
15
                 
16
         return self._curr_element        
view file @ 41e24a2cd0
... ... --- a/kicad-2012.01.19-fix-linking.patch
... ... +++ /dev/null
... ... @@ -1,11 +0,0 @@
0
--- pcb_calculator/CMakeLists.txt.orig	2012-01-22 17:23:40.000000000 +0100
1
+++ pcb_calculator/CMakeLists.txt	2012-01-23 20:52:58.000000000 +0100
2
@@ -62,7 +62,7 @@
3
         ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
4
 endif(APPLE)
5
 
6
-target_link_libraries( pcb_calculator common polygon bitmaps
7
+target_link_libraries( pcb_calculator common polygon kbool bitmaps
8
                         ${wxWidgets_LIBRARIES}
9
                         )
10
 
view file @ 41e24a2cd0
... ... --- a/kicad-2012.01.19-fix-plotting-scale.patch
... ... +++ /dev/null
... ... @@ -1,11 +0,0 @@
0
--- pcbnew/plotps.cpp.orig	2012-01-22 17:23:38.000000000 +0100
1
+++ pcbnew/plotps.cpp	2012-01-23 22:00:58.000000000 +0100
2
@@ -100,7 +100,7 @@
3
     PS_PLOTTER* plotter = new PS_PLOTTER();
4
     plotter->set_paper_size( SheetPS );
5
     plotter->set_scale_adjust( g_PcbPlotOptions.m_FineScaleAdjustX,
6
-                               g_PcbPlotOptions.m_FineScaleAdjustX );
7
+                               g_PcbPlotOptions.m_FineScaleAdjustY );
8
     plotter->set_viewport( offset, scale, g_PcbPlotOptions.m_PlotMirror );
9
     plotter->set_default_line_width( g_PcbPlotOptions.m_PlotLineWidth );
10
     plotter->set_creator( wxT( "PCBNEW-PS" ) );
view file @ 41e24a2cd0
... ... --- a/kicad-2012.01.19-move-up-junction-button.rev3371.patch
... ... +++ /dev/null
... ... @@ -1,21 +0,0 @@
0
--- eeschema/tool_sch.cpp~	2012-01-26 23:08:12.000000000 +0100
1
+++ eeschema/tool_sch.cpp	2012-01-26 23:08:12.000000000 +0100
2
@@ -187,15 +187,15 @@
3
     m_VToolBar->AddTool( ID_NOCONN_BUTT, wxEmptyString, KiBitmap( noconn_xpm ),
4
                          HELP_PLACE_NC_FLAG, wxITEM_CHECK );
5
 
6
+    m_VToolBar->AddTool( ID_JUNCTION_BUTT, wxEmptyString, KiBitmap( add_junction_xpm ),
7
+                         HELP_PLACE_JUNCTION, wxITEM_CHECK );
8
+
9
     m_VToolBar->AddTool( ID_LABEL_BUTT, wxEmptyString, KiBitmap( add_line_label_xpm ),
10
                          HELP_PLACE_NETLABEL, wxITEM_CHECK );
11
 
12
     m_VToolBar->AddTool( ID_GLABEL_BUTT, wxEmptyString, KiBitmap( add_glabel_xpm ),
13
                          HELP_PLACE_GLOBALLABEL, wxITEM_CHECK );
14
 
15
-    m_VToolBar->AddTool( ID_JUNCTION_BUTT, wxEmptyString, KiBitmap( add_junction_xpm ),
16
-                         HELP_PLACE_JUNCTION, wxITEM_CHECK );
17
-
18
     m_VToolBar->AddTool( ID_HIERLABEL_BUTT, wxEmptyString, KiBitmap( add_hierarchical_label_xpm ),
19
                          HELP_PLACE_HIER_LABEL, wxITEM_CHECK );
20
 
view file @ 41e24a2cd0
... ... --- a/kicad-2012.01.19-pcb-calculation.rev3328.patch
... ... +++ /dev/null
... ... @@ -1,11 +0,0 @@
0
--- pcbnew/class_board.cpp.orig	2012-01-22 17:23:38.000000000 +0100
1
+++ pcbnew/class_board.cpp	2012-01-27 18:49:34.000000000 +0100
2
@@ -1684,8 +1684,6 @@
3
     int idxmax = aPadList.size()-1;
4
 
5
     int delta = aPadList.size();
6
-    if( delta & 1 && delta > 1 )
7
-        delta += 1;
8
 
9
     int idx = 0;        // Starting index is the beginning of list
10
     while( delta )
view file @ 41e24a2cd0
... ... --- a/kicad-2012.01.19-ps-plotting-width-correction.rev3342.patch
... ... +++ /dev/null
... ... @@ -1,740 +0,0 @@
0
diff -ru kicad-2012.01.19-4.rev3256/common/common_plotPS_functions.cpp kicad-2012.01.19-5.rev3256/common/common_plotPS_functions.cpp
1
--- kicad-2012.01.19-4.rev3256/common/common_plotPS_functions.cpp	2012-01-22 17:23:37.000000000 +0100
2
+++ kicad-2012.01.19-5.rev3256/common/common_plotPS_functions.cpp	2012-01-27 20:21:51.000000000 +0100
3
@@ -489,16 +489,18 @@
4
 void PS_PLOTTER::flash_pad_circle( wxPoint pos, int diametre,
5
                                    GRTraceMode modetrace )
6
 {
7
+    int current_line_width;
8
     wxASSERT( output_file );
9
 
10
     set_current_line_width( -1 );
11
-    if( current_pen_width >= diametre )
12
-        set_current_line_width( diametre );
13
+    current_line_width = get_current_line_width();
14
+    if( current_line_width > diametre )
15
+        current_line_width = diametre;
16
 
17
     if( modetrace == FILLED )
18
-        circle( pos, diametre - current_pen_width, FILLED_SHAPE );
19
+        circle( pos, diametre - current_pen_width, FILLED_SHAPE, current_line_width );
20
     else
21
-        circle( pos, diametre - current_pen_width, NO_FILL );
22
+        circle( pos, diametre - current_pen_width, NO_FILL, current_line_width );
23
 
24
     set_current_line_width( -1 );
25
 }
26
diff -ru kicad-2012.01.19-4.rev3256/include/plot_common.h kicad-2012.01.19-5.rev3256/include/plot_common.h
27
--- kicad-2012.01.19-4.rev3256/include/plot_common.h	2012-01-22 17:23:38.000000000 +0100
28
+++ kicad-2012.01.19-5.rev3256/include/plot_common.h	2012-01-27 20:59:30.000000000 +0100
29
@@ -77,6 +77,20 @@
30
     virtual void set_color( int color )  = 0;
31
     virtual void set_dash( bool dashed ) = 0;
32
 
33
+    virtual int get_current_line_width()
34
+    {
35
+        return current_pen_width;
36
+    }
37
+
38
+    virtual void set_plot_width_adj( double width )
39
+    {
40
+    }
41
+
42
+    virtual double get_plot_width_adj()
43
+    {
44
+        return 0.;
45
+    }
46
+
47
     virtual void set_creator( const wxString& _creator )
48
     {
49
         creator = _creator;
50
@@ -350,6 +364,16 @@
51
         plot_scale_adjX = scaleX;
52
         plot_scale_adjY = scaleY;
53
     }
54
+ 
55
+    virtual void set_plot_width_adj( double width )
56
+    {
57
+        plot_width_adj = width;
58
+    }
59
+    
60
+    virtual double get_plot_width_adj()
61
+    {
62
+        return plot_width_adj;
63
+    }
64
 
65
 
66
     virtual void set_viewport( wxPoint aOffset, double aScale, bool aMirror );
67
@@ -393,6 +417,7 @@
68
 
69
 protected:
70
     double plot_scale_adjX, plot_scale_adjY;
71
+    double plot_width_adj;
72
 };
73
 
74
 /* Class to handle a D_CODE when plotting a board : */
75
diff -ru kicad-2012.01.19-4.rev3256/pcbnew/class_board.cpp kicad-2012.01.19-5.rev3256/pcbnew/class_board.cpp
76
--- kicad-2012.01.19-4.rev3256/pcbnew/class_board.cpp	2012-01-22 17:23:38.000000000 +0100
77
+++ kicad-2012.01.19-5.rev3256/pcbnew/class_board.cpp	2012-01-27 20:25:02.000000000 +0100
78
@@ -278,6 +278,21 @@
79
 }
80
 
81
 
82
+int BOARD::GetSmallestClearanceValue()
83
+{
84
+    int clearance = m_NetClasses.GetDefault()->GetClearance();
85
+
86
+    //Read list of Net Classes
87
+    for( NETCLASSES::const_iterator nc = m_NetClasses.begin(); nc != m_NetClasses.end(); nc++ )
88
+    {
89
+        NETCLASS* netclass = nc->second;
90
+        clearance = MIN( clearance, netclass->GetClearance() );
91
+    }
92
+
93
+    return clearance;
94
+}
95
+
96
+
97
 int BOARD::GetCurrentMicroViaSize()
98
 {
99
     NETCLASS* netclass = m_NetClasses.Find( m_CurrentNetClassName );
100
diff -ru kicad-2012.01.19-4.rev3256/pcbnew/class_board.h kicad-2012.01.19-5.rev3256/pcbnew/class_board.h
101
--- kicad-2012.01.19-4.rev3256/pcbnew/class_board.h	2012-01-22 17:23:39.000000000 +0100
102
+++ kicad-2012.01.19-5.rev3256/pcbnew/class_board.h	2012-01-27 20:26:22.000000000 +0100
103
@@ -761,6 +761,12 @@
104
     int GetBiggestClearanceValue();
105
 
106
     /**
107
+     * Function GetSmallestClearanceValue
108
+     * @return the smallest clearance value found in NetClasses list
109
+     */
110
+    int GetSmallestClearanceValue();
111
+
112
+    /**
113
      * Function GetCurrentTrackWidth
114
      * @return the current track width, according to the selected options
115
      * ( using the default netclass value or a preset value )
116
diff -ru kicad-2012.01.19-4.rev3256/pcbnew/dialogs/dialog_plot_base.cpp kicad-2012.01.19-5.rev3256/pcbnew/dialogs/dialog_plot_base.cpp
117
--- kicad-2012.01.19-4.rev3256/pcbnew/dialogs/dialog_plot_base.cpp	2012-01-22 17:23:35.000000000 +0100
118
+++ kicad-2012.01.19-5.rev3256/pcbnew/dialogs/dialog_plot_base.cpp	2012-01-27 20:31:44.000000000 +0100
119
@@ -179,7 +179,6 @@
120
 	m_GerberOptionsSizer->Add( m_excludeEdgeLayerOpt, 0, wxTOP|wxRIGHT|wxLEFT, 2 );
121
 	
122
 	m_subtractMaskFromSilk = new wxCheckBox( this, wxID_ANY, _("Subtract soldermask from silkscreen"), wxDefaultPosition, wxDefaultSize, 0 );
123
-	m_subtractMaskFromSilk->SetValue(true); 
124
 	m_subtractMaskFromSilk->SetToolTip( _("Remove silkscreen from areas without soldermask") );
125
 	
126
 	m_GerberOptionsSizer->Add( m_subtractMaskFromSilk, 0, wxTOP|wxRIGHT|wxLEFT, 2 );
127
@@ -268,6 +267,20 @@
128
 	
129
 	bSizer17->Add( bSizer19, 1, wxEXPAND, 5 );
130
 	
131
+	wxBoxSizer* bSizer191;
132
+	bSizer191 = new wxBoxSizer( wxVERTICAL );
133
+	
134
+	m_textPSFineAdjustWidth = new wxStaticText( this, wxID_ANY, _("Width correction"), wxDefaultPosition, wxDefaultSize, 0 );
135
+	m_textPSFineAdjustWidth->Wrap( -1 );
136
+	bSizer191->Add( m_textPSFineAdjustWidth, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
137
+	
138
+	m_PSFineAdjustWidthOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
139
+	m_PSFineAdjustWidthOpt->SetToolTip( _("Set global width correction for exact width postscript output.\nThese width correction is intended to compensate tracks width and also pads and vias size errors.\nThe reasonable width correction value must be in a range of [-(MinTrackWidth-1), +(MinClearanceValue-1)] in decimils.") );
140
+	
141
+	bSizer191->Add( m_PSFineAdjustWidthOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
142
+	
143
+	bSizer17->Add( bSizer191, 1, wxEXPAND, 5 );
144
+	
145
 	m_PSOptionsSizer->Add( bSizer17, 1, wxEXPAND, 5 );
146
 	
147
 	m_plotPSNegativeOpt = new wxCheckBox( this, wxID_ANY, _("Negative plot"), wxDefaultPosition, wxDefaultSize, 0 );
148
diff -ru kicad-2012.01.19-4.rev3256/pcbnew/dialogs/dialog_plot_base.fbp kicad-2012.01.19-5.rev3256/pcbnew/dialogs/dialog_plot_base.fbp
149
--- kicad-2012.01.19-4.rev3256/pcbnew/dialogs/dialog_plot_base.fbp	2012-01-22 17:23:35.000000000 +0100
150
+++ kicad-2012.01.19-5.rev3256/pcbnew/dialogs/dialog_plot_base.fbp	2012-01-27 20:42:20.000000000 +0100
151
@@ -3416,6 +3416,189 @@
152
                                                                 </object>
153
                                                             </object>
154
                                                         </object>
155
+                                                        <object class="sizeritem" expanded="1">
156
+                                                            <property name="border">5</property>
157
+                                                            <property name="flag">wxEXPAND</property>
158
+                                                            <property name="proportion">1</property>
159
+                                                            <object class="wxBoxSizer" expanded="1">
160
+                                                                <property name="minimum_size"></property>
161
+                                                                <property name="name">bSizer191</property>
162
+                                                                <property name="orient">wxVERTICAL</property>
163
+                                                                <property name="permission">none</property>
164
+                                                                <object class="sizeritem" expanded="1">
165
+                                                                    <property name="border">5</property>
166
+                                                                    <property name="flag">wxLEFT|wxRIGHT|wxTOP</property>
167
+                                                                    <property name="proportion">0</property>
168
+                                                                    <object class="wxStaticText" expanded="1">
169
+                                                                        <property name="BottomDockable">1</property>
170
+                                                                        <property name="LeftDockable">1</property>
171
+                                                                        <property name="RightDockable">1</property>
172
+                                                                        <property name="TopDockable">1</property>
173
+                                                                        <property name="aui_name"></property>
174
+                                                                        <property name="bg"></property>
175
+                                                                        <property name="caption"></property>
176
+                                                                        <property name="caption_visible">1</property>
177
+                                                                        <property name="center_pane">0</property>
178
+                                                                        <property name="close_button">1</property>
179
+                                                                        <property name="context_help"></property>
180
+                                                                        <property name="context_menu">1</property>
181
+                                                                        <property name="default_pane">0</property>
182
+                                                                        <property name="dock">Dock</property>
183
+                                                                        <property name="dock_fixed">0</property>
184
+                                                                        <property name="docking">Left</property>
185
+                                                                        <property name="enabled">1</property>
186
+                                                                        <property name="fg"></property>
187
+                                                                        <property name="floatable">1</property>
188
+                                                                        <property name="font"></property>
189
+                                                                        <property name="gripper">0</property>
190
+                                                                        <property name="hidden">0</property>
191
+                                                                        <property name="id">wxID_ANY</property>
192
+                                                                        <property name="label">Width correction</property>
193
+                                                                        <property name="layer"></property>
194
+                                                                        <property name="maximize_button">0</property>
195
+                                                                        <property name="maximum_size"></property>
196
+                                                                        <property name="minimize_button">0</property>
197
+                                                                        <property name="minimum_size"></property>
198
+                                                                        <property name="moveable">1</property>
199
+                                                                        <property name="name">m_textPSFineAdjustWidth</property>
200
+                                                                        <property name="pane_border">1</property>
201
+                                                                        <property name="pane_position"></property>
202
+                                                                        <property name="pane_size"></property>
203
+                                                                        <property name="permission">protected</property>
204
+                                                                        <property name="pin_button">1</property>
205
+                                                                        <property name="pos"></property>
206
+                                                                        <property name="position"></property>
207
+                                                                        <property name="resize">Resizable</property>
208
+                                                                        <property name="row"></property>
209
+                                                                        <property name="show">1</property>
210
+                                                                        <property name="size"></property>
211
+                                                                        <property name="style"></property>
212
+                                                                        <property name="subclass"></property>
213
+                                                                        <property name="toolbar_pane">0</property>
214
+                                                                        <property name="tooltip"></property>
215
+                                                                        <property name="validator_data_type"></property>
216
+                                                                        <property name="validator_style">wxFILTER_NONE</property>
217
+                                                                        <property name="validator_type">wxDefaultValidator</property>
218
+                                                                        <property name="validator_variable"></property>
219
+                                                                        <property name="window_extra_style"></property>
220
+                                                                        <property name="window_name"></property>
221
+                                                                        <property name="window_style"></property>
222
+                                                                        <property name="wrap">-1</property>
223
+                                                                        <event name="OnChar"></event>
224
+                                                                        <event name="OnEnterWindow"></event>
225
+                                                                        <event name="OnEraseBackground"></event>
226
+                                                                        <event name="OnKeyDown"></event>
227
+                                                                        <event name="OnKeyUp"></event>
228
+                                                                        <event name="OnKillFocus"></event>
229
+                                                                        <event name="OnLeaveWindow"></event>
230
+                                                                        <event name="OnLeftDClick"></event>
231
+                                                                        <event name="OnLeftDown"></event>
232
+                                                                        <event name="OnLeftUp"></event>
233
+                                                                        <event name="OnMiddleDClick"></event>
234
+                                                                        <event name="OnMiddleDown"></event>
235
+                                                                        <event name="OnMiddleUp"></event>
236
+                                                                        <event name="OnMotion"></event>
237
+                                                                        <event name="OnMouseEvents"></event>
238
+                                                                        <event name="OnMouseWheel"></event>
239
+                                                                        <event name="OnPaint"></event>
240
+                                                                        <event name="OnRightDClick"></event>
241
+                                                                        <event name="OnRightDown"></event>
242
+                                                                        <event name="OnRightUp"></event>
243
+                                                                        <event name="OnSetFocus"></event>
244
+                                                                        <event name="OnSize"></event>
245
+                                                                        <event name="OnUpdateUI"></event>
246
+                                                                    </object>
247
+                                                                </object>
248
+                                                                <object class="sizeritem" expanded="1">
249
+                                                                    <property name="border">5</property>
250
+                                                                    <property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT</property>
251
+                                                                    <property name="proportion">0</property>
252
+                                                                    <object class="wxTextCtrl" expanded="1">
253
+                                                                        <property name="BottomDockable">1</property>
254
+                                                                        <property name="LeftDockable">1</property>
255
+                                                                        <property name="RightDockable">1</property>
256
+                                                                        <property name="TopDockable">1</property>
257
+                                                                        <property name="aui_name"></property>
258
+                                                                        <property name="bg"></property>
259
+                                                                        <property name="caption"></property>
260
+                                                                        <property name="caption_visible">1</property>
261
+                                                                        <property name="center_pane">0</property>
262
+                                                                        <property name="close_button">1</property>
263
+                                                                        <property name="context_help"></property>
264
+                                                                        <property name="context_menu">1</property>
265
+                                                                        <property name="default_pane">0</property>
266
+                                                                        <property name="dock">Dock</property>
267
+                                                                        <property name="dock_fixed">0</property>
268
+                                                                        <property name="docking">Left</property>
269
+                                                                        <property name="enabled">1</property>
270
+                                                                        <property name="fg"></property>
271
+                                                                        <property name="floatable">1</property>
272
+                                                                        <property name="font"></property>
273
+                                                                        <property name="gripper">0</property>
274
+                                                                        <property name="hidden">0</property>
275
+                                                                        <property name="id">wxID_ANY</property>
276
+                                                                        <property name="layer"></property>
277
+                                                                        <property name="maximize_button">0</property>
278
+                                                                        <property name="maximum_size"></property>
279
+                                                                        <property name="maxlength">0</property>
280
+                                                                        <property name="minimize_button">0</property>
281
+                                                                        <property name="minimum_size"></property>
282
+                                                                        <property name="moveable">1</property>
283
+                                                                        <property name="name">m_PSFineAdjustWidthOpt</property>
284
+                                                                        <property name="pane_border">1</property>
285
+                                                                        <property name="pane_position"></property>
286
+                                                                        <property name="pane_size"></property>
287
+                                                                        <property name="permission">protected</property>
288
+                                                                        <property name="pin_button">1</property>
289
+                                                                        <property name="pos"></property>
290
+                                                                        <property name="position"></property>
291
+                                                                        <property name="resize">Resizable</property>
292
+                                                                        <property name="row"></property>
293
+                                                                        <property name="show">1</property>
294
+                                                                        <property name="size"></property>
295
+                                                                        <property name="style"></property>
296
+                                                                        <property name="subclass"></property>
297
+                                                                        <property name="toolbar_pane">0</property>
298
+                                                                        <property name="tooltip">Set global width correction for exact width postscript output.&#x0A;These width correction is intended to compensate tracks width and also pads and vias size errors.&#x0A;The reasonable width correction value must be in a range of [-(MinTrackWidth-1), +(MinClearanceValue-1)] in decimils.</property>
299
+                                                                        <property name="validator_data_type"></property>
300
+                                                                        <property name="validator_style">wxFILTER_NONE</property>
301
+                                                                        <property name="validator_type">wxDefaultValidator</property>
302
+                                                                        <property name="validator_variable"></property>
303
+                                                                        <property name="value"></property>
304
+                                                                        <property name="window_extra_style"></property>
305
+                                                                        <property name="window_name"></property>
306
+                                                                        <property name="window_style"></property>
307
+                                                                        <event name="OnChar"></event>
308
+                                                                        <event name="OnEnterWindow"></event>
309
+                                                                        <event name="OnEraseBackground"></event>
310
+                                                                        <event name="OnKeyDown"></event>
311
+                                                                        <event name="OnKeyUp"></event>
312
+                                                                        <event name="OnKillFocus"></event>
313
+                                                                        <event name="OnLeaveWindow"></event>
314
+                                                                        <event name="OnLeftDClick"></event>
315
+                                                                        <event name="OnLeftDown"></event>
316
+                                                                        <event name="OnLeftUp"></event>
317
+                                                                        <event name="OnMiddleDClick"></event>
318
+                                                                        <event name="OnMiddleDown"></event>
319
+                                                                        <event name="OnMiddleUp"></event>
320
+                                                                        <event name="OnMotion"></event>
321
+                                                                        <event name="OnMouseEvents"></event>
322
+                                                                        <event name="OnMouseWheel"></event>
323
+                                                                        <event name="OnPaint"></event>
324
+                                                                        <event name="OnRightDClick"></event>
325
+                                                                        <event name="OnRightDown"></event>
326
+                                                                        <event name="OnRightUp"></event>
327
+                                                                        <event name="OnSetFocus"></event>
328
+                                                                        <event name="OnSize"></event>
329
+                                                                        <event name="OnText"></event>
330
+                                                                        <event name="OnTextEnter"></event>
331
+                                                                        <event name="OnTextMaxLen"></event>
332
+                                                                        <event name="OnTextURL"></event>
333
+                                                                        <event name="OnUpdateUI"></event>
334
+                                                                    </object>
335
+                                                                </object>
336
+                                                            </object>
337
+                                                        </object>
338
                                                     </object>
339
                                                 </object>
340
                                                 <object class="sizeritem" expanded="0">
341
diff -ru kicad-2012.01.19-4.rev3256/pcbnew/dialogs/dialog_plot_base.h kicad-2012.01.19-5.rev3256/pcbnew/dialogs/dialog_plot_base.h
342
--- kicad-2012.01.19-4.rev3256/pcbnew/dialogs/dialog_plot_base.h	2012-01-22 17:23:35.000000000 +0100
343
+++ kicad-2012.01.19-5.rev3256/pcbnew/dialogs/dialog_plot_base.h	2012-01-27 20:43:04.000000000 +0100
344
@@ -85,6 +85,8 @@
345
 		wxTextCtrl* m_fineAdjustXscaleOpt;
346
 		wxStaticText* m_staticText8;
347
 		wxTextCtrl* m_fineAdjustYscaleOpt;
348
+		wxStaticText* m_textPSFineAdjustWidth;
349
+		wxTextCtrl* m_PSFineAdjustWidthOpt;
350
 		wxCheckBox* m_plotPSNegativeOpt;
351
 		wxCheckBox* m_forcePSA4OutputOpt;
352
 		wxTextCtrl* m_messagesBox;
353
diff -ru kicad-2012.01.19-4.rev3256/pcbnew/pcbplot.cpp kicad-2012.01.19-5.rev3256/pcbnew/pcbplot.cpp
354
--- kicad-2012.01.19-4.rev3256/pcbnew/pcbplot.cpp	2012-01-22 17:23:38.000000000 +0100
355
+++ kicad-2012.01.19-5.rev3256/pcbnew/pcbplot.cpp	2012-01-28 15:27:08.000000000 +0100
356
@@ -24,6 +24,7 @@
357
 /* Keywords to r/w options in m_Config */
358
 #define CONFIG_XFINESCALE_ADJ    wxT( "PlotXFineScaleAdj" )
359
 #define CONFIG_YFINESCALE_ADJ    wxT( "PlotYFineScaleAdj" )
360
+#define CONFIG_PS_FINEWIDTH_ADJ  wxT( "PSPlotFineWidthAdj" )
361
 
362
 // Define min and max reasonable values for print scale
363
 #define MIN_SCALE 0.01
364
@@ -59,10 +60,13 @@
365
 private:
366
     PCB_EDIT_FRAME*  m_Parent;
367
     wxConfig*        m_Config;
368
-    std::vector<int> layerList;         // List to hold CheckListBox layer numbers
369
+    std::vector<int> layerList;               // List to hold CheckListBox layer numbers
370
     double           m_XScaleAdjust;
371
     double           m_YScaleAdjust;
372
-    static wxPoint   prevPosition;      // Dialog position & size
373
+    double           m_PSWidthAdjust;         // Global width correction for exact width postscript output.
374
+    double           m_WidthAdjustMinValue;   // Global width correction
375
+    double           m_WidthAdjustMaxValue;   // margins.
376
+    static wxPoint   prevPosition;            // Dialog position & size
377
     static wxSize    prevSize;
378
 
379
 public:
380
@@ -114,6 +118,12 @@
381
 
382
     m_Config->Read( CONFIG_XFINESCALE_ADJ, &m_XScaleAdjust );
383
     m_Config->Read( CONFIG_YFINESCALE_ADJ, &m_YScaleAdjust );
384
+    m_Config->Read( CONFIG_PS_FINEWIDTH_ADJ, &m_PSWidthAdjust);
385
+    
386
+    // The reasonable width correction value must be in a range of
387
+    // [-(MinTrackWidth-1), +(MinClearanceValue-1)] decimils.
388
+    m_WidthAdjustMinValue = -(board->GetBoardDesignSettings()->m_TrackMinWidth - 1);
389
+    m_WidthAdjustMaxValue = board->GetSmallestClearanceValue() - 1;
390
 
391
     m_plotFormatOpt->SetSelection( g_PcbPlotOptions.GetPlotFormat() );
392
 
393
@@ -135,6 +145,12 @@
394
     msg = ReturnStringFromValue( g_UserUnit, g_PcbPlotOptions.GetPlotLineWidth(),
395
                                  PCB_INTERNAL_UNIT );
396
     m_linesWidth->AppendText( msg );
397
+    
398
+    // Set units for PS global width correction.
399
+    AddUnitSymbol( *m_textPSFineAdjustWidth, g_UserUnit );
400
+    
401
+    // Set units for PS global width correction.
402
+    AddUnitSymbol( *m_textPSFineAdjustWidth, g_UserUnit );
403
 
404
     m_useAuxOriginCheckBox->SetValue( g_PcbPlotOptions.GetUseAuxOrigin() );
405
 
406
@@ -148,6 +164,13 @@
407
 
408
     msg.Printf( wxT( "%f" ), m_YScaleAdjust );
409
     m_fineAdjustYscaleOpt->AppendText( msg );
410
+    
411
+    // Test for a reasonable PS width correction value. Set to 0 if problem.
412
+    if( m_PSWidthAdjust < m_WidthAdjustMinValue || m_PSWidthAdjust > m_WidthAdjustMaxValue )
413
+        m_PSWidthAdjust = 0.;
414
+
415
+    msg.Printf( wxT( "%f" ), To_User_Unit( g_UserUnit, m_PSWidthAdjust, PCB_INTERNAL_UNIT ) );
416
+    m_PSFineAdjustWidthOpt->AppendText( msg );
417
 
418
     m_plotPSNegativeOpt->SetValue( g_PcbPlotOptions.m_PlotPSNegative );
419
     m_forcePSA4OutputOpt->SetValue( g_PcbPlotOptions.GetPsA4Output() );
420
@@ -282,16 +305,16 @@
421
 
422
     wxFileName dirName = wxFileName::DirName( dirDialog.GetPath() );
423
 
424
-    wxMessageDialog dialog( this, wxT( "Use a relative path? "),
425
-                            wxT( "Plot Output Directory" ),
426
+    wxMessageDialog dialog( this, _( "Use a relative path? "),
427
+                            _( "Plot Output Directory" ),
428
                             wxYES_NO | wxICON_QUESTION | wxYES_DEFAULT );
429
 
430
     if( dialog.ShowModal() == wxID_YES ) {
431
         wxString boardFilePath = ( (wxFileName) m_Parent->GetScreen()->GetFileName()).GetPath();
432
 
433
         if( !dirName.MakeRelativeTo( boardFilePath ) )
434
-            wxMessageBox( wxT( "Cannot make path relative (target volume different from board file volume)!" ),
435
-                          wxT( "Plot Output Directory" ), wxICON_ERROR );
436
+            wxMessageBox( _( "Cannot make path relative (target volume different from board file volume)!" ),
437
+                          _( "Plot Output Directory" ), wxOK | wxICON_ERROR );
438
     }
439
 
440
     m_outputDirectoryName->SetValue( dirName.GetFullPath() );
441
@@ -319,6 +342,7 @@
442
         m_scaleOpt->Enable( true );
443
         m_fineAdjustXscaleOpt->Enable( true );
444
         m_fineAdjustYscaleOpt->Enable( true );
445
+        m_PSFineAdjustWidthOpt->Enable( true );
446
         m_plotPSNegativeOpt->Enable( true );
447
         m_PlotOptionsSizer->Hide( m_GerberOptionsSizer );
448
         m_PlotOptionsSizer->Hide( m_HPGLOptionsSizer );
449
@@ -345,6 +369,7 @@
450
         m_scaleOpt->Enable( false );
451
         m_fineAdjustXscaleOpt->Enable( false );
452
         m_fineAdjustYscaleOpt->Enable( false );
453
+        m_PSFineAdjustWidthOpt->Enable( false );
454
         m_plotPSNegativeOpt->SetValue( false );
455
         m_plotPSNegativeOpt->Enable( false );
456
         m_PlotOptionsSizer->Show( m_GerberOptionsSizer );
457
@@ -370,6 +395,7 @@
458
         m_scaleOpt->Enable( true );
459
         m_fineAdjustXscaleOpt->Enable( false );
460
         m_fineAdjustYscaleOpt->Enable( false );
461
+        m_PSFineAdjustWidthOpt->Enable( false );
462
         m_plotPSNegativeOpt->SetValue( false );
463
         m_plotPSNegativeOpt->Enable( false );
464
         m_PlotOptionsSizer->Hide( m_GerberOptionsSizer );
465
@@ -397,6 +423,7 @@
466
         m_scaleOpt->SetSelection( 1 );
467
         m_fineAdjustXscaleOpt->Enable( false );
468
         m_fineAdjustYscaleOpt->Enable( false );
469
+        m_PSFineAdjustWidthOpt->Enable( false );
470
         m_plotPSNegativeOpt->SetValue( false );
471
         m_plotPSNegativeOpt->Enable( false );
472
         m_PlotOptionsSizer->Hide( m_GerberOptionsSizer );
473
@@ -447,7 +474,7 @@
474
     {
475
         msg = ReturnStringFromValue( g_UserUnit, tempOptions.GetHpglPenDiameter(), UNITS_MILS );
476
         m_HPGLPenSizeOpt->SetValue( msg );
477
-        msg.Printf( wxT( "HPGL pen size constrained!\n" ) );
478
+        msg.Printf( _( "HPGL pen size constrained!\n" ) );
479
         m_messagesBox->AppendText( msg );
480
     }
481
 
482
@@ -459,7 +486,7 @@
483
     {
484
         msg = ReturnStringFromValue( UNSCALED_UNITS, tempOptions.GetHpglPenSpeed(), 1 );
485
         m_HPGLPenSpeedOpt->SetValue( msg );
486
-        msg.Printf( wxT( "HPGL pen speed constrained!\n" ) );
487
+        msg.Printf( _( "HPGL pen speed constrained!\n" ) );
488
         m_messagesBox->AppendText( msg );
489
     }
490
 
491
@@ -471,7 +498,7 @@
492
     {
493
         msg = ReturnStringFromValue( g_UserUnit, tempOptions.GetHpglPenOverlay(), UNITS_MILS );
494
         m_HPGLPenOverlayOpt->SetValue( msg );
495
-        msg.Printf( wxT( "HPGL pen overlay constrained!\n" ) );
496
+        msg.Printf( _( "HPGL pen overlay constrained!\n" ) );
497
         m_messagesBox->AppendText( msg );
498
     }
499
 
500
@@ -484,7 +511,7 @@
501
         msg = ReturnStringFromValue( g_UserUnit, tempOptions.GetPlotLineWidth(),
502
                                      PCB_INTERNAL_UNIT );
503
         m_linesWidth->SetValue( msg );
504
-        msg.Printf( wxT( "Default linewidth constrained!\n" ) );
505
+        msg.Printf( _( "Default linewidth constrained!\n" ) );
506
         m_messagesBox->AppendText( msg );
507
     }
508
 
509
@@ -497,7 +524,7 @@
510
     {
511
         msg.Printf( wxT( "%f" ), m_XScaleAdjust );
512
         m_fineAdjustXscaleOpt->SetValue( msg );
513
-        msg.Printf( wxT( "X scale constrained!\n" ) );
514
+        msg.Printf( _( "X scale constrained!\n" ) );
515
         m_messagesBox->AppendText( msg );
516
     }
517
 
518
@@ -511,10 +538,28 @@
519
     {
520
         msg.Printf( wxT( "%f" ), m_YScaleAdjust );
521
         m_fineAdjustYscaleOpt->SetValue( msg );
522
-        msg.Printf( wxT( "Y scale constrained!\n" ) );
523
+        msg.Printf( _( "Y scale constrained!\n" ) );
524
+        m_messagesBox->AppendText( msg );
525
+    }
526
+    
527
+    // PS Width correction
528
+    msg = m_PSFineAdjustWidthOpt->GetValue();
529
+    tmpDouble = ReturnValueFromString( g_UserUnit, msg, PCB_INTERNAL_UNIT );
530
+
531
+    if( !setDouble( &m_PSWidthAdjust, tmpDouble, m_WidthAdjustMinValue, m_WidthAdjustMaxValue ) )
532
+    {
533
+        msg = ReturnStringFromValue( g_UserUnit, m_PSWidthAdjust, PCB_INTERNAL_UNIT );
534
+        m_PSFineAdjustWidthOpt->SetValue( msg );
535
+        msg.Printf( _( "Width correction constrained!\nThe reasonable width correction value must be in a range of [%+f; %+f]" ),
536
+                    To_User_Unit( g_UserUnit, m_WidthAdjustMinValue, PCB_INTERNAL_UNIT ),
537
+                    To_User_Unit( g_UserUnit, m_WidthAdjustMaxValue, PCB_INTERNAL_UNIT ) );
538
+        msg += ( g_UserUnit == INCHES )? _(" (\")") : _(" (mm)");
539
+        msg += _( " for current design rules!\n" );
540
         m_messagesBox->AppendText( msg );
541
     }
542
 
543
+    m_Config->Write( CONFIG_PS_FINEWIDTH_ADJ, m_PSWidthAdjust );
544
+
545
     m_Config->Write( CONFIG_YFINESCALE_ADJ, m_YScaleAdjust );
546
 
547
     tempOptions.SetUseGerberExtensions( m_useGerberExtensions->GetValue() );
548
@@ -565,10 +610,10 @@
549
     if( !outputDir.MakeAbsolute( boardFilePath ) )
550
     {
551
         wxString msg;
552
-        msg.Printf( wxT( " Cannot make %s absolute with respect to %s!" ),
553
+        msg.Printf( _( " Cannot make %s absolute with respect to %s!" ),
554
                     GetChars( outputDir.GetPath() ),
555
                     GetChars( boardFilePath ) );
556
-        wxMessageBox( msg, wxT( "Plot" ), wxICON_ERROR );
557
+        wxMessageBox( msg, _( "Plot" ), wxOK | wxICON_ERROR );
558
         return;
559
     }
560
 
561
@@ -577,12 +622,13 @@
562
         if( wxMkdir( outputDir.GetPath() ) )
563
         {
564
             wxString msg;
565
-            msg.Printf( wxT( "Directory %s created.\n" ), GetChars( outputDir.GetPath() ) );
566
+            msg.Printf( _( "Directory %s created.\n" ), GetChars( outputDir.GetPath() ) );
567
             m_messagesBox->AppendText( msg );
568
         }
569
         else
570
         {
571
-            wxMessageBox( wxT( "Cannot create output directory!" ), wxT( "Plot" ), wxICON_ERROR );
572
+            wxMessageBox( _( "Cannot create output directory!" ),
573
+                               _( "Plot" ), wxOK | wxICON_ERROR );
574
             return;
575
         }
576
     }
577
@@ -623,6 +669,9 @@
578
     if( m_fineAdjustYscaleOpt->IsEnabled() && m_YScaleAdjust != 0.0 )
579
         g_PcbPlotOptions.m_FineScaleAdjustY = m_YScaleAdjust;
580
 
581
+    if( m_PSFineAdjustWidthOpt->IsEnabled() )
582
+        g_PcbPlotOptions.m_FineWidthAdjust = m_PSWidthAdjust;
583
+
584
     switch( g_PcbPlotOptions.GetPlotFormat() )
585
     {
586
     case PLOT_FORMAT_POST:
587
diff -ru kicad-2012.01.19-4.rev3256/pcbnew/pcb_plot_params.cpp kicad-2012.01.19-5.rev3256/pcbnew/pcb_plot_params.cpp
588
--- kicad-2012.01.19-4.rev3256/pcbnew/pcb_plot_params.cpp	2012-01-22 17:23:42.000000000 +0100
589
+++ kicad-2012.01.19-5.rev3256/pcbnew/pcb_plot_params.cpp	2012-01-27 20:44:50.000000000 +0100
590
@@ -102,6 +102,7 @@
591
     scaleSelection         = 1;
592
     m_FineScaleAdjustX     = 1.0;
593
     m_FineScaleAdjustY     = 1.0;
594
+    m_FineWidthAdjust      = 0.;
595
     outputDirectory        = wxT( "" );
596
 }
597
 
598
diff -ru kicad-2012.01.19-4.rev3256/pcbnew/pcb_plot_params.h kicad-2012.01.19-5.rev3256/pcbnew/pcb_plot_params.h
599
--- kicad-2012.01.19-4.rev3256/pcbnew/pcb_plot_params.h	2012-01-22 17:23:42.000000000 +0100
600
+++ kicad-2012.01.19-5.rev3256/pcbnew/pcb_plot_params.h	2012-01-27 20:45:42.000000000 +0100
601
@@ -86,6 +86,8 @@
602
     // Only X and Y dimensions are adjusted: circles are plotted as circle, even if X and Y fine scale differ.
603
     double      m_FineScaleAdjustX;     // fine scale adjust X axis
604
     double      m_FineScaleAdjustY;     // dine scale adjust Y axis
605
+    // These width factor is intended to compensate plotters (and mainly printers) line width error.
606
+    double      m_FineWidthAdjust;
607
 
608
 private:
609
     long        layerSelection;
610
diff -ru kicad-2012.01.19-4.rev3256/pcbnew/plotps.cpp kicad-2012.01.19-5.rev3256/pcbnew/plotps.cpp
611
--- kicad-2012.01.19-4.rev3256/pcbnew/plotps.cpp	2012-01-27 14:42:34.000000000 +0100
612
+++ kicad-2012.01.19-5.rev3256/pcbnew/plotps.cpp	2012-01-27 20:58:11.000000000 +0100
613
@@ -101,6 +101,7 @@
614
     plotter->set_paper_size( SheetPS );
615
     plotter->set_scale_adjust( g_PcbPlotOptions.m_FineScaleAdjustX,
616
                                g_PcbPlotOptions.m_FineScaleAdjustY );
617
+    plotter->set_plot_width_adj( g_PcbPlotOptions.m_FineWidthAdjust );
618
     plotter->set_viewport( offset, scale, g_PcbPlotOptions.m_PlotMirror );
619
     plotter->set_default_line_width( g_PcbPlotOptions.m_PlotLineWidth );
620
     plotter->set_creator( wxT( "PCBNEW-PS" ) );
621
diff -ru kicad-2012.01.19-4.rev3256/pcbnew/plot_rtn.cpp kicad-2012.01.19-5.rev3256/pcbnew/plot_rtn.cpp
622
--- kicad-2012.01.19-4.rev3256/pcbnew/plot_rtn.cpp	2012-01-22 17:23:38.000000000 +0100
623
+++ kicad-2012.01.19-5.rev3256/pcbnew/plot_rtn.cpp	2012-01-27 20:57:10.000000000 +0100
624
@@ -32,6 +32,12 @@
625
 static void PlotTextModule( PLOTTER* plotter, TEXTE_MODULE* pt_texte,
626
                             GRTraceMode trace_mode );
627
 
628
+static int doIntValueFitToBand( int aInt, int aMin, int aMax )
629
+{
630
+    if( aInt < aMin ) return aMin;
631
+    if( aInt > aMax ) return aMax;
632
+    return aInt;
633
+}   
634
 
635
 /* Creates the plot for silkscreen layers
636
  */
637
@@ -826,6 +832,12 @@
638
             shape_pos = pad->ReturnShapePos();
639
             pos = shape_pos;
640
             wxSize margin;
641
+            double width_adj = 0;
642
+            
643
+            if( aLayerMask & ALL_CU_LAYERS )
644
+            {
645
+                width_adj =  aPlotter->get_plot_width_adj();
646
+            }
647
 
648
             switch( aLayerMask &
649
                    ( SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT |
650
@@ -845,8 +857,8 @@
651
                 break;
652
             }
653
 
654
-            size.x = pad->m_Size.x + ( 2 * margin.x );
655
-            size.y = pad->m_Size.y + ( 2 * margin.y );
656
+            size.x = pad->m_Size.x + ( 2 * margin.x ) + width_adj;
657
+            size.y = pad->m_Size.y + ( 2 * margin.y ) + width_adj;
658
 
659
             /* Don't draw a null size item : */
660
             if( size.x <= 0 || size.y <= 0 )
661
@@ -913,14 +925,20 @@
662
                 continue;
663
 
664
             int via_margin = 0;
665
+            double width_adj = 0;
666
 
667
             // If the current layer is a solder mask, use the global mask
668
             // clearance for vias
669
             if( ( aLayerMask & ( SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT ) ) )
670
                 via_margin = GetBoard()->GetBoardDesignSettings()->m_SolderMaskMargin;
671
+            
672
+            if( aLayerMask & ALL_CU_LAYERS )
673
+            {
674
+                width_adj =  aPlotter->get_plot_width_adj();
675
+            }
676
 
677
             pos    = Via->m_Start;
678
-            size.x = size.y = Via->m_Width + 2 * via_margin;
679
+            size.x = size.y = Via->m_Width + 2 * via_margin + width_adj;
680
 
681
             /* Don't draw a null size item : */
682
             if( size.x <= 0 )
683
@@ -941,7 +959,7 @@
684
         if( (g_TabOneLayerMask[track->GetLayer()] & aLayerMask) == 0 )
685
             continue;
686
 
687
-        size.x = size.y = track->m_Width;
688
+        size.x = size.y = track->m_Width + aPlotter->get_plot_width_adj();
689
         pos    = track->m_Start;
690
         end    = track->m_End;
691
 
692
@@ -956,7 +974,7 @@
693
         if( (g_TabOneLayerMask[track->GetLayer()] & aLayerMask) == 0 )
694
             continue;
695
 
696
-        size.x = size.y = track->m_Width;
697
+        size.x = size.y = track->m_Width + aPlotter->get_plot_width_adj();
698
         pos    = track->m_Start;
699
         end    = track->m_End;
700
 
701
@@ -1008,12 +1026,15 @@
702
             continue;
703
 
704
         pos = pts->m_Start;
705
-
706
+        
707
+        // It is quite possible that the real drill value is less then small drill value.
708
         if( g_PcbPlotOptions.m_DrillShapeOpt == PCB_PLOT_PARAMS::SMALL_DRILL_SHAPE )
709
-            diam.x = diam.y = SMALL_DRILL;
710
+            diam.x = diam.y = MIN( SMALL_DRILL, pts->GetDrillValue() );
711
         else
712
             diam.x = diam.y = pts->GetDrillValue();
713
-
714
+        
715
+        diam.x -= aPlotter->get_plot_width_adj();
716
+        diam.x = doIntValueFitToBand( diam.x, 1, pts->m_Width - 1 );
717
         aPlotter->flash_pad_circle( pos, diam.x, aTraceMode );
718
     }
719
 
720
@@ -1030,11 +1051,19 @@
721
             if( PtPad->m_DrillShape == PAD_OVAL )
722
             {
723
                 diam = PtPad->m_Drill;
724
+                diam.x -= aPlotter->get_plot_width_adj();
725
+                diam.x = doIntValueFitToBand( diam.x, 1, PtPad->m_Size.x - 1 );
726
+                diam.y -= aPlotter->get_plot_width_adj();
727
+                diam.y = doIntValueFitToBand( diam.y, 1, PtPad->m_Size.y - 1 );
728
                 aPlotter->flash_pad_oval( pos, diam, PtPad->m_Orient, aTraceMode );
729
             }
730
             else
731
             {
732
                 diam.x = aSmallDrillShape ? SMALL_DRILL : PtPad->m_Drill.x;
733
+                // It is quite possible that the real pad drill value is less then small drill value.
734
+                diam.x = aSmallDrillShape ? MIN( SMALL_DRILL, PtPad->m_Drill.x ) : PtPad->m_Drill.x;
735
+                diam.x -= aPlotter->get_plot_width_adj();
736
+                diam.x = doIntValueFitToBand( diam.x, 1, PtPad->m_Size.x - 1 );
737
                 aPlotter->flash_pad_circle( pos, diam.x, aTraceMode );
738
             }
739
         }
view file @ 41e24a2cd0
... ... --- a/kicad-2012.01.19-thermal-relief.rev3281.patch
... ... +++ /dev/null
... ... @@ -1,13 +0,0 @@
0
--- pcbnew/board_items_to_polygon_shape_transform.cpp.orig	2012-01-26 23:50:21.000000000 +0100
1
+++ pcbnew/board_items_to_polygon_shape_transform.cpp	2012-01-27 00:50:23.000000000 +0100
2
@@ -615,8 +615,8 @@
3
         // The pattern roughtly is a 90 deg arc pie
4
         std::vector <wxPoint> corners_buffer;
5
 
6
-        // Radius of outer arcs of the shape:
7
-        int outer_radius = dx + aThermalGap;     // The radius of the outer arc is pad radius + aThermalGap
8
+        // Radius of outer arcs of the shape corrected for arc approximation by lines
9
+        int outer_radius = (int) ( (dx + aThermalGap) * aCorrectionFactor );
10
 
11
         // Crosspoint of thermal spoke sides, the first point of polygon buffer
12
         corners_buffer.push_back( wxPoint( copper_thickness.x / 2, copper_thickness.y / 2 ) );
view file @ 41e24a2cd0
... ... --- a/kicad-2012.01.19-undo-redo-auto.rev3297.patch
... ... +++ /dev/null
... ... @@ -1,177 +0,0 @@
0
diff -ru kicad-2012.01.19-2.rev3256/pcbnew/automove.cpp kicad-2012.01.19-3.rev3256/pcbnew/automove.cpp
1
--- kicad-2012.01.19-2.rev3256/pcbnew/automove.cpp	2012-01-22 17:23:38.000000000 +0100
2
+++ kicad-2012.01.19-3.rev3256/pcbnew/automove.cpp	2012-01-27 15:38:42.000000000 +0100
3
@@ -17,7 +17,8 @@
4
 #include "pcbnew_id.h"
5
 #include "class_board.h"
6
 #include "class_module.h"
7
-
8
+ 
9
+extern BOARD_ITEM* DuplicateStruct( BOARD_ITEM* aItem );
10
 
11
 typedef enum {
12
     FIXE_MODULE,
13
@@ -185,6 +186,11 @@
14
     bool     edgesExists;
15
     double   surface;
16
 
17
+    // Undo: init list
18
+    PICKED_ITEMS_LIST  newList;
19
+    newList.m_Status = UR_CHANGED;
20
+    ITEM_PICKER        picker( NULL, UR_CHANGED );
21
+
22
     if( GetBoard()->m_Modules == NULL )
23
     {
24
         DisplayError( this, _( "No modules found!" ) );
25
@@ -262,6 +268,10 @@
26
                 continue;
27
         }
28
 
29
+        // Undo: add copy of old Module to undo
30
+        picker.m_Link           = DuplicateStruct( Module );
31
+        picker.m_PickedItemType = Module->Type();
32
+
33
         if( current.x > (Xsize_allowed + start.x) )
34
         {
35
             current.x  = start.x;
36
@@ -276,9 +286,17 @@
37
 
38
         PlaceModule( Module, NULL, true );
39
 
40
+        // Undo: add new Module to undo
41
+        picker.m_PickedItem = Module;
42
+        newList.PushItem( picker );
43
+
44
         current.x += Module->m_BoundaryBox.GetWidth() + pas_grille;
45
     }
46
 
47
+    // Undo: commit
48
+    if( newList.GetCount() )
49
+        SaveCopyInUndoList( newList, UR_CHANGED );
50
+
51
     DrawPanel->Refresh();
52
 }
53
 
54
diff -ru kicad-2012.01.19-2.rev3256/pcbnew/autoplac.cpp kicad-2012.01.19-3.rev3256/pcbnew/autoplac.cpp
55
--- kicad-2012.01.19-2.rev3256/pcbnew/autoplac.cpp	2012-01-22 17:23:38.000000000 +0100
56
+++ kicad-2012.01.19-3.rev3256/pcbnew/autoplac.cpp	2012-01-27 15:49:37.000000000 +0100
57
@@ -106,6 +106,11 @@
58
     float    Pas;
59
     int      lay_tmp_TOP, lay_tmp_BOTTOM;
60
 
61
+    // Undo: init list
62
+    PICKED_ITEMS_LIST  newList;
63
+    newList.m_Status = UR_CHANGED;
64
+    ITEM_PICKER        picker( NULL, UR_CHANGED );
65
+
66
     if( GetBoard()->m_Modules == NULL )
67
         return;
68
 
69
@@ -172,7 +177,14 @@
70
         {
71
         case PLACE_1_MODULE:
72
             if( ThisModule == Module )
73
+            {
74
+                // Module will be placed, add to undo.
75
+                picker.m_PickedItem     = ThisModule;
76
+                picker.m_PickedItemType = ThisModule->Type();
77
+                newList.PushItem( picker );
78
+
79
                 Module->m_ModuleStatus |= MODULE_to_PLACE;
80
+            }
81
 
82
             break;
83
 
84
@@ -183,7 +195,14 @@
85
                 break;
86
 
87
             if( !GetBoard()->m_BoundaryBox.Contains( Module->m_Pos ) )
88
+            {
89
+                // Module will be placed, add to undo.
90
+                picker.m_PickedItem     = Module;
91
+                picker.m_PickedItemType = Module->Type();
92
+                newList.PushItem( picker );
93
+
94
                 Module->m_ModuleStatus |= MODULE_to_PLACE;
95
+            }
96
 
97
             break;
98
 
99
@@ -193,6 +212,11 @@
100
             if( Module->m_ModuleStatus & MODULE_is_LOCKED )
101
                 break;
102
 
103
+            // Module will be placed, add to undo.
104
+            picker.m_PickedItem     = Module;
105
+            picker.m_PickedItemType = Module->Type();
106
+            newList.PushItem( picker );
107
+
108
             Module->m_ModuleStatus |= MODULE_to_PLACE;
109
             break;
110
 
111
@@ -204,7 +228,14 @@
112
             }
113
 
114
             if( !(Module->m_ModuleStatus & MODULE_is_PLACED) )
115
+            {
116
+                // Module will be placed, add to undo.
117
+                picker.m_PickedItem     = Module;
118
+                picker.m_PickedItemType = Module->Type();
119
+                newList.PushItem( picker );
120
+
121
                 Module->m_ModuleStatus |= MODULE_to_PLACE;
122
+            }
123
 
124
             break;
125
         }
126
@@ -221,6 +252,10 @@
127
         }
128
     }
129
 
130
+    // Undo: commit
131
+    if( newList.GetCount() )
132
+        SaveCopyInUndoList( newList, UR_CHANGED );
133
+
134
     activ = 0;
135
     Pas   = 100.0;
136
 
137
diff -ru kicad-2012.01.19-2.rev3256/pcbnew/solve.cpp kicad-2012.01.19-3.rev3256/pcbnew/solve.cpp
138
--- kicad-2012.01.19-2.rev3256/pcbnew/solve.cpp	2012-01-22 17:23:38.000000000 +0100
139
+++ kicad-2012.01.19-3.rev3256/pcbnew/solve.cpp	2012-01-27 16:08:23.000000000 +0100
140
@@ -79,6 +79,7 @@
141
 static int            Ncurrent;     /* measures of progress */
142
 static int            s_Clearance;  // Clearance value used in autorouter
143
 
144
+static PICKED_ITEMS_LIST s_ItemsListPicker;
145
 
146
 #define NOSUCCESS       0
147
 #define STOP_FROM_ESC   -1
148
@@ -272,6 +273,9 @@
149
 
150
     Ncurrent = 0;
151
 
152
+    // Prepare the undo command info
153
+    s_ItemsListPicker.ClearListAndDeleteItems();  // Should not be necessary, but...
154
+
155
     /* go until no more work to do */
156
     GetWork( &row_source, &col_source, &current_net_code,
157
              &row_target, &col_target, &pt_cur_ch ); // First net to route.
158
@@ -375,6 +379,9 @@
159
 
160
     DrawPanel->m_AbortEnable = false;
161
 
162
+    SaveCopyInUndoList( s_ItemsListPicker, UR_UNSPECIFIED );
163
+    s_ItemsListPicker.ClearItemsList(); // s_ItemsListPicker is no more owner of picked items
164
+
165
     return SUCCESS;
166
 }
167
 
168
@@ -1324,6 +1331,8 @@
169
 
170
     while( ( track = g_CurrentTrackList.PopFront() ) != NULL )
171
     {
172
+        ITEM_PICKER picker( track, UR_NEW );
173
+        s_ItemsListPicker.PushItem( picker );
174
         pcbframe->GetBoard()->m_Track.Insert( track, insertBeforeMe );
175
     }
176
 
view file @ c93e3d9911
... ... --- /dev/null
... ... +++ b/kicad-2015.01.02-freerouting.patch
... ... @@ -0,0 +1,52 @@
1
From f81cb9527e29c6a6ef21d9040162b42e31c40e44 Mon Sep 17 00:00:00 2001
2
From: Lubomir Rintel <lkundrak@v3.sk>
3
Date: Wed, 24 Dec 2014 09:53:49 +0100
4
Subject: [PATCH] Try to run freerouting by its JPackage launcher script
5
6
It's a sin to touch the Java tool by its JAR file in Fedora.
7
---
8
 pcbnew/dialogs/dialog_freeroute_exchange.cpp | 24 ++++++++++++++++++++++--
9
 1 file changed, 22 insertions(+), 2 deletions(-)
10
11
diff -urp kicad-2015.01.02/pcbnew/dialogs/dialog_freeroute_exchange.cpp kicad-2015.01.02.good/pcbnew/dialogs/dialog_freeroute_exchange.cpp
12
--- kicad-2015.01.02/pcbnew/dialogs/dialog_freeroute_exchange.cpp	2015-01-02 22:15:35.000000000 +0100
13
+++ kicad-2015.01.02.good/pcbnew/dialogs/dialog_freeroute_exchange.cpp	2015-01-03 11:25:55.393054653 +0100
14
@@ -80,7 +80,12 @@ void DIALOG_FREEROUTE::MyInit()
15
     wxConfigBase* cfg = Kiface().KifaceSettings();
16
     cfg->Read( FREEROUTE_RUN_KEY, &msg );
17
 */
18
-    wxFileName fileName( FindKicadFile( wxT( "freeroute.jar" ) ), wxPATH_UNIX );
19
+    wxFileName fileName( FindKicadFile( wxT( "freerouting" ) ), wxPATH_UNIX );
20
+
21
+    if( !fileName.FileExists() )
22
+    {
23
+        fileName.Assign ( FindKicadFile( wxT( "freeroute.jar" ) ), wxPATH_UNIX );
24
+    }
25
 
26
     if( fileName.FileExists() )
27
     {
28
@@ -144,8 +149,22 @@ void DIALOG_FREEROUTE::OnLaunchButtonCli
29
             return;
30
     }
31
 
32
-    wxFileName jarfileName( FindKicadFile( wxT( "freeroute.jar" ) ), wxPATH_UNIX );
33
-    wxString command;
34
+    wxFileName jarfileName( FindKicadFile( wxT( "freerouting" ) ), wxPATH_UNIX );
35
+    wxString command = wxT( "" );
36
+
37
+    if( jarfileName.FileExists() )
38
+    {
39
+        command << wxChar( '"' ) << jarfileName.GetFullPath() << wxChar( '"' );
40
+        // add option to load the .dsn file
41
+        command << wxT( " -de " );
42
+        // add *.dsn full filename (quoted):
43
+        command << wxChar( '"' ) << dsnFile << wxChar( '"' );
44
+
45
+        ProcessExecute( command );
46
+        return;
47
+    } else {
48
+        jarfileName.Assign ( FindKicadFile( wxT( "freeroute.jar" ) ), wxPATH_UNIX );
49
+    }
50
 
51
     // Find the Java application on Windows.
52
     // Colud be no more needed since we now have to run only java, not java web start
view file @ c93e3d9911
... ... --- /dev/null
... ... +++ b/kicad-2015.01.02-nostrip.patch
... ... @@ -0,0 +1,21 @@
1
diff --git a/CMakeLists.txt b/CMakeLists.txt
2
index af87f4b..f002416 100644
3
--- a/CMakeLists.txt
4
+++ b/CMakeLists.txt
5
@@ -186,7 +186,6 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
6
     endif()
7
 
8
     if( MINGW )
9
-        set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-s" )
10
 
11
         # _UNICODE definition seems needed under mingw/gcc 4.8
12
         # (Kicad uses unicode, and on Windows, wxWidgets >= 2.9.4 is mandatory
13
@@ -223,8 +222,6 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
14
             set( CMAKE_SHARED_LINKER_FLAGS "${TO_LINKER},--no-undefined" )
15
             set( CMAKE_MODULE_LINKER_FLAGS "${TO_LINKER},--no-undefined" )
16
 
17
-            set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-s" )
18
-
19
             # Defeat ELF's ability to use the GOT to replace locally implemented functions
20
             # with ones from another module.
21
             # https://bugs.launchpad.net/kicad/+bug/1322354
... ... --- a/kicad.spec
... ... +++ b/kicad.spec
... ... @@ -1,529 +1,340 @@
1
%define Werror_cflags            %nil
2
3
# Generated debug package is empty and rpmlint rejects build
4
%define _enable_debug_packages %{nil}
5
%define debug_package %{nil}
6
7
# To create source package: 
8
# bzr branch lp:kicad/stable
9
# 
10
# You can get the date by querying:
11
# $ bzr log -r-1 --line stable/
12
# 3009: jean-pierre charras 2011-05-25 Libedit: actual line thickness  taken in account by collector. Thick lines are now more easy t...
13
#
14
# $ bzr export --format=tbz2 --root=kicad kicad-sources-bzr$(bzr revno stable/).tar.bz2 stable/
1
%define revision 5528
15 2
16
# For library,
17
# See http://iut-tice.ujf-grenoble.fr/cao/how_to_download_sources.txt
18
# bzr branch lp:~kicad-lib-committers/kicad/library
19
#
20
# You can get the date by querying:
21
# $ bzr log -r-1 --line library/
22
# 109: xtony 2010-12-08 Add various modules.
23
#
24
# $ bzr export --format=tbz2 --root=kicad-library kicad-library-bzr$(bzr revno library/).tar.bz2 library/
25
26
# For doc,
27
# See http://iut-tice.ujf-grenoble.fr/cao/how_to_download_sources.txt
28
# bzr branch lp:~kicad-developers/kicad/doc
29
# 
30
# You can get the date by querying:
31
# $ bzr log -r-1 --line doc/
32
# 216: Andrey Fedorushkov 2011-06-02 update russian GUI
33
34
%define date 20120119
35
%define revision 3256
36
37
%define docname kicad-doc
38
%define docdate 20111221
39
%define docrevision 303
40
%define docversion %{docdate}.bzr%{docrevision}
41
42
%define libname kicad-library
43
%define libdate 20120119
44
%define librevision 114
45
%define libversion %{libdate}.bzr%{librevision}
46
47
Summary:	An open source software for the creation of electronic schematic diagrams
48 3
Name:		kicad
49
Version:	%{date}.bzr%{revision}
50
Release:	4
51
License:	GPLv2+
4
Version:	2015.03.21
5
Release:	0.rev%{revision}.1
6
Summary:	EDA software suite for creation of schematic diagrams and PCBs
52 7
Group:		Sciences/Computer science
53
Url:		http://www.lis.inpg.fr/realise_au_lis/kicad/
54
Source0:	%{name}-sources-bzr%{revision}.tar.bz2
55
Source1:	%{docname}-bzr%{docrevision}.tar.bz2
56
Source2:	%{libname}-bzr%{librevision}.tar.bz2
57
58
# Fedora & upstream patches
59
Patch11:	%{name}-2011.07.12-fix-linking.patch
60
Patch12:	%{name}-2011.07.12-boost-polygon-declare-gtlsort-earlier.patch
61
Patch13:	%{name}-2012.01.19-fix-linking.patch
62
Patch14:	%{name}-2012.01.19-fix-bom-in-python.patch
63
Patch20:	%{name}-2012.01.19-fix-plotting-scale.patch
64
Patch21:	%{name}-2012.01.19-move-up-junction-button.rev3371.patch
65
Patch22:	%{name}-2012.01.19-thermal-relief.rev3281.patch
66
Patch23:	%{name}-2012.01.19-undo-redo-auto.rev3297.patch
67
Patch24:	%{name}-2012.01.19-cvpcb-preview.rev3303.patch
68
Patch25:	%{name}-2012.01.19-pcb-calculation.rev3328.patch
69
Patch26:	%{name}-2012.01.19-ps-plotting-width-correction.rev3342.patch
8
License:	GPLv2+
9
Url:		http://www.kicad-pcb.org
10
# URL2:         https://launchpad.net/kicad
11
# URL3:         http://orson.net.pl/pub/kicad/
12
# Additional librairies from Walter Lain
13
# URL4:         http://smisioto.no-ip.org/elettronica/kicad/kicad-en.htm
14
15
# Source files created with the following scripts ...
16
#   kicad-clone.sh ... clone BZR repositories of main, libraries, doc
17
#   kicad-update.sh ... update BZR repositories
18
#   kicad-export.sh ... export BZR repositories and create tarballs
19
#   kicad-walter-libs.sh ... download, unpack and prepare tarball with walter libs
20
21
Source:		%{name}-%{version}.tar.xz
22
Source1:	%{name}-doc-%{version}.tar.xz
23
Source2:	%{name}-libraries-%{version}.tar.xz
24
Source3:	%{name}-footprints-%{version}.tar.xz
25
Source7:	Epcos-MKT-1.0.tar.bz2
26
Source8:	%{name}-walter-libraries-%{version}.tar.xz
27
Patch1:		kicad-2015.01.02-nostrip.patch
28
Patch2:		kicad-2015.01.02-freerouting.patch
70 29
71
BuildRequires:	cmake
72 30
BuildRequires:	desktop-file-utils
73
BuildRequires:	imagemagick
31
BuildRequires:	wxgtku3.0-devel
74 32
BuildRequires:	boost-devel
75
BuildRequires:	wxgtku2.8-devel
76
BuildRequires:	pkgconfig(gl)
77
BuildRequires:	pkgconfig(glu)
78
Requires:	%{libname} = %{libversion}
79
Requires:	%{docname} = %{docversion}
80
Suggests:	%{name}-locale
81
82
%description
83
Kicad is an open source (GPL) software for the creation of electronic
84
schematic diagrams and printed circuit board artwork.
85
86
Kicad is a set of four softwares and a project manager:
33
BuildRequires:	cmake
34
BuildRequires:	doxygen
35
BuildRequires:	glew-devel
36
BuildRequires:	openssl-devel
87 37
88
	Eeschema :  Schematic entry.
89
	Pcbnew :    Board editor.
90
	Gerbview :  GERBER viewer (photoplotter documents).
91
	Cvpcb :     footprint selector for components used in the circuit design.
92
	Kicad:      project manager.
38
Requires:	electronics-menu
39
Requires:	freerouting
93 40
94
%files
41
%description
42
KiCad is an EDA software to design electronic schematic
43
diagrams and printed circuit board artwork up to 16 layers.
44
KiCad is a set of four softwares and a project manager:
45
- KiCad: project manager
46
- Eeschema: schematic entry
47
- Pcbnew: board editor
48
- Cvpcb: footprint selector for components used in the circuit design
49
- Gerbview: GERBER viewer (photoplotter documents)
50
51
%files -f %{name}.lang
95 52
%{_bindir}/*
96
%{_prefix}/lib/%{name}/plugins/netlist_form_pads-pcb.xsl
97
%{_iconsdir}/*/*/*
98
%{_iconsdir}/%{name}.png
99
%{_liconsdir}/%{name}.png
100
%{_miconsdir}/%{name}.png
101
%{_datadir}/%{name}/demos/
102
%{_datadir}/%{name}/template/
103
%{_datadir}/applications
104
%{_datadir}/mime/packages/kicad.xml
105
%{_datadir}/mimelnk/application/x-kicad-project.desktop
106
%{_datadir}/mimelnk/application/x-kicad-schematic.desktop
53
%{_libdir}/%{name}
54
%{_datadir}/%{name}/
55
%{_datadir}/applications/*.desktop
56
%{_datadir}/icons/hicolor/*/mimetypes/application-x-*.*
57
%{_datadir}/icons/hicolor/*/apps/*.*
58
%{_datadir}/mime/packages/%{name}.xml
59
%{_datadir}/mimelnk/application/x-%{name}-*.desktop
60
#%config(noreplace) %{_sysconfdir}/ld.so.conf.d/kicad.conf
61
%dir %{_docdir}/%{name}/
62
%{_docdir}/%{name}/*.txt
107 63
108 64
#----------------------------------------------------------------------------
109 65
110
%package doc
111
Summary:	Documentation for kicad (creation of electronic schematic diagrams)
112
Version:	%{docversion}
113
Requires:	%{name}
66
%package	doc
67
Summary:	Documentation for KiCad
68
Group:		Documentation
69
License:	GPLv2+
114 70
BuildArch:	noarch
115 71
116
%description doc
117
Kicad is an open source (GPL) software for the creation of electronic
118
schematic diagrams and printed circuit board artwork.
119
120
Kicad-doc is the documentation for kicad.
72
%description	doc
73
Documentation and tutorials for KiCad in English.
121 74
122 75
%files doc
123
%doc %{_datadir}/doc/%{name}
124
125
#----------------------------------------------------------------------------
126
127
%package locales-ca
128
Summary:	Catalan Kicad locales
129
Version:	%{docversion}
130
Requires:	%{name}
131
Provides:	%{name}-locale
132
BuildArch:	noarch
133
134
%description locales-ca
135
Kicad is an open source (GPL) software for the creation of electronic
136
schematic diagrams and printed circuit board artwork.
137
138
Kicad-locales provides Catalan locales for kicad.
139
140
%files locales-ca
141
%{_datadir}/%{name}/internat/ca/
142
143
#----------------------------------------------------------------------------
144
145
%package locales-cs
146
Summary:	Czech Kicad locales
147
Version:	%{docversion}
148
Requires:	%{name}
149
Provides:	%{name}-locale
150
BuildArch:	noarch
151
152
%description locales-cs
153
Kicad is an open source (GPL) software for the creation of electronic
154
schematic diagrams and printed circuit board artwork.
155
156
Kicad-locales provides Czech locales for kicad.
157
158
%files locales-cs
159
%{_datadir}/%{name}/internat/cs/
160
161
#----------------------------------------------------------------------------
162
163
%package locales-de
164
Summary:	German Kicad locales
165
Version:	%{docversion}
166
Requires:	%{name}
167
Provides:	%{name}-locale
168
BuildArch:	noarch
169
170
%description locales-de
171
Kicad is an open source (GPL) software for the creation of electronic
172
schematic diagrams and printed circuit board artwork.
173
174
Kicad-locales provides German locales for kicad.
175
176
%files locales-de
177
%{_datadir}/%{name}/internat/de/
178
179
#----------------------------------------------------------------------------
180
181
%package locales-es
182
Summary:	Spanish Kicad locales
183
Version:	%{docversion}
184
Requires:	%{name}
185
Provides:	%{name}-locale
186
BuildArch:	noarch
187
188
%description locales-es
189
Kicad is an open source (GPL) software for the creation of electronic
190
schematic diagrams and printed circuit board artwork.
191
192
Kicad-locales provides Spanish locales for kicad.
193
194
%files locales-es
195
%{_datadir}/%{name}/internat/es/
196
197
#----------------------------------------------------------------------------
198
199
%package locales-fi
200
Summary:	Finnish Kicad locales
201
Version:	%{docversion}
202
Requires:	%{name}
203
Provides:	%{name}-locale
204
BuildArch:	noarch
205
206
%description locales-fi
207
Kicad is an open source (GPL) software for the creation of electronic
208
schematic diagrams and printed circuit board artwork.
209
210
Kicad-locales provides Finnish locales for kicad.
211
212
%files locales-fi
213
%{_datadir}/%{name}/internat/fi/
76
%dir %{_docdir}/%{name}/
77
%{_docdir}/%{name}/contrib
78
#%{_docdir}/%{name}/help/
79
%{_docdir}/%{name}/help/en
80
%{_docdir}/%{name}/help/file_formats
81
#%{_docdir}/%{name}/tutorials
82
%{_docdir}/%{name}/tutorials/en
83
%{_docdir}/%{name}/scripts
214 84
215 85
#----------------------------------------------------------------------------
216 86
217
%package locales-fr
218
Summary:	French Kicad locales
219
Version:	%{docversion}
220
Requires:	%{name}
221
Provides:	%{name}-locale
87
%package	doc-de
88
Summary:	Documentation for KiCad in German
89
Group:		Documentation
90
Requires:	%{name}-doc = %{version}-%{release}
91
Requires:	locales-de
222 92
BuildArch:	noarch
223 93
224
%description locales-fr
225
Kicad is an open source (GPL) software for the creation of electronic
226
schematic diagrams and printed circuit board artwork.
94
%description	doc-de
95
Documentation and tutorials for KiCad in German
227 96
228
Kicad-locales provides French locales for kicad.
229
230
%files locales-fr
231
%{_datadir}/%{name}/internat/fr/
97
%files doc-de
98
%{_docdir}/%{name}/help/de
99
%{_docdir}/%{name}/tutorials/de
232 100
233 101
#----------------------------------------------------------------------------
234 102
235
%package locales-hu
236
Summary:	Hungarian Kicad locales
237
Version:	%{docversion}
238
Release:	%{release}
239
Requires:	%{name}
240
Provides:	%{name}-locale
103
%package	doc-es
104
Summary:	Documentation for KiCad in Spanish
105
Group:		Documentation
106
Requires:	%{name}-doc = %{version}-%{release}
107
Requires:	locales-es
241 108
BuildArch:	noarch
242 109
243
%description locales-hu
244
Kicad is an open source (GPL) software for the creation of electronic
245
schematic diagrams and printed circuit board artwork.
246
247
Kicad-locales provides Hungarian locales for kicad.
110
%description	doc-es
111
Documentation and tutorials for KiCad in Spanish
248 112
249
%files locales-hu
250
%{_datadir}/%{name}/internat/hu/
113
%files doc-es
114
%{_docdir}/%{name}/help/es
115
%{_docdir}/%{name}/tutorials/es
251 116
252 117
#----------------------------------------------------------------------------
253 118
254
%package locales-it
255
Summary:	Italian Kicad locales
256
Version:	%{docversion}
257
Requires:	%{name}
258
Provides:	%{name}-locale
119
%package	doc-fr
120
Summary:	Documentation for KiCad in French
121
Group:		Documentation
122
Requires:	%{name}-doc = %{version}-%{release}
123
Requires:	locales-fr
259 124
BuildArch:	noarch
260 125
261
%description locales-it
262
Kicad is an open source (GPL) software for the creation of electronic
263
schematic diagrams and printed circuit board artwork.
264
265
Kicad-locales provides Italian locales for kicad.
126
%description	doc-fr
127
Documentation and tutorials for KiCad in French
266 128
267
%files locales-it
268
%{_datadir}/%{name}/internat/it/
129
%files doc-fr
130
%{_docdir}/%{name}/help/fr
131
%{_docdir}/%{name}/tutorials/fr
269 132
270 133
#----------------------------------------------------------------------------
271 134
272
%package locales-ja
273
Summary:	Japanese Kicad locales
274
Version:	%{docversion}
275
Requires:	%{name}
276
Provides:	%{name}-locale
135
%package	doc-hu
136
Summary:	Documentation for KiCad in Hungarian
137
Group:		Documentation
138
Requires:	%{name}-doc = %{version}-%{release}
139
Requires:	locales-hu
277 140
BuildArch:	noarch
278 141
279
%description locales-ja
280
Kicad is an open source (GPL) software for the creation of electronic
281
schematic diagrams and printed circuit board artwork.
142
%description	doc-hu
143
Documentation and tutorials for KiCad in Hungarian
282 144
283
Kicad-locales provides Japanese locales for kicad.
284
285
%files locales-ja
286
%{_datadir}/%{name}/internat/ja/
145
%files doc-hu
146
%{_docdir}/%{name}/tutorials/hu
287 147
288 148
#----------------------------------------------------------------------------
289 149
290
%package locales-ko
291
Summary:	Korean Kicad locales
292
Version:	%{docversion}
293
Requires:	%{name}
294
Provides:	%{name}-locale
150
%package	doc-it
151
Summary:	Documentation for KiCad in Italian
152
Group:		Documentation
153
Requires:	%{name}-doc = %{version}-%{release}
154
Requires:	locales-it
295 155
BuildArch:	noarch
296 156
297
%description locales-ko
298
Kicad is an open source (GPL) software for the creation of electronic
299
schematic diagrams and printed circuit board artwork.
300
301
Kicad-locales provides Korean locales for kicad.
157
%description	doc-it
158
Documentation and tutorials for KiCad in Italian
302 159
303
%files locales-ko
304
%{_datadir}/%{name}/internat/ko/
160
%files doc-it
161
%{_docdir}/%{name}/help/it
162
%{_docdir}/%{name}/tutorials/it
305 163
306 164
#----------------------------------------------------------------------------
307 165
308
%package locales-nl
309
Summary:	Dutch Kicad locales
310
Version:	%{docversion}
311
Requires:	%{name}
312
Provides:	%{name}-locale
166
%package	doc-ja
167
Summary:	Documentation for KiCad in Japanese
168
Group:		Documentation
169
Requires:	%{name}-doc = %{version}-%{release}
170
Requires:	locales-ja
313 171
BuildArch:	noarch
314 172
315
%description locales-nl
316
Kicad is an open source (GPL) software for the creation of electronic
317
schematic diagrams and printed circuit board artwork.
173
%description	doc-ja
174
Documentation and tutorials for KiCad in Japanese
318 175
319
Kicad-locales provides Dutch locales for kicad.
176
%files doc-ja
177
%{_docdir}/%{name}/help/ja
178
%{_docdir}/%{name}/tutorials/ja
320 179
321
%files locales-nl
322
%{_datadir}/%{name}/internat/nl/
323 180
324 181
#----------------------------------------------------------------------------
325 182
326
%package locales-pl
327
Summary:	Polish Kicad locales
328
Version:	%{docversion}
329
Requires:	%{name}
330
Provides:	%{name}-locale
183
%package	doc-pl
184
Summary:	Documentation for KiCad in Polish
185
Group:		Documentation
186
Requires:	%{name}-doc = %{version}-%{release}
187
Requires:	locales-pl
331 188
BuildArch:	noarch
332 189
333
%description locales-pl
334
Kicad is an open source (GPL) software for the creation of electronic
335
schematic diagrams and printed circuit board artwork.
190
%description	doc-pl
191
Documentation and tutorials for KiCad in Polish
336 192
337
Kicad-locales provides Polish locales for kicad.
338
339
%files locales-pl
340
%{_datadir}/%{name}/internat/pl/
193
%files doc-pl
194
%{_docdir}/%{name}/help/pl
195
%{_docdir}/%{name}/tutorials/pl
341 196
342 197
#----------------------------------------------------------------------------
343 198
344
%package locales-pt
345
Summary:	Portuguese Kicad locales
346
Version:	%{docversion}
347
Requires:	%{name}
348
Provides:	%{name}-locale
199
%package	doc-pt
200
Summary:	Documentation for KiCad in Portuguese
201
Group:		Documentation
202
Requires:	%{name}-doc = %{version}-%{release}
203
Requires:	locales-pt
349 204
BuildArch:	noarch
350 205
351
%description locales-pt
352
Kicad is an open source (GPL) software for the creation of electronic
353
schematic diagrams and printed circuit board artwork.
354
355
Kicad-locales provides Portuguese locales for kicad.
206
%description	doc-pt
207
Documentation and tutorials for KiCad in Portuguese
356 208
357
%files locales-pt
358
%{_datadir}/%{name}/internat/pt/
209
%files doc-pt
210
%{_docdir}/%{name}/help/pt
359 211
360 212
#----------------------------------------------------------------------------
361 213
362
%package locales-ru
363
Summary:	Russian Kicad locales
364
Version:	%{docversion}
365
Requires:	%{name}
366
Provides:	%{name}-locale
214
%package	doc-ru
215
Summary:	Documentation for KiCad in Russian
216
Group:		Documentation
217
Requires:	%{name}-doc = %{version}-%{release}
218
Requires:	locales-ru
367 219
BuildArch:	noarch
368 220
369
%description locales-ru
370
Kicad is an open source (GPL) software for the creation of electronic
371
schematic diagrams and printed circuit board artwork.
372
373
Kicad-locales provides Russian locales for kicad.
221
%description	doc-ru
222
Documentation and tutorials for KiCad in Russian
374 223
375
%files locales-ru
376
%{_datadir}/%{name}/internat/ru/
224
%files doc-ru
225
%{_docdir}/%{name}/help/ru
226
%{_docdir}/%{name}/tutorials/ru
377 227
378 228
#----------------------------------------------------------------------------
379 229
380
%package locales-sl
381
Summary:	Slovenian Kicad locales
382
Version:	%{docversion}
383
Requires:	%{name}
384
Provides:	%{name}-locale
230
%package	doc-zh_CN
231
Summary:	Documentation for KiCad in Chinese
232
Group:		Documentation
233
Requires:	%{name}-doc = %{version}-%{release}
234
Requires:	locales-zh
385 235
BuildArch:	noarch
386 236
387
%description locales-sl
388
Kicad is an open source (GPL) software for the creation of electronic
389
schematic diagrams and printed circuit board artwork.
237
%description    doc-zh_CN
238
Documentation and tutorials for KiCad in Chinese
390 239
391
Kicad-locales provides Slovenian locales for kicad.
392
393
%files locales-sl
394
%{_datadir}/%{name}/internat/sl
240
%files doc-zh_CN
241
%{_docdir}/%{name}/tutorials/zh_CN
395 242
396 243
#----------------------------------------------------------------------------
397 244
398
%package locales-sv
399
Summary:	Salvadoran Kicad locales
400
Version:	%{docversion}
401
Requires:	%{name}
402
Provides:	%{name}-locale
403
BuildArch:	noarch
404
405
%description locales-sv
406
Kicad is an open source (GPL) software for the creation of electronic
407
schematic diagrams and printed circuit board artwork.
245
%prep
246
%setup -q -a 1 -a 2 -a 3 -a 7 -a 8
408 247
409
Kicad-locales provides Salvadoran locales for kicad.
248
%patch1 -p1
249
%patch2 -p1
410 250
411
%files locales-sv
412
%{_datadir}/%{name}/internat/sv/
251
#kicad-doc.noarch: W: file-not-utf8 /usr/share/doc/kicad/AUTHORS.txt
252
iconv -f iso8859-1 -t utf-8 AUTHORS.txt > AUTHORS.conv && mv -f AUTHORS.conv AUTHORS.txt
413 253
414
#----------------------------------------------------------------------------
415
416
%package locales-zh-cn
417
Summary:	Chinese Kicad locales
418
Version:	%{docversion}
419
Requires:	%{name}
420
Provides:	%{name}-locale
421
BuildArch:	noarch
422 254
423
%description locales-zh-cn
424
Kicad is an open source (GPL) software for the creation of electronic
425
schematic diagrams and printed circuit board artwork.
255
#multilibs
256
%ifarch x86_64 sparc64 ppc64 amd64 s390x
257
%{__sed} -i "s|KICAD_PLUGINS lib/kicad/plugins|KICAD_PLUGINS lib64/kicad/plugins|" CMakeLists.txt
258
#%{__sed} -i "s|/usr/lib/kicad|/usr/lib64/kicad|" %{SOURCE3}
259
%endif
426 260
427
Kicad-locales provides Chinese locales for kicad.
428 261
429
%files locales-zh-cn
430
%{_datadir}/%{name}/internat/zh_CN/
262
%build
431 263
432
#----------------------------------------------------------------------------
264
# Add Epcos library
265
cd Epcos-MKT-1.0
266
cp -pR library ../%{name}-libraries-%{version}/
267
cp -pR modules ../%{name}-libraries-%{version}/
268
cd ..
433 269
434
%package library
435
Summary:	Library for kicad (creation of electronic schematic diagrams)
436
Version:	%{libversion}
437
Requires:	%{name}
438
BuildArch:	noarch
270
# Add Walter libraries
271
cd %{name}-walter-libraries-%{version}
272
cp -pR library ../%{name}-libraries-%{version}/
273
cp -pR modules ../%{name}-libraries-%{version}/
274
cd ..
439 275
440
%description library
441
Kicad is an open source (GPL) software for the creation of electronic
442
schematic diagrams and printed circuit board artwork.
276
#
277
# Symbols libraries
278
#
279
pushd %{name}-libraries-%{version}/
280
%cmake -DKICAD_STABLE_VERSION=OFF
281
%make -j1 VERBOSE=1
282
popd
443 283
444
Kicad-library is a set of library needed by kicad.
445 284
446
%files library
447
%{_datadir}/%{name}/library
448
%{_datadir}/%{name}/modules
285
#
286
# Core components
287
#
288
%cmake -DKICAD_STABLE_VERSION=OFF -DKICAD_SKIP_BOOST=ON \
289
        -DwxWidgets_CONFIG_EXECUTABLE=%{_bindir}/wx-config
290
%make VERBOSE=1
449 291
450
#----------------------------------------------------------------------------
451 292
452
%prep
453
%setup -q -T -b 0 -n %{name}
454
%setup -q -T -b 1 -n %{docname}
455
%setup -q -T -b 2 -n %{libname}
456
pushd ../%{name}
457
%patch11 -p0 -b .fix-linking1
458
%patch12 -p0 -b .gcc-4.7
459
%patch13 -p0 -b .fix-linking2
460
%patch14 -p1 -b .fix-bom-in-python
461
%patch20 -p0 -b .fix-plotting-scale
462
%patch21 -p0 -b .junction-button
463
%patch22 -p0 -b .thermal-relief
464
%patch23 -p1 -b .undo-redo
465
%patch24 -p1 -b .cvpcb-preview
466
%patch25 -p0 -b .pcb-calculation
467
%patch26 -p1 -b .width-correction
468
popd
293
%install
294
%makeinstall_std -C build
295
296
# install localization
297
cd %{name}-doc-%{version}/internat
298
for dir in bg ca cs de es fr hu it ko nl pl pt ru sl sv zh_CN
299
do
300
  install -m 644 -D ${dir}/%{name}.mo %{buildroot}%{_datadir}/locale/${dir}/LC_MESSAGES/%{name}.mo
301
done
302
cd ../..
303
304
305
# install desktop
306
for desktopfile in %{buildroot}%{_datadir}/applications/*.desktop ; do
307
  desktop-file-install \
308
  --dir %{buildroot}%{_datadir}/applications \
309
  --remove-category Development              \
310
  --delete-original                          \
311
  ${desktopfile}
312
done
469 313
470
%build
471
export LC_ALL=C
472
cd ../
473
474
# Building kicad-doc
475
pushd %{docname}
476
	%cmake \
477
		-DKICAD_STABLE_VERSION:BOOL=ON \
478
		-DCMAKE_BUILD_TYPE=Release
479
	%make
314
#
315
# Symbols libraries
316
#
317
pushd %{name}-libraries-%{version}/
318
%makeinstall_std -C build
480 319
popd
481 320
482
# Building kicad-library
483
pushd %{libname}
484
	%cmake \
485
		-DKICAD_STABLE_VERSION:BOOL=ON \
486
		-DCMAKE_BUILD_TYPE=Release
487
	%make
488
popd
321
# install template
322
install -d %{buildroot}%{_datadir}/%{name}/template
323
install -m 644 template/%{name}.pro %{buildroot}%{_datadir}/%{name}/template
489 324
490
# Building kicad
491
pushd %{name}
492
	%cmake \
493
		-DBUILD_SHARED_LIBS:BOOL=OFF \
494
		-DKICAD_STABLE_VERSION:BOOL=ON \
495
		-DCMAKE_BUILD_TYPE=Release
496
	%make
325
# Footprints
326
pushd %{name}-footprints-%{version}/
327
cp -a */ %{buildroot}%{_datadir}/%{name}/modules
497 328
popd
329
ln -f %{buildroot}%{_datadir}/%{name}/template/fp-lib-table{.for-pretty,}
498 330
499
%install
500
cd ../
331
# Preparing for documentation pull-ups
332
rm -f  %{name}-doc-%{version}/doc/help/CMakeLists.txt
333
rm -f  %{name}-doc-%{version}/doc/help/makefile
334
rm -f  %{name}-doc-%{version}/doc/tutorials/CMakeLists.txt
501 335
502
# Installing kicad-doc
503
pushd %{docname}
504
	%makeinstall_std -C build
505
popd
336
cp -pr %{name}-doc-%{version}/doc/* %{buildroot}%{_docdir}/%{name}
337
cp -pr AUTHORS.txt CHANGELOG* %{buildroot}%{_docdir}/%{name}
506 338
507
# Installing kicad-library
508
pushd %{libname}
509
	%makeinstall_std -C build
510
popd
511
512
# Installing kicad
513
pushd %{name}
514
	%makeinstall_std -C build
515
516
	# create desktop file
517
	desktop-file-install --vendor='' \
518
		--remove-category='Scientific' \
519
		--add-category='Science;Electronics;Education' \
520
		--dir=%{buildroot}%{_datadir}/applications \
521
		%{buildroot}%{_datadir}/applications/*.desktop
522
523
	# create icons
524
	mkdir -p %{buildroot}%{_miconsdir} %{buildroot}%{_iconsdir} %{buildroot}%{_liconsdir}
525
	convert -resize 16x16 %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %{buildroot}%{_miconsdir}/%{name}.png
526
	convert -resize 32x32 %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %{buildroot}%{_iconsdir}/%{name}.png
527
	convert -resize 48x48 %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %{buildroot}%{_liconsdir}/%{name}.png
528
popd
339
%find_lang %{name}
529 340

Comments