ports/94614: graphics/ImageMagick: fix pkg-config file when WITH_IMAGEMAGICK_THREADS

Mario Sergio Fujikawa Ferreira lioux at FreeBSD.org
Fri Mar 17 20:00:39 UTC 2006


>Number:         94614
>Category:       ports
>Synopsis:       graphics/ImageMagick: fix pkg-config file when WITH_IMAGEMAGICK_THREADS
>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 Mar 17 20:00:33 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Mario Sergio Fujikawa Ferreira
>Release:        FreeBSD 6.1-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD exxodus.fedaykin.here 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #2: Thu Mar 2 16:14:49 BRT 2006 lioux at exxodus:/usr/obj-6.x/usr/src-6.x/sys/LIOUX i386

>Description:

	When ImageMagick is built with thread support, some ports depending on
it do not detect ImageMagick correctly. This is a result of ImageMagick not
adding the proper thread flags on its pkg-config files.

>How-To-Repeat:

	Build graphics/ImageMagick with thread support then try building
multimedia/transcode WITH_IMAGEMAGICK

>Fix:

--- patch-Makefile begins here ---
--- Makefile.orig	Fri Mar 17 16:37:05 2006
+++ Makefile	Fri Mar 17 16:51:07 2006
@@ -7,7 +7,7 @@
 
 PORTNAME=	ImageMagick
 PORTVERSION=	6.2.5.5
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	graphics perl5
 MASTER_SITES=	ftp://ftp.nluug.nl/pub/ImageMagick/ \
 		${MASTER_SITE_LOCAL:S/%SUBDIR%/pav/}
@@ -52,8 +52,10 @@
      defined(PERL_THREADED) && ${PERL_THREADED} == "true")
 CONFIGURE_ARGS+=	--with-threads
 CONFIGURE_ENV+=		PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" PTHREAD_LIBS="${PTHREAD_LIBS}"
+WITH_IMAGEMAGICK_THREADS=yes
 .else
 CONFIGURE_ARGS+=	--without-threads
+.undef WITH_IMAGEMAGICK_THREADS
 .endif
 
 # Faster, but poor quality
@@ -227,6 +229,16 @@
 	@${PERL} -pi -e 's|<malloc.h>|<stdlib.h>|g' ${WRKSRC}/ltdl/ltdl.c
 	@${PERL} -pi -e 's|timestamp: %ld|timestamp: %d|g' \
 		${WRKSRC}/magick/xwindow.c
+.if defined(WITH_IMAGEMAGICK_THREADS)
+. for pkg_config_file in \
+	Magick++/lib/ImageMagick++.pc.in \
+	wand/Wand.pc.in \
+	magick/ImageMagick.pc.in
+	@${PERL} -pi -e 's|^(Libs.+)$$|\1 ${PTHREAD_LIBS}|; \
+		s|^(Cflags.+)$$|\1 ${PTHREAD_CFLAGS}|' \
+		${WRKSRC}/${pkg_config_file}
+. endfor
+.endif
 
 post-install:
 .if defined(WITHOUT_IMAGEMAGICK_16BIT_PIXEL)
--- patch-Makefile ends here ---


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



More information about the freebsd-ports-bugs mailing list