Bug 184034 - [PATCH] Update games/chessx to 1.0.0 and add stagedir support
Summary: [PATCH] Update games/chessx to 1.0.0 and add stagedir 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: Max Brazhnikov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-17 14:00 UTC by yamagi
Modified: 2013-11-25 16:40 UTC (History)
0 users

See Also:


Attachments
xchess.patch (384 bytes, patch)
2013-11-24 17:13 UTC, yamagi
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description yamagi 2013-11-17 14:00:00 UTC
The attached patch updates games/chessx to version 1.0.0. Changes to the port are:
 - files/patch-chessx.pro -> Patch chessx.pro to use lrelease-qt4 instead of lrelease
 - Stagedir support was added

Fix: 

Eigenschaftsänderungen: files/patch-chessx.pro
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property--J2FJcK8JwRqfPMv7bdiGR3WLfGyuIIy8pNxIZPjITeDgsY4x
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

Index: Makefile
===================================================================
--- Makefile	(Revision 334082)
+++ Makefile	(Arbeitskopie)
@@ -1,10 +1,11 @@
 # $FreeBSD$
 
 PORTNAME=	chessx
-PORTVERSION=	0.9.6
+PORTVERSION=	1.0.0
 CATEGORIES=	games
-MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTVERSION}
+MASTER_SITES=	SF/chessx/chessx/${PORTVERSION}
 DISTNAME=	${PORTNAME}-${PORTVERSION:S/./-/g}
+EXTRACT_SUFX=  .tgz
 
 MAINTAINER=	yamagi@yamagi.org
 COMMENT=	Qt4 chess database application
@@ -11,7 +12,7 @@
 
 LICENSE=	GPLv2 # (or later)
 
-WRKSRC=		${WRKDIR}/${PORTNAME}
+WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION:S/./-/g}
 
 USE_QT4=	corelib gui svg xml network moc_build qmake_build rcc_build uic_build
 MAKE_JOBS_SAVE=	yes
@@ -21,7 +22,6 @@
 CRAFTY_DESC=	Build with Crafty Chess Application
 OPTIONS_DEFAULT=STOCKFISH CRAFTY
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MSTOCKFISH}
@@ -35,7 +35,7 @@
 PLIST_FILES=	bin/${PORTNAME} \
 		share/pixmaps/${PORTNAME}.png
 
-DESKTOP_ENTRIES="ChessX" "" "${PREFIX}/share/pixmaps/${PORTNAME}.png" \
+DESKTOP_ENTRIES="ChessX" "" "${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png" \
 				"${PORTNAME}" "Game;BoardGame;" true
 
 do-configure:
@@ -42,8 +42,8 @@
 	@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${QMAKE} ${QMAKEFLAGS})
 
 do-install:
-	(cd ${WRKSRC} && ${INSTALL_PROGRAM} release/${PORTNAME} ${PREFIX}/bin)
+	(cd ${WRKSRC} && ${INSTALL_PROGRAM} release/${PORTNAME} ${STAGEDIR}${PREFIX}/bin)
 	(cd ${WRKSRC}/data/images && ${INSTALL_DATA} chessx.png \
-		${PREFIX}/share/pixmaps/${PORTNAME}.png)
+		${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png)
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
--- distinfo	(Revision 334082)
+++ distinfo	(Arbeitskopie)
@@ -1,2 +1,2 @@
-SHA256 (chessx-0-9-6.tar.gz) = 37ec638736b0e20fbdfb5db374bf971d76d81fe267ace3bde8b4e5c2d2e9c601
-SIZE (chessx-0-9-6.tar.gz) = 3213601
+SHA256 (chessx-1-0-0.tgz) = 822512e9142fd2aa7e9034ee84470d99f2c1df86d2b8cd97774e9e7bc97b7d72
+SIZE (chessx-1-0-0.tgz) = 3545265
Index: files/patch-chessx.pro
===================================================================
--- files/patch-chessx.pro	(Revision 0)
+++ files/patch-chessx.pro	(Arbeitskopie)
@@ -0,0 +1,16 @@
+--- chessx.pro_orig	2013-11-16 09:55:22.927196241 +0100
++++ chessx.pro	2013-11-16 09:55:41.556196226 +0100
+@@ -334,11 +334,11 @@
+ 
+ isEmpty(QMAKE_LRELEASE) {
+      win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe
+-     else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
++     else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease-qt4
+ }
+ 
+ isEmpty(TS_DIR):TS_DIR = i18n
+-TSQM.name = lrelease ${QMAKE_FILE_IN}
++TSQM.name = lrelease-qt4 ${QMAKE_FILE_IN}
+ TSQM.input = TRANSLATIONS
+ TSQM.output = $$TS_DIR/${QMAKE_FILE_BASE}.qm
+ TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.qm
Comment 1 Max Brazhnikov freebsd_committer freebsd_triage 2013-11-18 15:42:38 UTC
Responsible Changed
From-To: freebsd-ports-bugs->makc

