summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarty E. Plummer <hanetzer@startmail.com>2018-03-19 17:58:25 -0500
committerMichał Górny <mgorny@gentoo.org>2018-03-25 20:24:26 +0200
commitda3ff27aa3315ae8d276a724a2d8ff8b94dffeab (patch)
treea984fa568f6e060daeb933a39ae7eeefc038285c /media-libs/libsfml/libsfml-2.4.2-r2.ebuild
parentnet-fs/samba: Added net-libs/libnsl to (R)DEPEND. (diff)
downloadgentoo-da3ff27aa3315ae8d276a724a2d8ff8b94dffeab.tar.gz
gentoo-da3ff27aa3315ae8d276a724a2d8ff8b94dffeab.tar.bz2
gentoo-da3ff27aa3315ae8d276a724a2d8ff8b94dffeab.zip
media-libs/libsfml: build and install pkgconfig on mingw-w64
This is an upstream commit, which will be in the 2.5.0 release, which allows creation of the sfml pkgconfig files on mingw-w64 when either SFML_INSTALL_PKGCONFIG_FILES is true or if their internal check SFML_OS_SUPPORTS_PKGCONFIG returns true; since we explicitly set the former this change will allow build and install of sfml pc files on mingw-w64 and (I think) osx targets. Closes: https://github.com/gentoo/gentoo/pull/7518 Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'media-libs/libsfml/libsfml-2.4.2-r2.ebuild')
-rw-r--r--media-libs/libsfml/libsfml-2.4.2-r2.ebuild84
1 files changed, 84 insertions, 0 deletions
diff --git a/media-libs/libsfml/libsfml-2.4.2-r2.ebuild b/media-libs/libsfml/libsfml-2.4.2-r2.ebuild
new file mode 100644
index 000000000000..dda2accf7c68
--- /dev/null
+++ b/media-libs/libsfml/libsfml-2.4.2-r2.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils versionator
+
+MY_P="SFML-${PV}"
+
+DESCRIPTION="Simple and Fast Multimedia Library (SFML)"
+HOMEPAGE="http://www.sfml-dev.org/ https://github.com/SFML/SFML"
+SRC_URI="https://github.com/SFML/SFML/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0/$(get_version_component_range 1-2)"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc examples"
+
+RDEPEND="
+ media-libs/flac
+ media-libs/freetype:2
+ media-libs/libpng:0=
+ media-libs/libogg
+ media-libs/libvorbis
+ media-libs/openal
+ sys-libs/zlib
+ virtual/jpeg:0
+ kernel_linux? (
+ virtual/libudev:0
+ )
+ virtual/opengl
+ !kernel_Winnt? (
+ x11-libs/libX11
+ x11-libs/libXrandr
+ x11-libs/libxcb
+ x11-libs/xcb-util-image
+ )
+"
+DEPEND="
+ ${RDEPEND}
+ doc? ( app-doc/doxygen )
+"
+
+DOCS=( changelog.txt readme.txt )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.2-no-docs.patch
+ "${FILESDIR}"/${PN}-2.4.2-no-install-extlibs-mingw.patch
+ "${FILESDIR}"/${PN}-2.4.2-pkg-config.patch
+)
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ sed -i "s:DESTINATION .*:DESTINATION /usr/share/doc/${PF}:" \
+ doc/CMakeLists.txt || die
+
+ find examples -name CMakeLists.txt -delete || die
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DSFML_BUILD_DOC=$(usex doc)
+ -DSFML_INSTALL_PKGCONFIG_FILES=TRUE
+ )
+
+ if use kernel_Winnt; then
+ mycmakeargs+=( -DSFML_USE_SYSTEM_DEPS=TRUE )
+ fi
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ insinto /usr/share/cmake/Modules
+ doins cmake/Modules/FindSFML.cmake
+
+ if use examples ; then
+ docompress -x /usr/share/doc/${PF}/examples
+ dodoc -r examples
+ fi
+}