aboutsummaryrefslogtreecommitdiff
path: root/games/powerpak
diff options
context:
space:
mode:
Diffstat (limited to 'games/powerpak')
-rw-r--r--games/powerpak/Makefile38
-rw-r--r--games/powerpak/distinfo2
-rw-r--r--games/powerpak/files/Makefile.FreeBSD87
-rw-r--r--games/powerpak/files/patch-Makefile.UNIX77
-rw-r--r--games/powerpak/files/patch-PowerMedia::mpeg.c25
-rw-r--r--games/powerpak/pkg-plist42
6 files changed, 158 insertions, 113 deletions
diff --git a/games/powerpak/Makefile b/games/powerpak/Makefile
index 9dc9da724b3d..c6d1b8bcda2e 100644
--- a/games/powerpak/Makefile
+++ b/games/powerpak/Makefile
@@ -6,41 +6,37 @@
#
PORTNAME= powerpak
-PORTVERSION= 991203
+PORTVERSION= 20000511
CATEGORIES= games
-MASTER_SITES= http://www.imperialpenguin.com/software/powerpak/
+MASTER_SITES= http://www.angelfire.com/va/powerpakgsdk/images/
DISTNAME= PowerPak
MAINTAINER= ports@FreeBSD.org
-LIB_DEPENDS= SDL-1.0.2:${PORTSDIR}/devel/sdl10
+LIB_DEPENDS= SDL-1.1.4:${PORTSDIR}/devel/sdl12
+
+SDL_CONFIG= ${LOCALBASE}/bin/sdl11-config
USE_FREETYPE= yes
-MAKEFILE= Makefile.FreeBSD
INSTALLS_SHLIB= yes
+MAKE_ENV= SDL_CONFIG="${SDL_CONFIG}"
+MAKEFILE= Makefile.UNIX
post-extract:
- @ /usr/bin/find ${WRKSRC} -type f | xargs ${PERL} -pi -e 's/\r//g'
-
-pre-build:
- @ ${CP} ${FILESDIR}/Makefile.FreeBSD ${WRKSRC}
+ @ /usr/bin/find ${WRKSRC} -type f | xargs ${PERL} -pi -e 's/\r//g ; \
+ s|"SDL/|"|g ; s|<SDL/|<|g'
do-install:
@ ${INSTALL_DATA} ${WRKSRC}/libPP.a ${PREFIX}/lib
- @ ${INSTALL_DATA} ${WRKSRC}/libPP.so ${PREFIX}/lib
+ @ ${INSTALL_PROGRAM} ${WRKSRC}/libPP.so.1 ${PREFIX}/lib
+ @ ${LN} -sf ${PREFIX}/lib/libPP.so.1 ${PREFIX}/lib/libPP.so
@ ${MKDIR} ${PREFIX}/include/PowerPak
- @ ${INSTALL_DATA} ${WRKSRC}/*.h ${PREFIX}/include/PowerPak
- @ ${INSTALL_DATA} ${WRKSRC}/PowerDraw/*.h ${PREFIX}/include/PowerPak
- @ ${INSTALL_DATA} ${WRKSRC}/PowerInput/*.h ${PREFIX}/include/PowerPak
- @ ${MKDIR} ${PREFIX}/share/examples/PowerPak/PowerDraw
- @ ${INSTALL_DATA} ${WRKSRC}/PowerDraw/examples/Makefile.UNIX ${PREFIX}/share/examples/PowerPak/PowerDraw/Makefile
- @ ${INSTALL_DATA} ${WRKSRC}/PowerDraw/examples/*.c ${PREFIX}/share/examples/PowerPak/PowerDraw
- @ ${INSTALL_DATA} ${WRKSRC}/PowerDraw/examples/*.ttf ${PREFIX}/share/examples/PowerPak/PowerDraw
- @ ${INSTALL_DATA} ${WRKSRC}/PowerDraw/examples/*.pcx ${PREFIX}/share/examples/PowerPak/PowerDraw
- @ ${MKDIR} ${PREFIX}/share/examples/PowerPak/PowerInput
- @ ${INSTALL_DATA} ${WRKSRC}/PowerInput/examples/Makefile.UNIX ${PREFIX}/share/examples/PowerPak/PowerInput/Makefile
-.for file in ex1.c ex2.c ex3.c ex4.c ex5.c sprite.pcx
- @ ${INSTALL_DATA} ${WRKSRC}/PowerInput/examples/${file} ${PREFIX}/share/examples/PowerPak/PowerInput
+.for dir in . Power3D PowerDraw PowerInput PowerMedia PowerSound
+ @ ${INSTALL_DATA} ${WRKSRC}/${dir}/*.h ${PREFIX}/include/PowerPak
+ @ if [ -d ${WRKSRC}/${dir}/examples ]; then \
+ ${MKDIR} ${PREFIX}/share/examples/PowerPak/${dir}; \
+ ${INSTALL_DATA} ${WRKSRC}/${dir}/examples/* ${PREFIX}/share/examples/PowerPak/${dir}; \
+ fi
.endfor
.include <bsd.port.mk>
diff --git a/games/powerpak/distinfo b/games/powerpak/distinfo
index 6cd0a9f939bf..373f5f1b4f89 100644
--- a/games/powerpak/distinfo
+++ b/games/powerpak/distinfo
@@ -1 +1 @@
-MD5 (PowerPak.tar.gz) = 775cabf11ba2bb0bac057060db25b318
+MD5 (PowerPak.tar.gz) = 5fbb0224a39e1194898801912fae95e7
diff --git a/games/powerpak/files/Makefile.FreeBSD b/games/powerpak/files/Makefile.FreeBSD
deleted file mode 100644
index 01a4c21eb80f..000000000000
--- a/games/powerpak/files/Makefile.FreeBSD
+++ /dev/null
@@ -1,87 +0,0 @@
-CC?=gcc
-LOCALBASE?=/usr/local
-CFLAGS+=-Wall -I${LOCALBASE}/include/freetype1 -I${LOCALBASE}/include
-LIBS=-L${LOCALBASE}/lib -lm -lSDL -lttf
-OBJECTS=powerpak.o img.o img_gif.o img_ppm.o img_tif.o img_pcx.o img_bmp.o img_png.o img_jpg.o img_xxx.o \
-PowerDraw/powerdraw.o PowerDraw/gfx.o PowerDraw/primitives.o PowerDraw/sprites.o PowerDraw/truetype.o \
-PowerInput/keyboard.o PowerInput/mouse.o PowerInput/powerinput.o
-
-
-all: splash libPP.a libPP.so
-
-PowerDraw/powerdraw.o: PowerDraw/powerdraw.c
- ${CC} -o ${.TARGET} ${CFLAGS} -c ${.ALLSRC}
-
-PowerDraw/gfx.o: PowerDraw/gfx.c
- ${CC} -o ${.TARGET} ${CFLAGS} -c ${.ALLSRC}
-
-PowerDraw/primitives.o: PowerDraw/primitives.c
- ${CC} -o ${.TARGET} ${CFLAGS} -c ${.ALLSRC}
-
-PowerDraw/sprites.o: PowerDraw/sprites.c
- ${CC} -o ${.TARGET} ${CFLAGS} -c ${.ALLSRC}
-
-PowerDraw/truetype.o: PowerDraw/truetype.c
- ${CC} -o ${.TARGET} ${CFLAGS} -c ${.ALLSRC}
-
-PowerInput/keyboard.o: PowerInput/keyboard.c
- ${CC} -o ${.TARGET} ${CFLAGS} -c ${.ALLSRC}
-
-PowerInput/mouse.o: PowerInput/mouse.c
- ${CC} -o ${.TARGET} ${CFLAGS} -c ${.ALLSRC}
-
-PowerInput/powerinput.o: PowerInput/powerinput.c
- ${CC} -o ${.TARGET} ${CFLAGS} -c ${.ALLSRC}
-
-upgrade:splash installdirs
- @echo "Deleting old libs from /usr/lib"
- @rm -rf /usr/lib/libPP*
- @rm -rf /usr/lib/libPD*
- @rm -rf /usr/lib/libPI*
- @echo "Deleting old headers from /usr/include/PowerPak"
- @rm -rf /usr/include/PowerPak/*
- @echo "Copying libraries to /usr/lib"
- @cp *.a *.so /usr/lib/
- @echo "Copying headers to /usr/include/PowerPak"
- @cp *.h /usr/include/PowerPak/
- @cp ./PowerDraw/*.h /usr/include/PowerPak/
- @cp ./PowerInput/*.h /usr/include/PowerPak/
-
-install: all installdirs
- @echo "Copying libraries to /usr/lib"
- @cp *.so *.a /usr/lib/
- @echo "Copying headers to /usr/include/PowerPak"
- @cp *.h /usr/include/PowerPak/
- @cp ./PowerDraw/*.h /usr/include/PowerPak/
- @cp ./PowerInput/*.h /usr/include/PowerPak/
-
-uninstall: splash
- @echo "Deleting libPP libs from /usr/lib"
- @rm -rf /usr/lib/libPP*
- @echo "Deleting headers from /usr/include/PowerPak"
- @rm /usr/include/PowerPak/*
- @echo "Removing directory /usr/include/PowerPak"
- @rmdir /usr/include/PowerPak
-
-clean:
- @rm -rf *.o *.a *.so
- @rm -rf ./PowerDraw/*.o
- @rm -rf ./PowerInput/*.o
-
-libPP.a: $(OBJECTS)
- @echo "Building static library (libPP.a)"
- @ar rvs libPP.a $(OBJECTS)
-
-libPP.so: $(OBJECTS)
- @echo "Building dynamic library (libPP.so)"
- @$(CC) -D_REENTRANT -pthread -fpic -fPIC -shared -o libPP.so $(OBJECTS) $(LIBS)
-
-splash:
- @echo ""
- @echo "Building PowerPak"
- @echo ""
- @cat ASCII-Logo
- @echo ""
-
-installdirs: mkinstalldirs
- @./mkinstalldirs /usr/include/PowerPak
diff --git a/games/powerpak/files/patch-Makefile.UNIX b/games/powerpak/files/patch-Makefile.UNIX
new file mode 100644
index 000000000000..d9f2563e57c0
--- /dev/null
+++ b/games/powerpak/files/patch-Makefile.UNIX
@@ -0,0 +1,77 @@
+
+$FreeBSD$
+
+--- Makefile.UNIX.orig Wed Apr 17 19:04:37 2002
++++ Makefile.UNIX Wed Apr 17 19:16:50 2002
+@@ -1,12 +1,28 @@
+-CC=gcc
+-CFLAGS=-Wall -O6
+-LIBS=-L/usr/X11R6/lib -lm -lSDL -ldl -lpthread
++CC?=gcc
++CFLAGS?=-Wall -O6
++SDL_CONFIG?=sdl-config
++X11BASE?=/usr/X11R6
++LOCALBASE?=/usr/local
++SDL_LIBS!=$(SDL_CONFIG) --libs
++SDL_CFLAGS!=$(SDL_CONFIG) --cflags
++CFLAGS+=-I$(X11BASE)/include -I$(LOCALBASE)/include $(SDL_CFLAGS)
++LIBS+=-L$(X11BASE)/lib -L$(LOCALBASE)/lib -lm $(SDL_LIBS)
+ OBJECTS=powerpak.o img.o img_gif.o img_ppm.o img_tif.o img_pcx.o img_bmp.o img_png.o img_jpg.o img_xxx.o \
+ ./PowerDraw/powerdraw.o ./PowerDraw/gfx.o ./PowerDraw/primitives.o ./PowerDraw/sprites.o ./PowerDraw/truetype.o \
+ ./PowerInput/keyboard.o ./PowerInput/mouse.o ./PowerInput/powerinput.o ./PowerInput/joystick.o \
+ ./Power3D/gfx3d.o ./Power3D/power3d.o ./Power3D/objects3d.o ./Power3D/render.o \
+ ./PowerSound/audio.o ./PowerSound/channel.o ./PowerSound/sample.o ./PowerSound/powersound.o \
+ ./PowerMedia/mpeg.o
++SRCS=${OBJECTS:S/.o$/.c/}
++SO_OBJECTS=${OBJECTS:S/.o$/.so/}
++
++.SUFFIXES: .o .so .c
++
++.c.o:
++ ${CC} -o ${.TARGET} ${CFLAGS} -c ${.ALLSRC}
++
++.c.so:
++ ${CC} -fpic -DPIC -o ${.TARGET} ${CFLAGS} -c ${.ALLSRC}
+
+ # Uncomment these if you want the library built with Power3D support
+ # This requires an OpenGL implementation
+@@ -15,7 +31,7 @@
+
+ # Uncomment these if you want the library built with TrueType support
+ # This requires the freetype library (http://www.freetype.org)
+-CFLAGS += -DUSE_TTF
++CFLAGS += -DUSE_TTF -I${LOCALBASE}/include/freetype1/freetype
+ LIBS += -lttf
+
+ # Uncomment these if you want the library built with music support
+@@ -35,10 +51,10 @@
+
+ # Uncomment these if you want the library built with MPEG support
+ # This requires Loki's SMPEG library
+-CFLAGS += -DUSE_MPEG -I./PowerDraw
++CFLAGS += -DUSE_MPEG -I./PowerDraw -I${LOCALBASE}/include/smpeg
+ LIBS += -lsmpeg
+
+-all: splash libPP.a libPP.so
++all: splash libPP.a libPP.so.1
+
+ upgrade:splash installdirs
+ @echo "Deleting old libs from /usr/lib"
+@@ -85,12 +101,12 @@
+ @rm -rf ./PowerSound/*.o
+
+ libPP.a: $(OBJECTS)
+- @echo "Building static library (libPP.a)"
+- @ar rvs libPP.a $(OBJECTS)
++ @echo "Building static library (${.TARGET})"
++ @ar rvs libPP.a ${.ALLSRC}
+
+-libPP.so: $(OBJECTS)
+- @echo "Building dynamic library (libPP.so)"
+- @$(CC) -D_REENTRANT -fpic -fPIC -shared -o libPP.so $(OBJECTS) $(LIBS)
++libPP.so.1: $(SO_OBJECTS)
++ @echo "Building dynamic library (${.TARGET})"
++ @$(CC) -shared -o ${.TARGET} ${.ALLSRC} $(LIBS)
+
+ splash:
+ @echo ""
diff --git a/games/powerpak/files/patch-PowerMedia::mpeg.c b/games/powerpak/files/patch-PowerMedia::mpeg.c
new file mode 100644
index 000000000000..a6bf658d8fba
--- /dev/null
+++ b/games/powerpak/files/patch-PowerMedia::mpeg.c
@@ -0,0 +1,25 @@
+
+$FreeBSD$
+
+--- PowerMedia/mpeg.c 2002/04/17 15:58:59 1.1
++++ PowerMedia/mpeg.c 2002/04/17 16:03:52
+@@ -16,7 +16,7 @@
+
+ #ifdef USE_MPEG
+
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <smpeg.h>
+
+ #include "powermedia.h"
+@@ -210,7 +210,9 @@
+
+ int PM_RenderMpegFrame (PD_Surface *Surface, PM_Mpeg *Mpeg, int Frame, int X, int Y)
+ {
+- SMPEG_renderFrame(Mpeg->Mpeg, Frame, Surface, X, Y);
++ SMPEG_setdisplay(Mpeg->Mpeg, Surface, NULL, NULL);
++ SMPEG_move(Mpeg->Mpeg, X, Y);
++ SMPEG_renderFrame(Mpeg->Mpeg, Frame);
+
+ return 0;
+ }
diff --git a/games/powerpak/pkg-plist b/games/powerpak/pkg-plist
index 35e2e0011768..2e97dff6e6a8 100644
--- a/games/powerpak/pkg-plist
+++ b/games/powerpak/pkg-plist
@@ -1,21 +1,38 @@
include/PowerPak/IMG.h
include/PowerPak/gfx.h
+include/PowerPak/gfx3d.h
include/PowerPak/joystick.h
include/PowerPak/keyboard.h
include/PowerPak/mouse.h
+include/PowerPak/mpeg.h
+include/PowerPak/objects3d.h
+include/PowerPak/power3d.h
include/PowerPak/powerdraw.h
include/PowerPak/powerinput.h
+include/PowerPak/powermedia.h
include/PowerPak/powerpak.h
+include/PowerPak/powersound.h
include/PowerPak/primitives.h
+include/PowerPak/render.h
include/PowerPak/sprites.h
include/PowerPak/truetype.h
lib/libPP.a
lib/libPP.so
-share/examples/PowerPak/PowerDraw/Makefile
+lib/libPP.so.1
+share/examples/PowerPak/Power3D/Makefile.BeOS
+share/examples/PowerPak/Power3D/Makefile.Mingw32
+share/examples/PowerPak/Power3D/Makefile.UNIX
+share/examples/PowerPak/Power3D/ex1.c
+share/examples/PowerPak/Power3D/ex2.c
+share/examples/PowerPak/Power3D/ex3.c
+share/examples/PowerPak/PowerDraw/Makefile.BeOS
+share/examples/PowerPak/PowerDraw/Makefile.Mingw32
+share/examples/PowerPak/PowerDraw/Makefile.UNIX
share/examples/PowerPak/PowerDraw/ex1.c
share/examples/PowerPak/PowerDraw/ex2.c
share/examples/PowerPak/PowerDraw/ex3.c
share/examples/PowerPak/PowerDraw/ex4.c
+share/examples/PowerPak/PowerDraw/ex4.jpg
share/examples/PowerPak/PowerDraw/ex4.pcx
share/examples/PowerPak/PowerDraw/ex5-1.pcx
share/examples/PowerPak/PowerDraw/ex5-2.pcx
@@ -23,14 +40,31 @@ share/examples/PowerPak/PowerDraw/ex5.c
share/examples/PowerPak/PowerDraw/ex6.c
share/examples/PowerPak/PowerDraw/ex7.c
share/examples/PowerPak/PowerDraw/krylon.ttf
-share/examples/PowerPak/PowerInput/Makefile
+share/examples/PowerPak/PowerInput/Makefile.BeOS
+share/examples/PowerPak/PowerInput/Makefile.Mingw32
+share/examples/PowerPak/PowerInput/Makefile.UNIX
share/examples/PowerPak/PowerInput/ex1.c
share/examples/PowerPak/PowerInput/ex2.c
share/examples/PowerPak/PowerInput/ex3.c
share/examples/PowerPak/PowerInput/ex4.c
share/examples/PowerPak/PowerInput/ex5.c
share/examples/PowerPak/PowerInput/sprite.pcx
-@dirrm include/PowerPak
-@dirrm share/examples/PowerPak/PowerDraw
+share/examples/PowerPak/PowerMedia/Makefile.BeOS
+share/examples/PowerPak/PowerMedia/Makefile.Mingw32
+share/examples/PowerPak/PowerMedia/Makefile.UNIX
+share/examples/PowerPak/PowerMedia/ex1.c
+share/examples/PowerPak/PowerSound/Makefile.BeOS
+share/examples/PowerPak/PowerSound/Makefile.Mingw32
+share/examples/PowerPak/PowerSound/Makefile.UNIX
+share/examples/PowerPak/PowerSound/ex1.c
+share/examples/PowerPak/PowerSound/ex2.c
+share/examples/PowerPak/PowerSound/ex3.c
+share/examples/PowerPak/PowerSound/sample2.wav
+share/examples/PowerPak/PowerSound/sample3.wav
+@dirrm share/examples/PowerPak/PowerSound
+@dirrm share/examples/PowerPak/PowerMedia
@dirrm share/examples/PowerPak/PowerInput
+@dirrm share/examples/PowerPak/PowerDraw
+@dirrm share/examples/PowerPak/Power3D
@dirrm share/examples/PowerPak
+@dirrm include/PowerPak