Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 203400 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/portage/games-rpg/nwn-data/nwn-data-1.29-r2.ebuild (-5 / +58 lines)
Lines 4-9 Link Here
4
4
5
inherit eutils games
5
inherit eutils games
6
6
7
# 3-in-1 DVD - NWN, SoU, HotU (1 disk)
7
# Diamond DVD - NWN, SoU, HotU (1 disk)
8
# Diamond DVD - NWN, SoU, HotU (1 disk)
8
# Platinum CD/DVD - NWN, SoU, HotU (4 disks/1 disk)
9
# Platinum CD/DVD - NWN, SoU, HotU (4 disks/1 disk)
9
# Deluxe CD - NWN, SoU, HotU (5 disks)
10
# Deluxe CD - NWN, SoU, HotU (5 disks)
Lines 74-80 Link Here
74
	# this will make our lives so much easier.
75
	# this will make our lives so much easier.
75
	if [[ -n "${CD_ROOT}" ]]
76
	if [[ -n "${CD_ROOT}" ]]
76
	then
77
	then
77
		if [[ -f "${CD_ROOT}"/KingmakerSetup.exe ]]
78
		if [[ -f "${CD_ROOT}"/data5.cab ]]
79
		then
80
			NWN_SET="3in1_dvd"
81
			einfo "Neverwinter Nights 3-in-1 DVD found..."
82
		elif [[ -f "${CD_ROOT}"/KingmakerSetup.exe ]]
78
		then
83
		then
79
			NWN_SET="diamond_dvd"
84
			NWN_SET="diamond_dvd"
80
			einfo "Neverwinter Nights Diamond DVD found..."
85
			einfo "Neverwinter Nights Diamond DVD found..."
Lines 95-101 Link Here
95
	# set, or even a DVD set.
100
	# set, or even a DVD set.
96
	elif [[ -n "${CD_ROOT_1}" ]]
101
	elif [[ -n "${CD_ROOT_1}" ]]
97
	then
102
	then
98
		if [[ -f "${CD_ROOT_1}"/KingmakerSetup.exe ]]
103
		if [[ -f "${CD_ROOT_1}"/data5.cab ]]
104
		then
105
			NWN_SET="3in1_dvd"
106
			einfo "Neverwinter Nights 3-in-1 DVD found..."
107
		elif [[ -f "${CD_ROOT_1}"/KingmakerSetup.exe ]]
99
		then
108
		then
100
			NWN_SET="diamond_dvd"
109
			NWN_SET="diamond_dvd"
101
			einfo "Neverwinter Nights Diamond DVD found..."
110
			einfo "Neverwinter Nights Diamond DVD found..."
Lines 116-124 Link Here
116
	# to figure out what we have to work from.
125
	# to figure out what we have to work from.
117
	else
126
	else
118
		local mline=
127
		local mline=
119
		for mline in $(mount | egrep -e '(iso|cdrom)' | awk '{print $3}')
128
		for mline in $(mount | egrep -e '(iso|cdrom|udf)' | awk '{print $3}')
120
		do
129
		do
121
			if [[ -f "${mline}"/KingmakerSetup.exe ]]
130
			if [[ -f "${mline}"/data5.cab ]]
131
			then
132
				NWN_SET="3in1_dvd"
133
				einfo "Neverwinter Nights 3-in-1 DVD found..."
134
			elif [[ -f "${mline}"/KingmakerSetup.exe ]]
122
			then
135
			then
123
				NWN_SET="diamond_dvd"
136
				NWN_SET="diamond_dvd"
124
				einfo "Neverwinter Nights Diamond DVD found..."
137
				einfo "Neverwinter Nights Diamond DVD found..."
Lines 150-155 Link Here
150
	# Here is where we start our CD/DVD detection for changing disks.
163
	# Here is where we start our CD/DVD detection for changing disks.
151
	export CDROM_NAME_1="CD1" CDROM_NAME_2="CD2" CDROM_NAME_3="CD3"
