diff --git a/games/Makefile b/games/Makefile index e62898d935b1..b8376f6b868b 100644 --- a/games/Makefile +++ b/games/Makefile @@ -19,6 +19,7 @@ SUBDIR += abbayedesmorts SUBDIR += abe SUBDIR += abuse_sdl + SUBDIR += ace-of-penguins SUBDIR += acm SUBDIR += adgali SUBDIR += adom diff --git a/games/ace-of-penguins/Makefile b/games/ace-of-penguins/Makefile new file mode 100644 index 000000000000..99afb17a3bcb --- /dev/null +++ b/games/ace-of-penguins/Makefile @@ -0,0 +1,62 @@ +# Created by: Dmitry Marakasov +# $FreeBSD$ + +PORTNAME= ace-of-penguins +PORTVERSION= 1.4 +CATEGORIES= games +MASTER_SITES= http://www.delorie.com/store/ace/ +DISTNAME= ace-${PORTVERSION} + +MAINTAINER= amdmi3@FreeBSD.org +COMMENT= Set of Unix/X solitaire games + +LICENSE= GPLv2+ +LICENSE_FILE= ${WRKSRC}/COPYING + +LIB_DEPENDS= libpng.so:graphics/png + +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --program-prefix=ace- +USES= gmake libtool localbase:ldflags +USE_XORG= x11 xpm +INSTALL_TARGET= install-strip + +PORTDOCS= * + +GAMES= "canfield:Solitaire game:CardGame" \ + "freecell:Solitaire game:CardGame" \ + "golf:Solitaire game:CardGame" \ + "mastermind:Logic game:LogicGame" \ + "merlin:Classical logic game:LogicGame" \ + "minesweeper:Logic game:LogicGame" \ + "pegged:Solitaire game:LogicGame" \ + "penguins:Solitaire game:CardGame" \ + "solitaire:Solitaire game:CardGame" \ + "spider:Solitaire game:CardGame" \ + "taipedit:Layout editor for taipei game:CardGame" \ + "taipei:Mahjong solitaire game:BoardGame" \ + "thornq:Solitaire game:CardGame" \ + + +.for game in ${GAMES} +DESKTOP_ENTRIES+= \ + "Ace of Penguins: ${game:C/^([^:]*):([^:]*):([^:]*)$$/\1/:C/\"//g}" \ + "${game:C/^([^:]*):([^:]*):([^:]*)$$/\2/:C/\"//g}" \ + "${PREFIX}/share/pixmaps/${PORTNAME}.gif" \ + "ace-${game:C/^([^:]*):([^:]*):([^:]*)$$/\1/:C/\"//g}" \ + "Game;${game:C/^([^:]*):([^:]*):([^:]*)$$/\3/:C/\"//g};" \ + "" +.endfor + +OPTIONS_DEFINE= DOCS + +post-install: + ${INSTALL_DATA} ${WRKSRC}/docs/as.gif ${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.gif + +post-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} +.for f in AUTHORS ChangeLog NEWS README docs/*.gif docs/*.html + ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}/ +.endfor + +.include diff --git a/games/ace-of-penguins/distinfo b/games/ace-of-penguins/distinfo new file mode 100644 index 000000000000..de462488d0f8 --- /dev/null +++ b/games/ace-of-penguins/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1488290409 +SHA256 (ace-1.4.tar.gz) = 1fee3b0533921a42873c0623f33d873a067b1eec58f2c70c01449146e79a4cce +SIZE (ace-1.4.tar.gz) = 530490 diff --git a/games/ace-of-penguins/files/patch-lib_make-imglib.c b/games/ace-of-penguins/files/patch-lib_make-imglib.c new file mode 100644 index 000000000000..5527b70bf995 --- /dev/null +++ b/games/ace-of-penguins/files/patch-lib_make-imglib.c @@ -0,0 +1,20 @@ +--- lib/make-imglib.c.orig 2012-03-24 18:00:49 UTC ++++ lib/make-imglib.c +@@ -86,7 +86,7 @@ scan_image_directory () + png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0); + info_ptr = png_create_info_struct (png_ptr); + +- if (setjmp (png_ptr->jmpbuf)) { ++ if (setjmp (png_jmpbuf(png_ptr))) { + fclose (f); + continue; + } +@@ -202,7 +202,7 @@ tokenize(char *string) + char *rv; + if (string) { + next = string; +- return; ++ return NULL; + } + while (*next && !isgraph(*next)) next++; + if (!*next) return 0; diff --git a/games/ace-of-penguins/files/patch-lib_xwin.c b/games/ace-of-penguins/files/patch-lib_xwin.c new file mode 100644 index 000000000000..c37103263002 --- /dev/null +++ b/games/ace-of-penguins/files/patch-lib_xwin.c @@ -0,0 +1,18 @@ +--- lib/xwin.c.orig 2012-03-24 18:00:49 UTC ++++ lib/xwin.c +@@ -841,13 +841,13 @@ build_image (image *src) + png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0); + info_ptr = png_create_info_struct (png_ptr); + +- if (setjmp (png_ptr->jmpbuf)) { ++ if (setjmp (png_jmpbuf(png_ptr))) { + fprintf(stderr, "Invalid PNG image!\n"); + return; + } + + file_bytes = src->file_data; +- png_set_read_fn (png_ptr, (voidp)&file_bytes, (png_rw_ptr)png_reader); ++ png_set_read_fn (png_ptr, (png_voidp)&file_bytes, (png_rw_ptr)png_reader); + + png_read_info (png_ptr, info_ptr); + diff --git a/games/ace-of-penguins/pkg-descr b/games/ace-of-penguins/pkg-descr new file mode 100644 index 000000000000..c122acd2cfac --- /dev/null +++ b/games/ace-of-penguins/pkg-descr @@ -0,0 +1,8 @@ +The Ace of Penguins is a set of Unix/X solitaire games based on the +ones available for Windows(tm) but with a number of enhancements. + +The latest version includes clones of freecell, golf, mastermind, +merlin, minesweeper, pegged, solitaire, taipei (with editor!), and +thornq (by Martin Thornquist). + +WWW: http://www.delorie.com/store/ace/ diff --git a/games/ace-of-penguins/pkg-plist b/games/ace-of-penguins/pkg-plist new file mode 100644 index 000000000000..1b4b9fb78296 --- /dev/null +++ b/games/ace-of-penguins/pkg-plist @@ -0,0 +1,18 @@ +bin/ace-canfield +bin/ace-freecell +bin/ace-golf +bin/ace-mastermind +bin/ace-merlin +bin/ace-minesweeper +bin/ace-pegged +bin/ace-penguins +bin/ace-solitaire +bin/ace-spider +bin/ace-taipedit +bin/ace-taipei +bin/ace-thornq +lib/libcards.a +lib/libcards.so +lib/libcards.so.1 +lib/libcards.so.1.0.0 +share/pixmaps/ace-of-penguins.gif