Gentoo Archives: gentoo-commits

From: Thomas Beierlein <tomjbe@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-electronics/drawtiming/files/, sci-electronics/drawtiming/
Date: Mon, 05 Jun 2017 16:57:34
Message-Id: 1496681822.f61eaf087ab2663833f24157f815c4e3e2c4da87.tomjbe@gentoo
1 commit: f61eaf087ab2663833f24157f815c4e3e2c4da87
2 Author: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 5 16:55:00 2017 +0000
4 Commit: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 5 16:57:02 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f61eaf08
7
8 sci-electronics/drawtiming: Let package compile with >=imagemagick-7 (bug #595222). Thanks Toralf.
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.2
11
12 .../drawtiming/drawtiming-0.7.1-r2.ebuild | 37 ++++++
13 .../files/drawtiming-0.7.1-imagemagick-7.patch | 137 +++++++++++++++++++++
14 2 files changed, 174 insertions(+)
15
16 diff --git a/sci-electronics/drawtiming/drawtiming-0.7.1-r2.ebuild b/sci-electronics/drawtiming/drawtiming-0.7.1-r2.ebuild
17 new file mode 100644
18 index 00000000000..baa109d58d3
19 --- /dev/null
20 +++ b/sci-electronics/drawtiming/drawtiming-0.7.1-r2.ebuild
21 @@ -0,0 +1,37 @@
22 +# Copyright 1999-2017 Gentoo Foundation
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=5
26 +
27 +inherit autotools eutils
28 +
29 +DESCRIPTION="Command line tool for drawing timing diagrams"
30 +HOMEPAGE="http://drawtiming.sourceforge.net/index.html"
31 +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
32 +
33 +LICENSE="GPL-2"
34 +SLOT="0"
35 +KEYWORDS="~amd64 ~x86"
36 +IUSE="examples"
37 +
38 +DEPEND="media-gfx/imagemagick[cxx]"
39 +RDEPEND="${DEPEND}"
40 +
41 +src_prepare() {
42 + mv "${S}"/configure.in "${S}"/configure.ac
43 + epatch "${FILESDIR}"/${P}-gcc43.patch \
44 + "${FILESDIR}"/${P}-ldflags.patch
45 + if has_version ">=media-gfx/imagemagick-7.0.5.7" ;then
46 + epatch "${FILESDIR}"/${P}-imagemagick-7.patch
47 + fi
48 + eautoreconf
49 +}
50 +
51 +src_install() {
52 + emake DESTDIR="${D}" install
53 + dodoc AUTHORS ChangeLog README THANKS
54 + if use examples; then
55 + insinto "/usr/share/doc/${PF}/examples"
56 + doins samples/*.txt
57 + fi
58 +}
59
60 diff --git a/sci-electronics/drawtiming/files/drawtiming-0.7.1-imagemagick-7.patch b/sci-electronics/drawtiming/files/drawtiming-0.7.1-imagemagick-7.patch
61 new file mode 100644
62 index 00000000000..8f075a57200
63 --- /dev/null
64 +++ b/sci-electronics/drawtiming/files/drawtiming-0.7.1-imagemagick-7.patch
65 @@ -0,0 +1,137 @@
66 +diff -u drawtiming-0.7.1.old/configure.in drawtiming-0.7.1/configure.in
67 +--- drawtiming-0.7.1.old/configure.ac 2009-04-03 02:59:52.000000000 +0000
68 ++++ drawtiming-0.7.1/configure.ac 2017-06-01 15:20:15.168508458 +0000
69 +@@ -15,7 +15,7 @@
70 + [], [with_magick=check])
71 +
72 + AS_IF([test "x$with_magick" != "xno"],
73 +- [PKG_CHECK_MODULES([MAGICK], [ImageMagick++])],
74 ++ [PKG_CHECK_MODULES([MAGICK], [Magick++])],
75 + [AC_DEFINE([LITE],[1],[Build without ImageMagick])])
76 +
77 + AC_OUTPUT(Makefile drawtiming.spec src/Makefile doc/Makefile samples/Makefile)
78 +diff -u -r drawtiming-0.7.1.old/src/timing.cc drawtiming-0.7.1/src/timing.cc
79 +--- drawtiming-0.7.1.old/src/timing.cc 2017-06-05 15:36:36.603638861 +0000
80 ++++ drawtiming-0.7.1/src/timing.cc 2017-06-02 12:48:03.523309638 +0000
81 +@@ -517,7 +517,7 @@
82 + // ------------------------------------------------------------
83 +
84 + static void draw_dependency (gc &gc, int x0, int y0, int x1, int y1) {
85 +- list<Coordinate> shaft, head;
86 ++ vector<Coordinate> shaft, head;
87 +
88 + gc.push ();
89 + gc.stroke_color ("blue");
90 +@@ -571,7 +571,7 @@
91 +
92 + static void draw_delay (gc &gc, int x0, int y0, int x1, int y1, int y2,
93 + const string &text) {
94 +- list<Coordinate> head;
95 ++ vector<Coordinate> head;
96 +
97 + gc.push ();
98 + gc.stroke_color ("blue");
99 +@@ -688,7 +688,7 @@
100 +
101 + // ------------------------------------------------------------
102 +
103 +-void magick_gc::bezier (const std::list<Magick::Coordinate> &points) {
104 ++void magick_gc::bezier (const std::vector<Magick::Coordinate> &points) {
105 + drawables.push_back (DrawableBezier (points));
106 + }
107 +
108 +@@ -724,7 +724,7 @@
109 +
110 + // ------------------------------------------------------------
111 +
112 +-void magick_gc::polygon (const std::list<Magick::Coordinate> &points)
113 ++void magick_gc::polygon (const std::vector<Magick::Coordinate> &points)
114 + {
115 + drawables.push_back (DrawablePolygon (points));
116 + }
117 +diff -u -r drawtiming-0.7.1.old/src/timing.h drawtiming-0.7.1/src/timing.h
118 +--- drawtiming-0.7.1.old/src/timing.h 2009-04-03 03:02:40.000000000 +0000
119 ++++ drawtiming-0.7.1/src/timing.h 2017-06-02 12:49:35.780468543 +0000
120 +@@ -129,13 +129,13 @@
121 + gc (void) : width(0), height(0) { }
122 + virtual ~gc() { }
123 +
124 +- virtual void bezier (const std::list<Magick::Coordinate> &points) = 0;
125 ++ virtual void bezier (const std::vector<Magick::Coordinate> &points) = 0;
126 + virtual void fill_color (const std::string &name) = 0;
127 + virtual void fill_opacity (int op) = 0;
128 + virtual void font (const std::string &name) = 0;
129 + virtual void line (int x1, int y1, int x2, int y2) = 0;
130 + virtual void point_size (int size) = 0;
131 +- virtual void polygon (const std::list<Magick::Coordinate> &points) = 0;
132 ++ virtual void polygon (const std::vector<Magick::Coordinate> &points) = 0;
133 + virtual void pop (void) = 0;
134 + virtual void push (void) = 0;
135 + virtual void scaling (double hscale, double vscale) = 0;
136 +@@ -146,18 +146,18 @@
137 +
138 + #ifndef LITE
139 + class magick_gc : public gc {
140 +- std::list<Magick::Drawable> drawables;
141 ++ std::vector<Magick::Drawable> drawables;
142 +
143 + public:
144 + ~magick_gc (void);
145 +
146 +- void bezier (const std::list<Magick::Coordinate> &points);
147 ++ void bezier (const std::vector<Magick::Coordinate> &points);
148 + void fill_color (const std::string &name);
149 + void fill_opacity (int op);
150 + void font (const std::string &name);
151 + void line (int x1, int y1, int x2, int y2);
152 + void point_size (int size);
153 +- void polygon (const std::list<Magick::Coordinate> &points);
154 ++ void polygon (const std::vector<Magick::Coordinate> &points);
155 + void pop (void);
156 + void push (void);
157 + void scaling (double hscale, double vscale);
158 +diff -u -r drawtiming-0.7.1.old/src/timing.cc drawtiming-0.7.1/src/timing.cc
159 +--- drawtiming-0.7.1.old/src/timing.cc 2017-06-05 15:36:36.603638861 +0000
160 ++++ drawtiming-0.7.1/src/timing.cc 2017-06-02 12:48:03.523309638 +0000
161 +@@ -790,8 +790,8 @@
162 +
163 + // ------------------------------------------------------------
164 +
165 +-void postscript_gc::bezier (const std::list<Magick::Coordinate> &points) {
166 +- std::list<Magick::Coordinate>::const_iterator i = points.begin();
167 ++void postscript_gc::bezier (const std::vector<Magick::Coordinate> &points) {
168 ++ std::vector<Magick::Coordinate>::const_iterator i = points.begin();
169 +
170 + ps_text << "newpath\n";
171 + ps_text << i->x () << ' ' << (height - i->y ()) << " moveto\n";
172 +@@ -840,9 +840,9 @@
173 +
174 + // ------------------------------------------------------------
175 +
176 +-void postscript_gc::polygon (const std::list<Magick::Coordinate> &points) {
177 ++void postscript_gc::polygon (const std::vector<Magick::Coordinate> &points) {
178 + static const char *ops[] = {"stroke", "fill"};
179 +- std::list<Magick::Coordinate>::const_iterator i;
180 ++ std::vector<Magick::Coordinate>::const_iterator i;
181 + int j;
182 +
183 + for (j = 0; j < 2; j++) {
184 +diff -u -r drawtiming-0.7.1.old/src/timing.h drawtiming-0.7.1/src/timing.h
185 +--- drawtiming-0.7.1.old/src/timing.h 2009-04-03 03:02:40.000000000 +0000
186 ++++ drawtiming-0.7.1/src/timing.h 2017-06-02 12:49:35.780468543 +0000
187 +@@ -176,13 +176,13 @@
188 + postscript_gc (void);
189 + ~postscript_gc (void);
190 +
191 +- void bezier (const std::list<Magick::Coordinate> &points);
192 ++ void bezier (const std::vector<Magick::Coordinate> &points);
193 + void fill_color (const std::string &name);
194 + void fill_opacity (int op);
195 + void font (const std::string &name);
196 + void line (int x1, int y1, int x2, int y2);
197 + void point_size (int size);
198 +- void polygon (const std::list<Magick::Coordinate> &points);
199 ++ void polygon (const std::vector<Magick::Coordinate> &points);
200 + void pop (void);
201 + void push (void);
202 + void scaling (double hscale, double vscale);