Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Dec 2012 05:35:40 +0000 (UTC)
From:      Marcelo Araujo <araujo@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r309280 - in head/x11-wm/treewm: . files
Message-ID:  <201212200535.qBK5ZerA078778@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: araujo
Date: Thu Dec 20 05:35:39 2012
New Revision: 309280
URL: http://svnweb.freebsd.org/changeset/ports/309280

Log:
  - Add LICENSE.
  - Support CFLAGS properly.
  - Support SUB_FILES.
  - Support PORTEXAMPLES.
  - Add MAKE_JOBS_SAFE.
  - Trim header.
  - Bump PORTREVISION.
  
  PR:		ports/172073
  Submitted by:	KATO Tsuguru <tkato432@yahoo.com>

Added:
  head/x11-wm/treewm/files/patch-xprop__xprop.c   (contents, props changed)
  head/x11-wm/treewm/files/pkg-message.in   (contents, props changed)
Deleted:
  head/x11-wm/treewm/pkg-message
Modified:
  head/x11-wm/treewm/Makefile   (contents, props changed)

Modified: head/x11-wm/treewm/Makefile
==============================================================================
--- head/x11-wm/treewm/Makefile	Thu Dec 20 05:33:28 2012	(r309279)
+++ head/x11-wm/treewm/Makefile	Thu Dec 20 05:35:39 2012	(r309280)
@@ -1,46 +1,55 @@
-# New ports collection makefile for:	treewm
-# Date created:		09 Sep 2003
-# Whom:			Rudolf Polzer
-#
+# Created by: Rudolf Polzer
 # $FreeBSD$
-#
 
 PORTNAME=	treewm
 PORTVERSION=	0.4.5
-PORTREVISION=	5
+PORTREVISION=	6
 CATEGORIES=	x11-wm
 MASTER_SITES=	SF
 
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Window Manager that arranges the windows in a tree
 
+LICENSE=	GPLv2
+
 BUILD_DEPENDS=	xmkmf:${PORTSDIR}/devel/imake
 
+OPTIONS_DEFINE=	DOCS EXAMPLES
+
 USE_BZIP2=	yes
-USE_GMAKE=	yes
 USE_XORG=	x11 ice sm xext xmu xpm xt xxf86vm
+USE_GMAKE=	yes
+MAKE_JOBS_SAFE=	yes
 
-PKGMESSAGE=	${WRKDIR}/pkg-message
+SUB_FILES=	pkg-message
 
-PORTDOCS=	AUTHORS ChangeLog INSTALL PROBLEMS README README.tiling TODO default.cfg sample.cfg
+PORTDOCS=	AUTHORS ChangeLog INSTALL PROBLEMS README README.tiling TODO
+PORTEXAMPLES=	default.cfg sample.cfg
 
-post-patch:
-	@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|; s|/usr/X11R6|${LOCALBASE}|g' ${WRKSRC}/Makefile
+.include <bsd.port.options.mk>
 
-post-build:
-	@${SED} 's|%%D%%|${DOCSDIR}|g' ${PKGDIR}/pkg-message >${PKGMESSAGE}
+post-patch:
+	@${REINPLACE_CMD} -e \
+		'/^PREFIX/s| =| ?=| ; \
+		/^CXXFLAGS/s| =| ?=| ; \
+		s|/usr/X11R6|${LOCALBASE}|g' ${WRKSRC}/Makefile
 
 do-install:
-	${MKDIR} ${DATADIR}
-	${MKDIR} ${DATADIR}/pixmaps
 	${INSTALL_PROGRAM} ${WRKSRC}/src/treewm ${PREFIX}/bin
 	${INSTALL_PROGRAM} ${WRKSRC}/xprop/xprop ${PREFIX}/bin/xprop-treewm
 	${INSTALL_PROGRAM} ${WRKSRC}/xkill/xkill ${PREFIX}/bin/xkill-treewm
+	${MKDIR} ${DATADIR}/pixmaps
 	${INSTALL_DATA} ${WRKSRC}/src/pixmaps/*.xpm ${DATADIR}/pixmaps
-.if !defined(NOPORTDOCS)
-	${MKDIR} ${DOCSDIR}
-.for FILE in ${PORTDOCS}
-	${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}
+.if ${PORT_OPTIONS:MDOCS}
+	@${MKDIR} ${DOCSDIR}
+.for F in ${PORTDOCS}
+	${INSTALL_DATA} ${WRKSRC}/${F} ${DOCSDIR}
+.endfor
+.endif
+.if ${PORT_OPTIONS:MEXAMPLES}
+	@${MKDIR} ${EXAMPLESDIR}
+.for F in ${PORTEXAMPLES}
+	${INSTALL_DATA} ${WRKSRC}/${F} ${EXAMPLESDIR}
 .endfor
 .endif
 	@${CAT} ${PKGMESSAGE}

Added: head/x11-wm/treewm/files/patch-xprop__xprop.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-wm/treewm/files/patch-xprop__xprop.c	Thu Dec 20 05:35:39 2012	(r309280)
@@ -0,0 +1,49 @@
+--- xprop/xprop.c.orig	2002-03-14 21:14:47.000000000 +0900
++++ xprop/xprop.c	2012-09-13 15:21:40.000000000 +0900
+@@ -586,7 +586,7 @@
+ {
+ 	if (--_buf_len<0) {
+ 		_buf_ptr[0]='\0';
+-		return;
++		return 0;
+ 	}
+ 	_buf_ptr++[0] = c;
+ }
+@@ -1357,10 +1357,10 @@
+     if (id == None) {
+ 	fprintf (stderr, "%s:  no such property \"%s\"\n",
+ 		 program_name, propname);
+-	return;
++	return 0;
+     }
+     XDeleteProperty (dpy, w, id);
+-    return;
++    return 0;
+ }
+ 
+ thunk *Handle_Prop_Requests(argc, argv)
+@@ -1514,13 +1514,13 @@
+   printf("%s", prop);
+   if (!(atom = Parse_Atom(prop, True))) {
+ 	  printf(":  no such atom on any window.\n");
+-	  return;
++	  return 0;
+   }
+ 
+   data = Get_Property_Data_And_Type(atom, &length, &type, &size);
+   if (!size) {
+           puts(":  not found.");
+-	  return;
++	  return 0;
+   }
+ 
+   if (!notype && type)
+@@ -1535,7 +1535,7 @@
+   if (fsize!=size && fsize!=0) {
+ 	printf(": Type mismatch: assumed size %d bits, actual size %d bits.\n",
+ 	 fsize, size);
+-	  return;
++	  return 0;
+   }
+ 
+   thunks = Break_Down_Property(data, (int)length, format, size);

Added: head/x11-wm/treewm/files/pkg-message.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-wm/treewm/files/pkg-message.in	Thu Dec 20 05:35:39 2012	(r309280)
@@ -0,0 +1,14 @@
+--------------------------------------------------------------------------
+
+The treewm package has been successfully installed.
+
+NB:  Sample configuration files have been installed to
+%%EXAMPLESDIR%% as "default.cfg" and "sample.cfg".
+Users can look at them as well as the README in the same directory to
+write their .treewmrc in their homedir. Also, please take a look at
+
+  WWW: http://www.informatik.uni-frankfurt.de/~polzer/treewmdurchnull/downloads/treewm-examples-en.tar.bz2
+
+for further hints and examples about configuring treewm.
+
+--------------------------------------------------------------------------



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