Bug 186711 - [PATCH] games/maelstrom: don't silence warnings, fixes
Summary: [PATCH] games/maelstrom: don't silence warnings, fixes
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: Rusmir Dusko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-13 02:20 UTC by Dmitry Marakasov
Modified: 2014-02-13 12:00 UTC (History)
1 user (show)

See Also:


Attachments
maelstrom-3.0.6_9.patch (2.01 KB, patch)
2014-02-13 02:20 UTC, Dmitry Marakasov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Marakasov 2014-02-13 02:20:00 UTC
- Don't silence warnings
- Simplify doc installation handling
- Fix permission settings

Note the last one: you probably need the same fix for other ports.

You must not set permissions in the Makefile.

First, pkg will clear owners to root:wheel on syncing, but will
leave suid/sgid bits, so you'll end up with suid-root or sgid-wheel
(this case) binary.

Second, you won't be able to `make package` as a plain user.

Owners/perms should be done with plist instead, see patch.

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

Generated with FreeBSD Port Tools 0.99_11 (mode: change, diff: SVN)
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-02-13 02:20:20 UTC
Responsible Changed
From-To: freebsd-ports-bugs->nemysis

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2014-02-13 11:53:27 UTC
Author: nemysis
Date: Thu Feb 13 11:53:20 2014
New Revision: 344089
URL: http://svnweb.freebsd.org/changeset/ports/344089
QAT: https://qat.redports.org/buildarchive/r344089/

Log:
  - Bump PORTREVISION
  - Simplify DOCS installation handling
  - Simplify REINPLACE, don't silence warnings
  - Use proper permission settings in pkg-plist
  
  PR:		ports/186711
  Submitted by:	amdmi3@

Modified:
  head/games/maelstrom/Makefile
  head/games/maelstrom/pkg-plist

Modified: head/games/maelstrom/Makefile
==============================================================================
--- head/games/maelstrom/Makefile	Thu Feb 13 11:48:14 2014	(r344088)
+++ head/games/maelstrom/Makefile	Thu Feb 13 11:53:20 2014	(r344089)
@@ -3,7 +3,7 @@
 
 PORTNAME=	maelstrom
 PORTVERSION=	3.0.6
-PORTREVISION=	9
+PORTREVISION=	10
 CATEGORIES=	games
 MASTER_SITES=	http://slouken.libsdl.org/projects/Maelstrom/src/ \
 		SF/nemysisfreebsdp/${CATEGORIES}/:icons
@@ -29,33 +29,17 @@ PORTDOCS=	*
 
 OPTIONS_DEFINE=	DOCS
 
+DOCS_INSTALL_TARGET=install install_gamedocs
+
 DESKTOP_ENTRIES="Maelstrom" "" ${PORTNAME} \
 		"Maelstrom" "Game;ArcadeGame;" ""
 
-.include <bsd.port.options.mk>
-
 post-patch:
-	@${REINPLACE_CMD} \
-		-e 's|prefix = @prefix@|prefix = $${DESTDIR}@prefix@| ; \
+	@${REINPLACE_CMD} -e 's|@prefix@|$${DESTDIR}@prefix@|; \
 		s|$$(DESTDIR)$$(bindir)|$$(bindir)|' \
 		${WRKSRC}/Makefile.in
 
-	@(cd ${WRKSRC} ; ${REINPLACE_CMD} \
-		-e 's|@CFLAGS@|@CFLAGS@ -w| ; \
-		s|$$(CXXFLAGS)|$$(CXXFLAGS) -w|' \
-		Makefile.in maclib/Makefile.in \
-		netlogic/Makefile.in screenlib/Makefile.in)
-
-.if ${PORT_OPTIONS:MDOCS}
-INSTALL_TARGET=	install install_gamedocs
-.endif
-
 post-install:
-	${CHOWN} root:games ${STAGEDIR}${PREFIX}/bin/Maelstrom
-	${CHMOD} 2755 ${STAGEDIR}${PREFIX}/bin/Maelstrom
-	${CHMOD} 664 ${STAGEDIR}${PREFIX}/share/Maelstrom/Maelstrom-Scores
-	${CHOWN} root:games \
-		${STAGEDIR}${PREFIX}/share/Maelstrom/Maelstrom-Scores
 	${INSTALL_DATA} ${_DISTDIR}/${PORTNAME}.png \
 		${STAGEDIR}${PREFIX}/share/pixmaps/
 

Modified: head/games/maelstrom/pkg-plist
==============================================================================
--- head/games/maelstrom/pkg-plist	Thu Feb 13 11:48:14 2014	(r344088)
+++ head/games/maelstrom/pkg-plist	Thu Feb 13 11:53:20 2014	(r344089)
@@ -1,5 +1,9 @@
+@group games
+@mode 2755
 bin/Maelstrom
 bin/Maelstrom-netd
+@mode
+@group
 %%DATADIR%%/Images/Maelstrom_Icon#100.cicn
 %%DATADIR%%/Images/Maelstrom_Icon#101.cicn
 %%DATADIR%%/Images/Maelstrom_Icon#102.cicn
@@ -28,7 +32,11 @@ bin/Maelstrom-netd
 %%DATADIR%%/Images/Maelstrom_Titles#999.bmp
 %%DATADIR%%/Images/Makefile
 %%DATADIR%%/Images/Makefile.in
+@group games
+@mode 644
 %%DATADIR%%/Maelstrom-Scores
+@mode
+@group
 %%DATADIR%%/Maelstrom_Fonts
 %%DATADIR%%/Maelstrom_Sounds
 %%DATADIR%%/Maelstrom_Sprites
_______________________________________________
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 Rusmir Dusko freebsd_committer freebsd_triage 2014-02-13 11:53:35 UTC
State Changed
From-To: open->closed

Committed. Thanks!