aboutsummaryrefslogtreecommitdiffstats
path: root/games/gtklife/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'games/gtklife/Makefile')
-rw-r--r--games/gtklife/Makefile52
1 files changed, 40 insertions, 12 deletions
diff --git a/games/gtklife/Makefile b/games/gtklife/Makefile
index 63c1c5fb2da3..a1d4d75da759 100644
--- a/games/gtklife/Makefile
+++ b/games/gtklife/Makefile
@@ -5,17 +5,45 @@
# $FreeBSD$
#
-PORTNAME= gtklife
-PORTVERSION= 4.1
-CATEGORIES= games
-MASTER_SITES= http://ironphoenix.org/tril/gtklife/
-
-MAINTAINER= jylefort@FreeBSD.org
-COMMENT= A GTK+ implementation of Conway's Game of Life
-
-USE_X_PREFIX= yes
-USE_GNOME= gtk12
-USE_GMAKE= yes
-MAKE_ENV= DOCDIR="${DOCSDIR}" NOPORTDOCS="${NOPORTDOCS}"
+PORTNAME= gtklife
+PORTVERSION= 4.2
+CATEGORIES= games
+MASTER_SITES= http://ironphoenix.org/tril/gtklife/
+
+MAINTAINER= jylefort@FreeBSD.org
+COMMENT= A GTK+ implementation of Conway's Game of Life
+
+USE_X_PREFIX= yes
+USE_REINPLACE= yes
+USE_GNOME= gtk12
+USE_GMAKE= yes
+MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS}" PREFIX="${PREFIX}" DOCDIR="${DOCSDIR}"
+
+PLIST= ${WRKDIR}/pkg-plist
+PLIST_FILES= bin/gtklife
+PLIST_DIRS= %%DATADIR%%
+PORTDOCS= *
+
+DATA_SUBDIRS= graphics patterns
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|gtk-config|${GTK_CONFIG}|' ${WRKSRC}/Makefile
+
+pre-install:
+ @cd ${WRKSRC} && >${PLIST} && \
+ ${FIND} ${DATA_SUBDIRS} ! -type d | ${SORT} \
+ | ${SED} -e 's|^|%%DATADIR%%/|' >> ${PLIST} && \
+ ${FIND} ${DATA_SUBDIRS} -type d ! -empty | ${SORT} -r \
+ | ${SED} -e 's|^|@dirrm %%DATADIR%%/|' >> ${PLIST}
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/gtklife ${PREFIX}/bin
+ cd ${WRKSRC} && \
+ ${FIND} ${DATA_SUBDIRS} -type d ! -empty -exec ${MKDIR} "${DATADIR}/{}" \; && \
+ ${FIND} ${DATA_SUBDIRS} ! -type d -exec ${INSTALL_DATA} "{}" "${DATADIR}/{}" \;
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCSDIR}
+.endif
.include <bsd.port.mk>