- Fix the build with recent GCC [1]

- Autodetect MMX support and remove a knob
- Beautify pkg-messsage a bit

Reported by:	pointyhat [1]
This commit is contained in:
Alexey Dokuchaev 2007-06-14 06:40:39 +00:00
parent 3975e1fb8c
commit a811f65c68
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=193455
4 changed files with 93 additions and 15 deletions

View file

@ -53,24 +53,18 @@ CONFIGURE_ARGS+= --enable-audio=oss --with-default-output=oss
#.else
CONFIGURE_ARGS+= --disable-sdl
#.endif
.if ${ARCH} == "i386"
.if defined(WITHOUT_MMX)
CONFIGURE_ARGS+= --disable-mmx
.else
.if ${MACHINE_CPU:Mmmx}
CONFIGURE_ARGS+= --enable-mmx
BUILD_DEPENDS+= nasm:${PORTSDIR}/devel/nasm
.endif
.else
CONFIGURE_ARGS+= --disable-mmx
.endif
pre-everything::
#.if !defined(WITH_SDL)
# @${ECHO_MSG} '===> Define WITH_SDL to enable SDL support'
#.endif
.if ${ARCH} == "i386"
.if !defined(WITHOUT_MMX)
@${ECHO_MSG} '===> Define WITHOUT_MMX to disable MMX routines'
.endif
.endif
post-extract:
@${CP} ${WRKSRC}/INSTALL ${WRKSRC}/doc/INSTALL

View file

@ -0,0 +1,37 @@
--- src/cmd2F.c.orig Mon Jul 21 02:30:16 2003
+++ src/cmd2F.c Thu Jun 14 13:05:15 2007
@@ -1381,7 +1381,7 @@
for (i = 0; i < eNumof; i++) {
*vData = LittleEndian_getW(nact->datatbl_addr, 0);
- ((WORD *)nact->datatbl_addr)++;
+ nact->datatbl_addr += sizeof(WORD);
vData++;
}
@@ -1397,14 +1397,14 @@
for (i = 0; i < eNumof; i++) {
v_strcpy(eStrNum + i -1, (const char *)(nact->datatbl_addr));
- (char *)(nact->datatbl_addr) += (strlen((const char *)nact->datatbl_addr) + 1);
+ nact->datatbl_addr += (strlen((const char *)nact->datatbl_addr) + 1);
}
}
void commands2F83() {
int eNumof = sys_getCaliValue();
- ((WORD *)nact->datatbl_addr) += eNumof;
+ nact->datatbl_addr += eNumof * sizeof(WORD);
DEBUG_COMMAND("dataSkipWORD %d:\n", eNumof);
}
@@ -1414,7 +1414,7 @@
int i;
for (i = 0; i < eNumof; i++) {
- (char *)(nact->datatbl_addr) += (strlen((const char *)nact->datatbl_addr) + 1);
+ nact->datatbl_addr += (strlen((const char *)nact->datatbl_addr) + 1);
}
DEBUG_COMMAND("dataSkipString %d:\n", eNumof);

View file

@ -0,0 +1,47 @@
--- src/cmdf.c.orig Sat Dec 21 18:28:35 2002
+++ src/cmdf.c Thu Jun 14 13:03:47 2007
@@ -82,22 +82,22 @@
DEBUG_COMMAND("F1 %d,%d:\n", str_number, skip);
for (i = 0; i < skip; i++) {
- (char *)(nact->datatbl_addr) += (strlen((const char *)nact->datatbl_addr) + 1);
+ nact->datatbl_addr += (strlen((const char *)nact->datatbl_addr) + 1);
}
v_strcpy(str_number - 1 , (const char *)(nact->datatbl_addr));
- (char *)(nact->datatbl_addr) += (strlen((const char *)nact->datatbl_addr) + 1);
+ nact->datatbl_addr += (strlen((const char *)nact->datatbl_addr) + 1);
}
static void commandF2() {
int *read_var = sys_getCaliVariable();
int skip = sys_getCaliValue();
- ((WORD *)nact->datatbl_addr) += skip;
+ nact->datatbl_addr += skip * sizeof(WORD);
*read_var = LittleEndian_getW(nact->datatbl_addr, 0);
- ((WORD *)nact->datatbl_addr)++;
+ nact->datatbl_addr += sizeof(WORD);
DEBUG_COMMAND("F2 %d,%d:\n", *read_var, skip);
}
@@ -118,7 +118,7 @@
for (i = 0; i < count; i++) {
*read_var = LittleEndian_getW(nact->datatbl_addr, 0);
- ((WORD *)nact->datatbl_addr)++;
+ nact->datatbl_addr += sizeof(WORD);
read_var++;
}
@@ -155,7 +155,7 @@
for (i = 0; i < count; i++) {
for (j = 0; j < data_width; j++) {
*(F6Index[j] + i) = LittleEndian_getW(nact->datatbl_addr, 0);
- ((WORD *)nact->datatbl_addr)++;
+ nact->datatbl_addr += sizeof(WORD);
}
}

View file

@ -1,15 +1,15 @@
o make sure your kernel has been configured with options SHMMAXPGS=4096
o Make sure your kernel has been configured with options SHMMAXPGS=4096
when you run on display 16bpp or deeper color.
o copy PREFIX/share/example/xsystem35/xsys35rc.sample
o Copy PREFIX/share/example/xsystem35/xsys35rc.sample
to ~/.xsys35rc and fit it to your environment.
o install game data from AliceSoft's cdrom with
o Install game data from AliceSoft's cdrom with
PREFIX/bin/instgame.
o pcm0 sound device doesn't work well with this program for now.
Try snd0 instead, OSS commercial product or
-devdsp none commandline option as the last resort.
`-devdsp none' command line option as the last resort.
enjoy!
Enjoy!