summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-04-08 03:00:44 +0000
committerMike Frysinger <vapier@gentoo.org>2006-04-08 03:00:44 +0000
commitae102a8354bd09e41460fe18a7290a09f36f1796 (patch)
treeea80cfd2b3c26bc485119a65a812beb3b3d72860 /media-libs/sge
parentversion bump (diff)
downloadgentoo-2-ae102a8354bd09e41460fe18a7290a09f36f1796.tar.gz
gentoo-2-ae102a8354bd09e41460fe18a7290a09f36f1796.tar.bz2
gentoo-2-ae102a8354bd09e41460fe18a7290a09f36f1796.zip
Ebuild submitted by Minati jean michel et al #33296.
(Portage version: 2.1_pre7-r4)
Diffstat (limited to 'media-libs/sge')
-rw-r--r--media-libs/sge/ChangeLog8
-rw-r--r--media-libs/sge/Manifest6
-rw-r--r--media-libs/sge/files/digest-sge-0308093
-rw-r--r--media-libs/sge/files/sge-030809-build.patch123
-rw-r--r--media-libs/sge/files/sge-030809-cmap.patch28
-rw-r--r--media-libs/sge/files/sge-030809-freetype.patch11
-rw-r--r--media-libs/sge/metadata.xml5
-rw-r--r--media-libs/sge/sge-030809.ebuild61
8 files changed, 245 insertions, 0 deletions
diff --git a/media-libs/sge/ChangeLog b/media-libs/sge/ChangeLog
new file mode 100644
index 000000000000..c35be32b8947
--- /dev/null
+++ b/media-libs/sge/ChangeLog
@@ -0,0 +1,8 @@
+# ChangeLog for media-libs/sge
+# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/sge/ChangeLog,v 1.1 2006/04/08 03:00:44 vapier Exp $
+
+*sge-030809 (07 Apr 2006)
+
+ 07 Apr 2006; Mike Frysinger <vapier@gentoo.org> :
+ Initial import. Ebuild submitted by Minati jean michel et al #33296.
diff --git a/media-libs/sge/Manifest b/media-libs/sge/Manifest
new file mode 100644
index 000000000000..c7c048d1ec00
--- /dev/null
+++ b/media-libs/sge/Manifest
@@ -0,0 +1,6 @@
+MD5 152ef6734e4e8aa0ebf8fce94211cdca files/digest-sge-030809 229
+RMD160 681f790ac806dc29acc1e94ac62601c34b97bde6 files/digest-sge-030809 229
+SHA256 2c2c3e896cc3391a451770f6bec22c5feaaef0d9f5c2d6d28389b07e33415d04 files/digest-sge-030809 229
+MD5 7ce4122ec41a8b05d02daf21000235bd sge-030809.ebuild 1902
+RMD160 e68ecde6467ef7fc8181030fb04934e22a726700 sge-030809.ebuild 1902
+SHA256 24d3ed744976132e60a6aa9448288bdb7e3077d6b3a908634658fbde262b7646 sge-030809.ebuild 1902
diff --git a/media-libs/sge/files/digest-sge-030809 b/media-libs/sge/files/digest-sge-030809
new file mode 100644
index 000000000000..cf9f8699fdd9
--- /dev/null
+++ b/media-libs/sge/files/digest-sge-030809
@@ -0,0 +1,3 @@
+MD5 a76975665b6a2bf189130fa2c8821caf sge030809.tar.gz 251698
+RMD160 c3c2484e27e9ddce754cc9471720a7c33becbbc3 sge030809.tar.gz 251698
+SHA256 25cfbe59ab99647254e69d25984707045492c2a5d1b15f27d999d0284a7110fc sge030809.tar.gz 251698
diff --git a/media-libs/sge/files/sge-030809-build.patch b/media-libs/sge/files/sge-030809-build.patch
new file mode 100644
index 000000000000..5b277a0a6b08
--- /dev/null
+++ b/media-libs/sge/files/sge-030809-build.patch
@@ -0,0 +1,123 @@
+--- Makefile.orig 2006-03-29 00:08:39.000000000 -0500
++++ Makefile 2006-03-29 00:09:36.000000000 -0500
+@@ -2,7 +2,7 @@
+
+ include Makefile.conf
+
+-CFLAGS += $(SGE_CFLAGS) -fPIC $(FT_CFLAGS)
++CXXFLAGS += $(SGE_CFLAGS) -fPIC $(FT_CFLAGS)
+ LIBS =$(SGE_LIBS)
+
+ SGE_VER = 030809
+@@ -10,20 +10,26 @@
+
+ OBJECTS=sge_surface.o sge_primitives.o sge_tt_text.o sge_bm_text.o sge_misc.o sge_textpp.o sge_blib.o sge_rotation.o sge_collision.o sge_shape.o
+
+-all: config $(OBJECTS)
+- @ar rsc libSGE.a $(OBJECTS)
++SHARED_LIB=libSGE.so.$(API_VER)
++STATIC_LIB=libSGE.a
+
+-$(OBJECTS): %.o:%.cpp %.h #Each object depends on thier .cpp and .h file
+- $(CXX) $(CFLAGS) -c $<
++all: sge_config.h $(OBJECTS) $(SHARED_LIB) $(STATIC_LIB)
+
+-shared: all
+- $(CXX) $(CFLAGS) -Wl,-soname,libSGE.so.$(API_VER) -fpic -fPIC -shared -o libSGE.so $(OBJECTS) $(LIBS)
++$(STATIC_LIB): $(OBJECTS)
++ $(AR) rsc libSGE.a $(OBJECTS)
+
+-shared-strip: shared
++$(OBJECTS): sge_config.h
++$(OBJECTS): %.o:%.cpp %.h #Each object depends on their .cpp and .h file
++ $(CXX) $(CXXFLAGS) -c $<
++
++$(SHARED_LIB): $(OBJECTS)
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -Wl,-soname,libSGE.so.$(API_VER) -fpic -fPIC -shared -o libSGE.so $(OBJECTS) $(LIBS)
++
++shared-strip: $(SHARED_LIB)
+ @strip libSGE.so
+
+ # Building a dll... I have no idea how to do this, but it should be something like below.
+-dll: config $(OBJECTS)
++dll: sge_config.h $(OBJECTS)
+ dlltool --output-def SGE.def $(OBJECTS)
+ dllwrap --driver-name $(CXX) -o SGE.dll --def SGE.def --output-lib libSGE.a --dllname SGE.dll $(OBJECTS) $(LIBS)
+
+@@ -33,21 +39,22 @@
+ clean:
+ @rm -f *.o *.so *.a *.dll *.def
+
+-config:
+- @echo "/* SGE Config header (generated automatically) */" >sge_config.h
+- @echo "#define SGE_VER $(SGE_VER)" >>sge_config.h
++sge_config.h:
++ @echo "/* SGE Config header (generated automatically) */" >sge_config.h.tmp
++ @echo "#define SGE_VER $(SGE_VER)" >>sge_config.h.tmp
+ ifeq ($(C_COMP),y)
+- @echo "#define _SGE_C_AND_CPP" >>sge_config.h
++ @echo "#define _SGE_C_AND_CPP" >>sge_config.h.tmp
+ endif
+ ifeq ($(USE_FT),n)
+- @echo "#define _SGE_NOTTF" >>sge_config.h
++ @echo "#define _SGE_NOTTF" >>sge_config.h.tmp
+ endif
+ ifeq ($(USE_IMG),y)
+- @echo "#define _SGE_HAVE_IMG" >>sge_config.h
++ @echo "#define _SGE_HAVE_IMG" >>sge_config.h.tmp
+ endif
+ ifeq ($(NO_CLASSES),y)
+- @echo "#define _SGE_NO_CLASSES" >>sge_config.h
++ @echo "#define _SGE_NO_CLASSES" >>sge_config.h.tmp
+ endif
++ mv sge_config.h.tmp sge_config.h
+
+ ifneq ($(QUIET),y)
+ @echo "== SGE r$(SGE_VER)"
+@@ -70,13 +77,13 @@
+ @echo ""
+ endif
+
+-install: shared
+- @mkdir -p $(PREFIX_H)
+- install -c -m 644 sge*.h $(PREFIX_H)
+- @mkdir -p $(PREFIX)/lib
+- install -c -m 644 libSGE.a $(PREFIX)/lib
+- install -c libSGE.so $(PREFIX)/lib/libSGE.so.$(API_VER).$(SGE_VER)
+- @cd $(PREFIX)/lib;\
++install: $(SHARED_LIB) $(STATIC_LIB)
++ @mkdir -p $(DESTDIR)$(PREFIX_H)
++ install -c -m 644 sge*.h $(DESTDIR)$(PREFIX_H)
++ @mkdir -p $(DESTDIR)$(PREFIX)/lib
++ install -c -m 644 $(STATIC_LIB) $(DESTDIR)$(PREFIX)/lib
++ install -c libSGE.so $(DESTDIR)$(PREFIX)/lib/libSGE.so.$(API_VER).$(SGE_VER)
++ @cd $(DESTDIR)$(PREFIX)/lib;\
+ ln -sf libSGE.so.$(API_VER).$(SGE_VER) libSGE.so.$(API_VER);\
+ ln -sf libSGE.so.$(API_VER) libSGE.so
+ @echo "** Headerfiles installed in $(PREFIX_H)"
+--- Makefile.conf.orig 2006-03-29 00:08:39.000000000 -0500
++++ Makefile.conf 2006-03-29 00:08:39.000000000 -0500
+@@ -11,6 +11,7 @@
+ # Compilers (C and C++)
+ CC=gcc
+ CXX=g++
++AR=ar
+
+ # Make sure sdl-config is available
+ HAVE_SDL =$(shell if (sdl-config --version) < /dev/null > /dev/null 2>&1; then echo "y"; else echo "n"; fi;)
+@@ -25,11 +26,13 @@
+ PREFIX_H =$(shell sdl-config --prefix)/include/SDL
+
+ # Flags passed to the compiler
+-CFLAGS =-Wall -O3 -ffast-math
++CXXFLAGS ?=-O3 -ffast-math
+ SGE_CFLAGS =$(shell sdl-config --cflags)
+ # Uncomment to make some more optimizations
+-#CFLAGS =-Wall -O9 -ffast-math -march=i686
++#CXXFLAGS =-O9 -ffast-math -march=i686
+
++# Spit out warnings
++CXXFLAGS += -Wall
+
+ # Libs config
+ SGE_LIBS =$(shell sdl-config --libs) -lstdc++
diff --git a/media-libs/sge/files/sge-030809-cmap.patch b/media-libs/sge/files/sge-030809-cmap.patch
new file mode 100644
index 000000000000..c03396e1fb8b
--- /dev/null
+++ b/media-libs/sge/files/sge-030809-cmap.patch
@@ -0,0 +1,28 @@
+http://bugs.gentoo.org/33296#26
+
+patch by Steve <steviedizzle@gmail.com>
+
+explanation:
+It changes the 16bit integers for setting and clearing collision maps to 32bit
+because if the surface is too large the program will segfault.
+
+--- sge030809/sge_collision.cpp
++++ sge030809/sge_collision.cpp
+@@ -336,7 +336,7 @@
+ void sge_unset_cdata(sge_cdata *cd, Sint16 x, Sint16 y, Sint16 w, Sint16 h)
+ {
+ Uint8 *map=cd->map;
+- Sint16 offs,len;
++ Sint32 offs,len;
+ int i,n=0;
+
+ offs=y*cd->w + x;
+@@ -365,7 +365,7 @@
+ void sge_set_cdata(sge_cdata *cd, Sint16 x, Sint16 y, Sint16 w, Sint16 h)
+ {
+ Uint8 *map=cd->map;
+- Sint16 offs,len;
++ Sint32 offs,len;
+ int i,n=0;
+
+ offs=y*cd->w + x;
diff --git a/media-libs/sge/files/sge-030809-freetype.patch b/media-libs/sge/files/sge-030809-freetype.patch
new file mode 100644
index 000000000000..6de197901635
--- /dev/null
+++ b/media-libs/sge/files/sge-030809-freetype.patch
@@ -0,0 +1,11 @@
+--- sge_tt_text.cpp.orig 2006-03-28 23:57:23.000000000 -0500
++++ sge_tt_text.cpp 2006-03-28 23:58:03.000000000 -0500
+@@ -36,6 +36,8 @@
+ #include "sge_textpp.h"
+
+ #ifndef _SGE_NOTTF
++#include <ft2build.h>
++#include FT_FREETYPE_H
+ #include <freetype/freetype.h>
+ #include <freetype/ftoutln.h>
+ #include <freetype/ttnameid.h>
diff --git a/media-libs/sge/metadata.xml b/media-libs/sge/metadata.xml
new file mode 100644
index 000000000000..d3c2cc926f0b
--- /dev/null
+++ b/media-libs/sge/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/media-libs/sge/sge-030809.ebuild b/media-libs/sge/sge-030809.ebuild
new file mode 100644
index 000000000000..7b942fd4baeb
--- /dev/null
+++ b/media-libs/sge/sge-030809.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/sge/sge-030809.ebuild,v 1.1 2006/04/08 03:00:44 vapier Exp $
+
+inherit eutils
+
+MY_P="sge${PV}"
+DESCRIPTION="Graphics extensions library for SDL"
+HOMEPAGE="http://www.etek.chalmers.se/~e8cal1/sge/"
+SRC_URI="http://www.etek.chalmers.se/~e8cal1/sge/files/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples image truetype"
+
+RDEPEND=">=media-libs/libsdl-1.2
+ image? ( >=media-libs/sdl-image-1.2 )
+ truetype? ( >=media-libs/freetype-2 )"
+
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-build.patch
+ epatch "${FILESDIR}"/${P}-freetype.patch
+ epatch "${FILESDIR}"/${P}-cmap.patch
+}
+
+src_compile() {
+ # make sure the header gets regenerated everytime
+ rm -f sge_config.h
+
+ yesno() { use $1 && echo y || echo n ; }
+ emake \
+ USE_IMG=$(yesno image) \
+ USE_FT=$(yesno truetype) \
+ || die "emake failed"
+
+ if use examples ; then
+ cd examples
+ emake -j1 \
+ USE_IMG=$(yesno image) \
+ USE_FT=$(yesno truetype) \
+ || die "emake (examples) failed"
+ fi
+}
+
+src_install() {
+ make install DESTDIR="${D}" || die
+
+ dodoc README Todo WhatsNew
+
+ use doc && dohtml docs/*
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples || die "examples failed"
+ fi
+}