1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

- Update to 0.2

- Remove USE_REINPLACE

Submitted by:	Dmitry Marakasov <amdmi3@mail.ru>
PR:		ports/92859
This commit is contained in:
Simon Barner 2006-02-06 12:50:05 +00:00
parent 089e5a63e9
commit aaa93249af
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=155324
12 changed files with 132 additions and 152 deletions

View File

@ -6,7 +6,7 @@
#
PORTNAME= glpuzzle
PORTVERSION= 0.1.4
PORTVERSION= 0.2
CATEGORIES= games
MASTER_SITES= http://www.iua.upf.es/~mdeboer/resorama/glpuzzle/
EXTRACT_SUFX= .tgz
@ -18,25 +18,26 @@ LIB_DEPENDS= png.5:${PORTSDIR}/graphics/png \
jpeg.9:${PORTSDIR}/graphics/jpeg
USE_X_PREFIX= yes
USE_SDL= sdl
USE_SDL= sdl mixer
USE_GL= yes
USE_GMAKE= yes
USE_REINPLACE= yes
USE_GCC= 3.4+
MAKE_ENV= CXX="${CXX}" \
CPPFLAGS="`${SDL_CONFIG} --cflags` -I${X11BASE}/include" \
LDFLAGS="`${SDL_CONFIG} --libs` -L${X11BASE}/lib"
post-patch:
@${REINPLACE_CMD} -e "s|font/|${DATADIR}/font/|g" ${WRKSRC}/main.cxx
@${REINPLACE_CMD} -e "s|puzzle-preview/|${DATADIR}/puzzle-preview/|g" ${WRKSRC}/main.cxx
@${REINPLACE_CMD} -e "s|terminate|terminate_|g" ${WRKSRC}/main.cxx
@${REINPLACE_CMD} -e "s|puzzle-maps/|${DATADIR}/puzzle-maps/|g" ${WRKSRC}/puzzle-preview/preview.map
@${RM} -f ${WRKSRC}/puzzle-preview/preview.map.bak
.for i in font image puzzles sound
@${REINPLACE_CMD} -e "s|${i}/|${DATADIR}/${i}/|g" ${WRKSRC}/main.cxx
.endfor
@${REINPLACE_CMD} -e "s|g++|${CXX}|g" ${WRKSRC}/Makefile
@${REINPLACE_CMD} -e "s|INCLFLAGS|CPPFLAGS|" ${WRKSRC}/Makefile
@${REINPLACE_CMD} -e "/^include.*DEPENDS/ d" ${WRKSRC}/Makefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/glpuzzle ${PREFIX}/bin
.for i in font puzzle-maps puzzle-preview
.for i in font image puzzles sound
${MKDIR} ${DATADIR}/${i}
${INSTALL_DATA} ${WRKSRC}/${i}/* ${DATADIR}/${i}
.endfor

View File

@ -1,3 +1,3 @@
MD5 (glpuzzle-0.1.4.tgz) = 621df04274d61f2ee8bd43428971e063
SHA256 (glpuzzle-0.1.4.tgz) = 0fcccd08e227175c7fb21740aa548cd0ded029de9401bfdcbb0136d85800bb61
SIZE (glpuzzle-0.1.4.tgz) = 3206939
MD5 (glpuzzle-0.2.tgz) = 0dffdc8c0b9a2b689c1932d725ede2d3
SHA256 (glpuzzle-0.2.tgz) = 2ff48c279c61329f18171c409301a49bcc0789e9085118cf74bb6c09c287f27a
SIZE (glpuzzle-0.2.tgz) = 4111471

View File

@ -0,0 +1,13 @@
--- Loader.cxx.orig Mon Feb 6 13:45:24 2006
+++ Loader.cxx Mon Feb 6 13:45:04 2006
@@ -20,8 +20,10 @@
#include "Loader.hxx"
+extern "C" {
#include <png.h>
#include <jpeglib.h>
+}
void JpgLoader::Load(const std::string& filename,RGB& target,int x,int y)
{

View File

@ -1,24 +1,21 @@
--- Makefile.orig Sun Jan 15 12:25:30 2006
+++ Makefile Wed Jan 18 02:10:53 2006
@@ -9,8 +9,6 @@
DEPENDS = $(SOURCES:.cxx=.d)
OBJECTS = $(SOURCES:.cxx=.o)
INCLFLAGS = -I/usr/include/SDL
-CXX = g++
-CXXFLAGS = -O2
--- Makefile.orig Sun Feb 5 04:41:46 2006
+++ Makefile Sun Feb 5 23:05:34 2006
@@ -1,8 +1,6 @@
PROGRAM = glpuzzle
clean:
rm -f $(OBJECTS) $(DEPENDS) $(PROGRAM)
@@ -22,10 +20,10 @@
@rm $@.tmp
%.o: %.cxx
- $(CXX) -c $(CXXFLAGS) $(INCLFLAGS) $< -o $@
+ $(CXX) -c $(CXXFLAGS) $(CPPFLAGS) $< -o $@
-CXXFLAGS = -O2 -Wall
-INCLFLAGS = -I/usr/include/SDL
-LIBSFLAGS = -lpthread -lGL -lpthread -lpng -ljpeg -lSDL
+LIBSFLAGS = $(LDFLAGS) -lGL -lpng -ljpeg
SOURCES = main.cxx Screen.cxx Texture.cxx Loader.cxx
ENABLE_SOUND = 1
@@ -43,7 +41,7 @@
g++ -c $(CXXFLAGS) $(INCLFLAGS) $< -o $@
$(PROGRAM): $(OBJECTS)
- $(CXX) $(OBJECTS) -lpthread -lSDL -lGL -lpthread -lpng -ljpeg -o $@
+ $(CXX) $(OBJECTS) $(CXXFLAGS) $(LDFLAGS) -lGL -lpng -ljpeg -o $@
- g++ $(OBJECTS) $(LIBSFLAGS) -o $@
+ g++ $(OBJECTS) $(CXXFLAGS) $(CPPFLAGS) $(LIBSFLAGS) -o $@
install: $(PROGRAM)
@echo Installing in $(PREFIX)

View File

@ -1,8 +1,8 @@
--- main.cxx.orig Sun Jan 15 12:24:51 2006
+++ main.cxx Wed Jan 18 02:24:47 2006
@@ -24,6 +24,7 @@
*
*/
--- main.cxx.orig Sun Feb 5 04:41:46 2006
+++ main.cxx Sun Feb 5 23:41:41 2006
@@ -28,6 +28,7 @@
float BG_G = 0.0;
float BG_B = 0.0;
+#include <unistd.h>
#include <cstdio>

