Skip to content

Commit

Permalink
dev-games/physfs: added new USE-flags
Browse files Browse the repository at this point in the history
Added 7zip (Bug #381973), iso, vdf, slb file formats support, cleanup for
outdated code (Bug #649456).

Closes: https://bugs.gentoo.org/381973
Closes: https://bugs.gentoo.org/649456

Package-Manager: Portage-2.3.24, Repoman-2.3.6
Closes: gentoo#7532
  • Loading branch information
winterheart authored and chewi committed Mar 25, 2018
1 parent ed95e21 commit 9fa283b
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 15 deletions.
4 changes: 4 additions & 0 deletions dev-games/physfs/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ the user's home directory, where in the real filesystem your program is running,
etc.
</longdescription>
<use>
<flag name="7zip">Enable 7zip/lzma archive support</flag>
<flag name="grp">Enable Build Engine GRP archive support</flag>
<flag name="hog">Enable Descent I/II HOG archive support</flag>
<flag name="iso">Enable ISO9660 file support</flag>
<flag name="mvl">Enable Descent I/II MVL archive support</flag>
<flag name="slb">Enable Independence War SLB archive support</flag>
<flag name="vdf">Enable Gothic/Gothic II VDF archive support</flag>
<flag name="wad">Enable Doom WAD archive support</flag>
<flag name="qpak">Enable Quake I/II QPAK archive support</flag>
<flag name="zip">Enable ZIP archive support</flag>
Expand Down
50 changes: 50 additions & 0 deletions dev-games/physfs/physfs-3.0.1-r1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6
inherit cmake-multilib

DESCRIPTION="Abstraction layer for filesystem and archive access"
HOMEPAGE="http://icculus.org/physfs/"
SRC_URI="http://icculus.org/physfs/downloads/${P}.tar.bz2"

LICENSE="ZLIB"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc64 ~x86 ~x86-fbsd"
IUSE="7zip doc grp hog iso mvl qpak slb static-libs vdf wad +zip"

DEPEND="doc? ( app-doc/doxygen )"

DOCS=( docs/CHANGELOG.txt docs/CREDITS.txt docs/TODO.txt )

multilib_src_configure() {
local mycmakeargs=(
-DPHYSFS_BUILD_SHARED=ON
-DPHYSFS_BUILD_TEST=OFF
-DPHYSFS_BUILD_STATIC="$(usex static-libs)"
-DPHYSFS_ARCHIVE_7Z="$(usex 7zip)"
-DPHYSFS_ARCHIVE_GRP="$(usex grp)"
-DPHYSFS_ARCHIVE_HOG="$(usex hog)"
-DPHYSFS_ARCHIVE_ISO9660="$(usex iso)"
-DPHYSFS_ARCHIVE_MVL="$(usex mvl)"
-DPHYSFS_ARCHIVE_SLB="$(usex slb)"
-DPHYSFS_ARCHIVE_VDF="$(usex vdf)"
-DPHYSFS_ARCHIVE_WAD="$(usex wad)"
-DPHYSFS_ARCHIVE_QPAK="$(usex qpak)"
-DPHYSFS_ARCHIVE_ZIP="$(usex zip)"
)
cmake-utils_src_configure
}

multilib_src_compile() {
cmake-utils_src_compile
multilib_is_native_abi && use doc && cmake-utils_src_compile docs
}

multilib_src_install_all() {
einstalldocs
if use doc ; then
docinto html
dodoc -r "${CMAKE_BUILD_DIR}"/docs/html/*
fi
}
35 changes: 20 additions & 15 deletions dev-games/physfs/physfs-9999.ebuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 1999-2017 Gentoo Foundation
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6
Expand All @@ -16,36 +16,41 @@ fi

LICENSE="ZLIB"
SLOT="0"
IUSE="grp hog mvl qpak static-libs wad +zip"
IUSE="7zip doc grp hog iso mvl qpak slb static-libs vdf wad +zip"

RDEPEND=""
DEPEND=""

DOCS=( docs/CHANGELOG.txt docs/CREDITS.txt docs/TODO.txt )

src_prepare() {
cmake-utils_src_prepare

sed -i -e 's:-Werror::' CMakeLists.txt || die
# make sure these libs aren't used
rm -rf lzma zlib*
}

src_configure() {
multilib_src_configure() {
local mycmakeargs=(
-DPHYSFS_ARCHIVE_7Z=OFF
-DPHYSFS_BUILD_SHARED=ON
-DPHYSFS_BUILD_TEST=OFF
-DPHYSFS_BUILD_WX_TEST=OFF
-DPHYSFS_INTERNAL_ZLIB=OFF
-DPHYSFS_BUILD_STATIC="$(usex static-libs)"
-DPHYSFS_ARCHIVE_7Z="$(usex 7zip)"
-DPHYSFS_ARCHIVE_GRP="$(usex grp)"
-DPHYSFS_ARCHIVE_HOG="$(usex hog)"
-DPHYSFS_ARCHIVE_ISO9660="$(usex iso)"
-DPHYSFS_ARCHIVE_MVL="$(usex mvl)"
-DPHYSFS_ARCHIVE_SLB="$(usex slb)"
-DPHYSFS_ARCHIVE_VDF="$(usex vdf)"
-DPHYSFS_ARCHIVE_WAD="$(usex wad)"
-DPHYSFS_ARCHIVE_QPAK="$(usex qpak)"
-DPHYSFS_ARCHIVE_ZIP="$(usex zip)"
)
cmake-utils_src_configure
}

multilib_src_compile() {
cmake-utils_src_compile
multilib_is_native_abi && use doc && cmake-utils_src_compile docs
}

cmake-multilib_src_configure
multilib_src_install_all() {
einstalldocs
if use doc ; then
docinto html
dodoc -r "${CMAKE_BUILD_DIR}"/docs/html/*
fi
}

0 comments on commit 9fa283b

Please sign in to comment.