From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1E1E81382C5 for ; Fri, 16 Mar 2018 08:50:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 25377E0805; Fri, 16 Mar 2018 08:50:41 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DE2C0E0805 for ; Fri, 16 Mar 2018 08:50:40 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 79D8E335C7F for ; Fri, 16 Mar 2018 08:50:38 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BAF661F1 for ; Fri, 16 Mar 2018 08:50:36 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1521190234.50ec4fe777979deb16ffebe85f76db2459801cdf.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libsfml/files/, media-libs/libsfml/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/libsfml/files/libsfml-2.4.2-no-install-extlibs-mingw.patch media-libs/libsfml/libsfml-2.4.2-r1.ebuild X-VCS-Directories: media-libs/libsfml/files/ media-libs/libsfml/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 50ec4fe777979deb16ffebe85f76db2459801cdf X-VCS-Branch: master Date: Fri, 16 Mar 2018 08:50:36 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 6ba6c9bc-66e9-456e-be56-ae4a738500ae X-Archives-Hash: f351b3ee3347e3180f234b65e5bff3b5 commit: 50ec4fe777979deb16ffebe85f76db2459801cdf Author: Marty E. Plummer startmail com> AuthorDate: Wed Jun 7 00:11:03 2017 +0000 Commit: Michał Górny gentoo org> CommitDate: Fri Mar 16 08:50:34 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50ec4fe7 media-libs/libsfml: various mingw-w64 fixes. Fixes the following: * cross-compiling for windows does not require x11 and udev, so wrapped in use flags * since we RDEP on build deps, apply a patch accepted for upstream to prevent installtion of extlibs when SFML_USE_SYSTEM_DEPS is set * sets SFML_USE_SYSTEM_DEPS to true (no effect on native builds) * remove explicit dep on media-libs/mesa as this is provided by virtual/opengl in native compilation, and hopefully someday dev-util/mingw64-runtime will be an accepted provider for virtual/opengl and virtual/glu, as it provides the needed headers and libraries for the mingw-w64 platform. Closes: https://github.com/gentoo/gentoo/pull/4876 Package-Manager: Portage-2.3.6, Repoman-2.3.2 .../libsfml-2.4.2-no-install-extlibs-mingw.patch | 74 +++++++++++++++++++ media-libs/libsfml/libsfml-2.4.2-r1.ebuild | 83 ++++++++++++++++++++++ 2 files changed, 157 insertions(+) diff --git a/media-libs/libsfml/files/libsfml-2.4.2-no-install-extlibs-mingw.patch b/media-libs/libsfml/files/libsfml-2.4.2-no-install-extlibs-mingw.patch new file mode 100644 index 00000000000..b45063160e7 --- /dev/null +++ b/media-libs/libsfml/files/libsfml-2.4.2-no-install-extlibs-mingw.patch @@ -0,0 +1,74 @@ +--- SFML-2.4.2/CMakeLists.txt 2017-02-08 05:29:16.000000000 -0600 ++++ SFML-2.4.2.new/CMakeLists.txt 2017-06-05 22:12:39.166300154 -0500 +@@ -305,24 +305,26 @@ + # install 3rd-party libraries and tools + if(SFML_OS_WINDOWS) + +- # install the binaries of SFML dependencies +- if(ARCH_32BITS) +- install(DIRECTORY extlibs/bin/x86/ DESTINATION bin) +- if(SFML_COMPILER_MSVC AND SFML_MSVC_VERSION LESS 14) +- install(DIRECTORY extlibs/libs-msvc/x86/ DESTINATION lib) +- elseif(SFML_COMPILER_MSVC) +- install(DIRECTORY extlibs/libs-msvc-universal/x86/ DESTINATION lib) +- else() +- install(DIRECTORY extlibs/libs-mingw/x86/ DESTINATION lib) +- endif() +- elseif(ARCH_64BITS) +- install(DIRECTORY extlibs/bin/x64/ DESTINATION bin) +- if(SFML_COMPILER_MSVC AND SFML_MSVC_VERSION LESS 14) +- install(DIRECTORY extlibs/libs-msvc/x64/ DESTINATION lib) +- elseif(SFML_COMPILER_MSVC) +- install(DIRECTORY extlibs/libs-msvc-universal/x64/ DESTINATION lib) +- else() +- install(DIRECTORY extlibs/libs-mingw/x64/ DESTINATION lib) ++ if(NOT SFML_USE_SYSTEM_DEPS) ++ # install the binaries of SFML dependencies ++ if(ARCH_32BITS) ++ install(DIRECTORY extlibs/bin/x86/ DESTINATION bin) ++ if(SFML_COMPILER_MSVC AND SFML_MSVC_VERSION LESS 14) ++ install(DIRECTORY extlibs/libs-msvc/x86/ DESTINATION lib) ++ elseif(SFML_COMPILER_MSVC) ++ install(DIRECTORY extlibs/libs-msvc-universal/x86/ DESTINATION lib) ++ else() ++ install(DIRECTORY extlibs/libs-mingw/x86/ DESTINATION lib) ++ endif() ++ elseif(ARCH_64BITS) ++ install(DIRECTORY extlibs/bin/x64/ DESTINATION bin) ++ if(SFML_COMPILER_MSVC AND SFML_MSVC_VERSION LESS 14) ++ install(DIRECTORY extlibs/libs-msvc/x64/ DESTINATION lib) ++ elseif(SFML_COMPILER_MSVC) ++ install(DIRECTORY extlibs/libs-msvc-universal/x64/ DESTINATION lib) ++ else() ++ install(DIRECTORY extlibs/libs-mingw/x64/ DESTINATION lib) ++ endif() + endif() + endif() + +@@ -379,9 +381,11 @@ + install(DIRECTORY "${CMAKE_BINARY_DIR}/lib/\$ENV{CONFIGURATION}/" DESTINATION lib${LIB_SUFFIX}) + endif() + +- # since the iOS libraries are built as static, we must install the SFML dependencies +- # too so that the end user can easily link them to its final application +- install(FILES extlibs/libs-ios/libfreetype.a extlibs/libs-ios/libjpeg.a DESTINATION lib) ++ if(NOT SFML_USE_SYSTEM_DEPS) ++ # since the iOS libraries are built as static, we must install the SFML dependencies ++ # too so that the end user can easily link them to its final application ++ install(FILES extlibs/libs-ios/libfreetype.a extlibs/libs-ios/libjpeg.a DESTINATION lib) ++ endif() + + elseif(SFML_OS_ANDROID) + +@@ -389,7 +393,9 @@ + install(DIRECTORY extlibs/libs-android/${ANDROID_ABI} DESTINATION extlibs/lib) + install(FILES extlibs/Android.mk DESTINATION extlibs) + +- # install Android.mk so the NDK knows how to set up SFML +- install(FILES src/SFML/Android.mk DESTINATION .) ++ if(NOT SFML_USE_SYSTEM_DEPS) ++ # install Android.mk so the NDK knows how to set up SFML ++ install(FILES src/SFML/Android.mk DESTINATION .) ++ endif() + + endif() diff --git a/media-libs/libsfml/libsfml-2.4.2-r1.ebuild b/media-libs/libsfml/libsfml-2.4.2-r1.ebuild new file mode 100644 index 00000000000..7057c2f1346 --- /dev/null +++ b/media-libs/libsfml/libsfml-2.4.2-r1.ebuild @@ -0,0 +1,83 @@ +# 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 +) + +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 +}