You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
117 lines
2.6 KiB
117 lines
2.6 KiB
6 years ago
|
# Copyright 1999-2018 Gentoo Foundation
|
||
10 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
|
EAPI=5
|
||
|
WX_GTK_VER="3.0"
|
||
6 years ago
|
inherit cmake-utils eutils gnome2-utils readme.gentoo-r1 wxwidgets
|
||
10 years ago
|
|
||
|
MY_P=${PN}-src-${PV}
|
||
|
DESCRIPTION="An online multiplayer, free software engine for Doom and Doom II"
|
||
|
HOMEPAGE="http://odamex.net/"
|
||
|
SRC_URI="mirror://sourceforge/${PN}/Odamex/${PV}/${MY_P}.tar.bz2"
|
||
|
|
||
|
LICENSE="GPL-2"
|
||
|
SLOT="0"
|
||
7 years ago
|
KEYWORDS="~amd64 ~x86"
|
||
10 years ago
|
IUSE="dedicated +odalaunch master portmidi server"
|
||
|
|
||
|
RDEPEND="
|
||
6 years ago
|
dedicated? ( >=net-libs/miniupnpc-1.8:0= )
|
||
10 years ago
|
!dedicated? (
|
||
6 years ago
|
media-libs/libpng:0=
|
||
10 years ago
|
>=media-libs/libsdl-1.2.9[X,sound,joystick,video]
|
||
10 years ago
|
>=media-libs/sdl-mixer-1.2.6
|
||
|
odalaunch? ( x11-libs/wxGTK:${WX_GTK_VER}[X] )
|
||
|
portmidi? ( media-libs/portmidi )
|
||
6 years ago
|
server? ( >=net-libs/miniupnpc-1.8:0= )
|
||
|
)
|
||
|
"
|
||
10 years ago
|
DEPEND="${RDEPEND}"
|
||
|
|
||
6 years ago
|
DOC_CONTENTS="
|
||
|
This is just the engine, you will need doom resource files in order to play.
|
||
|
Check: http://odamex.net/wiki/FAQ#What_data_files_are_required.3F
|
||
|
"
|
||
|
|
||
|
S="${WORKDIR}/src-${PV:2:3}"
|
||
10 years ago
|
|
||
|
pkg_pretend() {
|
||
|
if ! test-flag-CXX -std=c++11; then
|
||
|
die "You need at least GCC 4.7.x or Clang >= 3.0 for C++11-specific compiler flags"
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
src_prepare() {
|
||
|
epatch "${FILESDIR}"/1-${P}-install-rules.patch \
|
||
|
"${FILESDIR}"/2-${P}-cmake-options.patch \
|
||
|
"${FILESDIR}"/3-${P}-wad-search-path.patch \
|
||
|
"${FILESDIR}"/4-${P}-odalauncher-bin-path.patch \
|
||
7 years ago
|
"${FILESDIR}"/${P}-miniupnpc.patch \
|
||
6 years ago
|
"${FILESDIR}"/${P}-miniupnpc20.patch \
|
||
7 years ago
|
"${FILESDIR}"/${P}-gcc6.patch
|
||
10 years ago
|
|
||
|
rm -r libraries/libminiupnpc || die
|
||
6 years ago
|
cmake-utils_src_prepare
|
||
10 years ago
|
}
|
||
|
|
||
|
src_configure() {
|
||
|
local mycmakeargs=(
|
||
|
-DUSE_INTREE_PORTMIDI=OFF
|
||
6 years ago
|
-DCMAKE_INSTALL_BINDIR="/usr/bin"
|
||
|
-DCMAKE_INSTALL_DATADIR="/usr/share"
|
||
10 years ago
|
$(cmake-utils_use_build master MASTER)
|
||
|
)
|
||
|
|
||
|
if use dedicated ; then
|
||
|
mycmakeargs+=(
|
||
|
-DBUILD_CLIENT=OFF
|
||
|
-DBUILD_ODALAUNCH=OFF
|
||
|
-DBUILD_SERVER=ON
|
||
|
-DENABLE_PORTMIDI=OFF
|
||
|
)
|
||
|
else
|
||
|
mycmakeargs+=(
|
||
|
-DBUILD_CLIENT=ON
|
||
|
$(cmake-utils_use_build odalaunch ODALAUNCH)
|
||
|
$(cmake-utils_use_build server SERVER)
|
||
|
$(cmake-utils_use_enable portmidi PORTMIDI)
|
||
|
)
|
||
|
fi
|
||
|
|
||
|
append-cxxflags -std=c++11
|
||
|
|
||
|
cmake-utils_src_configure
|
||
|
}
|
||
|
|
||
|
src_compile() {
|
||
|
cmake-utils_src_compile
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
cmake-utils_src_install
|
||
6 years ago
|
readme.gentoo_create_doc
|
||
10 years ago
|
|
||
|
if ! use dedicated ; then
|
||
|
newicon -s 128 "${S}/media/icon_${PN}_128.png" "${PN}.png"
|
||
|
make_desktop_entry ${PN}
|
||
|
|
||
|
if use odalaunch ; then
|
||
|
newicon -s 128 "${S}/media/icon_odalaunch_128.png" "odalaunch.png"
|
||
|
make_desktop_entry odalaunch "Odamex Launcher" odalaunch
|
||
|
fi
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
pkg_preinst() {
|
||
|
gnome2_icon_savelist
|
||
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
|
gnome2_icon_cache_update
|
||
6 years ago
|
readme.gentoo_print_elog
|
||
10 years ago
|
}
|
||
|
|
||
|
pkg_postrm() {
|
||
|
gnome2_icon_cache_update
|
||
|
}
|