aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2016-09-14 09:45:32 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2016-09-14 09:45:32 +0800
commit3227a34f3e9dce571b44d80075a914cdca57dc90 (patch)
tree7b7c608059eb1d153a40e882268398f1a4617677 /games
parent0f86245a1857794311b4e7c82c29eeb7fc554bbc (diff)
downloadfreebsd-ports-gnome-3227a34f3e9dce571b44d80075a914cdca57dc90.tar.gz
freebsd-ports-gnome-3227a34f3e9dce571b44d80075a914cdca57dc90.tar.zst
freebsd-ports-gnome-3227a34f3e9dce571b44d80075a914cdca57dc90.zip
- Update to 1.0
- Add LICENSE - Add .desktop file - Simplify makefile
Diffstat (limited to 'games')
-rw-r--r--games/osgg/Makefile30
-rw-r--r--games/osgg/distinfo5
-rw-r--r--games/osgg/files/patch-Makefile37
-rw-r--r--games/osgg/files/patch-main.cpp44
4 files changed, 93 insertions, 23 deletions
diff --git a/games/osgg/Makefile b/games/osgg/Makefile
index a445681faa74..b27872a3de4e 100644
--- a/games/osgg/Makefile
+++ b/games/osgg/Makefile
@@ -2,36 +2,32 @@
# $FreeBSD$
PORTNAME= osgg
-PORTVERSION= 0.99
-PORTREVISION= 9
+PORTVERSION= 1.0
CATEGORIES= games
MASTER_SITES= SF
MAINTAINER= amdmi3@FreeBSD.org
COMMENT= OldSkool Gravity Game
+LICENSE= GPLv3+
+
USES= tar:bzip2
USE_SDL= sdl image ttf mixer
-USE_GL= yes
-
-WRKSRC= ${WRKDIR}/${PORTNAME}
+USE_GL= gl
+MAKE_ENV= DATADIR="${DATADIR}/"
PLIST_FILES= bin/${PORTNAME}
PORTDATA= *
+DESKTOP_ENTRIES="Osgg" \
+ "" \
+ "${DATADIR}/icon.png" \
+ "osgg" \
+ "Game;ArcadeGame;" \
+ ""
+
post-extract:
- @${FIND} -d ${WRKSRC} -name .svn -exec ${RM} -rf {} \;
-
-post-patch:
- @${RM} -f ${WRKSRC}/osgg
- @${REINPLACE_CMD} -e 's|"[a-z]*.txt"|DATADIR&|; s|endian.h|sys/&|' \
- ${WRKSRC}/main.cpp
-
-do-build:
- cd ${WRKSRC} && ${CXX} ${CXXFLAGS} `${SDL_CONFIG} --libs --cflags` \
- -lGL -lSDL_image -lSDL_ttf -lSDL_mixer -o ${PORTNAME} \
- -DDATADIR="\"${DATADIR}/\"" \
- main.cpp text.cpp sound.cpp
+ @${RM} -f ${WRKSRC}/osgg ${WRKSRC}/launcher/launcher
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
diff --git a/games/osgg/distinfo b/games/osgg/distinfo
index b02185345891..126826764fb7 100644
--- a/games/osgg/distinfo
+++ b/games/osgg/distinfo
@@ -1,2 +1,3 @@
-SHA256 (osgg-0.99.tar.bz2) = d186294f490437e8bfce1f5947673932f57fc5719fa10dac5153aa7be8ed3f86
-SIZE (osgg-0.99.tar.bz2) = 2664753
+TIMESTAMP = 1471280939
+SHA256 (osgg-1.0.tar.bz2) = 59654b2a845883078071eca847a1fd07f0084302c1555a4d9d239155f29d758c
+SIZE (osgg-1.0.tar.bz2) = 300614
diff --git a/games/osgg/files/patch-Makefile b/games/osgg/files/patch-Makefile
new file mode 100644
index 000000000000..89127c35f1b6
--- /dev/null
+++ b/games/osgg/files/patch-Makefile
@@ -0,0 +1,37 @@
+--- Makefile.orig 2016-08-13 02:07:57 UTC
++++ Makefile
+@@ -1,26 +1,26 @@
+ DATADIR?=./
+
+-CC=g++ -DDATADIR="\"$(DATADIR)\""
++CXX?=g++
+
+-CFLAGS+=-Wall `sdl-config --cflags`
++CXXFLAGS+=-Wall `sdl-config --cflags` -DDATADIR="\"$(DATADIR)\""
+
+-LIBS+=-lGL `sdl-config --libs` -lSDL_ttf -lSDL_image -lSDL_mixer
++LIBS+=`sdl-config --libs` -lSDL_ttf -lSDL_image -lSDL_mixer -lGL -lm
+
+ SOURCES=main.cpp text.cpp sound.cpp
+-OBJECTS=$(SOURCES:.c=.o)
++OBJECTS=$(SOURCES:.cpp=.o)
+
+ EXECUTABLE=osgg
+
+ all: $(SOURCES) $(EXECUTABLE)
+
+ server: server.cpp
+- $(CC) $(LDFLAGS) server.cpp $(LIBS) -o $@
+-
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) server.cpp $(LIBS) -o $@
++
+ $(EXECUTABLE): $(OBJECTS)
+- $(CC) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $@
++ $(CXX) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $@
+
+ .cpp.o:
+- $(CC) $(CFLAGS) $< -o $@
++ $(CXX) $(CXXFLAGS) -c $< -o $@
+
+ clean:
+ rm -f *.o $(EXECUTABLE)
diff --git a/games/osgg/files/patch-main.cpp b/games/osgg/files/patch-main.cpp
index 98f208c96832..cf6d2f00287e 100644
--- a/games/osgg/files/patch-main.cpp
+++ b/games/osgg/files/patch-main.cpp
@@ -1,6 +1,6 @@
---- main.cpp.orig 2009-03-14 01:46:04.000000000 +0300
-+++ main.cpp 2013-12-21 03:29:52.401817465 +0400
-@@ -26,6 +26,7 @@
+--- main.cpp.orig 2016-08-13 02:07:57 UTC
++++ main.cpp
+@@ -27,15 +27,18 @@
#include <fstream>
#include <iostream>
#include <sstream>
@@ -8,7 +8,21 @@
#include <sys/time.h>
-@@ -340,6 +341,7 @@
+-#ifndef WIN32
+- #include <endian.h>
+-#else
++#if defined(WIN32)
+ typedef unsigned int uint;
+ #include <windows.h>
+ #include <GL/glext.h>
++#elif defined(__FreeBSD__)
++ #include <sys/endian.h>
++#else
++ #include <endian.h>
+ #endif
+
+
+@@ -348,6 +351,7 @@ bool classBullets::col(vector<vert> targ
}
}
}
@@ -16,3 +30,25 @@
}
void classBullets::shoot(entity owner, gPs velocity)
+@@ -1826,9 +1830,9 @@ int main(int argc, char **argv)
+
+ GLfloat scale;
+
+- readEnt("ship.txt", gameInfo.shipStaticVerts);
+- readEnt("base.txt", gameInfo.baseStaticVerts);
+- readEnt("enemy.txt", gameInfo.enemyStaticVerts);
++ readEnt(DATADIR "ship.txt", gameInfo.shipStaticVerts);
++ readEnt(DATADIR "base.txt", gameInfo.baseStaticVerts);
++ readEnt(DATADIR "enemy.txt", gameInfo.enemyStaticVerts);
+
+ //Enter Main loop
+ while(gameState != GameStateQuit)
+@@ -1958,7 +1962,7 @@ int main(int argc, char **argv)
+ break;
+
+ case SDLK_d:
+- saveMap(polys, ents, "verts.txt");
++ saveMap(polys, ents, DATADIR "verts.txt");
+ break;
+
+ case SDLK_s: