ports/181820: [patch] deskutils/xmdiary: remove USE_GCC=any

Tijl Coosemans tijl at FreeBSD.org
Wed Sep 4 17:10:00 UTC 2013


>Number:         181820
>Category:       ports
>Synopsis:       [patch] deskutils/xmdiary: remove USE_GCC=any
>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:   Wed Sep 04 17:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Tijl Coosemans
>Release:        FreeBSD 10.0-CURRENT i386
>Organization:
>Environment:
>Description:
The attached patch removes USE_GCC=any and fixes the build with clang
(change "unsigned int argc" into "int argc").
It also removes the scripts directory.  The scripts do not work with
the new patch in current.  The nomalloc script is replaced with a
REINPLACE_CMD and the noextradepend script no longer seems to be
necessary.
>How-To-Repeat:
>Fix:

--- xmdiary.patch begins here ---
Index: deskutils/xmdiary/Makefile
===================================================================
--- deskutils/xmdiary/Makefile	(revision 326283)
+++ deskutils/xmdiary/Makefile	(working copy)
@@ -3,7 +3,7 @@
 
 PORTNAME=	xmdiary
 PORTVERSION=	3.0.3
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	deskutils
 MASTER_SITES=	${MASTER_SITE_XCONTRIB}
 MASTER_SITE_SUBDIR=	office
@@ -15,17 +15,15 @@ COMMENT=	Personal and group calendar uti
 NO_CDROM=	Don't sell for profit
 EXTRACT_ONLY=	${DISTNAME}.tar.gz
 USES=		imake motif
-USE_GCC=	any
 USE_XORG=	x11 xext xp xpm xt
 MAN1=		xdaclunix.1 xdalarm.1 xdcustom.1 xddump.1 xdiary.1 xdinitdb.1 \
 		xdlight.1 xdnotify.1 xdprformat.1 xdremind.1 xdremove.1 \
 		xdrestore.1
 
 post-patch:
-	@${ECHO_MSG} removing the "malloc.h" includes
-	${SH} ${SCRIPTDIR}/nomalloc $(WRKSRC) 2>&1 > /dev/zero
-	@${ECHO_MSG} removing unnecessary DependTarget from Imakefile-s
-	${SH} ${SCRIPTDIR}/noextradepend $(WRKSRC) 2>&1 > /dev/zero
+	@${REINPLACE_CMD} -e 's/malloc\.h/stdlib.h/' \
+		${WRKSRC}/tools/LstLinked.c ${WRKSRC}/tools/System.c \
+		${WRKSRC}/xtools/xitClipboard.c ${WRKSRC}/xtools/xitInfoFile.c
 	${REINPLACE_CMD} -e 's|/usr/X11R6|${LOCALBASE}|g' \
 		-e 's|CcCmd gcc|CcCmd ${CC}|' '${WRKSRC}/XDiary.tmpl'
 
Index: deskutils/xmdiary/files/patch-warnings
===================================================================
--- deskutils/xmdiary/files/patch-warnings	(revision 326283)
+++ deskutils/xmdiary/files/patch-warnings	(working copy)
@@ -524,8 +524,9 @@
  ----------------------------------------------------------------------------*/
  
 -void 
+-  main( unsigned int argc, char *argv[] )
 +int 
-   main( unsigned int argc, char *argv[] )
++  main( int argc, char *argv[] )
  {
 --- xdalarm/xtmAlarmProc.c	1997-05-04 18:02:19.000000000 -0400
 +++ xdalarm/xtmAlarmProc.c	2013-03-27 21:54:22.000000000 -0400
@@ -533,8 +534,9 @@
  ----------------------------------------------------------------------------*/
  
 -void 
+-  main( unsigned int argc, char *argv[] )
 +int 
-   main( unsigned int argc, char *argv[] )
++  main( int argc, char *argv[] )
  {
 --- xdcustom/xtmCustom.c	1997-05-04 18:02:16.000000000 -0400
 +++ xdcustom/xtmCustom.c	2013-03-27 21:55:45.000000000 -0400
@@ -542,8 +544,9 @@
  ----------------------------------------------------------------------------*/
  
 -void 
+-  main( unsigned int argc, char *argv[] )
 +int 
-   main( unsigned int argc, char *argv[] )
++  main( int argc, char *argv[] )
  {
 @@ -616,5 +616,5 @@
  
@@ -586,8 +589,9 @@
  ----------------------------------------------------------------------------*/
  
 -void 
+-  main( unsigned int argc, char **argv )
 +int 
-   main( unsigned int argc, char **argv )
++  main( int argc, char **argv )
  {
 --- xdnotify/xtmNotify.c	1997-05-04 18:02:15.000000000 -0400
 +++ xdnotify/xtmNotify.c	2013-03-27 21:57:28.000000000 -0400
@@ -595,8 +599,9 @@
  ----------------------------------------------------------------------------*/
  
 -void 
+-  main( unsigned int argc, char *argv[] )
 +int 
-   main( unsigned int argc, char *argv[] )
++  main( int argc, char *argv[] )
  {
 --- xdprformat/xtmPrFormat.c	1997-05-04 18:02:15.000000000 -0400
 +++ xdprformat/xtmPrFormat.c	2013-03-27 21:58:19.000000000 -0400
@@ -612,8 +617,9 @@
  ----------------------------------------------------------------------------*/
  
 -void 
+-  main( unsigned int argc, char *argv[] )
 +int 
-   main( unsigned int argc, char *argv[] )
++  main( int argc, char *argv[] )
  {
 --- xdrestore/xtmRestore.c	1997-05-04 18:02:14.000000000 -0400
 +++ xdrestore/xtmRestore.c	2013-03-27 21:59:54.000000000 -0400
Index: deskutils/xmdiary/scripts/noextradepend
===================================================================
--- deskutils/xmdiary/scripts/noextradepend	(revision 326283)
+++ deskutils/xmdiary/scripts/noextradepend	(working copy)
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-for f in `find $1 -type f -name Imakefile -print | xargs grep -l Library.tmpl`
-do
-
-patch -p << END_OF_PATCH
---- $f.orig
-+++ $f
-@@ -30,1 +30,1 @@
--DependTarget()
-+/* DependTarget() -- Library.tmpl contains this now */
-
-END_OF_PATCH
-
-done
Index: deskutils/xmdiary/scripts/nomalloc
===================================================================
--- deskutils/xmdiary/scripts/nomalloc	(revision 326283)
+++ deskutils/xmdiary/scripts/nomalloc	(working copy)
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-for f in `find $1 -type f -name \*.\[ch\] -print | xargs grep -l malloc.h`
-do
-
-patch -p << END_OF_PATCH
---- $f.orig
-+++ $f
-@@ -10,1 +10,1 @@
--#include <malloc.h>
-+#include <stdlib.h>
-
-END_OF_PATCH
-
-done
-
--- xmdiary.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list