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

Contents of /dev-games/cegui/cegui-0.7.7.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sat Nov 17 06:07:58 2012 UTC (2 years, 1 month ago) by mr_bones_
Branch: MAIN
Changes since 1.1: +2 -2 lines
default to libxml2 for xml support (bug #422811)

(Portage version: 2.1.11.31/cvs/Linux x86_64, unsigned Manifest commit)

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

  ViewVC Help
Powered by ViewVC 1.1.20