View previous topic :: View next topic |
Author |
Message |
strategictraveler n00b
Joined: 19 Oct 2024 Posts: 3
|
Posted: Sat Oct 26, 2024 9:00 pm Post subject: [SOLVED] Ebuild Unexpected EOF |
|
|
I'm trying to write an ebuild for Cataclysm DDA. I copied the ebuild from games-roguelike/stone-soup and modified it, but I kept getting an error when emerging. I still can't seem to find what's causing it:
Error:
Code: | Calculating dependencies \/var/db/repos/test/games-roguelike/cataclysm-dda/cataclysm-dda-9999.ebuild: line 112: syntax error: unexpected end of file
* ERROR: games-roguelike/cataclysm-dda-9999::test failed (depend phase):
* error sourcing ebuild |
Ebuild:
Code: | # Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit xdg-utils toolchain-funcs
DESCRIPTION="A turn-based survival game set in a post-apocalyptic world"
HOMEPAGE="https://cataclysmdda.org
https://github.com/CleverRaven/Cataclysm-DDA"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/CleverRaven/Cataclysm-DDA.git"
else
SRC_URI="https://github.com/CleverRaven/Cataclysm-DDA/archive/${PV}.tar.gz"
KEYWORDS="~x86 ~amd64 ~arm ~arm64"
LICENSE="Apache-2.0 CC-BY-SA-3.0 OFL-1.1"
SLOT="0"
IUSE="debug lto ncurses nls +sound test +tiles"
RDEPEND="
!ncurses? ( !tiles? ( sys-libs/ncurses ) )
ncurses? ( sys-libs/ncurses )
tiles? (
media-libs/freetype
media-libs/libpng
media-libs/libsdl2[X,opengl,video]
media-libs/sdl2-ttf
media-libs/sdl2-image[png]
sound? (
media-libs/libsdl2[sound]
media-libs/sdl2-mixer[vorbis]
)
virtual/glu
virtual/opengl
)"
DEPEND="${RDEPEND}
test? ( dev-cpp/catch )
"
BDEPEND="
nls? ( sys-devel/gettext )
"
pkg_setup() {
if use !ncurses && use !tiles ; then
ewarn "Neither ncurses nor tiles frontend"
ewarn "selected, choosing ncurses only."
ewarn "Note that you can also enable both."
fi
if use sound && use !tiles ; then
ewarn "Sound support is only available with tiles."
fi
}
src_prepare() {
# Replace bundled catch2 package with system implementation
# https://bugs.gentoo.org/829950
if use test; then
cp /usr/include/catch2/catch.hpp "${S}/test/catch" || die "Couldn't substitute system catch2"
fi
}
src_compile() {
myemakeargs=(
RELEASE=$(usex debug "0" "1")
CXX="$(tc-getCXX)"
LDFLAGS="${LDFLAGS}"
LOCALIZE=$(usex nls "1" "0")
LTO=$(usex lto "1" "0")
MAKEOPTS="${MAKEOPTS}"
USE_XDG_DIR=1
SOUND=$(usex sound "1" "0")
PREFIX=/usr
)
if use ncurses || (use !ncurses && use !tiles) ; then
emake "${myemakeargs[@]}"
fi
if use tiles ; then
emake "${myemakeargs[@]}" clean
emake "${myemakeargs[@]}" "TILES=1"
fi
}
# TODO: src_test()
src_install() {
emake "${myemakeargs[@]}" \
$(usex tiles "TILES=1" "") \
DESTDIR="${D}" \
install
}
pkg_postinst() {
xdg_icon_cache_update
if use tiles && use ncurses ; then
elog
elog "Since you have enabled both tiles and ncurses frontends"
elog "the ncurses binary is called 'cataclysm' and the"
elog "tiles binary is called 'cataclysm-tiles'."
fi
}
pkg_postrm() {
xdg_icon_cache_update
} |
Last edited by strategictraveler on Sat Oct 26, 2024 9:14 pm; edited 1 time in total |
|
Back to top |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1896
|
Posted: Sat Oct 26, 2024 9:09 pm Post subject: |
|
|
strategictraveler wrote: | Code: |
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/CleverRaven/Cataclysm-DDA.git"
else
SRC_URI="https://github.com/CleverRaven/Cataclysm-DDA/archive/${PV}.tar.gz"
KEYWORDS="~x86 ~amd64 ~arm ~arm64"
|
|
There is no fi after the else to terminate the if statement. |
|
Back to top |
|
|
strategictraveler n00b
Joined: 19 Oct 2024 Posts: 3
|
Posted: Sat Oct 26, 2024 9:16 pm Post subject: |
|
|
Ah, I don't know how I missed that, thanks. |
|
Back to top |
|
|
|