/[gentoo-x86]/dev-ada/gtkada/gtkada-2.10.0.ebuild
Gentoo

Contents of /dev-ada/gtkada/gtkada-2.10.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Sun Dec 13 00:28:31 2009 UTC (5 years ago) by flameeyes
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +4 -3 lines
Add -j1 even to last release.
(Portage version: 2.2_rc58/cvs/Linux x86_64)

1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-ada/gtkada/gtkada-2.10.0.ebuild,v 1.5 2007/12/28 22:40:13 george Exp $
4
5 inherit eutils gnat versionator
6
7 Name="GtkAda-gpl"
8 MajorPV=$(get_version_component_range 1-2)
9 DESCRIPTION="Gtk+ bindings to the Ada language"
10 HOMEPAGE="https://libre.adacore.com/GtkAda/"
11 SRC_URI="mirror://gentoo/${Name}-${PV}.tgz"
12
13 LICENSE="GPL-2"
14 SLOT="2"
15 KEYWORDS="~amd64 ~x86 ~ppc"
16 IUSE="nls opengl"
17
18 DEPEND="virtual/ada
19 >=x11-libs/cairo-1.2.6
20 >=dev-libs/glib-2.12.4
21 >=x11-libs/pango-1.14.9
22 >=dev-libs/atk-1.12.1
23 >=x11-libs/gtk+-2.10.9
24 >=sys-apps/sed-4"
25 RDEPEND=""
26
27 S="${WORKDIR}/${Name}-${PV}"
28
29 # only needed for gcc-3.x based gnat profiles, but matching them individually
30 # would be insane
31 QA_EXECSTACK="${AdalibLibTop:1}/*/gtkada/libgtkada-${MajorPV}.so.0"
32
33 src_unpack() {
34 unpack ${A}
35
36 cd "${S}"
37 sed -i -e "s:-aI\$prefix/include/gtkada:-aI${AdalibSpecsDir}/gtkada:" \
38 src/tools/gtkada-config.in
39
40 # disable building tests to avoid waisting time while building for every
41 # profile. The tests are nonetheless installed under doc dir.
42 sed -i -e "/testgtk_dir/d" Makefile.in
43
44 # remove lib stripping
45 sed -i -e "s: strip \$(LIBNAME)::" src/Makefile.common.in
46 }
47
48 lib_compile() {
49 # some profile specific fixes first
50 sed -i -e "s:\$prefix/lib\(/gtkada\)*:${AdalibLibTop}/$1/gtkada:" \
51 src/tools/gtkada-config.in
52
53 local myconf
54 use opengl && myconf="--with-GL=auto" || myconf="--with-GL=no"
55
56 econf ${myconf} $(use_enable nls) || die "./configure failed"
57
58 # bug #279962
59 emake -j1 GNATFLAGS="${ADACFLAGS}" || die
60 }
61
62 lib_install() {
63 # make install misses all the .so and .a files and otherwise creates more
64 # problems than it's worth. Will do everything manually
65 mkdir -p "${DL}"
66 mv src/lib-obj/* src/*/obj/* src/tools/gtkada-config "${DL}"
67 rm "${DL}"/*.o
68 chmod 0444 "${DL}"/*.ali
69 chmod 0755 "${DL}"/gtkada-config
70 }
71
72 src_install() {
73 #set up environment
74 echo "PATH=%DL%" > ${LibEnv}
75 echo "LDPATH=%DL%" >> ${LibEnv}
76 echo "ADA_OBJECTS_PATH=%DL%" >> ${LibEnv}
77 echo "ADA_INCLUDE_PATH=${AdalibSpecsDir}/${PN}" >> ${LibEnv}
78
79 gnat_src_install
80
81 #specs
82 cd "${S}"/src
83 dodir "${AdalibSpecsDir}/${PN}"
84 insinto "${AdalibSpecsDir}/${PN}"
85 doins *.ad? glade/*.ad? gnome/*.ad? opengl/*.{ad?,c,h}
86
87 #docs
88 cd "${S}"
89 dodoc ANNOUNCE AUTHORS README
90 cp -dPr examples/ testgtk/ "${D}/usr/share/doc/${PF}"
91 cd "${S}"/docs
92 doinfo gtkada_ug/gtkada_ug.info
93 ps2pdf gtkada_ug/gtkada_ug.ps
94 ps2pdf gtkada_rm/gtkada_rm.ps
95 cp gtkada_ug.pdf gtkada_rm.pdf "${D}/usr/share/doc/${PF}"
96 dohtml -r gtkada_ug/{gtkada_ug.html,boxes.gif,hierarchy.jpg}
97 cp -dPr gtkada_rm/gtkada_rm/ "${D}/usr/share/doc/${PF}/html"
98
99 # utility stuff
100 cd "${S}"
101 dodir "${AdalibDataDir}/${PN}"
102 insinto "${AdalibDataDir}/${PN}"
103 doins -r xml/gtkada.xml projects/
104 }
105
106 pkg_postinst() {
107 eselect gnat update
108 einfo "The environment has been set up to make gnat automatically find files for"
109 einfo "GtkAda. In order to immediately activate these settings please do:"
110 einfo " env-update && source /etc/profile"
111 einfo "Otherwise the settings will become active next time you login"
112 }

  ViewVC Help
Powered by ViewVC 1.1.20