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

Contents of /sci-electronics/eagle/eagle-6.2.1_beta.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Apr 21 19:50:41 2013 UTC (4 weeks, 3 days ago) by mgorny
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +17 -5 lines
Support multilib libraries alternatively to emul-linux-x86-xlibs.

(Portage version: 2.2.0_alpha173/cvs/Linux x86_64, signed Manifest commit with key 9627F456F9DA7643!)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-electronics/eagle/eagle-6.2.1_beta.ebuild,v 1.1 2012/07/07 13:00:07 xmw Exp $
4
5 EAPI="4"
6
7 inherit eutils
8
9 DESCRIPTION="CadSoft EAGLE schematic and printed circuit board (PCB) layout editor"
10 HOMEPAGE="http://www.cadsoft.de"
11 SRC_URI="ftp://ftp.cadsoft.de/${PN}/betatest/${PN}-lin-${PV/_beta/-beta}.run"
12
13 LICENSE="cadsoft"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86 -*"
16 IUSE="doc linguas_de linguas_zh"
17
18 RESTRICT="strip"
19
20 QA_PREBUILT="opt/eagle-${PV}/bin/eagle"
21
22 RDEPEND="sys-libs/glibc
23 x86? (
24 sys-libs/zlib
25 x11-libs/libX11
26 x11-libs/libXext
27 x11-libs/libXrender
28 x11-libs/libXrandr
29 x11-libs/libXcursor
30 x11-libs/libXi
31 media-libs/freetype
32 media-libs/fontconfig
33 dev-libs/openssl
34 virtual/jpeg
35 )
36 amd64? (
37 app-emulation/emul-linux-x86-baselibs
38 || (
39 (
40 x11-libs/libX11[abi_x86_32]
41 x11-libs/libXext[abi_x86_32]
42 x11-libs/libXrender[abi_x86_32]
43 x11-libs/libXrandr[abi_x86_32]
44 x11-libs/libXcursor[abi_x86_32]
45 x11-libs/libXi[abi_x86_32]
46 media-libs/freetype[abi_x86_32]
47 media-libs/fontconfig[abi_x86_32]
48 )
49 app-emulation/emul-linux-x86-xlibs
50 )
51 )"
52
53 S=${WORKDIR}/${P/_beta/}
54
55 # Append ${PV} since that's what upstream installs to
56 case "${LINGUAS}" in
57 *de*)
58 MY_LANG="de";;
59 *)
60 MY_LANG="en";;
61 esac
62
63 src_unpack() {
64 # Extract the built-in .tar.bz2 file starting at __DATA__
65 sed -e '1,/^__DATA__$/d' "${DISTDIR}/${A}" | tar xj || die "unpacking failed"
66 }
67
68 src_install() {
69 local installdir="/opt/eagle-${PV}"
70
71 # Set MY_LANG for this function only since UPDATE_zh and README_zh
72 # don't exist
73 [[ ${LINGUAS} == *zh* ]] && MY_INST_LANG="zh" || MY_INST_LANG="${MY_LANG}"
74
75 insinto $installdir
76 doins -r .
77
78 fperms 0755 ${installdir}/bin/eagle
79
80 # Install wrapper (suppressing leading tabs)
81 # see bug #188368 or http://www.cadsoftusa.com/training/faq/#3
82 exeinto /opt/bin
83 newexe "${FILESDIR}/eagle_wrapper_script" eagle
84 # Finally, append the path of the eagle binary respecting $installdir and any
85 # arguments passed to the script (thanks Denilson)
86 echo "${installdir}/bin/eagle" '"$@"' >> "${D}/opt/bin/eagle"
87
88 # Install the documentation
89 cd doc
90 dodoc README_${MY_LANG} UPDATE_${MY_LANG} library_${MY_LANG}.txt
91 doman eagle.1
92 # Install extra documentation if requested
93 if use doc; then
94 dodoc {connect-device-split-symbol-${MY_INST_LANG},elektro-tutorial,manual_${MY_INST_LANG},tutorial_${MY_INST_LANG}}.pdf
95 fi
96 # Remove docs left in $installdir
97 rm -rf "${D}${installdir}/doc"
98 cd "${S}"
99
100 echo -e "ROOTPATH=${installdir}/bin\nPRELINK_PATH_MASK=${installdir}" > "${S}/90eagle-${PV}"
101 doenvd "${S}/90eagle-${PV}"
102
103 # Create desktop entry
104 newicon bin/${PN}icon50.png ${PF}-icon50.png
105 make_desktop_entry "${ROOT}/usr/bin/eagle-${PV}" "CadSoft EAGLE Layout Editor" ${PF}-icon50 "Graphics;Electronics"
106 }
107
108 pkg_postinst() {
109 elog "Run \`env-update && source /etc/profile\` from within \${ROOT}"
110 elog "now to set up the correct paths."
111 elog "You must first run eagle as root to invoke product registration."
112 echo
113 ewarn "Due to some necessary changes in the data structure, once you edit"
114 ewarn "a file with version 6.x you will no longer be able to edit it"
115 ewarn "with versions prior to 6.0!"
116 ewarn
117 ewarn "Please read /usr/share/doc/${PF}/UPDATE_${MY_LANG} if you are upgrading from 5.xx/4.xx."
118 }

  ViewVC Help
Powered by ViewVC 1.1.13