I'll take it.
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-11-23 17:09:06 UTC
Author: makc
Date: Sat Nov 23 17:08:57 2013
New Revision: 334686
URL: http://svnweb.freebsd.org/changeset/ports/334686

Log:
  - Update to 1.0.0
  - Add stage support
  - Convert to USES
  - Use options helpers
  - Patch qmake project file and remove do-install target from the port Makefile
  - Use pkg-plist
  
  PR:		based on ports/184034
  Submitted by:	Yamagi Burmeister (maintainter)

Added:
  head/games/chessx/files/patch-chessx.pro   (contents, props changed)
  head/games/chessx/pkg-plist   (contents, props changed)
Modified:
  head/games/chessx/Makefile
  head/games/chessx/distinfo

Modified: head/games/chessx/Makefile
==============================================================================
--- head/games/chessx/Makefile	Sat Nov 23 16:56:54 2013	(r334685)
+++ head/games/chessx/Makefile	Sat Nov 23 17:08:57 2013	(r334686)
@@ -1,49 +1,28 @@
 # $FreeBSD$
 
 PORTNAME=	chessx
-PORTVERSION=	0.9.6
+DISTVERSION=	1-0-0
 CATEGORIES=	games
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTVERSION}
-DISTNAME=	${PORTNAME}-${PORTVERSION:S/./-/g}
+EXTRACT_SUFX=	.tgz
 
 MAINTAINER=	yamagi@yamagi.org
-COMMENT=	Qt4 chess database application
+COMMENT=	Qt 4 chess database application
 
 LICENSE=	GPLv2 # (or later)
 
-WRKSRC=		${WRKDIR}/${PORTNAME}
-
-USE_QT4=	corelib gui svg xml network moc_build qmake_build rcc_build uic_build
-MAKE_JOBS_SAVE=	yes
+USES=		shared-mime-info qmake
+USE_QT4=	corelib gui svg xml network linguist_build \
+		moc_build qmake_build rcc_build uic_build
+QMAKE_ARGS+=	QMAKE_LRELEASE=${LRELEASE}
 
 OPTIONS_DEFINE=	STOCKFISH CRAFTY
-STOCKFISH_DESC=	Build with Stockfish Chess Engine
-CRAFTY_DESC=	Build with Crafty Chess Application
-OPTIONS_DEFAULT=STOCKFISH CRAFTY
-
-NO_STAGE=	yes
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MSTOCKFISH}
-RUN_DEPENDS+=	stockfish:${PORTSDIR}/games/stockfish
-.endif
-
-.if ${PORT_OPTIONS:MCRAFTY}
-RUN_DEPENDS+=	crafty:${PORTSDIR}/games/crafty
-.endif
-
-PLIST_FILES=	bin/${PORTNAME} \
-		share/pixmaps/${PORTNAME}.png
-
-DESKTOP_ENTRIES="ChessX" "" "${PREFIX}/share/pixmaps/${PORTNAME}.png" \
-				"${PORTNAME}" "Game;BoardGame;" true
-
-do-configure:
-	@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${QMAKE} ${QMAKEFLAGS})
-
-do-install:
-	(cd ${WRKSRC} && ${INSTALL_PROGRAM} release/${PORTNAME} ${PREFIX}/bin)
-	(cd ${WRKSRC}/data/images && ${INSTALL_DATA} chessx.png \
-		${PREFIX}/share/pixmaps/${PORTNAME}.png)
+OPTIONS_DEFAULT=	STOCKFISH CRAFTY
+
+STOCKFISH_DESC=	Install Stockfish Chess Engine
+STOCKFISH_RUN_DEPENDS=	stockfish:${PORTSDIR}/games/stockfish
+
+CRAFTY_DESC=	Install Crafty Chess Application
+CRAFTY_RUN_DEPENDS=	crafty:${PORTSDIR}/games/crafty
 
 .include <bsd.port.mk>

Modified: head/games/chessx/distinfo
==============================================================================
--- head/games/chessx/distinfo	Sat Nov 23 16:56:54 2013	(r334685)
+++ head/games/chessx/distinfo	Sat Nov 23 17:08:57 2013	(r334686)
@@ -1,2 +1,2 @@
-SHA256 (chessx-0-9-6.tar.gz) = 37ec638736b0e20fbdfb5db374bf971d76d81fe267ace3bde8b4e5c2d2e9c601
-SIZE (chessx-0-9-6.tar.gz) = 3213601
+SHA256 (chessx-1-0-0.tgz) = 822512e9142fd2aa7e9034ee84470d99f2c1df86d2b8cd97774e9e7bc97b7d72
+SIZE (chessx-1-0-0.tgz) = 3545265

