Bug 184883 - games/xminehunter: Support CXX/CXXFLAGS properly
Summary: games/xminehunter: Support CXX/CXXFLAGS properly
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: Pawel Pekala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-16 18:10 UTC by tkato432
Modified: 2013-12-20 19:50 UTC (History)
0 users

See Also:


Attachments
file.diff (2.98 KB, patch)
2013-12-16 18:10 UTC, tkato432
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tkato432 2013-12-16 18:10:23 UTC
- Support CXX/CXXFLAGS properly
- Support STRIP properly
- Add DESKTOP_ENTRIES

Remove file:
files/patch-aa
Comment 1 Pawel Pekala freebsd_committer freebsd_triage 2013-12-20 19:34:01 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pawel

I'll take it.
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-12-20 19:43:12 UTC
Author: pawel
Date: Fri Dec 20 19:43:05 2013
New Revision: 337083
URL: http://svnweb.freebsd.org/changeset/ports/337083

Log:
  - Respect CXX/CXXFLAGS
  - Add desktop entry file
  
  PR:		ports/184883
  Submitted by:	KATO Tsuguru <tkato432@yahoo.com>

Deleted:
  head/games/xminehunter/files/
Modified:
  head/games/xminehunter/Makefile   (contents, props changed)
  head/games/xminehunter/pkg-plist   (contents, props changed)

Modified: head/games/xminehunter/Makefile
==============================================================================
--- head/games/xminehunter/Makefile	Fri Dec 20 19:31:11 2013	(r337082)
+++ head/games/xminehunter/Makefile	Fri Dec 20 19:43:05 2013	(r337083)
@@ -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@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>

Modified: head/games/xminehunter/pkg-plist
==============================================================================
--- head/games/xminehunter/pkg-plist	Fri Dec 20 19:31:11 2013	(r337082)
+++ head/games/xminehunter/pkg-plist	Fri Dec 20 19:43:05 2013	(r337083)
@@ -1,4 +1,5 @@
 bin/xminehunter
-@exec mkdir %D/lib/X11/xminehunter
+share/pixmaps/xminehunter.xpm
+@exec mkdir -p %D/lib/X11/xminehunter
 @exec chmod 333 %D/lib/X11/xminehunter
-@dirrm lib/X11/xminehunter
+@dirrmtry lib/X11/xminehunter
_______________________________________________
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 Pawel Pekala freebsd_committer freebsd_triage 2013-12-20 19:43:14 UTC
State Changed
From-To: open->closed

Committed. Thanks!