Date: Tue, 25 Jan 2011 17:18:38 GMT From: David Demelier <demelier.david@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/154288: [patch] games/nethack*: remove old ports and cleanup latest Message-ID: <201101251718.p0PHIciv017852@red.freebsd.org> Resent-Message-ID: <201101251720.p0PHK9do056036@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 154288 >Category: ports >Synopsis: [patch] games/nethack*: remove old ports and cleanup latest >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jan 25 17:20:09 UTC 2011 >Closed-Date: >Last-Modified: >Originator: David Demelier >Release: 8.1-RELEASE-p2 >Organization: >Environment: FreeBSD Melon.malikania.fr 8.1-RELEASE-p2 FreeBSD 8.1-RELEASE-p2 #0: Tue Jan 25 11:52:00 CET 2011 root@Melon.malikania.fr:/usr/obj/usr/src/sys/Melon amd64 >Description: There is too much nethack version. I'm not sure much people use the oldest version so I propose the complete removal of these ports : /usr/ports/games/nethack32 /usr/ports/games/nethack33 /usr/ports/games/nethack33-gnome /usr/ports/games/nethack33-nox11 And then unify games/nethack34 with the following patch. Using option instead of installing a slave port for the appropriate frontend, then removing these ports : /usr/ports/games/nethack34-gnome /usr/ports/games/nethack34-nox11 /usr/ports/games/nethack34-qt And for finish renaming : /usr/ports/games/nethack34 -> /usr/ports/games/nethack. The following patch uses OPTIONS framework to select the appropriate frontend but it still use .if .elif .endif because only one option should be selected. There is no way to make only one option to select currently. >How-To-Repeat: >Fix: --- nethack.diff begins here --- --- Makefile.orig 2011-01-25 18:05:55.000000000 +0100 +++ Makefile 2011-01-25 18:12:05.000000000 +0100 @@ -32,17 +32,28 @@ HACKDIR?= lib/${HACKNAME} HACKDOCSDIR?= share/doc/${HACKNAME} -.if !defined(PKGNAMESUFFIX) +OPTIONS= X11 "Support for X11" Off \ + GNOME "Adds GNOME support" Off \ + QT "Adds Qt3 support" Off + +.include <bsd.port.options.mk> + +.if defined(WITH_X11) USE_XORG= xaw xpm GRAPHICS= X11_GRAPHICS -.else -.if ${PKGNAMESUFFIX} == "-gnome" +.elif defined(WITH_GNOME) MAKE_JOBS_UNSAFE= yes CATEGORIES= games gnome USE_GNOME= gnomelibs MAKE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" GRAPHICS= GNOME_GRAPHICS -.elif ${PKGNAMESUFFIX} == "-nox11" +.elif defined(WITH_QT) +USE_QT_VER= 3 +MAKE_ENV+= QTCPPFLAGS="${QTCPPFLAGS} ${PTHREAD_CFLAGS}" \ + QTCFGLIBS="${QTCFGLIBS} ${PTHREAD_LIBS}" \ + MOC="${MOC}" LIBQT="-lqt-mt" +GRAPHICS= QT_GRAPHICS +.else GRAPHICS= # none # # Patch notes: @@ -71,27 +82,10 @@ PATCH_DIST_STRIP= -p1 CFLAGS+= -DHPMON .endif -.elif ${PKGNAMESUFFIX} == "-qt" -USE_QT_VER= 3 -MAKE_ENV+= QTCPPFLAGS="${QTCPPFLAGS} ${PTHREAD_CFLAGS}" \ - QTCFGLIBS="${QTCFGLIBS} ${PTHREAD_LIBS}" \ - MOC="${MOC}" LIBQT="-lqt-mt" -GRAPHICS= QT_GRAPHICS -.endif .endif .include <bsd.port.pre.mk> -pre-everything:: - @if [ "${PKGBASE}" != "nethack" ]; then \ - ${ECHO_MSG} "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" ; \ - ${ECHO_MSG} " You cannot install nethack and ${PKGBASE} in parallel " ; \ - ${ECHO_MSG} " But ${PKGBASE} reads your prior nethack scores " ; \ - ${ECHO_MSG} " Don't forget to backup your nethack libdir if it's " ; \ - ${ECHO_MSG} " important for you " ; \ - ${ECHO_MSG} "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" ; \ - fi - post-patch: .for f in include/config.h sys/unix/Makefile.src sys/unix/Makefile.top @${REINPLACE_CMD} -e 's|%%HACKNAME%%|${HACKNAME}|g;s|%%HACKDIR%%|${PREFIX}/${HACKDIR}|g' ${WRKSRC}/${f} --- nethack.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101251718.p0PHIciv017852>