ports/123018: graphics/ImageMagick doesn't extract if archivers/lzmautils is installed
Jonathan Lennox
lennox at cs.columbia.edu
Wed Apr 23 16:00:02 UTC 2008
>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 at 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:
More information about the freebsd-ports-bugs
mailing list