aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authormezz <mezz@FreeBSD.org>2005-12-31 02:34:11 +0800
committermezz <mezz@FreeBSD.org>2005-12-31 02:34:11 +0800
commitb3a014928516917f0a25797c4c9c8cb77eccd19b (patch)
treea054fc04270b53d565f50c564f4b4fa7e1eddb39 /games
parent23250cdaf3bc7ec70b2673efe898a975c39f7e28 (diff)
downloadfreebsd-ports-gnome-b3a014928516917f0a25797c4c9c8cb77eccd19b.tar.gz
freebsd-ports-gnome-b3a014928516917f0a25797c4c9c8cb77eccd19b.tar.zst
freebsd-ports-gnome-b3a014928516917f0a25797c4c9c8cb77eccd19b.zip
- Get it installs a correct glest.ini version to get it runable by default.
Before, a different version of glest.ini would overwrite a correct glest.ini during the installation that causes game not runable by default. - Get configure to find pthread correct by teach it about ${PTHREAD_LIBS}, not use -lpthread (hardcore). - Remove the MAKE_ENV, it is not need. - Other very small clean up. - Bump the PORTREVISION, for glest.ini issue. Approved by: Jose Alonso Cardenas Marquez <acardenas@bsd.org.pe> (maintainer)
Diffstat (limited to 'games')
-rw-r--r--games/glest/Makefile21
1 files changed, 11 insertions, 10 deletions
diff --git a/games/glest/Makefile b/games/glest/Makefile
index bb261d9b4f3b..5af2e29e44fd 100644
--- a/games/glest/Makefile
+++ b/games/glest/Makefile
@@ -7,6 +7,7 @@
PORTNAME= glest
PORTVERSION= 1.2.1.2
+PORTREVISION= 1
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -31,14 +32,11 @@ USE_GL= yes
GNU_CONFIGURE= yes
CONFIGURE_SCRIPT= mk/linux/configure
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
+CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \
+ LIBS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}"
WRKSRC= ${WRKDIR}/${PORTNAME}_source_${PORTVERSION}
-LDFLAGS+= -L${LOCALBASE}/lib -L${X11BASE}/lib ${PTHREAD_LIBS}
-CPPFLAGS+= -I${LOCALBASE}/include -I${X11BASE}/include ${PTHREAD_CFLAGS}
-MAKE_ENV= CC="${CC}" CFLAGS="${CFLAGS} ${CXX}" LDFLAGS="${LDFLAGS}" CPPFLAGS="${CPPFLAGS}"
-CONFIGURE_ENV= ${MAKE_ENV}
-
GLESTDIRE= ${PREFIX}/lib/${PORTNAME}
SUB_FILES= glest-wrapper
@@ -46,12 +44,15 @@ SUB_FILES= glest-wrapper
post-extract:
@${FIND} -E ${WRKDIR} -type f -iregex ".*\.(c|cpp|h|txt|sh|ac|sub|ini|m4|jam|guess|rpath)" \
-print0 | ${XARGS} -0 ${REINPLACE_CMD} -e 's/[[:cntrl:]]*$$//'
+ @${RM} ${WRKDIR}/${PORTNAME}_game/glest.ini
post-patch:
@${REINPLACE_CMD} -e "s|%%ACLOCAL%%|${ACLOCAL}|g" -e "s|%%AUTOCONF%%|${AUTOCONF}|g" \
${WRKSRC}/mk/linux/autogen.sh
- @${REINPLACE_CMD} -e "s|-lpthread|${PTHREAD_LIBS}|g" \
- ${WRKSRC}/mk/linux/configure.ac ${WRKSRC}/mk/linux/mk/autoconf/binreloc.m4
+ @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g ; \
+ s|PTHREAD_LIBS="-l[$$]flag"|PTHREAD_LIBS="${PTHREAD_LIBS}"|g ; \
+ s|pthreads library -l[$$]flag|pthreads library ${PTHREAD_LIBS}|g' \
+ ${WRKSRC}/mk/linux/configure.ac ${WRKSRC}/mk/linux/mk/autoconf/*
@${FIND} -E ${WRKDIR} -type f -name '*.bak' -o -name '*.orig' | ${XARGS} ${RM}
pre-configure:
@@ -70,10 +71,10 @@ do-install:
@${RM} ${WRKDIR}/${PORTNAME}_game/license.txt
@${RM} ${WRKDIR}/${PORTNAME}_game/readme.txt
@${MKDIR} ${GLESTDIRE}
+ @${INSTALL_PROGRAM} ${WRKSRC}/glest ${GLESTDIRE}
+ @${INSTALL_DATA} ${WRKSRC}/mk/linux/glest.ini ${GLESTDIRE}
+ @${INSTALL_SCRIPT} ${WRKDIR}/glest-wrapper ${PREFIX}/bin/glest
@cd ${WRKDIR}/${PORTNAME}_game && \
- ${INSTALL_PROGRAM} ${WRKSRC}/glest ${GLESTDIRE} && \
- ${INSTALL_DATA} ${WRKSRC}/mk/linux/glest.ini ${GLESTDIRE} && \
- ${INSTALL_SCRIPT} ${WRKDIR}/glest-wrapper ${PREFIX}/bin/glest && \
${FIND} * -type d -exec ${MKDIR} "${GLESTDIRE}/{}" \; && \
${FIND} * -type f -exec ${INSTALL_DATA} "{}" "${GLESTDIRE}/{}" \;