View File

@ -2,48 +2,27 @@ bin/glpuzzle
%%DATADIR%%/font/charmap.jpg
%%DATADIR%%/font/charmap.map
%%DATADIR%%/font/charmap.png
%%DATADIR%%/puzzle-maps/bike-3x4.jpg
%%DATADIR%%/puzzle-maps/bike-3x4.map
%%DATADIR%%/puzzle-maps/bike-3x4.png
%%DATADIR%%/puzzle-maps/bird-4x4.jpg
%%DATADIR%%/puzzle-maps/bird-4x4.map
%%DATADIR%%/puzzle-maps/bird-4x4.png
%%DATADIR%%/puzzle-maps/blackberry-3x3.jpg
%%DATADIR%%/puzzle-maps/blackberry-3x3.map
%%DATADIR%%/puzzle-maps/blackberry-3x3.png
%%DATADIR%%/puzzle-maps/castle-6x3.jpg
%%DATADIR%%/puzzle-maps/castle-6x3.map
%%DATADIR%%/puzzle-maps/castle-6x3.png
%%DATADIR%%/puzzle-maps/clouds-4x4.jpg
%%DATADIR%%/puzzle-maps/clouds-4x4.map
%%DATADIR%%/puzzle-maps/clouds-4x4.png
%%DATADIR%%/puzzle-maps/goat-4x3.jpg
%%DATADIR%%/puzzle-maps/goat-4x3.map
%%DATADIR%%/puzzle-maps/goat-4x3.png
%%DATADIR%%/puzzle-maps/gorilla-4x3.jpg
%%DATADIR%%/puzzle-maps/gorilla-4x3.map
%%DATADIR%%/puzzle-maps/gorilla-4x3.png
%%DATADIR%%/puzzle-maps/heli-4x3.jpg
%%DATADIR%%/puzzle-maps/heli-4x3.map
%%DATADIR%%/puzzle-maps/heli-4x3.png
%%DATADIR%%/puzzle-maps/horse-4x3.jpg
%%DATADIR%%/puzzle-maps/horse-4x3.map
%%DATADIR%%/puzzle-maps/horse-4x3.png
%%DATADIR%%/puzzle-maps/penguin-3x2.jpg
%%DATADIR%%/puzzle-maps/penguin-3x2.map
%%DATADIR%%/puzzle-maps/penguin-3x2.png
%%DATADIR%%/puzzle-maps/penguins-5x5.jpg
%%DATADIR%%/puzzle-maps/penguins-5x5.map
%%DATADIR%%/puzzle-maps/penguins-5x5.png
%%DATADIR%%/puzzle-maps/train-2x2.jpg
%%DATADIR%%/puzzle-maps/train-2x2.map
%%DATADIR%%/puzzle-maps/train-2x2.png
%%DATADIR%%/puzzle-preview/preview.jpg
%%DATADIR%%/puzzle-preview/preview.map
%%DATADIR%%/puzzle-preview/preview.png
%%DATADIR%%/image/arrow.png
%%DATADIR%%/image/clouds-3x2.png
%%DATADIR%%/image/leave.png
%%DATADIR%%/puzzles/bike-3x4.pzl
%%DATADIR%%/puzzles/bird-4x4.pzl
%%DATADIR%%/puzzles/blackberry-3x3.pzl
%%DATADIR%%/puzzles/castle-6x3.pzl
%%DATADIR%%/puzzles/clouds-4x4.pzl
%%DATADIR%%/puzzles/goat-4x3.pzl
%%DATADIR%%/puzzles/gorilla-4x3.pzl
%%DATADIR%%/puzzles/heli-4x3.pzl
%%DATADIR%%/puzzles/horse-4x3.pzl
%%DATADIR%%/puzzles/penguin-3x2.pzl
%%DATADIR%%/puzzles/penguins-5x5.pzl
%%DATADIR%%/puzzles/train-2x2.pzl
%%DATADIR%%/sound/connect.wav
%%DATADIR%%/sound/finish.wav
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%@dirrm %%DOCSDIR%%
@dirrm %%DATADIR%%/puzzle-preview
@dirrm %%DATADIR%%/puzzle-maps
@dirrm %%DATADIR%%/font
@dirrm %%DATADIR%%/image
@dirrm %%DATADIR%%/puzzles
@dirrm %%DATADIR%%/sound
@dirrm %%DATADIR%%

