Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Jan 2013 05:49:11 +0900
From:      KATO Tsuguru <tkato432@yahoo.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/175584: games/xvmahjongg: Update MASTER_SITES
Message-ID:  <20130126054911.ee224e6dabb2de2105e30552@yahoo.com>
Resent-Message-ID: <201301252110.r0PLA53F075078@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         175584
>Category:       ports
>Synopsis:       games/xvmahjongg: Update MASTER_SITES
>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:   Fri Jan 25 21:10:05 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 7.4-RELEASE-p11 i386
>Organization:
>Environment:
>Description:
- 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

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/games/xvmahjongg/Makefile games/xvmahjongg/Makefile
--- /usr/ports/games/xvmahjongg/Makefile	2012-11-08 07:19:20.000000000 +0900
+++ games/xvmahjongg/Makefile	2013-01-26 03:20:27.000000000 +0900
@@ -1,33 +1,51 @@
-# New ports collection makefile for:	xvmahjongg
-# Date created:				21 March 1998
-# Whom:					Andrey Zakhvatov
-#
+# Created by: Andrey Zakhvatov
 # $FreeBSD: head/games/xvmahjongg/Makefile 300896 2012-07-14 13:54:48Z beat $
-#
 
 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
 
diff -urN /usr/ports/games/xvmahjongg/files/patch-aa games/xvmahjongg/files/patch-aa
--- /usr/ports/games/xvmahjongg/files/patch-aa	2012-11-08 07:19:19.000000000 +0900
+++ games/xvmahjongg/files/patch-aa	1970-01-01 09:00:00.000000000 +0900
@@ -1,20 +0,0 @@
---- image-stuff/Makefile	Thu Dec 19 23:01:20 1991
-+++ /home/andy/tmp/wrk/image-stuff/Makefile	Sat Mar 21 23:44:49 1998
-@@ -18,13 +18,13 @@
- 	cd ..; image-stuff/Img-mk-swap
- 
- ../images/color: ../images
--	mkdir $@
-+	- mkdir $@
- 
- ../images/bandw: ../images
--	mkdir $@
-+	- mkdir $@
- 
- ../images/swap: ../images
--	mkdir $@
-+	- mkdir $@
- 
- ../images:
--	mkdir $@
-+	- mkdir $@
diff -urN /usr/ports/games/xvmahjongg/files/patch-ab games/xvmahjongg/files/patch-ab
--- /usr/ports/games/xvmahjongg/files/patch-ab	2012-11-08 07:19:19.000000000 +0900
+++ games/xvmahjongg/files/patch-ab	1970-01-01 09:00:00.000000000 +0900
@@ -1,26 +0,0 @@
---- Makefile.orig	Fri Dec 20 23:33:15 1991
-+++ Makefile	Thu May 14 09:05:45 1998
-@@ -29,12 +29,12 @@
- 
- # Root directory of XView developers package
- # For OpenWindows users, this is the same as $OPENWINHOME.
--XVIEWROOT = ${OPENWINHOME}
-+XVIEWROOT = ${LOCALBASE}
- 
- # If not in OpenWindows, need to specify directory where libxview
- # and libolgx are.
- # For OpenWindows users, this is taken care of via $LD_LIBRARY_PATH.
--XVIEWLIBDIR =
-+XVIEWLIBDIR = -L${LOCALBASE}/lib
- # e.g., XVIEWLIBDIR = -L/usr/openwin/lib
- # This -L... stuff may only be appropriate in a SunOS environment,
- # so do what's appropriate in your environment.  The -L<pathname>
-@@ -45,7 +45,7 @@
- # currently only necessary when compiling icons.o
- TARGET=
- 
--CFLAGS = -O -I${XVIEWROOT}/include
-+CFLAGS+= -I${XVIEWROOT}/include
- 
- SWOBJS = icons.o mahjongg.o event.o
- SWLIBS= ${XVIEWLIBDIR} -lxview -lolgx -lX11
diff -urN /usr/ports/games/xvmahjongg/files/patch-event.c games/xvmahjongg/files/patch-event.c
--- /usr/ports/games/xvmahjongg/files/patch-event.c	1970-01-01 09:00:00.000000000 +0900
+++ games/xvmahjongg/files/patch-event.c	2013-01-13 18:02:39.000000000 +0900
@@ -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);
+ 	    }
+ 	}
+ 
diff -urN /usr/ports/games/xvmahjongg/files/patch-mahjongg.c games/xvmahjongg/files/patch-mahjongg.c
--- /usr/ports/games/xvmahjongg/files/patch-mahjongg.c	1970-01-01 09:00:00.000000000 +0900
+++ games/xvmahjongg/files/patch-mahjongg.c	2013-01-13 18:03:02.000000000 +0900
@@ -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) );
diff -urN /usr/ports/games/xvmahjongg/pkg-descr games/xvmahjongg/pkg-descr
--- /usr/ports/games/xvmahjongg/pkg-descr	2012-11-08 07:19:20.000000000 +0900
+++ games/xvmahjongg/pkg-descr	2013-01-11 01:34:06.000000000 +0900
@@ -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.
diff -urN /usr/ports/games/xvmahjongg/pkg-plist games/xvmahjongg/pkg-plist
--- /usr/ports/games/xvmahjongg/pkg-plist	2012-11-08 07:19:20.000000000 +0900
+++ games/xvmahjongg/pkg-plist	1970-01-01 09:00:00.000000000 +0900
@@ -1,5 +0,0 @@
-bin/xvmahjongg
-%%PORTDOCS%%share/doc/xvmahjongg/Notes
-%%PORTDOCS%%share/doc/xvmahjongg/README
-%%PORTDOCS%%share/doc/xvmahjongg/README.too
-%%PORTDOCS%%@dirrm share/doc/xvmahjongg
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130126054911.ee224e6dabb2de2105e30552>