Bug 175584

Summary: games/xvmahjongg: Update MASTER_SITES
Product: Ports & Packages Reporter: tkato432
Component: Individual Port(s)Assignee: Martin Wilke <miwi>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description tkato432 2013-01-25 21:10:05 UTC
- Update MASTER_SITES
- Fix build with clang
- Support PLIST_FILES
- Add MAKE_JOBS_UNSAFE

New file:
files/patch-event.c
files/patch-mahjongg.c

Remove file:
files/patch-aa
files/patch-ab
pkg-plist
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-01-25 21:11:56 UTC
Responsible Changed
From-To: freebsd-ports-bugs->araujo

araujo@ wants this submitter's PRs (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-02-04 14:22:46 UTC
Author: miwi
Date: Mon Feb  4 14:22:32 2013
New Revision: 311616
URL: http://svnweb.freebsd.org/changeset/ports/311616

Log:
  - Update MASTER_SITES
  - Fix build with clang
  - Support PLIST_FILES
  - Add MAKE_JOBS_UNSAFE
  
  PR:		175584
  Submitted by:	Ports Fury

Added:
  head/games/xvmahjongg/files/patch-event.c   (contents, props changed)
  head/games/xvmahjongg/files/patch-mahjongg.c   (contents, props changed)
Deleted:
  head/games/xvmahjongg/files/patch-aa
  head/games/xvmahjongg/files/patch-ab
  head/games/xvmahjongg/pkg-plist
Modified:
  head/games/xvmahjongg/Makefile   (contents, props changed)
  head/games/xvmahjongg/pkg-descr   (contents, props changed)

Modified: head/games/xvmahjongg/Makefile
==============================================================================
--- head/games/xvmahjongg/Makefile	Mon Feb  4 14:19:57 2013	(r311615)
+++ head/games/xvmahjongg/Makefile	Mon Feb  4 14:22:32 2013	(r311616)
@@ -1,33 +1,51 @@
-# New ports collection makefile for:	xvmahjongg
-# Date created:				21 March 1998
-# Whom:					Andrey Zakhvatov
-#
+# Created by: Andrey Zakhvatov
 # $FreeBSD$
-#
 
 PORTNAME=	xvmahjongg
 PORTVERSION=	2.1
 PORTREVISION=	2
 CATEGORIES=	games
-MASTER_SITES=	ftp://ftp.x.org/R5contrib/
-DISTFILES=	${PORTNAME}${PORTVERSION}.tar.Z
+MASTER_SITES=	XCONTRIB/../R5contrib
+DISTNAME=	${PORTNAME}${PORTVERSION}
+EXTRACT_SUFX=	.tar.Z
 
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Mahjongg for XView with multicolored tiles
 
-LIB_DEPENDS=	xview.3:${PORTSDIR}/x11-toolkits/xview
+LIB_DEPENDS=	xview:${PORTSDIR}/x11-toolkits/xview
+
+OPTIONS_DEFINE=	DOCS
 
-ALL_TARGET=	mahjongg.swap
 WRKSRC=		${WRKDIR}/mahjongg2.1
+
+MAKE_ENV=	OPENWINHOME="${LOCALBASE}" MKDIR="${MKDIR}"
+ALL_TARGET=	mahjongg.swap
+MAKE_JOBS_UNSAFE=	yes
+
 MAN6=		xvmahjongg.6
+PORTDOCS=	Notes README README.too
+PLIST_FILES=	bin/xvmahjongg
+
+.include <bsd.port.options.mk>
+
+post-patch:
+	@${REINPLACE_CMD} -e \
+		'/^XVIEWLIBDIR/s| =.*| = -L$${XVIEWROOT}/lib| ; \
+		 /^CFLAGS/s| = -O | += | ; \
+		 s|cc |$$(CC) |' ${WRKSRC}/Makefile
+	@${REINPLACE_CMD} -e \
+		's|cc |$$(CC) | ; \
+		 s|mkdir |-$$(MKDIR) |' ${WRKSRC}/image-stuff/Makefile
 
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/mahjongg ${PREFIX}/bin/xvmahjongg
-	${INSTALL_MAN} ${WRKSRC}/mahjongg.6 ${PREFIX}/man/man6/xvmahjongg.6
-.if !defined(NOPORTDOCS)
+	(cd ${WRKSRC} && ${INSTALL_PROGRAM} mahjongg \
+		${PREFIX}/bin/xvmahjongg)
+	(cd ${WRKSRC} && ${INSTALL_MAN} mahjongg.6 \
+		${MAN6PREFIX}/man/man6/xvmahjongg.6)
+.if ${PORT_OPTIONS:MDOCS}
 	@${MKDIR} ${DOCSDIR}
