From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Bavier Subject: [PATCH 4/4] gnu: Add transfig. Date: Fri, 10 Oct 2014 13:19:50 -0500 Message-ID: <87mw93vlbt.fsf@member.fsf.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcelL-0001mv-PP for guix-devel@gnu.org; Fri, 10 Oct 2014 14:18:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XcelG-0002V7-Ol for guix-devel@gnu.org; Fri, 10 Oct 2014 14:17:59 -0400 Received: from mail-ig0-x22f.google.com ([2607:f8b0:4001:c05::22f]:35375) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcelG-0002Tw-Hq for guix-devel@gnu.org; Fri, 10 Oct 2014 14:17:54 -0400 Received: by mail-ig0-f175.google.com with SMTP id uq10so3749137igb.14 for ; Fri, 10 Oct 2014 11:17:54 -0700 (PDT) Received: from cooper.gmail.com (chippewa-nat.cray.com. [136.162.34.1]) by mx.google.com with ESMTPSA id mk5sm2367363igb.15.2014.10.10.11.17.53 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 10 Oct 2014 11:17:53 -0700 (PDT) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0004-gnu-Add-transfig.patch >From ece0a8dec5d95ccf84156e9e6c0c582639163b1e Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Fri, 10 Oct 2014 13:11:22 -0500 Subject: [PATCH 4/4] gnu: Add transfig. * gnu/packages/xfig.scm (transfig): New variable. --- gnu/packages/xfig.scm | 74 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/gnu/packages/xfig.scm b/gnu/packages/xfig.scm index 7cb2258..c382788 100644 --- a/gnu/packages/xfig.scm +++ b/gnu/packages/xfig.scm @@ -129,3 +129,77 @@ such as GIF, JPEG, EPSF (PostScript), etc. Those objects can be created, deleted, moved or modified. Attributes such as colors or line styles can be selected in various ways. For text, 35 fonts are available.") (license bsd-2))) + +(define-public transfig + (package + (name "transfig") + (version "3.2.5e") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/mcj/mcj-source/transfig." + version ".tar.gz")) + (sha256 + (base32 + "0i3p7qmg2w8qrad3pn42b0miwarql7yy0gpd49b1bpal6bqsiicf")))) + (build-system gnu-build-system) + (native-inputs + `(("imake" ,imake) + ("makedepend" ,makedepend))) + (inputs + `(("xfig" ,xfig) + ("libjpeg" ,libjpeg) + ("libpng" ,libpng) + ("libxpm" ,libxpm) + ("libx11" ,libx11) + ("zlib" ,zlib))) + (arguments + `(#:tests? #f + #:phases + (alist-replace + 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((imake (assoc-ref inputs "imake")) + (out (assoc-ref outputs "out"))) + (substitute* '("fig2dev/Imakefile" + "transfig/Imakefile") + (("XCOMM (BINDIR = )[[:graph:]]*" _ front) + (string-append front out "/bin")) + (("XCOMM USEINLINE") "USEINLINE") + ;; The variable name is deceptive. The directory is used as an + ;; installation path for bitmaps. + (("(XFIGLIBDIR =[[:blank:]]*)[[:graph:]]*" _ front) + (string-append front out "/lib")) + (("(XPMLIBDIR = )[[:graph:]]*" _ front) + (string-append front (assoc-ref inputs "libxpm") "/lib")) + (("(XPMINC = -I)[[:graph:]]*" _ front) + (string-append front (assoc-ref inputs "libxpm") "/include/X11")) + (("/usr/local/lib/fig2dev") (string-append out "/lib"))) + ;; The -a argument is required in order to pick up the correct paths + ;; to several X header files. + (zero? (system* "xmkmf" "-a")) + (substitute* '("Makefile" + "fig2dev/Makefile" + "transfig/Makefile") + ;; This imake variable somehow remains undefined + (("DefaultGcc2AMD64Opt") "-O2") + ;; Reset a few variable defaults that are set in imake templates + ((imake) out) + (("(MANPATH = )[[:graph:]]*" _ front) + (string-append front out "/share/man")) + (("(CONFDIR = )([[:graph:]]*)" _ front default) + (string-append front out default))))) + (alist-cons-after + 'install 'install/doc + (lambda _ + (zero? (system* "make" "install.man"))) + %standard-phases)))) + (home-page "http://www.xfig.org/") + (synopsis "Create portable LaTeX figures") + (description + "Transfig creates a makefile to translate figures described in Fig code +or PIC into a specified LaTeX graphics language. PIC files are identified by +the suffix \".pic\"; Fig files can be specified either with or without the +suffix \".fig\". Transfig also creates a TeX macro file appropriate to the +target language.") + (license bsd-2))) -- 1.7.9.5 --=-=-= -- Eric Bavier --=-=-=--