Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2889c6d9b5 | ||
|
|
7bb3ff11f9 | ||
|
|
0701050583 | ||
|
|
626fd62b47 |
11 changed files with 296 additions and 21 deletions
0
.cvsignore → .gitignore
vendored
0
.cvsignore → .gitignore
vendored
21
Makefile
21
Makefile
|
|
@ -1,21 +0,0 @@
|
|||
# Makefile for source rpm: amanith
|
||||
# $Id$
|
||||
NAME := amanith
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
define find-makefile-common
|
||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||
|
||||
ifeq ($(MAKEFILE_COMMON),)
|
||||
# attept a checkout
|
||||
define checkout-makefile-common
|
||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||
endif
|
||||
|
||||
include $(MAKEFILE_COMMON)
|
||||
54
amanith-0.3-freetype-fix.patch
Normal file
54
amanith-0.3-freetype-fix.patch
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
diff -up amanith/plugins/fonts/gfontsimpexp.cpp.BAD amanith/plugins/fonts/gfontsimpexp.cpp
|
||||
--- amanith/plugins/fonts/gfontsimpexp.cpp.BAD 2007-11-15 10:02:49.000000000 -0500
|
||||
+++ amanith/plugins/fonts/gfontsimpexp.cpp 2007-11-15 10:05:59.000000000 -0500
|
||||
@@ -34,7 +34,6 @@
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
-#include <freetype/internal/ftgloadr.h>
|
||||
|
||||
namespace Amanith {
|
||||
|
||||
@@ -197,8 +196,9 @@ static void LoadGlyph(GFont2D& Font, con
|
||||
GFontChar2D *c;
|
||||
GGlyphMetrics tmpMetrics;
|
||||
FT_Error error;
|
||||
+ FT_Matrix subGlyphMatrix;
|
||||
+ FT_Int subGlyphArg1, subGlyphArg2;
|
||||
GInt32 i, j, k0, k1, numVert;
|
||||
- FT_SubGlyphRec subGlyph;
|
||||
GPoint2 p;
|
||||
GReal x, y;
|
||||
GVect<GReal, 2> v;
|
||||
@@ -223,19 +223,22 @@ static void LoadGlyph(GFont2D& Font, con
|
||||
GDynArray<GSubChar2D> subChars(Face->glyph->num_subglyphs);
|
||||
|
||||
for (i = 0; i < (GInt32)Face->glyph->num_subglyphs; i++) {
|
||||
- subGlyph = Face->glyph->subglyphs[i];
|
||||
- subChars[i].GlyphIndex = subGlyph.index;
|
||||
- subChars[i].Flags = subGlyph.flags;
|
||||
+ FT_Get_SubGlyph_Info(Face->glyph, i,
|
||||
+ &subChars[i].GlyphIndex,
|
||||
+ (FT_UInt*)&subChars[i].Flags,
|
||||
+ &subGlyphArg1,
|
||||
+ &subGlyphArg2,
|
||||
+ &subGlyphMatrix);
|
||||
// rotation and scale
|
||||
- subChars[i].Transformation[G_X][G_X] = Fixed1616ToReal(subGlyph.transform.xx);
|
||||
- subChars[i].Transformation[G_X][G_Y] = Fixed1616ToReal(subGlyph.transform.xy);
|
||||
+ subChars[i].Transformation[G_X][G_X] = Fixed1616ToReal(subGlyphMatrix.xx);
|
||||
+ subChars[i].Transformation[G_X][G_Y] = Fixed1616ToReal(subGlyphMatrix.xy);
|
||||
// x position
|
||||
- subChars[i].Transformation[G_X][G_Z] = subGlyph.arg1 * Scale;
|
||||
+ subChars[i].Transformation[G_X][G_Z] = subGlyphArg1 * Scale;
|
||||
// rotation and scale
|
||||
- subChars[i].Transformation[G_Y][G_X] = Fixed1616ToReal(subGlyph.transform.yx);
|
||||
- subChars[i].Transformation[G_Y][G_Y] = Fixed1616ToReal(subGlyph.transform.yy);
|
||||
+ subChars[i].Transformation[G_Y][G_X] = Fixed1616ToReal(subGlyphMatrix.yx);
|
||||
+ subChars[i].Transformation[G_Y][G_Y] = Fixed1616ToReal(subGlyphMatrix.yy);
|
||||
// y position
|
||||
- subChars[i].Transformation[G_Y][G_Z] = subGlyph.arg2 * Scale;
|
||||
+ subChars[i].Transformation[G_Y][G_Z] = subGlyphArg2 * Scale;
|
||||
// last row is an identity
|
||||
subChars[i].Transformation[G_Z][G_X] = 0;
|
||||
subChars[i].Transformation[G_Z][G_Y] = 0;
|
||||
12
amanith-0.3-gcc-C++fix.patch
Normal file
12
amanith-0.3-gcc-C++fix.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -up amanith/examples/opengl/vectorizer/drawer.h.BAD amanith/examples/opengl/vectorizer/drawer.h
|
||||
--- amanith/examples/opengl/vectorizer/drawer.h.BAD 2007-11-14 17:52:37.000000000 -0500
|
||||
+++ amanith/examples/opengl/vectorizer/drawer.h 2007-11-14 17:53:07.000000000 -0500
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
#endif
|
||||
// destructor
|
||||
~QGLWidgetTest();
|
||||
- void QGLWidgetTest::timerEvent(QTimerEvent *e);
|
||||
+ void timerEvent(QTimerEvent *e);
|
||||
};
|
||||
|
||||
|
||||
45
amanith-0.3-nothirdpartystatic.patch
Normal file
45
amanith-0.3-nothirdpartystatic.patch
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
--- amanith/amanith.pro.BAD 2007-05-26 18:03:40.000000000 -0500
|
||||
+++ amanith/amanith.pro 2007-05-26 18:03:48.000000000 -0500
|
||||
@@ -1,4 +1,4 @@
|
||||
TEMPLATE = subdirs
|
||||
CONFIG += ordered
|
||||
|
||||
-SUBDIRS += 3rdpart build plugins examples
|
||||
+SUBDIRS += build plugins examples
|
||||
--- amanith/plugins/jpeg/build.conf.BAD 2007-05-26 18:03:57.000000000 -0500
|
||||
+++ amanith/plugins/jpeg/build.conf 2007-05-26 18:04:09.000000000 -0500
|
||||
@@ -25,7 +25,7 @@ contains(DEFINES, _JPEG_PLUGIN) {
|
||||
}
|
||||
}
|
||||
|
||||
-unix: LIBS += $$(AMANITHDIR)/lib/libjpeg.a
|
||||
+unix: LIBS += -ljpeg
|
||||
win32: {
|
||||
|
||||
!contains(DEFINES, WIN32_MINGW) {
|
||||
--- amanith/plugins/png/build.conf.BAD 2007-05-26 18:04:21.000000000 -0500
|
||||
+++ amanith/plugins/png/build.conf 2007-05-26 18:04:33.000000000 -0500
|
||||
@@ -25,9 +25,7 @@ contains(DEFINES, _PNG_PLUGIN) {
|
||||
}
|
||||
}
|
||||
|
||||
-INCLUDEPATH += $$(AMANITHDIR)/3rdpart/zlib
|
||||
-
|
||||
-unix: LIBS += $$(AMANITHDIR)/lib/libpng.a $$(AMANITHDIR)/lib/libzlib.a
|
||||
+unix: LIBS += -lpng -lz
|
||||
win32: {
|
||||
|
||||
!contains(DEFINES, WIN32_MINGW) {
|
||||
--- amanith/plugins/fonts/build.conf.BAD 2007-05-26 18:04:44.000000000 -0500
|
||||
+++ amanith/plugins/fonts/build.conf 2007-05-26 18:05:08.000000000 -0500
|
||||
@@ -38,9 +38,9 @@ contains(DEFINES, _FONTS_PLUGIN) {
|
||||
# take into account compilation mode (debug or release)
|
||||
DEFINES -= FT_DEBUG_LEVEL_ERROR FT_DEBUG_LEVEL_TRACE
|
||||
|
||||
INCLUDEPATH += $$(AMANITHDIR)/3rdpart/freetype2/include
|
||||
|
||||
-unix: LIBS += $$(AMANITHDIR)/lib/libfreetype2.a $$(AMANITHDIR)/lib/libzlib.a
|
||||
+unix: LIBS += -lfreetype -lz
|
||||
win32: {
|
||||
|
||||
!contains(DEFINES, WIN32_MINGW) {
|
||||
19
amanith-0.3-system-freetype.patch
Normal file
19
amanith-0.3-system-freetype.patch
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
diff -up amanith/plugins/fonts/build.conf.BAD amanith/plugins/fonts/build.conf
|
||||
--- amanith/plugins/fonts/build.conf.BAD 2007-11-15 10:18:43.000000000 -0500
|
||||
+++ amanith/plugins/fonts/build.conf 2007-11-15 10:19:10.000000000 -0500
|
||||
@@ -38,7 +38,7 @@ contains(DEFINES, _FONTS_PLUGIN) {
|
||||
# take into account compilation mode (debug or release)
|
||||
DEFINES -= FT_DEBUG_LEVEL_ERROR FT_DEBUG_LEVEL_TRACE
|
||||
|
||||
-INCLUDEPATH += $$(AMANITHDIR)/3rdpart/freetype2/include
|
||||
+QMAKE_CXXFLAGS += `pkg-config --cflags freetype2`
|
||||
|
||||
unix: LIBS += -lfreetype -lz
|
||||
win32: {
|
||||
@@ -51,4 +51,4 @@ win32: {
|
||||
contains(DEFINES, WIN32_MINGW) {
|
||||
LIBS += $$(AMANITHDIR)/lib/libfreetype2.a $$(AMANITHDIR)/lib/libzlib.a
|
||||
}
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
26
amanith-0.3-system-glew.patch
Normal file
26
amanith-0.3-system-glew.patch
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
diff -up amanith/build/build.pro.BAD amanith/build/build.pro
|
||||
--- amanith/build/build.pro.BAD 2007-11-14 17:41:00.000000000 -0500
|
||||
+++ amanith/build/build.pro 2007-11-14 17:41:41.000000000 -0500
|
||||
@@ -69,8 +69,9 @@ SOURCES = gelement.cpp \
|
||||
#
|
||||
#*********************************************************
|
||||
contains(DEFINES, _OPENGLEXT_PLUGIN) {
|
||||
- SOURCES += support/glew.c gopenglext.cpp
|
||||
+ SOURCES += gopenglext.cpp
|
||||
CONFIG += opengl
|
||||
+ LIBS += -lGLEW
|
||||
|
||||
# Qt4 syntax
|
||||
contains(DEFINES, USE_QT4) {
|
||||
diff -up amanith/include/amanith/gopenglext.h.BAD amanith/include/amanith/gopenglext.h
|
||||
--- amanith/include/amanith/gopenglext.h.BAD 2007-11-14 17:42:28.000000000 -0500
|
||||
+++ amanith/include/amanith/gopenglext.h 2007-11-14 17:42:52.000000000 -0500
|
||||
@@ -29,7 +29,7 @@
|
||||
#ifndef GOPENGLEXT_H
|
||||
#define GOPENGLEXT_H
|
||||
|
||||
-#include "GL/glew.h"
|
||||
+#include <GL/glew.h>
|
||||
// this inclusion to make glew linking working with some platforms (ex: Mac)
|
||||
#include "amanith/gelement.h"
|
||||
#ifdef G_OS_WIN
|
||||
12
amanith-0.3-system-libjpeg.patch
Normal file
12
amanith-0.3-system-libjpeg.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -up amanith/plugins/jpeg/gjpegimpexp.cpp.BAD amanith/plugins/jpeg/gjpegimpexp.cpp
|
||||
--- amanith/plugins/jpeg/gjpegimpexp.cpp.BAD 2007-11-14 22:06:33.000000000 -0500
|
||||
+++ amanith/plugins/jpeg/gjpegimpexp.cpp 2007-11-14 22:07:15.000000000 -0500
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <csetjmp>
|
||||
|
||||
G_EXTERN_C {
|
||||
- #include "../../3rdpart/libjpeg/jpeglib.h"
|
||||
+ #include <jpeglib.h>
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
12
amanith-0.3-system-libpng.patch
Normal file
12
amanith-0.3-system-libpng.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -up amanith/plugins/png/gpngimpexp.cpp.BAD amanith/plugins/png/gpngimpexp.cpp
|
||||
--- amanith/plugins/png/gpngimpexp.cpp.BAD 2007-11-14 22:09:31.000000000 -0500
|
||||
+++ amanith/plugins/png/gpngimpexp.cpp 2007-11-14 22:10:11.000000000 -0500
|
||||
@@ -35,7 +35,7 @@
|
||||
//#include <csetjmp>
|
||||
|
||||
G_EXTERN_C {
|
||||
- #include "../../3rdpart/libpng/png.h"
|
||||
+ #include <png.h>
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
115
amanith.spec
Normal file
115
amanith.spec
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
Name: amanith
|
||||
Version: 0.3
|
||||
Release: 5%{?dist}
|
||||
Summary: Crossplatform framework for 2d/3d vector graphics
|
||||
Group: Development/Libraries
|
||||
License: QPL
|
||||
URL: http://www.amanith.org
|
||||
Source0: http://www.amanith.org/download/files/amanith_03.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: qt-devel, freetype-devel, libjpeg-devel, libpng-devel, zlib-devel
|
||||
BuildRequires: xorg-x11-devel, glew-devel, mesa-libGLU-devel
|
||||
BuildRequires: mesa-libGL-devel, pkgconfig
|
||||
Patch0: amanith-0.3-nothirdpartystatic.patch
|
||||
Patch1: amanith-0.3-system-glew.patch
|
||||
Patch3: amanith-0.3-gcc-C++fix.patch
|
||||
Patch4: amanith-0.3-system-libjpeg.patch
|
||||
Patch5: amanith-0.3-system-libpng.patch
|
||||
Patch6: amanith-0.3-freetype-fix.patch
|
||||
Patch7: amanith-0.3-system-freetype.patch
|
||||
|
||||
%description
|
||||
Amanith is an OpenSource C++ CrossPlatform framework designed for 2d & 3d
|
||||
vector graphics. All the framework is heavily based on a light plug-in
|
||||
system.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for amanith
|
||||
Group: Development/Libraries
|
||||
Requires: glew-devel
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
Development libraries and headers for developing programs that use amanith.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
# Boo. Hiss. SGI Free B and GLX files.
|
||||
rm -rf include/GL/
|
||||
# Don't need the 3rdpart stuff either.
|
||||
rm -rf 3rdpart/
|
||||
chmod -x include/amanith/*.h include/amanith/1d/*.h \
|
||||
include/amanith/2d/*.h include/amanith/lang/*.h \
|
||||
include/amanith/numerics/*.h include/amanith/geometry/*.h \
|
||||
include/amanith/rendering/*.h include/amanith/support/*.h \
|
||||
FAQ CHANGELOG INSTALL README LICENSE.QPL doc/amanith.chm \
|
||||
src/1d/*.cpp src/2d/*.cpp src/support/*.cpp src/rendering/*.cpp \
|
||||
src/*.cpp src/geometry/*.cpp plugins/jpeg/*.cpp src/numerics/*.cpp \
|
||||
plugins/fonts/*.cpp plugins/png/*.cpp \
|
||||
plugins/jpeg/*.h plugins/png/*.h plugins/fonts/*.h
|
||||
# convert to utf-8, fix end of line encoding
|
||||
for i in FAQ CHANGELOG INSTALL README LICENSE.QPL; do
|
||||
sed -i -e 's|\r||g' $i
|
||||
iconv -f iso-8859-1 -t utf-8 -o $i{.utf8,}
|
||||
mv $i{.utf8,}
|
||||
done
|
||||
|
||||
%build
|
||||
export AMANITHDIR=$(pwd)
|
||||
export LD_LIBRARY_PATH=$AMANITHDIR/lib:$LD_LIBRARY_PATH
|
||||
source %{_sysconfdir}/profile.d/qt.sh
|
||||
qmake amanith.pro
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
mkdir -p $RPM_BUILD_ROOT%{_libdir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_includedir}
|
||||
|
||||
# We're using cp instead of install because the symlinks are already
|
||||
# created correctly.
|
||||
cp -a lib/*.so* $RPM_BUILD_ROOT%{_libdir}
|
||||
cp -a plugins/*.so* $RPM_BUILD_ROOT%{_libdir}
|
||||
cp -a include/amanith $RPM_BUILD_ROOT%{_includedir}
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc CHANGELOG FAQ LICENSE.QPL README doc/*
|
||||
%{_libdir}/*.so.*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/*.so
|
||||
%{_includedir}/amanith/
|
||||
|
||||
%changelog
|
||||
* Thu Dec 20 2007 Tom "spot" Callaway <tcallawa@redhat.com> 0.3-5
|
||||
- use macros when we source qt.sh
|
||||
|
||||
* Wed Dec 19 2007 Tom "spot" Callaway <tcallawa@redhat.com> 0.3-4
|
||||
- source /etc/profile/qt.sh so qmake is in the path
|
||||
|
||||
* Wed Dec 19 2007 Tom "spot" Callaway <tcallawa@redhat.com> 0.3-3
|
||||
- Add glew-devel as explicit Requires for amanith-devel
|
||||
- change AMANITHDIR to use pwd rather than a macro combo
|
||||
- drop INSTALL from %%doc
|
||||
|
||||
* Thu Nov 15 2007 Tom "spot" Callaway <tcallawa@redhat.com> 0.3-2
|
||||
- fix freetype plugin to properly use system includes
|
||||
|
||||
* Sat May 26 2007 Tom "spot" Callaway <tcallawa@redhat.com> 0.3-1
|
||||
- initial Fedora package
|
||||
1
sources
1
sources
|
|
@ -0,0 +1 @@
|
|||
392e79d36cc2d57921c7fefacbc4d4a3 amanith_03.tar.gz
|
||||
Loading…
Add table
Add a link
Reference in a new issue