/[gentoo-x86]/dev-games/cegui/cegui-0.7.6-r1.ebuild
Gentoo

Contents of /dev-games/cegui/cegui-0.7.6-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Mon Jun 18 18:10:06 2012 UTC (22 months ago) by hasufell
Branch: MAIN
Changes since 1.7: +2 -2 lines
stable for x86 wrt bug #412675

(Portage version: 2.2.0_alpha110/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-games/cegui/cegui-0.7.6-r1.ebuild,v 1.7 2012/06/10 23:01:12 hasufell Exp $
4
5 EAPI="4"
6
7 inherit eutils
8
9 MY_P=CEGUI-${PV}
10 MY_D=CEGUI-DOCS-${PV}
11 DESCRIPTION="Crazy Eddie's GUI System"
12 HOMEPAGE="http://www.cegui.org.uk/"
13 SRC_URI="mirror://sourceforge/crayzedsgui/${MY_P}.tar.gz
14 doc? ( mirror://sourceforge/crayzedsgui/${MY_D}.tar.gz )"
15
16 LICENSE="MIT"
17 SLOT="0"
18 KEYWORDS="amd64 -ppc x86"
19 IUSE="bidi debug devil doc examples expat gtk irrlicht lua ogre opengl pcre static-libs tinyxml truetype xerces-c xml zip"
20 REQUIRED_USE="|| ( expat tinyxml xerces-c xml )" # bug 362223
21
22 RDEPEND="bidi? ( dev-libs/fribidi )
23 devil? ( media-libs/devil )
24 expat? ( dev-libs/expat )
25 truetype? ( media-libs/freetype:2 )
26 irrlicht? ( dev-games/irrlicht )
27 lua? (
28 dev-lang/lua
29 dev-lua/toluapp
30 )
31 ogre? ( >=dev-games/ogre-1.7 )
32 opengl? (
33 virtual/opengl
34 virtual/glu
35 media-libs/freeglut
36 media-libs/glew
37 )
38 pcre? ( dev-libs/libpcre )
39 tinyxml? ( dev-libs/tinyxml )
40 xerces-c? ( dev-libs/xerces-c )
41 xml? ( dev-libs/libxml2 )
42 zip? ( sys-libs/zlib[minizip] )"
43 DEPEND="${RDEPEND}
44 virtual/pkgconfig
45 doc? ( app-doc/doxygen )"
46
47 S=${WORKDIR}/${MY_P}
48 S2=${WORKDIR}/${MY_P}_static
49
50 src_unpack() {
51 default
52 cp -a "${S}" "${S2}" || die
53 }
54
55 src_prepare() {
56 # use minizip from zlib rather than local code
57 if use zip ; then
58 sed -i \
59 -e '/CEGUI_BUILD_MINIZIP_RESOURCE_PROVIDER_TRUE/{
60 s:minizip/ioapi.cpp minizip/unzip.cpp::;
61 s:libCEGUIBase@cegui_bsfx@_la-ioapi.lo::;
62 s:libCEGUIBase@cegui_bsfx@_la-unzip.lo::
63 }' \
64 -e '/^ZLIB_LIBS/s:=.*:= -lminizip:' \
65 cegui/src/Makefile.in || die
66 fi
67 rm -rf cegui/src/minizip
68
69 if use examples ; then
70 cp -r Samples Samples.clean
71 rm -f $(find Samples.clean -name 'Makefile*')
72 fi
73
74 # zlib-1.2.5.1-r1 renames the OF macro in zconf.h, bug #420293
75 # and http://www.cegui.org.uk/mantis/view.php?id=813
76 sed -i '1i#define OF(x) x' \
77 "${S2}"/cegui/src/minizip/{ioapi,unzip}.h || die
78 }
79
80 src_configure() {
81 local myconf=(
82 $(use_enable bidi bidirectional-text)
83 $(use_enable debug)
84 $(use_enable devil)
85 $(use_enable examples samples)
86 $(use_enable expat)
87 $(use_enable truetype freetype)
88 $(use_enable irrlicht irrlicht-renderer)
89 $(use_enable lua lua-module)
90 $(use_enable lua toluacegui)
91 --enable-external-toluapp
92 $(use_enable ogre ogre-renderer)
93 $(use_enable opengl opengl-renderer)
94 --enable-external-glew
95 $(use_enable pcre)
96 $(use_enable tinyxml)
97 --enable-external-tinyxml
98 $(use_enable xerces-c)
99 $(use_enable xml libxml)
100 $(use_enable zip minizip-resource-provider)
101 --enable-null-renderer
102 --enable-stb
103 --enable-tga
104 --disable-corona
105 --disable-dependency-tracking
106 --disable-freeimage
107 --disable-rapidxml
108 --disable-samples
109 --disable-silly
110 $(use_with gtk gtk2)
111 )
112
113 econf \
114 "${myconf[@]}" \
115 --disable-static \
116 --enable-shared
117
118 if use static-libs ; then
119 cd "${S2}" || die
120 econf \
121 "${myconf[@]}" \
122 --enable-static \
123 --disable-shared
124 fi
125
126 # we are doing a double build here cause
127 # the build system does not permit
128 # "--enable-static --enable-shared"
129 }
130
131 src_compile() {
132 default
133
134 if use static-libs ; then
135 emake -C "${S2}"
136 fi
137 }
138
139 src_install() {
140 local i
141 default
142
143 if use doc ; then
144 emake html || die
145 dohtml -r doc/doxygen/html/* || die
146 fi
147 if use examples ; then
148 insinto /usr/share/doc/${PF}/Samples
149 doins -r Samples.clean/* || die
150 fi
151
152 if use static-libs ; then
153 find "${S2}" -name "*CEGUI*.a" -exec dolib.a '{}' \;
154
155 # fix/merge .la files
156 for i in `find "${D}" -name "*.la"` ; do
157 sed \
158 -e "s/old_library=''/old_library='$(basename ${i%.la}).a'/" \
159 -i ${i} || die "fixing .la files failed"
160 done
161 else
162 # remove .la files
163 prune_libtool_files --all
164 fi
165 }

  ViewVC Help
Powered by ViewVC 1.1.20