Forgot to add those
This commit is contained in:
parent
773648d8a6
commit
6cab99493e
86
eclass/wise.eclass
Normal file
86
eclass/wise.eclass
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
# Copyright 2021-2021 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
# @ECLASS: wise.eclass
|
||||||
|
# @MAINTAINER:
|
||||||
|
# moog621@gmail.com
|
||||||
|
# @AUTHOR:
|
||||||
|
# moog621@gmail.com
|
||||||
|
# @SUPPORTED_EAPIS: 7
|
||||||
|
# @BLURB: Functions to work with WISE installers.
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# This class will provide various bits and bobs to work with WISE installers
|
||||||
|
# that were popular in retail and shareware softwares in the 1990s.
|
||||||
|
# There are 2 key components at play.
|
||||||
|
# First, there is a Pascal program that runs in DOS, Windows and OS/2.
|
||||||
|
# There exists source code for it, but porting it to FreePascal and Linux
|
||||||
|
# proves very challenging. Instead, the DOS version is run inside of DOSBox.
|
||||||
|
# It takes a considerable amount of time, but it gets it right. Unfortunately,
|
||||||
|
# the program does not respect any directory structures or filenames, so
|
||||||
|
# we are left to pick up the pieces with key component 2: shell functions
|
||||||
|
# made for cleaning up this mess.
|
||||||
|
|
||||||
|
# In order to disable network-sandbox:
|
||||||
|
PROPERTIES+="live"
|
||||||
|
|
||||||
|
# @ECLASS-VARIABLE: WISE_INSTALLER
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# WISE installer filename. It can be an array!
|
||||||
|
: ${WISE_INSTALLER:=}
|
||||||
|
|
||||||
|
LICENSE+="e_wise-mit-like"
|
||||||
|
SRC_URI+="
|
||||||
|
http://kannegieser.net/veit/programm/e_wise.arj
|
||||||
|
"
|
||||||
|
|
||||||
|
BDEPEND+="
|
||||||
|
games-emulation/dosbox
|
||||||
|
app-arch/p7zip
|
||||||
|
"
|
||||||
|
|
||||||
|
wise_unpack_installers() {
|
||||||
|
mkdir wise_output
|
||||||
|
mkdir ewise
|
||||||
|
pushd ewise
|
||||||
|
7z x "${DISTDIR}/e_wise.arj"
|
||||||
|
popd
|
||||||
|
local counter=0
|
||||||
|
for wiseguy in ${WISE_INSTALLER[@]}; do
|
||||||
|
wiseguy_abs=$(readlink -f ${wiseguy})
|
||||||
|
wiseguy_dir=$(echo ${wiseguy} | sed 's/\.exe//')
|
||||||
|
wiseguy_config="${wiseguy}.dosbox"
|
||||||
|
cat <<EOF > "${wiseguy_config}"
|
||||||
|
[autoexec]
|
||||||
|
mount D ${WORKDIR}/ewise
|
||||||
|
mount E ${WORKDIR}/${wiseguy_dir}
|
||||||
|
mount F ${WORKDIR}
|
||||||
|
D:\\E_WISE_D.EXE F:\\${counter}.exe E:\\
|
||||||
|
exit
|
||||||
|
EOF
|
||||||
|
mkdir ${wiseguy_dir}
|
||||||
|
ln -s ${DISTDIR}/${wiseguy} ${counter}.exe
|
||||||
|
pushd ${wiseguy_dir}
|
||||||
|
elog "Extracting ${wiseguy} in DOSBox"
|
||||||
|
SDL_VIDEODRIVER=dummy dosbox -conf ${WORKDIR}/${wiseguy_config}
|
||||||
|
elog "Creating directory structures"
|
||||||
|
grep filename:\ MAINDIR 00000000.BAT | sed 's/^.*filename:\ MAINDIR\\//;s/\\/\//g;s:[^/]*$::;s/\/$//' | sort -u | xargs mkdir -p
|
||||||
|
elog "Renaming files"
|
||||||
|
grep ^MOVE\s*.*\ MAINDIR 00000000.BAT -B1 | tr -d '\r' | sed 's/\\/\//g;s/^MOVE\s*\([^/]*\)\ MAINDIR\/\(.*\)$/\2\/\1/;s/^RENAME\ \([^/]*\)\ .*$/mv\ \1/;/^\-\-$/d' | sed 'N;s/\.EWI\n/\.EWI\ /' | sh
|
||||||
|
for i in $(ls | grep \\.EWI$); do
|
||||||
|
if [ $(grep -c "^RENAME\ $i\ .*$" 00000000.BAT) -eq 0 ]; then
|
||||||
|
elog "Removing homeless file $i"
|
||||||
|
rm -f $i
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
for i in $(grep EWI\ W32INST_PATH_ 00000000.BAT | awk '{print $2}'); do
|
||||||
|
elog "Removing useless file $i"
|
||||||
|
rm -f $i
|
||||||
|
done
|
||||||
|
elog "Removing useless file 00000000.BAT"
|
||||||
|
elog "Removing useless file 00000000.TXT"
|
||||||
|
rm -f 00000000.BAT 00000000.TXT
|
||||||
|
mv * ${WORKDIR}/wise_output
|
||||||
|
popd
|
||||||
|
counter=$((${counter} + 1))
|
||||||
|
done
|
||||||
|
}
|
2
games-fps/counter-strike-data/Manifest
Normal file
2
games-fps/counter-strike-data/Manifest
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
DIST csv15full.exe 127194009 BLAKE2B fd2593370cfd3dd5f93932d0509ab308d30de4028c9f60eb4ecc7bf83c7f8acb5f2831f05108b74d06c263a145a2293c6780ca17aa1ed04b5b7b8e26449d9e00 SHA512 5b2816e61d26b0017affcf59db7e6117f01410988529094c2cba62b2f0f07d0b5828d73cb527b03a60c7b89aa5453f2cdab255ed15a011f56e2fc0423d4883fe
|
||||||
|
DIST e_wise.arj 108222 BLAKE2B 8bd042899b1edf6ab93cefe72837e7892bd290d32bf9dfa37139abbd4bf1731292f95e1a300e676f1258797bb17fe68416d8040de1cf076cefd44ca7bd95f01f SHA512 cfce00151d4e67810287be885a917389cb36c42d8e6bb9d25e4f64628352579cfe260959c4eef31f8fa30bfbc739678b8d5a88c4c35c1d2a6b263bd538e39780
|
37
games-fps/counter-strike-data/counter-strike-data-1.5.ebuild
Normal file
37
games-fps/counter-strike-data/counter-strike-data-1.5.ebuild
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
# Copyright 1999-2021 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
inherit wise
|
||||||
|
|
||||||
|
DESCRIPTION="Freeware release of Counter-Strike 1.5"
|
||||||
|
HOMEPAGE="web.archive.org/web/20031231214931/http://www.counter-strike.net/"
|
||||||
|
WISE_INSTALLER="csv15full.exe"
|
||||||
|
SRC_URI+="
|
||||||
|
https://archive.org/download/counter-strike-1.5/${WISE_INSTALLER}
|
||||||
|
"
|
||||||
|
|
||||||
|
LICENSE="UNKNOWN"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~arm ~ppc64 ~x86"
|
||||||
|
|
||||||
|
RDEPEND=""
|
||||||
|
BDEPEND=""
|
||||||
|
|
||||||
|
S="${WORKDIR}"
|
||||||
|
|
||||||
|
src_unpack() {
|
||||||
|
wise_unpack_installers
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
insinto "/usr/share"
|
||||||
|
doins -r wise_output/cstrike
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
echo
|
||||||
|
elog "In order to play this mod run FreeCS"
|
||||||
|
echo
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user