current SVN HEAD 1212 doesn't compile on Solaris because:
- uname -p must be used for sunos too.
- libversioncheck doesn't work properly with the default 'grep' and 'cpp'.
I patched it this way (please tell me if it may be acceptable)
Index: quake3-Solaris_SVN1212/trunk/Makefile
===================================================================
--- quake3-Solaris_SVN1212/trunk/Makefile (revision 1212)
+++ quake3-Solaris_SVN1212/trunk/Makefile (working copy)
@@ -13,6 +13,11 @@
COMPILE_ARCH=$(shell uname -m | sed -e s/i.86/i386/)
endif
+ifeq ($(COMPILE_PLATFORM),sunos)
+ # SunOS is a tad different..
+ COMPILE_ARCH=$(shell uname -p | sed -e s/i.86/i386/)
+endif
+
ifeq ($(COMPILE_PLATFORM),mingw32)
ifeq ($(COMPILE_ARCH),i386)
COMPILE_ARCH=x86
@@ -92,6 +97,10 @@
USE_CURL=1
endif
+ifndef USE_SDL_VERSION_CHECK
+USE_SDL_VERSION_CHECK=1
+endif
+
ifndef USE_CURL_DLOPEN
ifeq ($(PLATFORM),mingw32)
USE_CURL_DLOPEN=0
@@ -664,6 +673,7 @@
INSTALL=ginstall
MKDIR=gmkdir
COPYDIR="/usr/local/share/games/quake3"
+ USE_SDL_VERSION_CHECK=0
ifneq (,$(findstring i86pc,$(shell uname -m)))
ARCH=i386
@@ -866,7 +876,11 @@
# Create the build directories, check libraries and print out
# an informational message, then start building
+ifeq ($(USE_SDL_VERSION_CHECK=1),1)
targets: makedirs libversioncheck
+else
+targets: makedirs
+endif
@echo ""
@echo "Building ioquake3 in $(B):"
@echo " PLATFORM: $(PLATFORM)"
current SVN HEAD 1212 doesn't compile on Solaris because: - uname -p must be used for sunos too. - libversioncheck doesn't work properly with the default 'grep' and 'cpp'. I patched it this way (please tell me if it may be acceptable) Index: quake3-Solaris_SVN1212/trunk/Makefile =================================================================== --- quake3-Solaris_SVN1212/trunk/Makefile (revision 1212) +++ quake3-Solaris_SVN1212/trunk/Makefile (working copy) @@ -13,6 +13,11 @@ COMPILE_ARCH=$(shell uname -m | sed -e s/i.86/i386/) endif +ifeq ($(COMPILE_PLATFORM),sunos) + # SunOS is a tad different.. + COMPILE_ARCH=$(shell uname -p | sed -e s/i.86/i386/) +endif + ifeq ($(COMPILE_PLATFORM),mingw32) ifeq ($(COMPILE_ARCH),i386) COMPILE_ARCH=x86 @@ -92,6 +97,10 @@ USE_CURL=1 endif +ifndef USE_SDL_VERSION_CHECK +USE_SDL_VERSION_CHECK=1 +endif + ifndef USE_CURL_DLOPEN ifeq ($(PLATFORM),mingw32) USE_CURL_DLOPEN=0 @@ -664,6 +673,7 @@ INSTALL=ginstall MKDIR=gmkdir COPYDIR="/usr/local/share/games/quake3" + USE_SDL_VERSION_CHECK=0 ifneq (,$(findstring i86pc,$(shell uname -m))) ARCH=i386 @@ -866,7 +876,11 @@ # Create the build directories, check libraries and print out # an informational message, then start building +ifeq ($(USE_SDL_VERSION_CHECK=1),1) targets: makedirs libversioncheck +else +targets: makedirs +endif @echo "" @echo "Building ioquake3 in $(B):" @echo " PLATFORM: $(PLATFORM)"Created attachment 1582 [details] Patch for proposed changesInstead of disabling the SDL check, could you try this patch instead? I assume Solaris grep is what is causing it to fail for you. Index: Makefile =================================================================== --- Makefile (revision 1216) +++ Makefile (working copy) @@ -1072,7 +1072,7 @@ "#if SDL_VERSION_ATLEAST(" \ "$(MINSDL_MAJOR),$(MINSDL_MINOR),$(MINSDL_PATCH)" \ ")\nMINSDL_PASSED\n#endif" | \ - $(CC) $(BASE_CFLAGS) -E - | grep -q MINSDL_PASSED || \ + $(CC) $(BASE_CFLAGS) -E - | grep MINSDL_PASSED > /dev/null || \ ( /bin/echo "SDL version" \ "$(MINSDL_MAJOR).$(MINSDL_MINOR).$(MINSDL_PATCH)" \ "or greater required" && exit 1 )That's not enough to fix it on SunOS, here's what I get with your patch (removed the '@' so I could see what was happening): raistlin@ergoth:[/tmp/trunk][521]$ gmake gmake[1]: Entering directory `/tmp/trunk' /bin/echo -e "#include \"SDL_version.h\"\n" \ "#if SDL_VERSION_ATLEAST(" \ "1,2,7" \ ")\nMINSDL_PASSED\n#endif" | \ gcc -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes -pipe -DUSE_ICON -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DNO_VM_COMPILED -DUSE_LOCAL_HEADERS -DSVN_VERSION=\\\"1.35_SVN1216M\\\" -DMINSDL_MAJOR=1 -DMINSDL_MINOR=2 -DMINSDL_PATCH=7 -E - | grep MINSDL_PASSED > /dev/null || \ ( /bin/echo "SDL version" \ "1.2.7" \ "or greater required" && exit 1 ) <stdin>:2:25: missing binary operator before token "(" SDL version 1.2.7 or greater required gmake[1]: *** [libversioncheck] Error 1 gmake[1]: Leaving directory `/tmp/trunk' gmake: *** [release] Error 2