diff --git a/sci-astronomy/celestia/celestia-1.6.1.recipe b/sci-astronomy/celestia/celestia-1.6.1.recipe index 0e3c3e338..6960b670c 100644 --- a/sci-astronomy/celestia/celestia-1.6.1.recipe +++ b/sci-astronomy/celestia/celestia-1.6.1.recipe @@ -41,10 +41,11 @@ REQUIRES=" " BUILD_REQUIRES=" - haiku${secondaryArchSuffix}_devel + haiku${secondaryArchSuffix}_devel devel:libgl$secondaryArchSuffix devel:libglu$secondaryArchSuffix devel:libiconv$secondaryArchSuffix + devel:libintl$secondaryArchSuffix devel:libjpeg$secondaryArchSuffix devel:liblua5.1$secondaryArchSuffix devel:libpng$secondaryArchSuffix @@ -62,22 +63,12 @@ BUILD_PREREQUIRES=" " BUILD() -{ - local - for cf in -O2 -ffast-math \ - -fexpensive-optimizations \ - -fomit-frame-pointer; do - sed -i \ - -e "s/${cf}//g" \ - configure.in admin/* || die "sed failed" - done - +{ autoreconf -fi - export LIBS="-lbe -lnetwork -lglut -lGL -lintl" - - ./configure \ - --prefix=$appsDir \ + export LIBS="-lbe -lGL -lGLU -lglut -lintl -lnetwork" + + runConfigure ./configure \ --datarootdir=$dataDir \ --datadir=$dataDir \ --disable-rpath \ @@ -90,9 +81,10 @@ BUILD() INSTALL() { + mkdir -p $appsDir make install - mv $appsDir/bin/celestia $appsDir/Celestia - rm -rf $appsDir/bin + mv $binDir/celestia $appsDir/Celestia + rm -rf $binDir local APP_SIGNATURE="application/x-vnd.celestia" local MAJOR="`echo "$portVersion" | cut -d. -f1`" diff --git a/sci-astronomy/celestia/patches/celestia-1.6.1.patchset b/sci-astronomy/celestia/patches/celestia-1.6.1.patchset index d8d94f2a2..ccba22ace 100644 --- a/sci-astronomy/celestia/patches/celestia-1.6.1.patchset +++ b/sci-astronomy/celestia/patches/celestia-1.6.1.patchset @@ -1,4 +1,4 @@ -From 920f812d2f38ff96c703dd24ea6779e9766e67d9 Mon Sep 17 00:00:00 2001 +From 1cb3637fae9bca7ba8662e5854c0b2aed82aad5b Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Sat, 15 Sep 2018 22:09:15 +1000 Subject: Fix build for haiku @@ -86,7 +86,7 @@ index 9a1b054..dda19e0 100644 2.19.0 -From de882a7f5ff40f9367dc7c8b8f5bfb06c4b9623e Mon Sep 17 00:00:00 2001 +From 2efebe98af6ad5a8ee7ffbb79aeb9297a59e8271 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Sat, 15 Sep 2018 22:31:57 +1000 Subject: Add missing headers @@ -126,7 +126,7 @@ index 0775204..5500143 100644 2.19.0 -From 7efacb288eb0d6d6f26c8225b4f66f9150be1f1c Mon Sep 17 00:00:00 2001 +From daf6a9be27322ed45c81f709728c2c9b64d8a0db Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Sat, 15 Sep 2018 22:55:24 +1000 Subject: Add missing header @@ -149,7 +149,7 @@ index 38fb01f..44791ff 100644 2.19.0 -From ef4cc25bf26d4584a599f5c69cde50673c61e8aa Mon Sep 17 00:00:00 2001 +From 204164c0c62a43ddc21655f3318ad59d778391af Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Sat, 15 Sep 2018 23:47:31 +1000 Subject: Fix for png16 @@ -172,7 +172,7 @@ index 92602da..c2c2520 100644 2.19.0 -From ff3d1c6e61a926febd23a3ca1966d3d2242a491f Mon Sep 17 00:00:00 2001 +From 1492101fa45a846b28e210bd4dc11afca7d6707d Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Sun, 16 Sep 2018 13:12:37 +1000 Subject: Disable GLSL shaders. Add window size and position for Haiku. @@ -250,7 +250,7 @@ index 4b14167..9c1ed7f 100644 2.19.0 -From 5977aaeb2572e274b0295cfe65546ecf430cf0ba Mon Sep 17 00:00:00 2001 +From 64b8b223eb1128f81ca816a82632f50c0b4f73c3 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Sun, 16 Sep 2018 13:34:04 +1000 Subject: Use system type defs @@ -281,3 +281,103 @@ index 560b39b..e2200c6 100644 -- 2.19.0 + +From b773b49085ab7d8f5e5c9e386062ff07fe58da4f Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Sun, 16 Sep 2018 20:00:58 +1000 +Subject: Fix build for x86 arch + + +diff --git a/src/celengine/cmdparser.cpp b/src/celengine/cmdparser.cpp +index e2daf31..32fe5de 100644 +--- a/src/celengine/cmdparser.cpp ++++ b/src/celengine/cmdparser.cpp +@@ -713,8 +713,8 @@ Command* CommandParser::parseCommand() + cmd = new CommandRenderPath(glcpath); + } + else if (commandName == "splitview") +- { +- unsigned int view = 1; ++ { ++ double view = 1; + paramList->getNumber("view", view); + string splitType; + paramList->getString("type", splitType); +@@ -724,7 +724,7 @@ Command* CommandParser::parseCommand() + } + else if (commandName == "deleteview") + { +- unsigned int view = 1; ++ double view = 1; + paramList->getNumber("view", view); + cmd = new CommandDeleteView(view); + } +@@ -734,7 +734,7 @@ Command* CommandParser::parseCommand() + } + else if (commandName == "setactiveview") + { +- unsigned int view = 1; ++ double view = 1; + paramList->getNumber("view", view); + cmd = new CommandSetActiveView(view); + } +diff --git a/src/celengine/dds.cpp b/src/celengine/dds.cpp +index a09fc76..9105474 100644 +--- a/src/celengine/dds.cpp ++++ b/src/celengine/dds.cpp +@@ -198,7 +198,7 @@ Image* LoadDDSImage(const string& filename) + Image* img = new Image(format, + (int) ddsd.width, + (int) ddsd.height, +- max(ddsd.mipMapLevels, 1u)); ++ max((uint32)ddsd.mipMapLevels, (uint32)1u)); + if (img == NULL) + return NULL; + +diff --git a/src/celengine/render.cpp b/src/celengine/render.cpp +index 56d0c21..140e7a2 100644 +--- a/src/celengine/render.cpp ++++ b/src/celengine/render.cpp +@@ -1537,7 +1537,7 @@ static void computeOrbitSectionBoundingVolumes(Renderer::CachedOrbit& orbit) + + Renderer::OrbitSection section; + section.firstSample = samplesPerSection * i; +- unsigned int lastSample = min((unsigned int) orbit.trajectory.size() - 1, section.firstSample + nSamples + 1); ++ unsigned int lastSample = min((unsigned int) orbit.trajectory.size() - 1, (unsigned int)(section.firstSample + nSamples + 1)); + + // Set the initial axis and origin of the capsule bounding volume; they will be adjusted + // to contain all points in the trajectory. The length of the axis may change, but the +-- +2.19.0 + + +From b6fcb045a3665123d91855df2cdf8b0037679823 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Sun, 16 Sep 2018 20:51:42 +1000 +Subject: Fix crash on mesh render + + +diff --git a/src/celengine/mesh.cpp b/src/celengine/mesh.cpp +index 38f32bf..2fc1277 100644 +--- a/src/celengine/mesh.cpp ++++ b/src/celengine/mesh.cpp +@@ -509,6 +509,7 @@ Mesh::render(const std::vector& materials, + // the possibility of deleting the original data. We can always map + // read-only later on for things like picking, but this could be a low + // performance path. ++#ifndef __HAIKU__ + if (!vbInitialized && isVBOSupported()) + { + vbInitialized = true; +@@ -526,7 +527,7 @@ Mesh::render(const std::vector& materials, + } + } + } +- ++#endif + if (vbObject != 0) + { + glx::glBindBufferARB(GL_ARRAY_BUFFER_ARB, vbObject); +-- +2.19.0 +