Bug 154530

Summary: [PATCH] graphics/libvisual04: Fix path conflict & take maintainership
Product: Ports & Packages Reporter: Chris Rees <utisoft>
Component: Individual Port(s)Assignee: Ade Lovett <ade>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Chris Rees 2011-02-05 19:20:10 UTC
	When graphics/libvisual04 and graphics/libvisual are both installed, the header file called by <libvisual%%VER%%/libvisual/libvisual.h> includes files from libvisual[02], which gives very strange errors. I've spent half an hour tearing my hair out over this while trying to port projectM_visual (requested in ports/152823)! This can be explained by -I${LOCALBASE}/include being searched before -I${LOCALBASE}/include/libvisual%%VER%%.

Fix: Patch attached. I've taken the liberty of changing maintainership to me too! PORTREVISION is also bumped.

	Unfortunately the fix requires a small hack to the build process; since the header files are looked for during build I've put a symlink in the right place. I think that this is the cleanest solution, and the 'mess' is deleted with the WRKSRC.

	Tested: http://tinderbox.bayofrum.net/index.php?action=display_markup_log&build=8.1-amnesiac&id=255
	http://tinderbox.bayofrum.net/index.php?action=display_markup_log&build=9-amnesiac&id=255
	http://tinderbox.bayofrum.net/index.php?action=display_markup_log&build=7.3-amnesiac&id=255

- Pass maintainership to submitter
- Remove conflicts with graphics/libvisual[02]

PR:
Submitted by:	Chris Rees <utisoft_at_gmail.com>



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.--LfgeGRfKVogreGoOUBShp6bN09jgNpHsHjUv8VW80M9vJhr0
Content-Type: text/plain; name="libvisual04-includes.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="libvisual04-includes.diff"

Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/graphics/libvisual04/Makefile,v
retrieving revision 1.19
diff -u -r1.19 Makefile
--- Makefile	4 Dec 2010 07:32:06 -0000	1.19
+++ Makefile	5 Feb 2011 17:37:04 -0000
@@ -1,5 +1,5 @@
-# New ports collection makefile for:	libvisual
-# Date created:		23 oktober 2004
+# New ports collection Makefile for:	libvisual
+# Date created:		23 Oktober 2004
 # Whom:			Koop Mast <kwm@FreeBSD.org>
 #
 # $FreeBSD: ports/graphics/libvisual04/Makefile,v 1.19 2010/12/04 07:32:06 ade Exp $
@@ -7,12 +7,12 @@
 
 PORTNAME=	libvisual
 PORTVERSION=	0.4.0
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	graphics
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
 PKGNAMESUFFIX=	04
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	utisoft@gmail.com
 COMMENT=	Abstraction library that sits between apps and visual plugin
 
 USE_AUTOTOOLS=	libtool
@@ -23,12 +23,18 @@
 LDFLAGS=	-L${LOCALBASE}/lib ${PTHREAD_LIBS}
 CONFIGURE_ENV=	CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
 USE_LDCONFIG=	yes
-PLIST_SUB=	VER=-0.4
+VER=		-0.4
+PLIST_SUB=	VER=${VER}
 
 post-patch:
 	@${REINPLACE_CMD} -e 's|-Wno-unused-variable||g;s|-O3|${CFLAGS}|g' \
 		${WRKSRC}/libvisual/Makefile.in
 	@${REINPLACE_CMD} -e 's|sys/sched.h||g' -e '/test.*==/s|==|=|g' ${WRKSRC}/configure
 	@${FIND} ${WRKSRC} -name Makefile.in | ${XARGS} ${REINPLACE_CMD} -e 's|$$<|$${.ALLSRC}|g'
+	@${FIND} ${WRKSRC} -name "*.h" | ${XARGS} ${REINPLACE_CMD} \
+		-e 's#include <libvisual/#include <libvisual${VER}/libvisual/#'
+	@${MKDIR} -p ${WRKSRC}/${PORTNAME}/${PORTNAME}${VER}
+	@${LN} -s ${WRKSRC}/${PORTNAME} \
+		${WRKSRC}/${PORTNAME}/${PORTNAME}${VER}/${PORTNAME}
 
 .include <bsd.port.mk>
How-To-Repeat: 	Install both graphics/libvisual and graphics/libvisual04, try to use the headers from libvisual04 and see the confusion.
Comment 1 Ade Lovett freebsd_committer freebsd_triage 2011-03-23 21:34:52 UTC
State Changed
From-To: open->closed

Committed with minor tweaks. 


Comment 2 Ade Lovett freebsd_committer freebsd_triage 2011-03-23 21:34:52 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ade

Committed with minor tweaks.
Comment 3 dfilter service freebsd_committer freebsd_triage 2011-03-23 21:34:58 UTC
ade         2011-03-23 21:34:44 UTC

  FreeBSD ports repository

  Modified files:
    graphics/libvisual04 Makefile 
  Log:
  Fix include file path conflict with other libvisual ports.
  Submitter also takes maintainership from ports@
  
  PR:             154530
  Submitted by:   Chris Rees <utisoft (at) gmail (dot) com>
  
  Revision  Changes    Path
  1.20      +9 -3      ports/graphics/libvisual04/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"