Gentoo Archives: gentoo-commits

From: "Tim Harder (radhermit)" <radhermit@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-libs/libsfml: ChangeLog metadata.xml libsfml-1.6.ebuild
Date: Sat, 05 Feb 2011 05:38:31
Message-Id: 20110205053821.2486020057@flycatcher.gentoo.org
1 radhermit 11/02/05 05:38:21
2
3 Added: ChangeLog metadata.xml libsfml-1.6.ebuild
4 Log:
5 Initial import for bug #258895. Ebuild by me.
6
7 (Portage version: 2.2.0_alpha19/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 media-libs/libsfml/ChangeLog
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/libsfml/ChangeLog?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/libsfml/ChangeLog?rev=1.1&content-type=text/plain
14
15 Index: ChangeLog
16 ===================================================================
17 # ChangeLog for media-libs/libsfml
18 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
19 # $Header: /var/cvsroot/gentoo-x86/media-libs/libsfml/ChangeLog,v 1.1 2011/02/05 05:38:21 radhermit Exp $
20
21 *libsfml-1.6 (05 Feb 2011)
22
23 05 Feb 2011; Tim Harder <radhermit@g.o> +libsfml-1.6.ebuild,
24 +files/libsfml-1.6-csfml-destdir.patch,
25 +files/libsfml-1.6-deps-and-flags.patch, +files/libsfml-1.6-destdir.patch,
26 +metadata.xml:
27 Initial import for bug #258895. Ebuild by me.
28
29
30
31
32 1.1 media-libs/libsfml/metadata.xml
33
34 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/libsfml/metadata.xml?rev=1.1&view=markup
35 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/libsfml/metadata.xml?rev=1.1&content-type=text/plain
36
37 Index: metadata.xml
38 ===================================================================
39 <?xml version = '1.0' encoding = 'UTF-8'?>
40 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
41 <pkgmetadata>
42 <herd>games</herd>
43 <maintainer>
44 <email>radhermit@g.o</email>
45 <name>Tim Harder</name>
46 </maintainer>
47 <longdescription lang="en">
48 The Simple and Fast Multimedia Library (SFML) is a portable and easy to use
49 multimedia API written in C++. You can see it as a modern, object-oriented
50 alternative to SDL. SFML is composed of several packages to suit your needs.
51 You can use SFML as a minimal windowing system to interface with OpenGL, or
52 as a fully-featured multimedia library for building games or interactive
53 programs.
54 </longdescription>
55 <use>
56 <flag name="csfml">Build the C libraries for SFML</flag>
57 </use>
58 </pkgmetadata>
59
60
61
62 1.1 media-libs/libsfml/libsfml-1.6.ebuild
63
64 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/libsfml/libsfml-1.6.ebuild?rev=1.1&view=markup
65 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/libsfml/libsfml-1.6.ebuild?rev=1.1&content-type=text/plain
66
67 Index: libsfml-1.6.ebuild
68 ===================================================================
69 # Copyright 1999-2011 Gentoo Foundation
70 # Distributed under the terms of the GNU General Public License v2
71 # $Header: /var/cvsroot/gentoo-x86/media-libs/libsfml/libsfml-1.6.ebuild,v 1.1 2011/02/05 05:38:21 radhermit Exp $
72
73 EAPI=3
74 PYTHON_DEPEND="python? 2:2.6 3"
75 PYTHON_MODNAME="PySFML"
76
77 inherit eutils multilib toolchain-funcs distutils
78
79 MY_P="SFML-${PV}"
80 DESCRIPTION="Simple and fast multimedia library"
81 HOMEPAGE="http://sfml.sourceforge.net/"
82 SRC_URI="mirror://sourceforge/sfml/${MY_P}-sdk-linux-32.tar.gz
83 csfml? ( mirror://sourceforge/sfml/${MY_P}-c-sdk-linux-32.tar.gz )
84 python? ( mirror://sourceforge/sfml/${MY_P}-python-sdk.zip )"
85
86 LICENSE="as-is"
87 SLOT="0"
88 KEYWORDS="~amd64 ~x86"
89 IUSE="csfml debug doc examples python static-libs"
90
91 DEPEND="media-libs/freetype:2
92 media-libs/glew
93 media-libs/libpng
94 media-libs/libsndfile
95 media-libs/mesa
96 media-libs/openal
97 sys-libs/zlib
98 virtual/jpeg
99 x11-libs/libX11
100 x11-libs/libXrandr"
101 RDEPEND="${DEPEND}"
102
103 S="${WORKDIR}/${MY_P}"
104
105 src_prepare() {
106 epatch "${FILESDIR}"/${P}-destdir.patch
107 epatch "${FILESDIR}"/${P}-deps-and-flags.patch
108 if use csfml ; then
109 epatch "${FILESDIR}"/${P}-csfml-destdir.patch
110 fi
111 }
112
113 src_compile() {
114 local myconf
115
116 if use debug ; then
117 myconf="$myconf DEBUGBUILD=yes"
118 fi
119
120 emake $myconf CPP=$(tc-getCXX) CC=$(tc-getCC) || die "emake failed"
121
122 if use static-libs ; then
123 emake $myconf STATIC=yes CPP=$(tc-getCXX) CC=$(tc-getCC) || die "emake failed"
124 fi
125
126 if use csfml ; then
127 cd "${S}/CSFML"
128 emake CPP=$(tc-getCXX) || die "emake failed"
129 fi
130
131 if use python ; then
132 cd "${S}/python"
133 distutils_src_compile
134 fi
135 }
136
137 src_install() {
138 emake DESTDIR="${D}" prefix=/usr libdir=/usr/$(get_libdir) install || die "emake install failed"
139
140 if use csfml ; then
141 pushd "${S}/CSFML" >/dev/null
142 emake DESTDIR="${D}" prefix=/usr libdir=/usr/$(get_libdir) install || die "emake install failed"
143 popd >/dev/null
144 fi
145
146 if use python ; then
147 pushd "${S}/python" >/dev/null
148 distutils_src_install
149 popd >/dev/null
150 fi
151
152 if use static-libs ; then
153 dolib.a lib/*.a || die "dolib.a failed"
154 fi
155
156 if use doc ; then
157 dohtml doc/html/*
158 if use csfml ; then
159 docinto csfml/html
160 dohtml CSFML/doc/html/*
161 fi
162 if use python ; then
163 docinto python/html
164 dohtml python/doc/*
165 fi
166 fi
167
168 if use examples ; then
169 for i in ftp opengl pong post-fx qt sockets sound sound_capture voip window wxwidgets X11 ; do
170 insinto /usr/share/doc/${PF}/examples/$i
171 doins samples/$i/* || die "doins failed"
172 done
173
174 if use python ; then
175 insinto /usr/share/doc/${PF}/python/examples
176 doins -r python/samples/* || die "doins failed"
177 fi
178 fi
179 }
180
181 pkg_postinst() {
182 use python && distutils_pkg_postinst
183 }
184
185 pkg_postrm() {
186 use python && distutils_pkg_postrm
187 }