/[gentoo-x86]/sci-electronics/pcb/pcb-20110918.ebuild
Gentoo

Contents of /sci-electronics/pcb/pcb-20110918.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Thu Jul 31 16:50:33 2014 UTC (6 years, 4 months ago) by tomjbe
Branch: MAIN
Changes since 1.8: +4 -3 lines
Add missing depend (bug #514844). Thanks Patrick

(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 0x762053D5)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-electronics/pcb/pcb-20110918.ebuild,v 1.8 2013/01/04 12:58:37 ago Exp $
4
5 EAPI="3"
6
7 inherit autotools eutils fdo-mime gnome2-utils toolchain-funcs
8
9 DESCRIPTION="GPL Electronic Design Automation: Printed Circuit Board editor"
10 HOMEPAGE="http://www.gpleda.org/"
11 SRC_URI="mirror://sourceforge/pcb/pcb/${P}/${P}.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="amd64 ppc x86 ~x86-macos"
16 IUSE="dbus debug doc gcode gif gtk jpeg m4lib-png motif nelma opengl png
17 test tk toporouter xrender"
18 # toporouter-output USE flag removed, there seems to be no result
19
20 CDEPEND="dev-libs/glib:2
21 gif? ( >=media-libs/gd-2.0.23 )
22 gtk? ( x11-libs/gtk+:2 x11-libs/pango
23 x11-libs/gtkglext
24 dbus? ( sys-apps/dbus ) )
25 jpeg? ( >=media-libs/gd-2.0.23[jpeg] )
26 motif? ( !gtk? (
27 >=x11-libs/motif-2.3:0
28 dbus? ( sys-apps/dbus )
29 xrender? ( >=x11-libs/libXrender-0.9 ) ) )
30 nelma? ( >=media-libs/gd-2.0.23 )
31 opengl? ( virtual/opengl )
32 gcode? ( >=media-libs/gd-2.0.23 )
33 virtual/libintl
34 png? ( >=media-libs/gd-2.0.23[png] )
35 m4lib-png? ( >=media-libs/gd-2.0.23[png] )
36 tk? ( >=dev-lang/tk-8 )"
37 #toporouter-output? ( x11-libs/cairo )
38
39 DEPEND="${CDEPEND}
40 test? (
41 || ( media-gfx/graphicsmagick[imagemagick] media-gfx/imagemagick )
42 sci-electronics/gerbv
43 )
44 >=dev-util/intltool-0.35
45 virtual/pkgconfig
46 sys-devel/gettext"
47
48 RDEPEND="${CDEPEND}
49 sci-electronics/electronics-menu"
50
51 pkg_setup() {
52 if use gtk && use motif; then
53 elog "Can only build for GTK+ or Motif/Lesstif GUI. GTK+ has priority."
54 fi
55 if !(use gtk || use motif); then
56 elog "Building without GUI, make sure you know what you are doing."
57 fi
58 if use dbus && !(use gtk || use motif); then
59 elog "dbus needs GTK or Motif/Lesstif GUI. Try USE=-dbus or USE=gtk or USE=motif."
60 fi
61 if use opengl && !(use gtk); then
62 elog "GL drawing needs GTK"
63 fi
64 if (use gtk || (! use gtk && ! use motif)) && (use xrender); then
65 elog "The XRender extension is only usable with the Motif/Lesstif GUI."
66 fi
67 }
68
69 src_prepare() {
70 if use test; then
71 # adapt the list of tests to run according to USE flag settings
72 if ! use png; then
73 sed -i '/^hid_png/d' tests/tests.list || die
74 fi
75 if ! use gcode; then
76 sed -i '/^hid_gcode/d' tests/tests.list || die
77 fi
78 fi
79 # Backport from upstream
80 # http://git.geda-project.org/pcb/commit/?id=a34b40add60310a51780f359cc90d9c5ee75752c
81 # (do not install static GTS library)
82 sed -i -e 's/lib_LIBRARIES/noinst_LIBRARIES/' -e 's/include_HEADERS/noinst_HEADERS/' gts/Makefile.am || die
83
84 # fix bad syntax in Makefile.am and configure.ac before running eautoreconf
85 sed -i -e 's/:=/=/' Makefile.am || die
86 epatch "${FILESDIR}"/${P}-fix-config.diff
87 eautoreconf
88 }
89
90 src_configure() {
91 local myconf
92 if use gtk ; then
93 myconf="--with-gui=gtk $(use_enable dbus) $(use_enable opengl gl) --disable-xrender"
94 elif use motif ; then
95 myconf="--with-gui=lesstif $(use_enable dbus) $(use_enable xrender)"
96 else
97 myconf="--with-gui=batch --disable-xrender --disable-dbus"
98 fi
99
100 local exporters="bom gerber ps"
101 if (use png || use jpeg || use gif) ; then
102 exporters="${exporters} png"
103 fi
104 use nelma && exporters="${exporters} nelma"
105 use gcode && exporters="${exporters} gcode"
106 use tk || export WISH="${EPREFIX}/bin/true"
107
108 econf \
109 ${myconf} \
110 $(use_enable doc) \
111 $(use_enable gif) \
112 $(use_enable jpeg) \
113 $(use_enable png) \
114 $(use_enable m4lib-png) \
115 $(use_enable toporouter) \
116 $(use_enable debug) \
117 --enable-nls \
118 --disable-toporouter-output \
119 --with-exporters="${exporters}" \
120 --disable-dependency-tracking \
121 --disable-rpath \
122 --disable-update-mime-database \
123 --disable-update-desktop-database \
124 --docdir="${EPREFIX}/usr/share/doc/${PF}"
125 }
126 # toporouter-output USE flag removed, there seems to be no result
127 # $(use_enable toporouter-output) \
128
129 src_compile() {
130 emake AR="$(tc-getAR)"
131 }
132
133 src_install() {
134 emake DESTDIR="${D}" install || die "install failed"
135 dodoc AUTHORS README NEWS ChangeLog
136 }
137
138 pkg_preinst() {
139 gnome2_icon_savelist
140 }
141
142 pkg_postinst() {
143 fdo-mime_desktop_database_update
144 fdo-mime_mime_database_update
145 gnome2_icon_cache_update
146 }
147
148 pkg_postrm() {
149 fdo-mime_desktop_database_update
150 fdo-mime_mime_database_update
151 gnome2_icon_cache_update
152 }

  ViewVC Help
Powered by ViewVC 1.1.20