--- /usr/portage/games-fps/quake1-data/quake1-data-2.40.ebuild 2006-07-05 02:36:53.000000000 +0100 +++ quake1-data-2.40.ebuild 2006-08-10 17:06:07.000000000 +0100 @@ -21,40 +21,48 @@ pkg_setup() { games_pkg_setup - if built_with_use "games-fps/quake1-demodata" symlink ; then - eerror "The symlink for the demo data conflicts with the cdinstall data" - die "Unmerge games-fps/quake1-demodata to remove the conflict" + if has_version "games-fps/quake1-demodata" \ + && built_with_use "games-fps/quake1-demodata" symlink ; then + eerror "The symlink for the demo data conflicts with the cdinstall data." + die "Unmerge games-fps/quake1-demodata to remove the conflict." fi - export CDROM_NAME_SET=("Existing Install" "Quake CD" "Ultimate Quake Collection") - cdrom_get_cds id1:q101_int.1:Setup/ID1 + export CDROM_SET_NAMES=("Existing Install" "Quake CD" "Quake CD (alternate)" "Ultimate Quake Collection") + cdrom_get_cds id1:q101_int.1:resource.1:Setup/ID1 } src_unpack() { - echo ">>> Unpacking q101_int to ${PWD}" - if [[ ${CDROM_SET} == "1" ]] ; then - cat "${CDROM_ROOT}"/q101_int.1 "${CDROM_ROOT}"/q101_int.2 > \ - "${S}"/q101_int.exe - lha xqf "${S}"/q101_int.exe || die "failure unpacking q101_int.exe" + if [[ "${CDROM_SET}" == "1" ]] ; then + echo ">>> Unpacking q101_int to ${PWD}" + cat "${CDROM_ROOT}"/q101_int.{1,2} > q101_int.exe + lha xqf q101_int.exe || die "lha q101_int.exe failed" rm -f q101_int.exe + elif [[ "${CDROM_SET}" == "2" ]] ; then + echo ">>> Unpacking resource.1 to ${PWD}" + lha xqf "${CDROM_ROOT}"/resource.1 || die "lha resource.1 failed" fi } src_install() { - insinto ${GAMES_DATADIR}/quake1/id1 - case ${CDROM_SET} in - 0) doins "${CDROM_ROOT}"/id1/* || die "doins pak files" + insinto "${GAMES_DATADIR}/quake1/id1" + + case "${CDROM_SET}" in + 0) doins "${CDROM_ROOT}"/id1/* || die "doins id1/* 0 failed" dodoc "${CDROM_ROOT}"/*.txt ;; - 1) doins id1/* || die "doins pak files" + 1) doins id1/* || die "doins id1/* 1 failed" + dodoc *.txt + ;; + 2) doins id1/* || die "doins id1/* 2 failed" dodoc *.txt ;; - 2) newins "${CDROM_ROOT}"/Setup/ID1/PAK0.PAK pak0.pak \ + 3) newins "${CDROM_ROOT}"/Setup/ID1/PAK0.PAK pak0.pak \ || die "ins pak0.pak failed" newins "${CDROM_ROOT}"/Setup/ID1/PAK1.PAK pak1.pak \ || die "ins pak1.pak failed" dodoc "${CDROM_ROOT}"/Docs/* ;; esac + prepgamesdirs }