164
	export CDROM_NAME_1="CD1" CDROM_NAME_2="CD2" CDROM_NAME_3="CD3"
152
	case "${NWN_SET}" in
165
	case "${NWN_SET}" in
166
	3in1_dvd)
167
		einfo "Both Shadows of Undrentide and Hordes of the Underdark will"
168
		einfo "be installed from your DVD along with Neverwinter Nights."
169
		touch .metadata/sou || die "touch sou"
170
		touch .metadata/hou || die "touch hou"
171
		touch .metadata/orig || die "touch orig"
172
		cdrom_get_cds data5.cab
173
		;;
153
	diamond_dvd)
174
	diamond_dvd)
154
		einfo "Both Shadows of Undrentide and Hordes of the Underdark will"
175
		einfo "Both Shadows of Undrentide and Hordes of the Underdark will"
155
		einfo "be installed from your DVD along with Neverwinter Nights."
176
		einfo "be installed from your DVD along with Neverwinter Nights."
Lines 235-240 Link Here
235
		get_cd_set
256
		get_cd_set
236
257
237
		case ${NWN_SET} in
258
		case ${NWN_SET} in
259
		3in1_dvd)
260
			mkdir -p "${S}"
261
			cd "${S}"
262
			einfo "Unpacking files..."
263
			# We don't give the user the option to install SoU/HotU.  While some
264
			# people might complain about this, most newer NWN stuff requires
265
			# them both anyway, so it makes no sense not to install them.
266
			unshield x "${CDROM_ROOT}"/data1.hdr || die "unpacking"
267
			# We have to adjust the files after unpacking the cab file.
268
			rm -rf _*
269
			#mv -f App_Executables/Miles/* miles/
270
			mkdir -p ambient/
271
			mkdir -p data/
272
			mv -f App_Executables/ambient/*.wav ambient/
273
			#mv -f App_Executables/docs .
274
			mv -f App_Executables/{modules,texturepacks} .
275
			mv -f App_Executables/{dm,local}vault .
276
			mv -f App_Executables/data/xp*.bif data/
277
			mv -f App_Executables/*.key .
278
			mv -f App_Executables/nwm .
279
			if use videos
280
			then
281
				mv -f App_Executables/movies .
282
			fi
283
			mkdir -p utils/nwupdateskins/
284
			mv -f App_Executables/utils/nwupdateskins/*.bmp utils/nwupdateskins/
285
			rm -rf App_Executables/
286
			;;
238
		diamond_dvd)
287
		diamond_dvd)
239
			# This is probably the simplest NWN to install.
288
			# This is probably the simplest NWN to install.
240
			mkdir -p "${S}"
289
			mkdir -p "${S}"
Lines 433-438 Link Here
433
			mkdir -p $currentlocale
482
			mkdir -p $currentlocale
434
			cd ${currentlocale}
483
			cd ${currentlocale}
435
			unpack ${a} || die "unpacking ${a}"
484
			unpack ${a} || die "unpacking ${a}"
485
			# go back to continue the loop, otherwise further
486
			# unpacking goes to the wrong directory and the next
487
			# block after this loop throws errors
488
			cd ..
436
		fi
489
		fi
437
	done
490
	done
438
	if use linguas_en
491
	if use linguas_en
Lines 446-452 Link Here
446
	mv nwn.ini nwn.ini.default
499
	mv nwn.ini nwn.ini.default
447
500
448
	sed -i -e 's,/bin/sh,/bin/bash,g' -e '\:^./nwmain .*:i \
501
	sed -i -e 's,/bin/sh,/bin/bash,g' -e '\:^./nwmain .*:i \
449
'"dir='${dir}';LINGUAS='${LINGUAS}'"' \
502
'"dir='${dir}';LINGUAS='${LINGUAS}'"';LANG="${LANG/_*}" \
450
die() { \
503
die() { \
451
	echo "$*" 1>&2 \
504
	echo "$*" 1>&2 \
452
	exit 1 \
505
	exit 1 \

Return to bug 203400