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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Jul 31 16:50:33 2014 UTC (6 years, 4 months ago) by tomjbe
Branch: MAIN
Changes since 1.1: +3 -2 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-20140316.ebuild,v 1.1 2014/05/12 06:13:24 tomjbe Exp $
4
5 EAPI="5"
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 DOCS="AUTHORS README NEWS ChangeLog"
52
53 pkg_setup() {
54 if use gtk && use motif; then
55 elog "Can only build for GTK+ or Motif/Lesstif GUI. GTK+ has priority."
56 fi
57 if !(use gtk || use motif); then
58 elog "Building without GUI, make sure you know what you are doing."
59 fi
60 if use dbus && !(use gtk || use motif); then
61 elog "dbus needs GTK or Motif/Lesstif GUI. Try USE=-dbus or USE=gtk or USE=motif."
62 fi
63 if use opengl && !(use gtk); then
64 elog "GL drawing needs GTK"
65 fi
66 if (use gtk || (! use gtk && ! use motif)) && (use xrender); then
67 elog "The XRender extension is only usable with the Motif/Lesstif GUI."
68 fi
69 }
70
71 src_prepare() {
72 if use test; then
73 # adapt the list of tests to run according to USE flag settings
74 if ! use png; then
75 sed -i '/^hid_png/d' tests/tests.list || die
76 fi
77 if ! use gcode; then
78 sed -i '/^hid_gcode/d' tests/tests.list || die
79 fi
80 fi
81 # Backport from upstream
82 # http://git.geda-project.org/pcb/commit/?id=a34b40add60310a51780f359cc90d9c5ee75752c
83 # (do not install static GTS library)
84 sed -i -e 's/lib_LIBRARIES/noinst_LIBRARIES/' -e 's/include_HEADERS/noinst_HEADERS/' gts/Makefile.am || die
85
86 # fix bad syntax in Makefile.am and configure.ac before running eautoreconf
87 sed -i -e 's/:=/=/' Makefile.am || die
88 epatch "${FILESDIR}"/${PN}-20110918-fix-config.diff
89 eautoreconf
90 }
91
92 src_configure() {
93 local myconf
94 if use gtk ; then
95 myconf="--with-gui=gtk $(use_enable dbus) $(use_enable opengl gl) --disable-xrender"
96 elif use motif ; then
97 myconf="--with-gui=lesstif $(use_enable dbus) $(use_enable xrender)"
98 else
99 myconf="--with-gui=batch --disable-xrender --disable-dbus"
100 fi
101
102 local exporters="bom gerber ps"
103 if (use png || use jpeg || use gif) ; then
104 exporters="${exporters} png"
105 fi
106 use nelma && exporters="${exporters} nelma"
107 use gcode && exporters="${exporters} gcode"
108 use tk || export WISH="${EPREFIX}/bin/true"
109
110 econf \
111 ${myconf} \
112 $(use_enable doc) \
113 $(use_enable gif) \
114 $(use_enable jpeg) \
115 $(use_enable png) \
116 $(use_enable m4lib-png) \
117 $(use_enable toporouter) \
118 $(use_enable debug) \
119 --enable-nls \
120 --disable-toporouter-output \
121 --with-exporters="${exporters}" \
122 --disable-dependency-tracking \
123 --disable-rpath \
124 --disable-update-mime-database \
125 --disable-update-desktop-database \
126 --docdir="${EPREFIX}/usr/share/doc/${PF}"
127 }
128 # toporouter-output USE flag removed, there seems to be no result
129 # $(use_enable toporouter-output) \
130
131 src_compile() {
132 emake AR="$(tc-getAR)"
133 }
134
135 pkg_preinst() {
136 gnome2_icon_savelist
137 }
138
139 pkg_postinst() {
140 fdo-mime_desktop_database_update
141 fdo-mime_mime_database_update
142 gnome2_icon_cache_update
143 }
144
145 pkg_postrm() {
146 fdo-mime_desktop_database_update
147 fdo-mime_mime_database_update
148 gnome2_icon_cache_update
149 }

  ViewVC Help
Powered by ViewVC 1.1.20