Date: Wed, 23 Apr 2008 11:40:01 -0400 (EDT) From: Jonathan Lennox <lennox@cs.columbia.edu> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/123018: graphics/ImageMagick doesn't extract if archivers/lzmautils is installed Message-ID: <200804231540.m3NFe1ac012814@cnr.cs.columbia.edu> Resent-Message-ID: <200804231600.m3NG02LK084768@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 123018 >Category: ports >Synopsis: graphics/ImageMagick doesn't extract if archivers/lzmautils is installed >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Apr 23 16:00:02 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Jonathan Lennox >Release: FreeBSD 5.5-RELEASE-p20 i386 >Organization: Columbia University >Environment: System: FreeBSD cnr.cs.columbia.edu 5.5-RELEASE-p20 FreeBSD 5.5-RELEASE-p20 #27: Thu Apr 17 12:35:22 EDT 2008 lennox@cnr.cs.columbia.edu:/usr/obj/usr/src/sys/CNR i386 >Description: The graphics/ImageMagick port now uses the lzma-compressed distribution archive of the port. It has an EXTRACT_DEPENDS on archivers/lzma, checking for the lzma executable. Unfortunately, the archivers/lzmautils port also provides an lzma executable, with a different syntax for its command-line options. (The archivers/lzmautils port is a dependency of archivers/gtar, which I believe is why it happened to be installed on my system.) Thus, if archivers/lzmautils is installed, ImageMagick's EXTRACT_DEPENDS is satisfied, but the extraction fails, like this: ===> Extracting for ImageMagick-6.4.0.7 => MD5 Checksum OK for ImageMagick-6.4.0-7.tar.lzma. => SHA256 Checksum OK for ImageMagick-6.4.0-7.tar.lzma. ===> ImageMagick-6.4.0.7 depends on executable: lzma - found ===> ImageMagick-6.4.0.7 depends on file: /usr/local/bin/perl5.8.8 - found /usr/local/bin/lzma: invalid option -- s tar: Error opening archive: Empty input file: Inappropriate file type or format *** Error code 1 Stop in /usr/ports/graphics/ImageMagick. >How-To-Repeat: portinstall archivers/lzmautils portinstall graphics/ImageMagick >Fix: The following patch causes the ImageMagick makefile to detect whether archivers/lzma or archivers/lzmautils is installed, and adjust its extraction command accordingly. (archivers/lzmautils provides lzcat, whereas archivers/lzma does not.) A separate question is which port ImageMagick should use for its EXTRACT_DEPENDS. --- graphics/ImageMagick/Makefile.orig Wed Apr 23 11:24:03 2008 +++ graphics/ImageMagick/Makefile Wed Apr 23 11:29:59 2008 @@ -30,8 +30,6 @@ EXTRACT_DEPENDS= lzma:${PORTSDIR}/archiv WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:R} -EXTRACT_CMD= ${LOCALBASE}/bin/lzma d -EXTRACT_BEFORE_ARGS= -so USE_PERL5= yes USE_GNOME= gnomehack gnometarget pkgconfig USE_AUTOTOOLS= libltdl:15 @@ -79,6 +77,16 @@ OPTIONS= X11 "X11 support" on \ IMAGEMAGICK_GSLIB "libgs (Postscript SHLIB) support" off .include <bsd.port.pre.mk> + +# ${LOCALBASE}/bin/lzma from archivers/lzma and from archivers/lzmautils have different syntaxes. +.if exists(${LOCALBASE}/bin/lzcat) +# archivers/lzmautils +EXTRACT_CMD= ${LOCALBASE}/bin/lzcat +.else +# archivers/lzma +EXTRACT_CMD= ${LOCALBASE}/bin/lzma d +EXTRACT_BEFORE_ARGS= -so +.endif .if defined(WITH_GHOSTSCRIPT_GNU) && !defined(WITHOUT_IMAGEMAGICK_PDF) IGNORE= requires newer version of ghostscript >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200804231540.m3NFe1ac012814>