illumos port. (#4732)
overcoming sun constant defined in this platform. forcing 64 bits build as angelscript assembly is incorrect for 32 bits.
This commit is contained in:
parent
eb7a5b2ee6
commit
1f0ea77f80
@ -196,7 +196,7 @@ if(UNIX OR MINGW)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
if(UNIX AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
if(NOT PKGCONFIG_FOUND)
|
||||
@ -363,6 +363,11 @@ elseif(MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") # Enable multi-processor compilation (faster)
|
||||
endif()
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "SunOs")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
|
||||
endif()
|
||||
|
||||
|
||||
# Build the angelscript library if not in system
|
||||
if(USE_SYSTEM_ANGELSCRIPT)
|
||||
@ -686,6 +691,10 @@ if(NOT SERVER_ONLY)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
|
||||
target_link_libraries(supertuxkart nsl socket vorbisfile)
|
||||
endif()
|
||||
|
||||
if (USE_DNS_C)
|
||||
target_link_libraries(supertuxkart dnsc)
|
||||
else()
|
||||
|
@ -14,7 +14,7 @@ if(WIN32)
|
||||
find_library(FREETYPE_LIBRARY NAMES freetype libfreetype PATHS "${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/lib")
|
||||
set(FREETYPE_FOUND 1)
|
||||
set(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY})
|
||||
elseif(APPLE)
|
||||
elseif(APPLE OR ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
|
||||
find_path(FREETYPE_INCLUDE_DIRS NAMES ft2build.h PATH_SUFFIXES freetype2 include/freetype2 include)
|
||||
find_library(FREETYPE_LIBRARY NAMES freetype)
|
||||
set(FREETYPE_FOUND 1)
|
||||
|
@ -887,7 +887,7 @@ IFileList* CFileSystem::createFileList(const io::path& directory)
|
||||
size = buf.st_size;
|
||||
isDirectory = S_ISDIR(buf.st_mode);
|
||||
}
|
||||
#if !defined(_IRR_SOLARIS_PLATFORM_) && !defined(__CYGWIN__) && !defined(__HAIKU__)
|
||||
#if !defined(_IRR_SOLARIS_PLATFORM_) && !defined(__CYGWIN__) && !defined(__HAIKU__) && !defined(__sun)
|
||||
// only available on some systems
|
||||
else
|
||||
{
|
||||
|
@ -2278,7 +2278,7 @@ bool IrrDriver::OnEvent(const irr::SEvent &event)
|
||||
scene::ISceneNode *IrrDriver::addLight(const core::vector3df &pos,
|
||||
float energy, float radius,
|
||||
float r, float g, float b,
|
||||
bool sun, scene::ISceneNode* parent)
|
||||
bool sun_, scene::ISceneNode* parent)
|
||||
{
|
||||
#ifndef SERVER_ONLY
|
||||
if (CVS->isGLSL())
|
||||
@ -2286,7 +2286,7 @@ scene::ISceneNode *IrrDriver::addLight(const core::vector3df &pos,
|
||||
if (parent == NULL) parent = m_scene_manager->getRootSceneNode();
|
||||
LightNode *light = NULL;
|
||||
|
||||
if (!sun)
|
||||
if (!sun_)
|
||||
light = new LightNode(m_scene_manager, parent, energy, radius,
|
||||
r, g, b);
|
||||
else
|
||||
@ -2297,7 +2297,7 @@ scene::ISceneNode *IrrDriver::addLight(const core::vector3df &pos,
|
||||
|
||||
m_lights.push_back(light);
|
||||
|
||||
if (sun)
|
||||
if (sun_)
|
||||
{
|
||||
m_renderer->addSunLight(pos);
|
||||
}
|
||||
|
@ -410,7 +410,7 @@ public:
|
||||
// ------------------------------------------------------------------------
|
||||
scene::ISceneNode *addLight(const core::vector3df &pos, float energy,
|
||||
float radius, float r, float g, float b,
|
||||
bool sun = false,
|
||||
bool sun_ = false,
|
||||
scene::ISceneNode* parent = NULL);
|
||||
// ------------------------------------------------------------------------
|
||||
void clearLights();
|
||||
|
@ -1078,9 +1078,9 @@ void PostProcessing::renderGodRays(scene::ICameraSceneNode * const camnode,
|
||||
const SColor col = track->getGodRaysColor();
|
||||
|
||||
// The sun interposer
|
||||
SP::SPDynamicDrawCall* sun = irr_driver->getSunInterposer();
|
||||
SP::SPDynamicDrawCall* sun_ = irr_driver->getSunInterposer();
|
||||
// This will only do thing when you update the sun position
|
||||
sun->uploadInstanceData();
|
||||
sun_->uploadInstanceData();
|
||||
SP::SPShader* glow_shader = SP::getGlowShader();
|
||||
glow_shader->use();
|
||||
SP::SPUniformAssigner* glow_color_assigner = glow_shader
|
||||
@ -1088,7 +1088,7 @@ void PostProcessing::renderGodRays(scene::ICameraSceneNode * const camnode,
|
||||
assert(glow_color_assigner != NULL);
|
||||
video::SColorf cf(track->getGodRaysColor());
|
||||
glow_color_assigner->setValue(core::vector3df(cf.r, cf.g, cf.b));
|
||||
sun->draw();
|
||||
sun_->draw();
|
||||
glow_shader->unuse();
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
|
||||
|
@ -2135,9 +2135,9 @@ void Track::loadTrackModel(bool reverse_track, unsigned int mode_id)
|
||||
#ifndef SERVER_ONLY
|
||||
if (!CVS->isGLSL())
|
||||
{
|
||||
scene::ILightSceneNode *sun = (scene::ILightSceneNode *) m_sun;
|
||||
scene::ILightSceneNode *sun_ = (scene::ILightSceneNode *) m_sun;
|
||||
|
||||
sun->setLightType(video::ELT_DIRECTIONAL);
|
||||
sun_->setLightType(video::ELT_DIRECTIONAL);
|
||||
|
||||
// The angle of the light is rather important - let the sun
|
||||
// point towards (0,0,0).
|
||||
@ -2148,7 +2148,7 @@ void Track::loadTrackModel(bool reverse_track, unsigned int mode_id)
|
||||
else
|
||||
m_sun->setRotation((-m_sun_position).getHorizontalAngle());
|
||||
|
||||
sun->getLightData().SpecularColor = m_sun_specular_color;
|
||||
sun_->getLightData().SpecularColor = m_sun_specular_color;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -429,6 +429,8 @@
|
||||
path = realpath("/proc/self/exe", NULL);
|
||||
#elif defined(__NetBSD__)
|
||||
path = realpath("/proc/curproc/exe", NULL);
|
||||
#elif defined(__sun)
|
||||
path = realpath("/proc/self/path/a.out", NULL);
|
||||
#elif defined(__APPLE__)
|
||||
path = (char*)malloc(PATH_MAX+1);
|
||||
uint32_t len = PATH_MAX;
|
||||
|
@ -40,7 +40,7 @@
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#if (defined(__linux__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__)) || defined(__NetBSD__) || defined(__APPLE__)
|
||||
#if (defined(__linux__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__)) || defined(__NetBSD__) || defined(__APPLE__) || defined(__sun)
|
||||
# include <pthread.h>
|
||||
#endif
|
||||
|
||||
@ -95,7 +95,7 @@ namespace VS
|
||||
static void setThreadName(const char* name)
|
||||
{
|
||||
#if defined(__linux__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__)
|
||||
#if __GLIBC__ > 2 || __GLIBC_MINOR__ > 11
|
||||
#if __GLIBC__ > 2 || __GLIBC_MINOR__ > 11 || defined(__sun)
|
||||
pthread_setname_np(pthread_self(), name);
|
||||
#endif
|
||||
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
|
Loading…
Reference in New Issue
Block a user