--- nwn-data-1.29-r1.ebuild.orig 2006-12-14 13:52:36.000000000 +0100 +++ nwn-data-1.29-r1.ebuild 2006-12-14 20:55:26.000000000 +0100 @@ -39,7 +39,7 @@ LICENSE="NWN-EULA" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="cdinstall hou nowin sou ${LANGUAGES}" +IUSE="cdinstall hou nowin sou videos ${LANGUAGES}" RESTRICT="strip mirror" RDEPEND="virtual/opengl @@ -265,7 +265,7 @@ # Now, we need to create our directories, since we know we'll end up # needing them for our install. mkdir -p ambient data dmvault docs lib localvault miles modules \ - music nwm override texturepacks scripttemplates movies + music nwm override texturepacks scripttemplates # Handle NWN CD1 mkdir "${S}"/disc1_tmp @@ -291,11 +291,17 @@ # NWN CD3 cdrom_load_next_cd einfo "Copying files from cd..." - for i in ambient data movies music + for i in ambient data music do cp ${CDROM_ROOT}/${i}/* "${S}"/${i} || die "error copying data" chmod -x "${S}"/${i}/* done + if use videos + then + mkdir -p "${S}"/movies + cp ${CDROM_ROOT}/movies/* "${S}"/movies || die "error copying data" + chmod -x "${S}"/movies/* + fi # Now, we install HoU and SoU, if necessary if use sou @@ -419,6 +425,9 @@ if [[ ! -a nwn.ini ]]; then \ cp nwn.ini.default nwn.ini \ fi \ +if [[ -r ./nwmovies.so ]]; then \ + export LD_PRELOAD=./nwmovies.so:$LD_PRELOAD \ +fi \ if [[ -r ./nwmouse.so ]]; then \ export XCURSOR_PATH="$(pwd)" \ export XCURSOR_THEME=nwmouse \ @@ -433,6 +442,10 @@ rm -rf "${S}"/dialog.tlk "${S}"/dialog.TLK "${S}"/dialogf.tlk \ "${S}"/dmclient "${S}"/nwmain "${S}"/nwserver "${S}"/nwm/* \ "${S}"/SDL-1.2.5 "${S}"/fixinstall + if ! use videos + then + rm -rf "${S}"/movies/* + fi mv "${S}"/* "${Ddir}" mv "${S}"/.metadata "${Ddir}" keepdir "${dir}"/servervault @@ -441,7 +454,7 @@ keepdir "${dir}"/portraits keepdir "${dir}"/hak cd "${Ddir}" - for d in ambient data dmvault hak localvault music override portraits + for d in ambient data dmvault hak localvault movies music override portraits do if [ -d ${d} ] then @@ -487,6 +500,10 @@ elog " hak/" elog " localvault/" elog " modules/" + if use videos + then + elog " movies/" + fi elog " music/" elog " portraits/" elog " saves/" @@ -520,6 +537,12 @@ ewarn "${dir}/modules" ewarn "or emerge with USE=nowin." fi + if ! use cdinstall && use nowin && use videos + then + ewarn "Some/all movies will be missing. You can copy them manually into :" + ewarn "${dir}/movies" + ewarn "or emerge with USE=cdinstall and/or USE=-nowin." + fi elog "This is only the data portion, you will also need games-rpg/nwn to" elog "play Neverwinter Nights." echo