Added: head/games/chessx/files/patch-chessx.pro
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/chessx/files/patch-chessx.pro	Sat Nov 23 17:08:57 2013	(r334686)
@@ -0,0 +1,27 @@
+--- ./chessx.pro.orig	2013-10-30 20:52:41.000000000 +0000
++++ ./chessx.pro	2013-11-18 16:36:14.764197702 +0000
+@@ -309,17 +309,14 @@
+ }
+ 
+ unix:!macx {
+- target.path = /usr/local/bin/chessx
+- pixmaps.path = /usr/share/pixmaps
++ target.path = $$PREFIX/bin
++ pixmaps.path = $$PREFIX/share/pixmaps
+  pixmaps.files = data/images/chessx.png
+- desktop.path = /usr/share/applications
+- desktop.files = chessx.desktop
+- desktop.extra += xdg-mime install --mode system chessx-x-chess-pgn.xml &&
+- desktop.extra += xdg-mime default chessx.desktop application/x-chess-pgn &&
+- desktop.extra += xdg-icon-resource install --context mimetypes --size 32 ./data/images/chessx-32.png application-x-chess-pgn &&
+- desktop.extra += xdg-icon-resource install --context mimetypes --size 64 ./data/images/chessx-64.png application-x-chess-pgn &&
+- desktop.extra += xdg-icon-resource install --context mimetypes --size 128 ./data/images/chessx.png application-x-chess-pgn
+- INSTALLS += target desktop pixmaps
++ desktop.path = $$PREFIX/share/applications
++ desktop.files = unix/chessx.desktop
++ mime.path = $$PREFIX/share/mime/packages
++ mime.files += unix/chessx-x-chess-pgn.xml
++ INSTALLS += target desktop pixmaps mime
+ }
+ 
+ RESOURCES = resources.qrc

Added: head/games/chessx/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/chessx/pkg-plist	Sat Nov 23 17:08:57 2013	(r334686)
@@ -0,0 +1,4 @@
+bin/chessx
+share/applications/chessx.desktop
+share/mime/packages/chessx-x-chess-pgn.xml
+share/pixmaps/chessx.png
_______________________________________________
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 Max Brazhnikov freebsd_committer freebsd_triage 2013-11-23 17:15:05 UTC
State Changed
From-To: open->closed

Committed with some modifications. Thanks!
Comment 4 yamagi 2013-11-24 17:13:10 UTC
Hello,
I was away for some days and just read your mail. The updates patch
looks good, thank you for the commit. 

> Btw, does chessx really require games/stockfish and games/crafty? If it can be 
> useful without them, I suggest to disable these options by default, so that 
> users who install chessx from package won't be forced to download and install 
> additional packages.

Regarding stockfish and crafty: xchess is usable without them, but as
soon as games should be analysed (and that is the main reason to
install a chess database) an engine must be present. Nevertheless, 
I suggest to disable the dependencies to both engines by default.
pkg users can install an engine by hand if they need one. Patch
is attached.

Ciao,
Yamagi

-- 
Homepage:  www.yamagi.org
XMPP:      yamagi@yamagi.org
GnuPG/GPG: 0xEFBCCBCB
Comment 5 dfilter service freebsd_committer freebsd_triage 2013-11-25 16:33:47 UTC
Author: makc
Date: Mon Nov 25 16:33:39 2013
New Revision: 334863
URL: http://svnweb.freebsd.org/changeset/ports/334863

Log:
  - Don't force pkg users to install optional dependencies
  
  PR:		ports/184034
  Submitted by:	Yamagi Burmeister (maintainter)

Modified:
  head/games/chessx/Makefile

Modified: head/games/chessx/Makefile
==============================================================================
--- head/games/chessx/Makefile	Mon Nov 25 16:31:44 2013	(r334862)
+++ head/games/chessx/Makefile	Mon Nov 25 16:33:39 2013	(r334863)
@@ -17,7 +17,6 @@ USE_QT4=	corelib gui svg xml network lin
 QMAKE_ARGS+=	QMAKE_LRELEASE=${LRELEASE}
 
 OPTIONS_DEFINE=	STOCKFISH CRAFTY
-OPTIONS_DEFAULT=	STOCKFISH CRAFTY
 
 STOCKFISH_DESC=	Install Stockfish Chess Engine
 STOCKFISH_RUN_DEPENDS=	stockfish:${PORTSDIR}/games/stockfish
_______________________________________________
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"