aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2013-10-20 22:53:20 +0800
committerdanfe <danfe@FreeBSD.org>2013-10-20 22:53:20 +0800
commit8d97e62c542a3256f2e10de79c2f0c2baeb2a6dd (patch)
tree419a3ea9c91e7faf5c26492d2f4de844148c44b3
parentda1b2f7506d138f20262dec5c2d6e2166eac3a3f (diff)
downloadfreebsd-ports-gnome-8d97e62c542a3256f2e10de79c2f0c2baeb2a6dd.tar.gz
freebsd-ports-gnome-8d97e62c542a3256f2e10de79c2f0c2baeb2a6dd.tar.zst
freebsd-ports-gnome-8d97e62c542a3256f2e10de79c2f0c2baeb2a6dd.zip
Fix the build on recent -CURRENT and stagify while I'm here.
PR: ports/182027
-rw-r--r--astro/stellarium/Makefile10
-rw-r--r--astro/stellarium/files/patch-src-StelMainGraphicsView.cpp11
-rw-r--r--astro/stellarium/files/patch-src-core-StelUtils.cpp13
-rw-r--r--astro/stellarium/files/patch-src-core-renderer-StelQGLArrayVertexBufferBackend.cpp49
-rw-r--r--astro/stellarium/files/patch-src-core-renderer-StelQGLInterleavedArrayVertexBufferBackend.cpp45
-rw-r--r--astro/stellarium/pkg-plist1
6 files changed, 122 insertions, 7 deletions
diff --git a/astro/stellarium/Makefile b/astro/stellarium/Makefile
index 2c686926a81f..6752534eb226 100644
--- a/astro/stellarium/Makefile
+++ b/astro/stellarium/Makefile
@@ -19,9 +19,7 @@ USE_QT4= moc_build rcc_build uic_build qmake_build \
corelib gui network opengl script
INSTALLS_ICONS= yes
-MAN1= ${PORTNAME}.1
PORTDOCS= AUTHORS ChangeLog README
-NO_STAGE= yes
OPTIONS_DEFINE= MORE_STARS MULTIMEDIA DOCS
OPTIONS_DEFAULT= MULTIMEDIA
@@ -59,11 +57,9 @@ post-patch: .SILENT
post-install:
.if ${PORT_OPTIONS:MMORE_STARS}
${INSTALL_DATA} ${DISTDIR}/stars_[45678]_[12]v0_0.cat \
- ${DATADIR}/stars/default
-.endif
-.if ${PORT_OPTIONS:MDOCS}
- @${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
+ ${STAGEDIR}${DATADIR}/stars/default
.endif
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>
diff --git a/astro/stellarium/files/patch-src-StelMainGraphicsView.cpp b/astro/stellarium/files/patch-src-StelMainGraphicsView.cpp
new file mode 100644
index 000000000000..d24bd88a96a4
--- /dev/null
+++ b/astro/stellarium/files/patch-src-StelMainGraphicsView.cpp
@@ -0,0 +1,11 @@
+--- src/StelMainGraphicsView.cpp.orig 2013-09-07 23:50:48.000000000 +0800
++++ src/StelMainGraphicsView.cpp 2013-10-19 19:49:37.000000000 +0800
+@@ -43,6 +43,8 @@
+ #include <QTimer>
+ #include <QDir>
+
++#include <locale>
++
+ #ifndef DISABLE_SCRIPTING
+ #include "StelScriptMgr.hpp"
+ #include "StelMainScriptAPIProxy.hpp"
diff --git a/astro/stellarium/files/patch-src-core-StelUtils.cpp b/astro/stellarium/files/patch-src-core-StelUtils.cpp
new file mode 100644
index 000000000000..c5ef930f9518
--- /dev/null
+++ b/astro/stellarium/files/patch-src-core-StelUtils.cpp
@@ -0,0 +1,13 @@
+--- src/core/StelUtils.cpp.orig 2013-08-04 14:20:27.000000000 +0800
++++ src/core/StelUtils.cpp 2013-10-19 19:37:56.000000000 +0800
+@@ -1065,8 +1065,8 @@ double calculateSiderealPeriod(const dou
+ QString hoursToHmsStr(const double hours)
+ {
+ int h = (int)hours;
+- int m = (int)((std::abs(hours)-std::abs(h))*60);
+- float s = (((std::abs(hours)-std::abs(h))*60)-m)*60;
++ int m = (int)((std::abs(hours)-std::abs(double(h)))*60);
++ float s = (((std::abs(hours)-std::abs(double(h)))*60)-m)*60;
+
+ return QString("%1h%2m%3s").arg(h).arg(m).arg(QString::number(s, 'f', 1));
+ }
diff --git a/astro/stellarium/files/patch-src-core-renderer-StelQGLArrayVertexBufferBackend.cpp b/astro/stellarium/files/patch-src-core-renderer-StelQGLArrayVertexBufferBackend.cpp
new file mode 100644
index 000000000000..5ddea6034b25
--- /dev/null
+++ b/astro/stellarium/files/patch-src-core-renderer-StelQGLArrayVertexBufferBackend.cpp
@@ -0,0 +1,49 @@
+--- src/core/renderer/StelQGLArrayVertexBufferBackend.cpp.orig 2013-04-21 15:22:59.000000000 +0800
++++ src/core/renderer/StelQGLArrayVertexBufferBackend.cpp 2013-10-19 19:47:23.000000000 +0800
+@@ -42,7 +42,7 @@ StelQGLArrayVertexBufferBackend(const Pr
+ const StelVertexAttribute& attribute(this->attributes.attributes[attrib]);
+
+ attributeBuffers[attribute.interpretation] =
+- std::malloc(vertexCapacity * attributeSize(attribute.type));
++ ::malloc(vertexCapacity * attributeSize(attribute.type));
+ }
+ }
+
+@@ -50,11 +50,11 @@ StelQGLArrayVertexBufferBackend::~StelQG
+ {
+ for(int buffer = 0; buffer < AttributeInterpretation_MAX; ++buffer)
+ {
+- if(NULL != attributeBuffers[buffer]){std::free(attributeBuffers[buffer]);}
++ if(NULL != attributeBuffers[buffer]){::free(attributeBuffers[buffer]);}
+ }
+ if(NULL != projectedPositions)
+ {
+- std::free(projectedPositions);
++ ::free(projectedPositions);
+ }
+ }
+
+@@ -71,7 +71,7 @@ void StelQGLArrayVertexBufferBackend::ad
+ {
+ const StelVertexAttribute& attribute(attributes.attributes[attrib]);
+ attributeBuffers[attribute.interpretation] =
+- std::realloc(attributeBuffers[attribute.interpretation],
++ ::realloc(attributeBuffers[attribute.interpretation],
+ vertexCapacity * attributeSize(attribute.type));
+ }
+ }
+@@ -167,12 +167,12 @@ void StelQGLArrayVertexBufferBackend::
+ if(Q_UNLIKELY(NULL == projectedPositions))
+ {
+ projectedPositions =
+- static_cast<Vec3f*>(std::malloc(minProjectedSize * sizeof(Vec3f)));
++ static_cast<Vec3f*>(::malloc(minProjectedSize * sizeof(Vec3f)));
+ }
+ else if(projectedPositionsCapacity < minProjectedSize)
+ {
+ projectedPositions =
+- static_cast<Vec3f*>(std::realloc(projectedPositions, minProjectedSize * sizeof(Vec3f)));
++ static_cast<Vec3f*>(::realloc(projectedPositions, minProjectedSize * sizeof(Vec3f)));
+ projectedPositionsCapacity = minProjectedSize;
+ }
+
diff --git a/astro/stellarium/files/patch-src-core-renderer-StelQGLInterleavedArrayVertexBufferBackend.cpp b/astro/stellarium/files/patch-src-core-renderer-StelQGLInterleavedArrayVertexBufferBackend.cpp
new file mode 100644
index 000000000000..deb92bf15f3f
--- /dev/null
+++ b/astro/stellarium/files/patch-src-core-renderer-StelQGLInterleavedArrayVertexBufferBackend.cpp
@@ -0,0 +1,45 @@
+--- src/core/renderer/StelQGLInterleavedArrayVertexBufferBackend.cpp.orig 2013-08-04 14:20:27.000000000 +0800
++++ src/core/renderer/StelQGLInterleavedArrayVertexBufferBackend.cpp 2013-10-19 19:47:06.000000000 +0800
+@@ -42,15 +42,15 @@ StelQGLInterleavedArrayVertexBufferBacke
+ }
+ // Align to VERTEX_ALIGN
+ vertexStride = (vertexBytes + VERTEX_ALIGN - 1) & ~(VERTEX_ALIGN - 1);
+- vertices = static_cast<char*>(std::malloc(vertexCapacity * vertexStride));
++ vertices = static_cast<char*>(::malloc(vertexCapacity * vertexStride));
+ }
+
+ StelQGLInterleavedArrayVertexBufferBackend::~StelQGLInterleavedArrayVertexBufferBackend()
+ {
+- std::free(vertices);
++ ::free(vertices);
+ if(NULL != projectedPositions)
+ {
+- std::free(projectedPositions);
++ ::free(projectedPositions);
+ }
+ }
+
+@@ -63,7 +63,7 @@ void StelQGLInterleavedArrayVertexBuffer
+ if(Q_UNLIKELY(vertexCount == vertexCapacity))
+ {
+ vertexCapacity *= 2;
+- vertices = static_cast<char*>(std::realloc(vertices, vertexCapacity * vertexStride));
++ vertices = static_cast<char*>(::realloc(vertices, vertexCapacity * vertexStride));
+ }
+
+ std::memcpy(vertices + vertexCount * vertexStride, vertexInPtr, vertexBytes);
+@@ -122,12 +122,12 @@ void StelQGLInterleavedArrayVertexBuffer
+ if(Q_UNLIKELY(NULL == projectedPositions))
+ {
+ projectedPositions =
+- static_cast<Vec3f*>(std::malloc(minProjectedSize * sizeof(Vec3f)));
++ static_cast<Vec3f*>(::malloc(minProjectedSize * sizeof(Vec3f)));
+ }
+ else if(projectedPositionsCapacity < minProjectedSize)
+ {
+ projectedPositions =
+- static_cast<Vec3f*>(std::realloc(projectedPositions, minProjectedSize * sizeof(Vec3f)));
++ static_cast<Vec3f*>(::realloc(projectedPositions, minProjectedSize * sizeof(Vec3f)));
+ projectedPositionsCapacity = minProjectedSize;
+ }
+
diff --git a/astro/stellarium/pkg-plist b/astro/stellarium/pkg-plist
index 389453288535..b9ce8360ef5c 100644
--- a/astro/stellarium/pkg-plist
+++ b/astro/stellarium/pkg-plist
@@ -1,4 +1,5 @@
bin/stellarium
+man/man1/stellarium.1.gz
%%DATADIR%%/data/DejaVuSans.ttf
%%DATADIR%%/data/DejaVuSansMono.ttf
%%DATADIR%%/data/base_locations.bin.gz