View File

@ -6,7 +6,7 @@
#
PORTNAME= glpuzzle
PORTVERSION= 0.1.4
PORTVERSION= 0.2
CATEGORIES= games
MASTER_SITES= http://www.iua.upf.es/~mdeboer/resorama/glpuzzle/
EXTRACT_SUFX= .tgz
@ -18,25 +18,26 @@ LIB_DEPENDS= png.5:${PORTSDIR}/graphics/png \
jpeg.9:${PORTSDIR}/graphics/jpeg
USE_X_PREFIX= yes
USE_SDL= sdl
USE_SDL= sdl mixer
USE_GL= yes
USE_GMAKE= yes
USE_REINPLACE= yes
USE_GCC= 3.4+
MAKE_ENV= CXX="${CXX}" \
CPPFLAGS="`${SDL_CONFIG} --cflags` -I${X11BASE}/include" \
LDFLAGS="`${SDL_CONFIG} --libs` -L${X11BASE}/lib"
post-patch:
@${REINPLACE_CMD} -e "s|font/|${DATADIR}/font/|g" ${WRKSRC}/main.cxx
@${REINPLACE_CMD} -e "s|puzzle-preview/|${DATADIR}/puzzle-preview/|g" ${WRKSRC}/main.cxx
@${REINPLACE_CMD} -e "s|terminate|terminate_|g" ${WRKSRC}/main.cxx
@${REINPLACE_CMD} -e "s|puzzle-maps/|${DATADIR}/puzzle-maps/|g" ${WRKSRC}/puzzle-preview/preview.map
@${RM} -f ${WRKSRC}/puzzle-preview/preview.map.bak
.for i in font image puzzles sound
@${REINPLACE_CMD} -e "s|${i}/|${DATADIR}/${i}/|g" ${WRKSRC}/main.cxx
.endfor
@${REINPLACE_CMD} -e "s|g++|${CXX}|g" ${WRKSRC}/Makefile
@${REINPLACE_CMD} -e "s|INCLFLAGS|CPPFLAGS|" ${WRKSRC}/Makefile
@${REINPLACE_CMD} -e "/^include.*DEPENDS/ d" ${WRKSRC}/Makefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/glpuzzle ${PREFIX}/bin
.for i in font puzzle-maps puzzle-preview
.for i in font image puzzles sound
${MKDIR} ${DATADIR}/${i}
${INSTALL_DATA} ${WRKSRC}/${i}/* ${DATADIR}/${i}
.endfor

View File

@ -1,3 +1,3 @@
MD5 (glpuzzle-0.1.4.tgz) = 621df04274d61f2ee8bd43428971e063
SHA256 (glpuzzle-0.1.4.tgz) = 0fcccd08e227175c7fb21740aa548cd0ded029de9401bfdcbb0136d85800bb61
SIZE (glpuzzle-0.1.4.tgz) = 3206939
MD5 (glpuzzle-0.2.tgz) = 0dffdc8c0b9a2b689c1932d725ede2d3
SHA256 (glpuzzle-0.2.tgz) = 2ff48c279c61329f18171c409301a49bcc0789e9085118cf74bb6c09c287f27a
SIZE (glpuzzle-0.2.tgz) = 4111471

View File

@ -0,0 +1,13 @@
--- Loader.cxx.orig Mon Feb 6 13:45:24 2006
+++ Loader.cxx Mon Feb 6 13:45:04 2006
@@ -20,8 +20,10 @@
#include "Loader.hxx"
+extern "C" {
#include <png.h>
#include <jpeglib.h>
+}
void JpgLoader::Load(const std::string& filename,RGB& target,int x,int y)
{

View File

@ -1,24 +1,21 @@
--- Makefile.orig Sun Jan 15 12:25:30 2006
+++ Makefile Wed Jan 18 02:10:53 2006
@@ -9,8 +9,6 @@
DEPENDS = $(SOURCES:.cxx=.d)
OBJECTS = $(SOURCES:.cxx=.o)
INCLFLAGS = -I/usr/include/SDL
-CXX = g++
-CXXFLAGS = -O2
--- Makefile.orig Sun Feb 5 04:41:46 2006
+++ Makefile Sun Feb 5 23:05:34 2006
@@ -1,8 +1,6 @@
PROGRAM = glpuzzle
clean:
rm -f $(OBJECTS) $(DEPENDS) $(PROGRAM)
@@ -22,10 +20,10 @@
@rm $@.tmp
%.o: %.cxx
- $(CXX) -c $(CXXFLAGS) $(INCLFLAGS) $< -o $@
+ $(CXX) -c $(CXXFLAGS) $(CPPFLAGS) $< -o $@
-CXXFLAGS = -O2 -Wall
-INCLFLAGS = -I/usr/include/SDL
-LIBSFLAGS = -lpthread -lGL -lpthread -lpng -ljpeg -lSDL
+LIBSFLAGS = $(LDFLAGS) -lGL -lpng -ljpeg
SOURCES = main.cxx Screen.cxx Texture.cxx Loader.cxx
ENABLE_SOUND = 1
@@ -43,7 +41,7 @@
g++ -c $(CXXFLAGS) $(INCLFLAGS) $< -o $@
$(PROGRAM): $(OBJECTS)
- $(CXX) $(OBJECTS) -lpthread -lSDL -lGL -lpthread -lpng -ljpeg -o $@
+ $(CXX) $(OBJECTS) $(CXXFLAGS) $(LDFLAGS) -lGL -lpng -ljpeg -o $@
- g++ $(OBJECTS) $(LIBSFLAGS) -o $@
+ g++ $(OBJECTS) $(CXXFLAGS) $(CPPFLAGS) $(LIBSFLAGS) -o $@
install: $(PROGRAM)
@echo Installing in $(PREFIX)

View File

@ -1,8 +1,8 @@
--- main.cxx.orig Sun Jan 15 12:24:51 2006
+++ main.cxx Wed Jan 18 02:24:47 2006
@@ -24,6 +24,7 @@
*
*/
--- main.cxx.orig Sun Feb 5 04:41:46 2006
+++ main.cxx Sun Feb 5 23:41:41 2006
@@ -28,6 +28,7 @@
float BG_G = 0.0;
float BG_B = 0.0;
+#include <unistd.h>
#include <cstdio>

