Bug 186966 - [PATCH] games/doomlegacy: Add an option to disable IPX support
Summary: [PATCH] games/doomlegacy: Add an option to disable IPX support
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Alexey Dokuchaev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-23 00:00 UTC by Steve Wills
Modified: 2014-03-27 15:51 UTC (History)
1 user (show)

See Also:


Attachments
doomlegacy-1.44.a4.patch (6.25 KB, patch)
2014-02-23 00:00 UTC, Steve Wills
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Wills freebsd_committer freebsd_triage 2014-02-23 00:00:00 UTC
- Add an option to disable IPX support

For those who have removed it from base via WITHOUT_IPX in src.conf

Port maintainer (danfe@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 1.00.2014.02.11 (mode: change, diff: SVN)
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-02-23 00:00:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->danfe

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2014-03-27 15:31:49 UTC
Author: danfe
Date: Thu Mar 27 15:31:46 2014
New Revision: 349341
URL: http://svnweb.freebsd.org/changeset/ports/349341
QAT: https://qat.redports.org/buildarchive/r349341/

Log:
  Add an option to disable IPX support.  Given that IPX was removed in SRC
  r263140, conditionalize on exists(/usr/include/netipx/ipx.h), and disable
  it by default (thus bump PORTREVISION).  While here, stagify the port.
  
  PR:		ports/186966
  Submitted by:	swills

Modified:
  head/games/doomlegacy/Makefile

Modified: head/games/doomlegacy/Makefile
==============================================================================
--- head/games/doomlegacy/Makefile	Thu Mar 27 15:04:15 2014	(r349340)
+++ head/games/doomlegacy/Makefile	Thu Mar 27 15:31:46 2014	(r349341)
@@ -3,12 +3,13 @@
 
 PORTNAME=	doomlegacy
 DISTVERSION=	1.44_alpha4
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	games
 MASTER_SITES=	http://doomlegacy.sourceforge.net/releases/ \
 		http://freebsd.nsu.ru/distfiles/:wad
 DISTNAME=	${PORTNAME}_${DISTVERSION}_src_r${SVN_REV}
-# legacy.wad is not provided by upstream and must be regenerated manually
+# legacy.wad is not included in distfile and must be regenerated manually
 # when needed (its contents change); luckily, it doesn't happen too often
 DISTFILES=	${DISTNAME}${EXTRACT_SUFX} legacy_wad${EXTRACT_SUFX}:wad
 DIST_SUBDIR=	${PORTNAME}
@@ -33,14 +34,16 @@ SVN_REV=	999
 OPTIONS_DEFINE=	DOCS
 OPTIONS_DEFINE_i386=	ASM
 
-NO_STAGE=	yes
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MASM}
-BUILD_DEPENDS=	nasm:${PORTSDIR}/devel/nasm
-MAKE_ENV=	USEASM=1 OLD_DEPENDENCIES=1
+.if exists(/usr/include/netipx/ipx.h)
+OPTIONS_DEFINE+=	IPX
+IPX_DESC=	IPX protocol support
 .endif
 
+ASM_BUILD_DEPENDS=	nasm:${PORTSDIR}/devel/nasm
+ASM_MAKE_ENV=		USEASM=1 OLD_DEPENDENCIES=1
+
+.include <bsd.port.options.mk>
+
 post-patch: .SILENT
 	${REINPLACE_CMD} -e 's|<malloc|<stdlib|' ${WRKSRC}/p_setup.c \
 		${WRKSRC}/r_data.c ${WRKSRC}/w_wad.c
@@ -56,15 +59,17 @@ post-patch: .SILENT
 # Provide better support for relative paths (for `-iwad' switch)
 	${REINPLACE_CMD} -e "s|s\[0\] ==[^)]*|strchr(s, '/')|" \
 			${WRKSRC}/d_main.c
-	${RM} ${WRKSRC}/_doc/LICENSE.txt
+.if ! ${PORT_OPTIONS:MIPX}
+	${REINPLACE_CMD} -e '/USE_IPX/s|define|undef|' ${WRKSRC}/doomdef.h
+	${REINPLACE_CMD} -e 's| -lipx||' ${WRKSRC}/Makefile
+.endif
 
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/../bin/doomlegacy ${PREFIX}/bin
-	${INSTALL_DATA} ${WRKDIR}/legacy.wad ${DMDIR}
-.if ${PORT_OPTIONS:MDOCS}
-	@${MKDIR} ${DOCSDIR}
-	cd ${WRKSRC}/_doc && ${COPYTREE_SHARE} . ${DOCSDIR}
-.endif
+	${INSTALL_PROGRAM} ${WRKSRC}/../bin/doomlegacy ${STAGEDIR}${PREFIX}/bin
+	@${MKDIR} ${STAGEDIR}${DMDIR}
+	${INSTALL_DATA} ${WRKDIR}/legacy.wad ${STAGEDIR}${DMDIR}
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	(cd ${WRKSRC}/_doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})
 
 .include "${.CURDIR}/../doom-data/Makefile.include"
 .include <bsd.port.mk>
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Alexey Dokuchaev freebsd_committer freebsd_triage 2014-03-27 15:48:33 UTC
State Changed
From-To: open->closed

Thanks for the PR, it was in time indeed: IPX support was removed completely 
in SRC r263140.  I've used less intrusive approach than yours: without touch 
of any patches, but it should be functionally equivalent.