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.
116 lines
2.8 KiB
116 lines
2.8 KiB
6 years ago
|
# Copyright 1999-2018 Gentoo Foundation
|
||
8 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
6 years ago
|
EAPI=6
|
||
|
inherit desktop toolchain-funcs
|
||
8 years ago
|
|
||
|
DESCRIPTION="The Ur-Quan Masters: Port of Star Control 2"
|
||
|
HOMEPAGE="http://sc2.sourceforge.net/"
|
||
|
SRC_URI="mirror://sourceforge/sc2/${P}-source.tgz
|
||
|
mirror://sourceforge/sc2/${P}-content.uqm
|
||
|
music? ( mirror://sourceforge/sc2/${P}-3domusic.uqm )
|
||
|
voice? ( mirror://sourceforge/sc2/${P}-voice.uqm )
|
||
|
remix? ( mirror://sourceforge/sc2/${PN}-remix-disc1.uqm \
|
||
|
mirror://sourceforge/sc2/${PN}-remix-disc2.uqm \
|
||
|
mirror://sourceforge/sc2/${PN}-remix-disc3.uqm \
|
||
|
mirror://sourceforge/sc2/${PN}-remix-disc4.uqm )"
|
||
|
|
||
|
LICENSE="GPL-2+"
|
||
|
SLOT="0"
|
||
7 years ago
|
KEYWORDS="~amd64 ~ppc64 ~x86"
|
||
8 years ago
|
IUSE="music opengl remix voice"
|
||
|
|
||
6 years ago
|
RDEPEND="
|
||
|
media-libs/libmikmod
|
||
8 years ago
|
media-libs/libogg
|
||
6 years ago
|
>=media-libs/libpng-1.4:0=
|
||
8 years ago
|
media-libs/libsdl[X,sound,joystick,video]
|
||
|
media-libs/libvorbis
|
||
|
media-libs/sdl-image[png]
|
||
|
sys-libs/zlib
|
||
6 years ago
|
opengl? ( virtual/opengl )
|
||
|
"
|
||
8 years ago
|
DEPEND="${RDEPEND}
|
||
6 years ago
|
virtual/pkgconfig
|
||
|
"
|
||
8 years ago
|
|
||
|
src_prepare() {
|
||
6 years ago
|
default
|
||
|
|
||
8 years ago
|
local myopengl
|
||
|
|
||
|
use opengl \
|
||
|
&& myopengl=opengl \
|
||
|
|| myopengl=pure
|
||
|
|
||
6 years ago
|
eapply \
|
||
8 years ago
|
"${FILESDIR}"/${P}-tempdir.patch \
|
||
|
"${FILESDIR}"/${P}-warning.patch
|
||
|
|
||
8 years ago
|
cat <<-EOF > config.state
|
||
|
CHOICE_debug_VALUE='nodebug'
|
||
|
CHOICE_graphics_VALUE='${myopengl}'
|
||
|
CHOICE_sound_VALUE='mixsdl'
|
||
|
CHOICE_accel_VALUE='plainc'
|
||
6 years ago
|
INPUT_install_prefix_VALUE='/usr/share'
|
||
8 years ago
|
INPUT_install_bindir_VALUE='\$prefix/bin'
|
||
|
INPUT_install_libdir_VALUE='\$prefix/lib'
|
||
6 years ago
|
INPUT_install_sharedir_VALUE='/usr/share/'
|
||
8 years ago
|
EOF
|
||
|
|
||
|
# Take out the read so we can be non-interactive.
|
||
|
sed -i \
|
||
|
-e '/read CHOICE/d' build/unix/menu_functions || die
|
||
|
|
||
|
# respect CFLAGS
|
||
|
sed -i \
|
||
|
-e "s/-O3//" build/unix/build.config || die
|
||
|
|
||
|
sed -i \
|
||
6 years ago
|
-e "s:@INSTALL_LIBDIR@:/usr/$(get_libdir)/:g" \
|
||
8 years ago
|
build/unix/uqm-wrapper.in || die
|
||
|
|
||
|
# respect CC
|
||
|
sed -i \
|
||
|
-e "s/PROG_gcc_FILE=\"gcc\"/PROG_gcc_FILE=\"$(tc-getCC)\"/" \
|
||
|
build/unix/config_proginfo_build || die
|
||
|
}
|
||
|
|
||
|
src_compile() {
|
||
|
MAKE_VERBOSE=1 ./build.sh uqm || die
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
# Using the included install scripts seems quite painful.
|
||
|
# This manual install is totally fragile but maybe they'll
|
||
|
# use a sane build system for the next release.
|
||
6 years ago
|
newbin uqm-wrapper uqm
|
||
|
exeinto /usr/"$(get_libdir)"/${PN}
|
||
8 years ago
|
doexe uqm
|
||
|
|
||
6 years ago
|
insinto /usr/share/${PN}/content/packages
|
||
8 years ago
|
doins "${DISTDIR}"/${P}-content.uqm
|
||
6 years ago
|
echo ${P} > "${ED}"/usr/share/${PN}/content/version || die
|
||
8 years ago
|
|
||
6 years ago
|
insinto /usr/share/${PN}/content/addons
|
||
8 years ago
|
if use music; then
|
||
|
doins "${DISTDIR}"/${P}-3domusic.uqm
|
||
|
fi
|
||
|
|
||
|
if use voice; then
|
||
|
doins "${DISTDIR}"/${P}-voice.uqm
|
||
|
fi
|
||
|
|
||
|
if use remix; then
|
||
6 years ago
|
insinto /usr/share/${PN}/content/addons
|
||
8 years ago
|
doins "${DISTDIR}"/${PN}-remix-disc{1,2,3,4}.uqm
|
||
|
fi
|
||
|
|
||
|
dodoc AUTHORS ChangeLog Contributing README WhatsNew doc/users/manual.txt
|
||
|
docinto devel
|
||
|
dodoc doc/devel/[!n]*
|
||
|
docinto devel/netplay
|
||
|
dodoc doc/devel/netplay/*
|
||
|
make_desktop_entry uqm "The Ur-Quan Masters"
|
||
|
}
|