-.for file in Notes README README.too
-	@${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
+.for i in ${PORTDOCS}
+	(cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${DOCSDIR})
 .endfor
 .endif
 

Added: head/games/xvmahjongg/files/patch-event.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xvmahjongg/files/patch-event.c	Mon Feb  4 14:22:32 2013	(r311616)
@@ -0,0 +1,38 @@
+--- event.c.orig
++++ event.c
+@@ -134,7 +134,7 @@
+ set_special_event_handling()
+ {
+     if (In_special_event_mode)
+-	return;
++	return(0);
+ 
+     xv_set(message_panel,
+ 			PANEL_BACKGROUND_PROC,	play_back_proc,
+@@ -151,7 +151,7 @@
+ clr_special_event_handling()
+ {
+     if (!In_special_event_mode)
+-	return;
++	return(0);
+ 
+     xv_set(message_panel,
+ 			PANEL_BACKGROUND_PROC,	NULL,
+@@ -761,7 +761,7 @@
+ 	    p = xv_mem_create(64, 64, 8);
+ 	    if (p == NULL) {
+ 		fprintf(stderr, "begin_preview: xv_mem_create returned NULL\n");
+-		return;
++		return(0);
+ 	    }
+ 	}
+ 	if (selptr->si_before_preview == NULL) {
+@@ -775,7 +775,7 @@
+ 	    if (selptr->si_before_preview == NULL) {
+ 		fprintf(stderr,
+ 			"begin_preview: error, couldn't create server image\n");
+-		return;
++		return(0);
+ 	    }
+ 	}
+ 

Added: head/games/xvmahjongg/files/patch-mahjongg.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xvmahjongg/files/patch-mahjongg.c	Mon Feb  4 14:22:32 2013	(r311616)
@@ -0,0 +1,28 @@
+--- mahjongg.c.orig
++++ mahjongg.c
+@@ -41,6 +41,7 @@
+  */
+ 
+ #include <stdio.h>
++#include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <xview/xview.h>
+@@ -1178,7 +1179,7 @@
+     tileptr->y_loc = y_loc;
+ 
+     if (tileptr->removed)
+-	return;
++	return(0);
+ 
+     if (! tileptr->top_covered)
+ 	if (Use_tile_server_images)
+@@ -1245,7 +1246,7 @@
+ Pixrect *pr;
+ {
+     if (PIXRECT_IMAGE_DEPTH(pr) <= 1)
+-	return;
++	return(0);
+ 
+     shift_image_colors( PIXRECT_IMAGE_DATA_PTR(pr),
+ 			PIXRECT_IMAGE_SIZE(pr) );

Modified: head/games/xvmahjongg/pkg-descr
==============================================================================
--- head/games/xvmahjongg/pkg-descr	Mon Feb  4 14:19:57 2013	(r311615)
+++ head/games/xvmahjongg/pkg-descr	Mon Feb  4 14:22:32 2013	(r311616)
@@ -1,12 +1,12 @@
-   Mah jongg is an ancient Chinese game whose origins are supposed
-to date back around 3000 years. It is typically a four player game
-with  similarities  to most  popular card games. This version is a
-solitaire  game  using  the  mahjongg  tiles. It was inspired by a
-version originally seen on a PC.
-   The  object  of  the  game  is to remove all the tiles from the
-board  in matching  pairs. Tiles match only if they are identical.
-Exceptions  are  the flower and season tiles. Any season tile will
-match  any  other  season  tile and any flower tile will match any
-other  flower  tile. Tiles  may be  removed from the board only if
-they have either a left or a right edge  open and they do not have
-a tile covering them.
+Mah jongg is an ancient Chinese game whose origins are supposed to date
+back around 3000 years. It is typically a four player game with
+similarities to most popular card games. This version is a solitaire
+game using the mahjongg tiles. It was inspired by a version originally
+seen on a PC.
+
+The object of the game is to remove all the tiles from the board in
+matching pairs. Tiles match only if they are identical.  Exceptions are
+the flower and season tiles. Any season tile will match any other season
+tile and any flower tile will match any other flower tile. Tiles may be
+removed from the board only if they have either a left or a right edge
+open and they do not have a tile covering them.
_______________________________________________
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 Martin Wilke freebsd_committer freebsd_triage 2013-02-04 14:22:51 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 4 Martin Wilke freebsd_committer freebsd_triage 2013-02-04 14:22:56 UTC
Responsible Changed
From-To: araujo->miwi

I'll take it.