wok-next rev 20759
celestia: add patches, update (b)deps
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Jun 02 15:06:48 2018 +0300 (2018-06-02) |
parents | 102ce3af4b0f |
children | fc15bece1af6 |
files | celestia/receipt celestia/stuff/celestia-1.6.0-gcc45.patch celestia/stuff/make-dereferenced-temporaries-explicit celestia/stuff/patches/celestia-1.5.1-gcc44.patch celestia/stuff/patches/celestia-1.6.1-gcc46.patch celestia/stuff/patches/celestia-1.6.1-gentoo.patch celestia/stuff/patches/celestia-1.6.1-libpng15.patch celestia/stuff/patches/celestia-1.6.1-libpng16.patch celestia/stuff/patches/celestia-1.6.1-linking.patch celestia/stuff/patches/gcc-4.7-fixes.diff celestia/stuff/patches/series |
line diff
1.1 --- a/celestia/receipt Sat Jun 02 13:05:09 2018 +0300 1.2 +++ b/celestia/receipt Sat Jun 02 15:06:48 2018 +0300 1.3 @@ -6,34 +6,37 @@ 1.4 SHORT_DESC="Real-time 3D Space Simulation" 1.5 MAINTAINER="slaxemulator@gmail.com" 1.6 LICENSE="GPL2" 1.7 -WEB_SITE="http://www.shatters.net/celestia/" 1.8 +WEB_SITE="https://celestia.space/" 1.9 1.10 TARBALL="$PACKAGE-$VERSION.tar.gz" 1.11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" 1.12 1.13 -BUILD_DEPENDS="gtk+ glew libtheora lua5.1 gtkglext freeglut xorg-libXmu mesa \ 1.14 -glu libjpeg jpeg zlib gtk+-dev libtheora-dev lua5.1-dev gtkglext-dev \ 1.15 -freeglut-dev xorg-libXmu-dev glu mesa-dev libpng16-dev libogg-dev \ 1.16 -jpeg-dev glew-dev zlib-dev gettext autoconf" 1.17 +BUILD_DEPENDS="automake libtool gettext mesa-dev glu-dev gtk+-dev gtkglext-dev \ 1.18 +lua5.1-dev libjpeg-turbo-dev libtheora-dev" 1.19 1.20 compile_rules() { 1.21 - export LDFLAGS="$LDFLAGS -Wl,--copy-dt-needed-entries -ldl" 1.22 + sed -i 's|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|' configure.in 1.23 + autoreconf -vi || return 1 1.24 1.25 - sed -i 's|"ray.h"|&\n#include "mathlib.h"|' src/celmath/intersect.h 1.26 - sed -i 's|NULL|0|' src/celengine/frametree.h 1.27 - sed -i 's|"png.h"|&\n#include "zlib.h"|' src/celestia/imagecapture.cpp 1.28 - sed -i 's|<cstdio>|&\n#include <string.h>|' src/celengine/*.cpp 1.29 + # Celestia-1.6.1 has a bug in the font rendering and requires -fsigned-char 1.30 + export CFLAGS="$CFLAGS -fsigned-char" 1.31 + export CXXFLAGS="$CXXFLAGS -fsigned-char" 1.32 1.33 ./configure \ 1.34 --with-gtk \ 1.35 + --disable-rpath \ 1.36 + --with-lua \ 1.37 $CONFIGURE_ARGS && 1.38 fix libtool && 1.39 make && 1.40 - make DESTDIR=$DESTDIR install 1.41 + make \ 1.42 + DESTDIR=$DESTDIR \ 1.43 + MKDIR_P='mkdir -p' \ 1.44 + install 1.45 } 1.46 1.47 genpkg_rules() { 1.48 copy @std 1.49 - DEPENDS="gtk+ glew libtheora lua5.1 gtkglext freeglut xorg-libXmu mesa glu \ 1.50 - libjpeg jpeg zlib" 1.51 + DEPENDS="cairo gdk-pixbuf glib glu gtk+ gtkglext libjpeg-turbo libogg \ 1.52 + libpng16 libtheora mesa pango" 1.53 }
2.1 --- a/celestia/stuff/celestia-1.6.0-gcc45.patch Sat Jun 02 13:05:09 2018 +0300 2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 2.3 @@ -1,45 +0,0 @@ 2.4 ---- src/celengine/overlay.h 2010-04-16 17:43:35.000000000 +0200 2.5 -+++ src/celengine/overlay.h 2010-04-16 17:43:55.000000000 +0200 2.6 -@@ -12,6 +12,7 @@ 2.7 - 2.8 - #include <string> 2.9 - #include <iostream> 2.10 -+#include <cstdio> 2.11 - #include <celtxf/texturefont.h> 2.12 - 2.13 - 2.14 ---- src/celmath/mathlib.h 2010-04-16 18:16:09.000000000 +0200 2.15 -+++ src/celmath/mathlib.h 2010-04-16 18:16:18.000000000 +0200 2.16 -@@ -44,11 +44,6 @@ template<class T> T radToDeg(T r) 2.17 - return r * 180 / static_cast<T>(PI); 2.18 - } 2.19 - 2.20 --template<class T> T abs(T x) 2.21 --{ 2.22 -- return (x < 0) ? -x : x; 2.23 --} 2.24 -- 2.25 - template<class T> T square(T x) 2.26 - { 2.27 - return x * x; 2.28 ---- src/celengine/star.cpp 2010-04-16 18:17:42.000000000 +0200 2.29 -+++ src/celengine/star.cpp 2010-04-16 18:17:57.000000000 +0200 2.30 -@@ -10,6 +10,7 @@ 2.31 - #include <celmath/mathlib.h> 2.32 - #include <cstring> 2.33 - #include <cassert> 2.34 -+#include <cstdio> 2.35 - #include "celestia.h" 2.36 - #include "astro.h" 2.37 - #include "orbit.h" 2.38 ---- src/celestia/celx_object.cpp 2010-04-16 18:19:52.000000000 +0200 2.39 -+++ src/celestia/celx_object.cpp 2010-04-16 18:22:37.000000000 +0200 2.40 -@@ -773,7 +773,7 @@ static int object_mark(lua_State* l) 2.41 - markAlpha = 1.0f; 2.42 - 2.43 - Color markColorAlpha(0.0f, 1.0f, 0.0f, 0.9f); 2.44 -- markColorAlpha = Color::Color(markColor, markAlpha); 2.45 -+ markColorAlpha = Color(markColor, markAlpha); 2.46 - 2.47 - const char* markLabel = celx.safeGetString(6, WrongType, "Fifth argument to object:mark must be a string"); 2.48 - if (markLabel == NULL)
3.1 --- a/celestia/stuff/make-dereferenced-temporaries-explicit Sat Jun 02 13:05:09 2018 +0300 3.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 3.3 @@ -1,46 +0,0 @@ 3.4 ---- celestia-1.6.0+dfsg.orig/src/celengine/vecgl.h 3.5 -+++ celestia-1.6.0+dfsg/src/celengine/vecgl.h 3.6 -@@ -89,17 +89,20 @@ inline void glScale(const Vec3f& v) 3.7 - 3.8 - inline void glLightDirection(GLenum light, const Vec3f& dir) 3.9 - { 3.10 -- glLightfv(light, GL_POSITION, &(Vec4f(dir.x, dir.y, dir.z, 0.0f).x)); 3.11 -+ Vec4f dir4(dir.x, dir.y, dir.z, 0.0f); 3.12 -+ glLightfv(light, GL_POSITION, &dir4.x); 3.13 - } 3.14 - 3.15 - inline void glLightPosition(GLenum light, const Point3f& pos) 3.16 - { 3.17 -- glLightfv(light, GL_POSITION, &(Vec4f(pos.x, pos.y, pos.z, 1.0f).x)); 3.18 -+ Vec4f pos4(pos.x, pos.y, pos.z, 1.0f); 3.19 -+ glLightfv(light, GL_POSITION, &pos4.x); 3.20 - } 3.21 - 3.22 - inline void glLightColor(GLenum light, GLenum which, const Vec3f& color) 3.23 - { 3.24 -- glLightfv(light, which, &(Vec4f(color.x, color.y, color.z, 1.0f).x)); 3.25 -+ Vec4f color4(color.x, color.y, color.z, 1.0f); 3.26 -+ glLightfv(light, which, &color4.x); 3.27 - } 3.28 - 3.29 - inline void glLightColor(GLenum light, GLenum which, const Vec4f& color) 3.30 -@@ -109,15 +112,14 @@ inline void glLightColor(GLenum light, G 3.31 - 3.32 - inline void glLightColor(GLenum light, GLenum which, const Color& color) 3.33 - { 3.34 -- glLightfv(light, which, 3.35 -- &(Vec4f(color.red(), color.green(), color.blue(), color.alpha()).x)); 3.36 -+ Vec4f color4(color.red(), color.green(), color.blue(), color.alpha()); 3.37 -+ glLightfv(light, which, &color4.x); 3.38 - } 3.39 - 3.40 - inline void glAmbientLightColor(const Color& color) 3.41 - { 3.42 -- glLightModelfv(GL_LIGHT_MODEL_AMBIENT, 3.43 -- &(Vec4f(color.red(), color.green(), color.blue(), 3.44 -- color.alpha()).x)); 3.45 -+ Vec4f color4(color.red(), color.green(), color.blue(), color.alpha()); 3.46 -+ glLightModelfv(GL_LIGHT_MODEL_AMBIENT, &color4.x); 3.47 - } 3.48 - 3.49 - #endif // _VECGL_H_
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/celestia/stuff/patches/celestia-1.5.1-gcc44.patch Sat Jun 02 15:06:48 2018 +0300 4.3 @@ -0,0 +1,20 @@ 4.4 +--- src/celengine/overlay.h.orig 2009-07-08 02:27:08.000000000 -0400 4.5 ++++ src/celengine/overlay.h 2009-07-08 02:27:28.000000000 -0400 4.6 +@@ -10,6 +10,7 @@ 4.7 + #ifndef _OVERLAY_H_ 4.8 + #define _OVERLAY_H_ 4.9 + 4.10 ++#include <cstdio> 4.11 + #include <string> 4.12 + #include <iostream> 4.13 + #include <celtxf/texturefont.h> 4.14 +--- src/celengine/star.cpp.orig 2009-07-08 02:40:52.000000000 -0400 4.15 ++++ src/celengine/star.cpp 2009-07-08 02:41:08.000000000 -0400 4.16 +@@ -8,6 +8,7 @@ 4.17 + // of the License, or (at your option) any later version. 4.18 + 4.19 + #include <celmath/mathlib.h> 4.20 ++#include <cstdio> 4.21 + #include <cstring> 4.22 + #include <cassert> 4.23 + #include "celestia.h"
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/celestia/stuff/patches/celestia-1.6.1-gcc46.patch Sat Jun 02 15:06:48 2018 +0300 5.3 @@ -0,0 +1,13 @@ 5.4 +http://bugs.gentoo.org/show_bug.cgi?id=366073 5.5 + 5.6 +Patch written by Nils Larsson <ni1s@nerdshack.com> 5.7 +--- src/celengine/frametree.h 5.8 ++++ src/celengine/frametree.h 5.9 +@@ -14,6 +14,7 @@ 5.10 + #define _CELENGINE_FRAMETREE_H_ 5.11 + 5.12 + #include <vector> 5.13 ++#include <cstddef> 5.14 + 5.15 + class Star; 5.16 + class Body;
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 6.2 +++ b/celestia/stuff/patches/celestia-1.6.1-gentoo.patch Sat Jun 02 15:06:48 2018 +0300 6.3 @@ -0,0 +1,23 @@ 6.4 +--- src/celestia/Makefile.am 2011-06-07 19:15:51.502000147 +0200 6.5 ++++ src/celestia/Makefile.am.new 2011-06-07 19:15:47.208000302 +0200 6.6 +@@ -15,6 +15,7 @@ 6.7 + if ENABLE_GTK 6.8 + SUBDIRS += gtk 6.9 + celestiaGTKLIBS = $(GTK_LIBS) gtk/libgtkgui.a 6.10 ++LIBS += $(GTK_LIBS) 6.11 + endif 6.12 + 6.13 + COMMONSOURCES = \ 6.14 + 6.15 +Index: src/celengine/frametree.h 6.16 +=================================================================== 6.17 +--- src/celengine/frametree.h (revision 5163) 6.18 ++++ src/celengine/frametree.h (arbetskopia) 6.19 +@@ -14,6 +14,7 @@ 6.20 + #define _CELENGINE_FRAMETREE_H_ 6.21 + 6.22 + #include <vector> 6.23 ++#include <cstddef> 6.24 + 6.25 + class Star; 6.26 + class Body;
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 7.2 +++ b/celestia/stuff/patches/celestia-1.6.1-libpng15.patch Sat Jun 02 15:06:48 2018 +0300 7.3 @@ -0,0 +1,14 @@ 7.4 +imagecapture.cpp:184:40: error: ‘Z_BEST_COMPRESSION’ was not declared in this scope 7.5 + 7.6 +--- src/celestia/imagecapture.cpp 7.7 ++++ src/celestia/imagecapture.cpp 7.8 +@@ -31,6 +31,9 @@ 7.9 + #include "png.h" 7.10 + #endif 7.11 + 7.12 ++// Z_BEST_COMPRESSION 7.13 ++#include <zlib.h> 7.14 ++ 7.15 + // Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng 7.16 + #ifndef png_jmpbuf 7.17 + #define png_jmpbuf(png_ptr) png_ptr->jmpbuf
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 8.2 +++ b/celestia/stuff/patches/celestia-1.6.1-libpng16.patch Sat Jun 02 15:06:48 2018 +0300 8.3 @@ -0,0 +1,25 @@ 8.4 +image.cpp:530:61: error: ‘memcpy’ was not declared in this scope 8.5 + 8.6 +https://bugs.gentoo.org/show_bug.cgi?id=464764 8.7 + 8.8 +Patch written by Lars Wendler <polynomial-c@gentoo.org> 8.9 +--- a/celestia/src/celengine/image.cpp 8.10 ++++ b/celestia/src/celengine/image.cpp 8.11 +@@ -42,6 +42,7 @@ extern "C" { 8.12 + #include "jpeglib.h" 8.13 + #else 8.14 + #include <cstdio> 8.15 ++#include <string.h> 8.16 + #include <jpeglib.h> 8.17 + #endif 8.18 + } 8.19 +--- a/celestia/src/celengine/texture.cpp 8.20 ++++ b/celestia/src/celengine/texture.cpp 8.21 +@@ -28,6 +28,7 @@ 8.22 + #include <cstdlib> 8.23 + #include <cstdio> 8.24 + #include <cassert> 8.25 ++#include <string.h> 8.26 + 8.27 + #ifndef _WIN32 8.28 + #ifndef TARGET_OS_MAC
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 9.2 +++ b/celestia/stuff/patches/celestia-1.6.1-linking.patch Sat Jun 02 15:06:48 2018 +0300 9.3 @@ -0,0 +1,54 @@ 9.4 +Fix linking issues: 9.5 + * underlinking GLUT (bug #372123, #387609) 9.6 + * as-needed (bug #281258) 9.7 + 9.8 +--- a/src/celestia/Makefile.am 9.9 ++++ b/src/celestia/Makefile.am 9.10 +@@ -7,14 +7,15 @@ 9.11 + 9.12 + if ENABLE_KDE 9.13 + SUBDIRS += kde 9.14 +-celestiaKDELIBS = $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KFILE) \ 9.15 +- $(LIBSOCKET) -lDCOP kde/libkdegui.a 9.16 ++celestiaKDELIBS = kde/libkdegui.a 9.17 + celestia_LDFLAGS = $(all_libraries) $(KDE_RPATH) 9.18 ++LIBS += $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KFILE) $(LIBSOCKET) -lDCOP 9.19 + endif 9.20 + 9.21 + if ENABLE_GTK 9.22 + SUBDIRS += gtk 9.23 +-celestiaGTKLIBS = $(GTK_LIBS) gtk/libgtkgui.a 9.24 ++celestiaGTKLIBS = gtk/libgtkgui.a 9.25 ++LIBS += $(GTK_LIBS) 9.26 + endif 9.27 + 9.28 + COMMONSOURCES = \ 9.29 +@@ -62,6 +63,7 @@ 9.30 + 9.31 + if ENABLE_GLUT 9.32 + GLUTSOURCES = glutmain.cpp 9.33 ++GLUTLIBS = -lGL 9.34 + endif 9.35 + 9.36 + if ENABLE_THEORA 9.37 +@@ -80,15 +82,16 @@ 9.38 + celestia_LDADD = \ 9.39 + $(celestiaKDELIBS) \ 9.40 + $(celestiaGTKLIBS) \ 9.41 +- $(DL_LIBS) \ 9.42 +- $(LUA_LIBS) \ 9.43 +- $(THEORA_LIBS) \ 9.44 + ../celengine/libcelengine.a \ 9.45 + ../celtxf/libceltxf.a \ 9.46 + ../cel3ds/libcel3ds.a \ 9.47 + ../celmath/libcelmath.a \ 9.48 + ../celutil/libcelutil.a \ 9.49 +- $(SPICE_LIBS) 9.50 ++ $(LUA_LIBS) \ 9.51 ++ $(THEORA_LIBS) \ 9.52 ++ $(GLUTLIBS) \ 9.53 ++ $(SPICE_LIBS) \ 9.54 ++ $(DL_LIBS) 9.55 + 9.56 + noinst_HEADERS = $(wildcard *.h) 9.57 + noinst_DATA = ../../celestia
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 10.2 +++ b/celestia/stuff/patches/gcc-4.7-fixes.diff Sat Jun 02 15:06:48 2018 +0300 10.3 @@ -0,0 +1,10 @@ 10.4 +--- a/src/celmath/intersect.h 10.5 ++++ b/src/celmath/intersect.h 10.6 +@@ -15,6 +15,7 @@ 10.7 + #include "ray.h" 10.8 + #include "sphere.h" 10.9 + #include "ellipsoid.h" 10.10 ++#include "mathlib.h" 10.11 + 10.12 + 10.13 + template<class T> bool testIntersection(const Ray3<T>& ray,
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 11.2 +++ b/celestia/stuff/patches/series Sat Jun 02 15:06:48 2018 +0300 11.3 @@ -0,0 +1,6 @@ 11.4 +# from https://www.archlinux.org/packages/extra/x86_64/celestia/ 11.5 +-Np0|celestia-1.6.1-gcc46.patch 11.6 +-Np0|celestia-1.6.1-libpng15.patch 11.7 +-Np2|celestia-1.6.1-libpng16.patch 11.8 +celestia-1.6.1-linking.patch 11.9 +gcc-4.7-fixes.diff