/[gentoo-x86]/sci-electronics/eagle/eagle-5.11.0.ebuild
Gentoo

Contents of /sci-electronics/eagle/eagle-5.11.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Sat Jul 11 22:20:49 2015 UTC (3 years, 2 months ago) by idl0r
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +2 -2 lines
Version bump. Add new license for 7.3.0. Add RESTRICT="mirror bindist" due to license restrictions, thanks to Ulrich Müller <ulm@gentoo.org>! Cleanup. Also fixes bug 545064.

(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key B427ABC8)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-electronics/eagle/eagle-5.11.0.ebuild,v 1.8 2015/06/14 18:51:43 ulm Exp $
4
5 EAPI=5
6
7 inherit eutils
8
9 DESCRIPTION="CadSoft EAGLE schematic and printed circuit board (PCB) layout editor"
10 HOMEPAGE="http://www.cadsoft.de"
11
12 KEYWORDS="amd64 x86"
13 IUSE="doc linguas_de linguas_zh"
14 LICENSE="cadsoft"
15 RESTRICT="strip test mirror bindist"
16 SLOT="0"
17
18 SRC_URI="ftp://ftp.cadsoft.de/eagle/program/${PV%\.[0-9]}/${PN}-lin-${PV}.run"
19
20 QA_FLAGS_IGNORED="opt/eagle-${PV}/bin/eagle"
21
22 RDEPEND="
23 sys-libs/glibc
24 || ( virtual/jpeg:62[abi_x86_32(-)] media-libs/jpeg:62[abi_x86_32(-)] )
25 >=media-libs/libpng-1.2.51:1.2[abi_x86_32(-)]
26 >=dev-libs/openssl-0.9.8z_p1-r2:0.9.8[abi_x86_32(-)]
27 x11-libs/libXext[abi_x86_32(-)]
28 x11-libs/libX11[abi_x86_32(-)]
29 x11-libs/libXau[abi_x86_32(-)]
30 x11-libs/libXdmcp[abi_x86_32(-)]
31 "
32
33 # Append ${PV} since that's what upstream installs to
34 INSTALLDIR="/opt/eagle-${PV}"
35 case "${LINGUAS}" in
36 *de*)
37 MY_LANG="de";;
38 *)
39 MY_LANG="en";;
40 esac
41 # Mandatory documentation being installed
42 DOCS="README_${MY_LANG} UPDATE_${MY_LANG} library_${MY_LANG}.txt"
43
44 src_unpack() {
45 # Extract the built-in .tar.bz2 file starting at __DATA__
46 sed -e '1,/^__DATA__$/d' "${DISTDIR}/${A}" | tar xj || die "unpacking failed"
47 }
48
49 src_install() {
50 # Set MY_LANG for this function only since UPDATE_zh and README_zh
51 # don't exist
52 [[ ${LINGUAS} == *zh* ]] && MY_INST_LANG="zh" || MY_INST_LANG="${MY_LANG}"
53
54 dodir ${INSTALLDIR}
55 # Copy all to INSTALLDIR
56 cp -r . "${D}"/${INSTALLDIR} || die
57
58 # Install wrapper (suppressing leading tabs)
59 # see bug #188368 or http://www.cadsoft.de/faq.htm#17040701
60 newbin "${FILESDIR}/eagle_wrapper_script" eagle-${PV}
61 dosym eagle-${PV} /usr/bin/eagle
62 # Finally, append the path of the eagle binary respecting INSTALLDIR and any
63 # arguments passed to the script (thanks Denilson)
64 echo "${INSTALLDIR}/bin/eagle" '"$@"' >> "${D}/usr/bin/eagle-${PV}"
65
66 # Install the documentation
67 cd doc || die
68 dodoc ${DOCS}
69 doman eagle.1
70 # Install extra documentation if requested
71 use doc && dodoc elektro-tutorial.pdf manual_${MY_INST_LANG}.pdf tutorial_${MY_INST_LANG}.pdf
72 # Remove docs left in INSTALLDIR
73 rm -rf "${D}${INSTALLDIR}/doc" || die
74 cd .. || die
75
76 echo -e "ROOTPATH=${INSTALLDIR}/bin\nPRELINK_PATH_MASK=${INSTALLDIR}" > "${S}/90eagle-${PV}"
77 doenvd "${S}/90eagle-${PV}"
78
79 # Create desktop entry
80 mv bin/${PN}icon50.png bin/${PF}-icon50.png || die
81 doicon bin/${PF}-icon50.png
82 make_desktop_entry "${ROOT}/usr/bin/eagle-${PV}" "CadSoft EAGLE Layout Editor" ${PF}-icon50 "Graphics;Electronics"
83 }
84
85 pkg_postinst() {
86 elog "Run \`env-update && source /etc/profile\` from within \${ROOT}"
87 elog "now to set up the correct paths."
88 elog "You must first run eagle as root to invoke product registration."
89 echo
90 ewarn "Due to some necessary changes in the data structure, once you edit"
91 ewarn "a file with version 5.x you will no longer be able to edit it"
92 ewarn "with versions prior to 5.0!"
93 ewarn
94 ewarn "Please read /usr/share/doc/${PF}/UPDATE_${MY_LANG} if you are upgrading from 4.xx."
95 }

  ViewVC Help
Powered by ViewVC 1.1.20