ports/184883: games/xminehunter: Support CXX/CXXFLAGS properly

KATO Tsuguru tkato432 at yahoo.com
Mon Dec 16 18:10:23 UTC 2013


>Number:         184883
>Category:       ports
>Synopsis:       games/xminehunter: Support CXX/CXXFLAGS properly
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 16 18:10:23 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 8.4-RELEASE-p4 i386
>Organization:
>Environment:
>Description:
- Support CXX/CXXFLAGS properly
- Support STRIP properly
- Add DESKTOP_ENTRIES

Remove file:
files/patch-aa

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/games/xminehunter/Makefile games/xminehunter/Makefile
--- /usr/ports/games/xminehunter/Makefile	2013-11-14 06:46:16.000000000 +0900
+++ games/xminehunter/Makefile	2013-12-17 00:00:00.000000000 +0900
@@ -3,17 +3,44 @@
 
 PORTNAME=	xminehunter
 PORTVERSION=	0.4
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	games
-MASTER_SITES=	${MASTER_SITE_XCONTRIB}
-MASTER_SITE_SUBDIR=	games
+MASTER_SITES=	XCONTRIB/games
 
 MAINTAINER=	ports at FreeBSD.org
 COMMENT=	Motif minesweeper game
 
+WRKSRC=		${WRKDIR}/${PORTNAME}
+
 USES=		motif
 USE_XORG=	xpm
-WRKSRC=		${WRKDIR}/xminehunter
-ALL_TARGET=	xminehunter
+ALL_TARGET=	${PORTNAME}
+
+CPPFLAGS+=	-I${LOCALBASE}/include
+LDFLAGS+=	-L${LOCALBASE}/lib
+
+DESKTOP_ENTRIES="XMineHunter" "" "${PREFIX}/share/pixmaps/${PORTNAME}.xpm" \
+		"${PORTNAME}" "" ""
+
+post-patch:
+	@${REINPLACE_CMD} -e \
+		'/^INSTALL_BIN/s|=.*|= $${PREFIX}/bin| ; \
+		 /^INSTALL_SCORE/s|=.*|= $${PREFIX}/lib/X11/${PORTNAME}| ; \
+		 /^INCLUDES/s|-I/.*/include|$${CPPFLAGS}| ; \
+		 /^LIBS/s|-L/.*/lib|$${LDFLAGS}| ; \
+		 s|-lXm |$${MOTIFLIB} | ; \
+		 s|^CC =|CXX ?=| ; \
+		 s|^CFLAGS =|CXXFLAGS +=| ; \
+		 s|$${CC}|$${CXX}| ; \
+		 s|$${CFLAGS}|$${CXXFLAGS}| ; \
+		 s| \($${INSTALL_SCORE_PATH}\)| $${DESTDIR}\1| ; \
+        	 s|chmod 333|chmod 633| ; \
+		 s|cp |$${BSD_INSTALL_DATA} | ; \
+		 s| \($${INSTALL_BIN_PATH}\)| $${DESTDIR}\1|' \
+		${WRKSRC}/${MAKEFILE}
+
+post-install:
+	(cd ${WRKSRC}/bitmaps && ${INSTALL_DATA} normal.xpm \
+		${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.xpm)
 
 .include <bsd.port.mk>
diff -urN /usr/ports/games/xminehunter/files/patch-aa games/xminehunter/files/patch-aa
--- /usr/ports/games/xminehunter/files/patch-aa	2013-11-14 06:46:16.000000000 +0900
+++ games/xminehunter/files/patch-aa	1970-01-01 09:00:00.000000000 +0900
@@ -1,26 +0,0 @@
---- ./Makefile.orig	1996-07-22 03:11:34.000000000 -0300
-+++ ./Makefile	2013-11-13 18:22:58.000000000 -0200
-@@ -1,9 +1,9 @@
--INSTALL_BIN_PATH = /usr/local/bin
--INSTALL_SCORE_PATH = /usr/local/lib/xminehunter
--
--INCLUDES = -I/usr/local/X11R5/include
--LIBS = -L/usr/local/X11R5/lib -lXm -lXt -lXpm -lXext -lX11
-+INSTALL_BIN_PATH = ${DESTDIR}${PREFIX}/bin
-+INSTALL_SCORE_PATH = ${DESTDIR}${PREFIX}/lib/X11/xminehunter
- 
-+INCLUDES = -I${LOCALBASE}/include
-+LIBS = -L${LOCALBASE}/lib ${MOTIFLIB} -lXt -lXpm -lXext -lX11
-+LIBS+= -Wl,-rpath,${LOCALBASE}/lib
- 
- CC = g++
- 
-@@ -50,7 +50,7 @@
- 
- install:
- 	mkdir -p ${INSTALL_SCORE_PATH}
--	chmod 333 ${INSTALL_SCORE_PATH}
-+	chmod 633 ${INSTALL_SCORE_PATH}
- 	cp xminehunter ${INSTALL_BIN_PATH}
- 
- clean:
diff -urN /usr/ports/games/xminehunter/pkg-plist games/xminehunter/pkg-plist
--- /usr/ports/games/xminehunter/pkg-plist	2013-11-06 22:00:45.000000000 +0900
+++ games/xminehunter/pkg-plist	2013-12-17 00:00:00.000000000 +0900
@@ -1,4 +1,5 @@
 bin/xminehunter
- at exec mkdir %D/lib/X11/xminehunter
+share/pixmaps/xminehunter.xpm
+ at exec mkdir -p %D/lib/X11/xminehunter
 @exec chmod 333 %D/lib/X11/xminehunter
- at dirrm lib/X11/xminehunter
+ at dirrmtry lib/X11/xminehunter
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list