View File

@ -2,48 +2,27 @@ bin/glpuzzle
%%DATADIR%%/font/charmap.jpg
%%DATADIR%%/font/charmap.map
%%DATADIR%%/font/charmap.png
%%DATADIR%%/puzzle-maps/bike-3x4.jpg
%%DATADIR%%/puzzle-maps/bike-3x4.map
%%DATADIR%%/puzzle-maps/bike-3x4.png
%%DATADIR%%/puzzle-maps/bird-4x4.jpg
%%DATADIR%%/puzzle-maps/bird-4x4.map
%%DATADIR%%/puzzle-maps/bird-4x4.png
%%DATADIR%%/puzzle-maps/blackberry-3x3.jpg
%%DATADIR%%/puzzle-maps/blackberry-3x3.map
%%DATADIR%%/puzzle-maps/blackberry-3x3.png
%%DATADIR%%/puzzle-maps/castle-6x3.jpg
%%DATADIR%%/puzzle-maps/castle-6x3.map
%%DATADIR%%/puzzle-maps/castle-6x3.png
%%DATADIR%%/puzzle-maps/clouds-4x4.jpg
%%DATADIR%%/puzzle-maps/clouds-4x4.map
%%DATADIR%%/puzzle-maps/clouds-4x4.png
%%DATADIR%%/puzzle-maps/goat-4x3.jpg
%%DATADIR%%/puzzle-maps/goat-4x3.map
%%DATADIR%%/puzzle-maps/goat-4x3.png
%%DATADIR%%/puzzle-maps/gorilla-4x3.jpg
%%DATADIR%%/puzzle-maps/gorilla-4x3.map
%%DATADIR%%/puzzle-maps/gorilla-4x3.png
%%DATADIR%%/puzzle-maps/heli-4x3.jpg
%%DATADIR%%/puzzle-maps/heli-4x3.map
%%DATADIR%%/puzzle-maps/heli-4x3.png
%%DATADIR%%/puzzle-maps/horse-4x3.jpg
%%DATADIR%%/puzzle-maps/horse-4x3.map
%%DATADIR%%/puzzle-maps/horse-4x3.png
%%DATADIR%%/puzzle-maps/penguin-3x2.jpg
%%DATADIR%%/puzzle-maps/penguin-3x2.map
%%DATADIR%%/puzzle-maps/penguin-3x2.png
%%DATADIR%%/puzzle-maps/penguins-5x5.jpg
%%DATADIR%%/puzzle-maps/penguins-5x5.map
%%DATADIR%%/puzzle-maps/penguins-5x5.png
%%DATADIR%%/puzzle-maps/train-2x2.jpg
%%DATADIR%%/puzzle-maps/train-2x2.map
%%DATADIR%%/puzzle-maps/train-2x2.png
%%DATADIR%%/puzzle-preview/preview.jpg
%%DATADIR%%/puzzle-preview/preview.map
%%DATADIR%%/puzzle-preview/preview.png
%%DATADIR%%/image/arrow.png
%%DATADIR%%/image/clouds-3x2.png
%%DATADIR%%/image/leave.png
%%DATADIR%%/puzzles/bike-3x4.pzl
%%DATADIR%%/puzzles/bird-4x4.pzl
%%DATADIR%%/puzzles/blackberry-3x3.pzl
%%DATADIR%%/puzzles/castle-6x3.pzl
%%DATADIR%%/puzzles/clouds-4x4.pzl
%%DATADIR%%/puzzles/goat-4x3.pzl
%%DATADIR%%/puzzles/gorilla-4x3.pzl
%%DATADIR%%/puzzles/heli-4x3.pzl
%%DATADIR%%/puzzles/horse-4x3.pzl
%%DATADIR%%/puzzles/penguin-3x2.pzl
%%DATADIR%%/puzzles/penguins-5x5.pzl
%%DATADIR%%/puzzles/train-2x2.pzl
%%DATADIR%%/sound/connect.wav
%%DATADIR%%/sound/finish.wav
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%@dirrm %%DOCSDIR%%
@dirrm %%DATADIR%%/puzzle-preview
@dirrm %%DATADIR%%/puzzle-maps
@dirrm %%DATADIR%%/font
@dirrm %%DATADIR%%/image
@dirrm %%DATADIR%%/puzzles
@dirrm %%DATADIR%%/sound
@dirrm %%DATADIR%%