diff --git a/games/glpuzzle/Makefile b/games/glpuzzle/Makefile index 5a3f27fb837e..2b8c748612e5 100644 --- a/games/glpuzzle/Makefile +++ b/games/glpuzzle/Makefile @@ -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 diff --git a/games/glpuzzle/distinfo b/games/glpuzzle/distinfo index e15e8bed05e0..6fd331024a28 100644 --- a/games/glpuzzle/distinfo +++ b/games/glpuzzle/distinfo @@ -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 diff --git a/games/glpuzzle/files/patch-Loader.cxx b/games/glpuzzle/files/patch-Loader.cxx new file mode 100644 index 000000000000..39b86aa1e8e7 --- /dev/null +++ b/games/glpuzzle/files/patch-Loader.cxx @@ -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 + #include ++} + + void JpgLoader::Load(const std::string& filename,RGB& target,int x,int y) + { diff --git a/games/glpuzzle/files/patch-Makefile b/games/glpuzzle/files/patch-Makefile index 7a0b9101257d..d5ce0891df88 100644 --- a/games/glpuzzle/files/patch-Makefile +++ b/games/glpuzzle/files/patch-Makefile @@ -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) diff --git a/games/glpuzzle/files/patch-main.cxx b/games/glpuzzle/files/patch-main.cxx index 649d49663420..df5e2962e8cc 100644 --- a/games/glpuzzle/files/patch-main.cxx +++ b/games/glpuzzle/files/patch-main.cxx @@ -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 #include diff --git a/games/glpuzzle/pkg-plist b/games/glpuzzle/pkg-plist index 2d255b24b1ae..e22e2d70c65d 100644 --- a/games/glpuzzle/pkg-plist +++ b/games/glpuzzle/pkg-plist @@ -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%% diff --git a/games/jigzo/Makefile b/games/jigzo/Makefile index 5a3f27fb837e..2b8c748612e5 100644 --- a/games/jigzo/Makefile +++ b/games/jigzo/Makefile @@ -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 diff --git a/games/jigzo/distinfo b/games/jigzo/distinfo index e15e8bed05e0..6fd331024a28 100644 --- a/games/jigzo/distinfo +++ b/games/jigzo/distinfo @@ -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 diff --git a/games/jigzo/files/patch-Loader.cxx b/games/jigzo/files/patch-Loader.cxx new file mode 100644 index 000000000000..39b86aa1e8e7 --- /dev/null +++ b/games/jigzo/files/patch-Loader.cxx @@ -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 + #include ++} + + void JpgLoader::Load(const std::string& filename,RGB& target,int x,int y) + { diff --git a/games/jigzo/files/patch-Makefile b/games/jigzo/files/patch-Makefile index 7a0b9101257d..d5ce0891df88 100644 --- a/games/jigzo/files/patch-Makefile +++ b/games/jigzo/files/patch-Makefile @@ -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) diff --git a/games/jigzo/files/patch-main.cxx b/games/jigzo/files/patch-main.cxx index 649d49663420..df5e2962e8cc 100644 --- a/games/jigzo/files/patch-main.cxx +++ b/games/jigzo/files/patch-main.cxx @@ -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 #include diff --git a/games/jigzo/pkg-plist b/games/jigzo/pkg-plist index 2d255b24b1ae..e22e2d70c65d 100644 --- a/games/jigzo/pkg-plist +++ b/games/jigzo/pkg-plist @@ -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%%