Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Oct 2011 15:57:32 -0500
From:      Zhihao Yuan <lichray@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/161345: x11/xscreensaver: [PATCH] fixes build; improvements
Message-ID:  <4e8e1643.ca88ec0a.6e72.ffffecde@mx.google.com>
Resent-Message-ID: <201110062100.p96L0JvT027126@freefall.freebsd.org>

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

>Number:         161345
>Category:       ports
>Synopsis:       x11/xscreensaver: [PATCH] fixes build; improvements
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 06 21:00:19 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Zhihao Yuan
>Release:        FreeBSD 8.2-STABLE amd64
>Organization:
Northern Illinois University
>Environment:
System: FreeBSD compaq.yuetime 8.2-STABLE FreeBSD 8.2-STABLE #9 r225739: Sat Sep 24 04:14:17 CDT 2011 lichray@compaq.yuetime:/usr/obj/home/lichray/devel/freebsd-stable/sys/HOUKAGO amd64


	
>Description:
	
	-lintl is required to build xscreensaver; restore the ldflag.
	Several improvements:
	1. Replaces cp+sed with REINPLACE_CMD;
	2. Makes p5-libwww and netpbm optional (only 2 plug-ins require them);
	3. Removes -O0 on amd64. No longer needed.
>How-To-Repeat:
	
>Fix:

	

--- patch-xscreensaver_1 begins here ---
diff -ruN --exclude=CVS /usr/ports/x11/xscreensaver.orig/Makefile /usr/ports/x11/xscreensaver/Makefile
--- /usr/ports/x11/xscreensaver.orig/Makefile	2011-10-01 01:05:36.000000000 -0500
+++ /usr/ports/x11/xscreensaver/Makefile	2011-10-06 15:41:00.112362842 -0500
@@ -7,6 +7,7 @@
 
 PORTNAME=	xscreensaver
 PORTVERSION=	5.15
+PORTREVISION=	1
 CATEGORIES?=	x11
 MASTER_SITES=	http://www.jwz.org/xscreensaver/ \
 		http://dougbarton.us/Downloads/
@@ -20,9 +21,6 @@
 		xml2.5:${PORTSDIR}/textproc/libxml2 \
 		glade-2.0.0:${PORTSDIR}/devel/libglade2
 
-RUN_DEPENDS=	${SITE_PERL}/LWP/Simple.pm:${PORTSDIR}/www/p5-libwww \
-		giftopnm:${PORTSDIR}/graphics/netpbm
-
 MAKE_JOBS_SAFE=	yes
 
 USE_XORG=	xpm
@@ -39,6 +37,7 @@
 
 OPTIONS=	KERBEROS "Add support for kerberos" off \
 		PAM "Add support for pam authentication" off \
+		WWW "Enable web access for plugins" off \
 		SETUID_HACKS "Install sonar hack suid so it can ping" off \
 		FIREF "Add extra port x11/fireflies" off \
 		XAOS1 "Add extra port graphics/xaos" off \
@@ -62,6 +61,10 @@
 CONFIGURE_ARGS+=	--without-pam
 PLIST_SUB+=		PAM="@comment not installed: "
 .endif
+.if defined(WITH_WWW)
+RUN_DEPENDS=	${SITE_PERL}/LWP/Simple.pm:${PORTSDIR}/www/p5-libwww \
+		giftopnm:${PORTSDIR}/graphics/netpbm
+.endif
 .if defined(WITH_SETUID_HACKS)
 CONFIGURE_ARGS+=	--with-setuid-hacks
 .endif
@@ -132,24 +135,18 @@
 	companioncube.6 hilbert.6 tronbit.6 \
 	xscreensaver-gl-helper.6
 
-.if ${ARCH} == "amd64"
-CFLAGS+=	-O0
-.endif
-
 post-patch:
-	@ ${CP} ${WRKSRC}/configure ${WRKSRC}/configure.Patched
-	@ ${SED} -e 's#-lpthread#${PTHREAD_LIBS}#g' \
+	@ ${REINPLACE_CMD} -e 's#-lpthread#${PTHREAD_LIBS}#g' \
 		-e 's#malloc.h#stdlib.h#g' \
 		-e 's#/usr/X11R6#${LOCALBASE}#g' \
-		${WRKSRC}/configure.Patched > ${WRKSRC}/configure
-	@ ${CP} ${WRKSRC}/hacks/vidwhacker ${WRKSRC}/hacks/vidwhacker.presed
-	@ ${SED} -e '329s#.*#      $$fn = "$$imagedir/$$fn";#' \
-	    ${WRKSRC}/hacks/vidwhacker.presed > ${WRKSRC}/hacks/vidwhacker
+		-e '/sed.*-lintl/d' \
+		${WRKSRC}/configure
+	@ ${REINPLACE_CMD} -e '329s#.*#      $$fn = "$$imagedir/$$fn";#' \
+	    ${WRKSRC}/hacks/vidwhacker
 .if defined(WITH_PAM)
 .for f in driver/passwd-pam.c driver/xscreensaver.man
-	@ ${CP} ${WRKSRC}/${f} ${WRKSRC}/${f}.presed
-	@ ${SED} -e "s#/etc/pam.d#${PREFIX}/etc/pam.d#g" \
-	    ${WRKSRC}/${f}.presed > ${WRKSRC}/${f}
+	@ ${REINPLACE_CMD} -e "s#/etc/pam.d#${PREFIX}/etc/pam.d#g" \
+	    ${WRKSRC}/${f}
 .endfor
 	@ ${CP} ${FILESDIR}/xscreensaver.pam ${WRKSRC}/driver/xscreensaver.pam
 .else
--- patch-xscreensaver_1 ends here ---


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4e8e1643.ca88ec0a.6e72.ffffecde>