summaryrefslogtreecommitdiff
path: root/extra/xfig
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /extra/xfig
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'extra/xfig')
-rw-r--r--extra/xfig/LICENSE33
-rw-r--r--extra/xfig/PKGBUILD63
-rw-r--r--extra/xfig/xfig-3.2.4-redhat.patch31
-rw-r--r--extra/xfig/xfig-3.2.5-color-resources.patch39
-rw-r--r--extra/xfig/xfig-3.2.5-enable-Xaw3d.patch18
-rw-r--r--extra/xfig/xfig-3.2.5-fhs.patch12
-rw-r--r--extra/xfig/xfig-3.2.5-missing-protos.patch11
-rw-r--r--extra/xfig/xfig-3.2.5-urwfonts.patch79
-rw-r--r--extra/xfig/xfig-3.2.5b-fix-eps-reading.patch46
-rw-r--r--extra/xfig/xfig.3.2.5-modularX.patch28
-rw-r--r--extra/xfig/xfig.desktop47
-rw-r--r--extra/xfig/xfig.install11
12 files changed, 418 insertions, 0 deletions
diff --git a/extra/xfig/LICENSE b/extra/xfig/LICENSE
new file mode 100644
index 000000000..5b38ccff8
--- /dev/null
+++ b/extra/xfig/LICENSE
@@ -0,0 +1,33 @@
+Excerpt of the README from xfig/transfig - legal notice:
+---------------------------------------------------------------------------
+
+THE LAWRENCE BERKELEY NATIONAL LABORATORY DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL,
+INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+***************************************************************************
+NEW COPYRIGHT/PERMISSION NOTICE:
+
+The xfig copyright and permission notice has changed (again) slightly in
+version 3.2.5. It now states that:
+
+ FIG : Facility for Interactive Generation of figures
+ Copyright (c) 1985-1988 by Supoj Sutanthavibul
+ Parts Copyright (c) 1989-2002 by Brian V. Smith
+ Parts Copyright (c) 1991 by Paul King
+
+ Any party obtaining a copy of these files is granted, free of charge, a
+ full and unrestricted irrevocable, world-wide, paid up, royalty-free,
+ nonexclusive right and license to deal in this software and documentation
+ files (the "Software"), including without limitation the rights to use,
+ copy, modify, merge, publish distribute, sublicense and/or sell copies of
+ the Software, and to permit persons who receive copies from any such
+ party to do so, with the only requirement being that the above copyright
+ and this permission notice remain intact.
+
+The license for 3.2.4 didn't allow selling xfig unless it was simply included in a
+collection of programs (e.g. a CD) that one was selling.
diff --git a/extra/xfig/PKGBUILD b/extra/xfig/PKGBUILD
new file mode 100644
index 000000000..45c07d0dc
--- /dev/null
+++ b/extra/xfig/PKGBUILD
@@ -0,0 +1,63 @@
+# $Id: PKGBUILD 101110 2010-11-28 02:40:08Z eric $
+# Maintainer: Eric Belanger <eric@archlinux.org>
+
+pkgname=xfig
+pkgver=3.2.5b
+pkgrel=5
+pkgdesc="An interactive drawing tool"
+arch=('i686' 'x86_64')
+url="http://www.xfig.org/userman/"
+license=('custom')
+depends=('libpng' 'libjpeg' 'xaw3d' 'libxi' 'desktop-file-utils' 'gsfonts')
+makedepends=('imake')
+optdepends=('transfig: to use the frontend to convert fig files')
+options=('!makeflags' '!emptydirs')
+install=xfig.install
+source=(http://downloads.sourceforge.net/mcj/${pkgname}.${pkgver}.full.tar.gz \
+ xfig-3.2.4-redhat.patch xfig-3.2.5-color-resources.patch \
+ xfig-3.2.5-enable-Xaw3d.patch xfig-3.2.5-urwfonts.patch \
+ xfig-3.2.5-fhs.patch xfig-3.2.5-missing-protos.patch \
+ xfig.3.2.5-modularX.patch xfig-3.2.5b-fix-eps-reading.patch LICENSE xfig.desktop)
+md5sums=('499b0ce103a6b353453bf7e327f9a3b9' '5c2bc208c8ee852bc9ffa00dcbfd8241'\
+ 'a4b91e4aaf48ed07f4a579a1f692ef82' '46c6fb15d26c9fe03e558bdacc0b0a53'\
+ 'c5b7dc054063f02c6bfcd132dae82b6f' 'b532871c792716465e3b05967bcfba10'\
+ 'de059a6b8ce287942c7da35d19ee46f3' '7347389f7fdecd582579845df0c0b664'\
+ 'fa14e85b5365d07ca8deca9ea47d4e6a' 'f405b7a96f3401c12153fe6170a7d8f1'\
+ '8ac2de637c9148aa4a32978910822230')
+sha1sums=('0730d7e6bc217c0de02682efb0078821512bb542' '926ad99c7221baa4aa9e9737722958860b2700fc'\
+ 'b7c03fb70066ff476a4039a8c0f8930c15edef68' '33bff26b42ce164e79de11808b5b34b363f0d59f'\
+ 'e595ccdbe293ea0fdecbf59a2192ae57ced2c8eb' '39bec6bac9746b643b05fd1286826113ede07ff6'\
+ 'bd76cd50be6a5789cfd6f182309cfd7056be04f3' 'a1285f4e61ad2eec040460ab03e8022098e7f78e'\
+ '12a64ddaf65a73e23ef74f31483515a0e262768c' '31edf4cfab708820ea3f114d095dfef5aa88e5aa'\
+ '9011b8fa6143e37525b28cc9800a3bf2d6b008d2')
+
+build() {
+ cd "${srcdir}/${pkgname}.${pkgver}"
+ patch -p1 < ../xfig-3.2.4-redhat.patch
+ patch -p1 < ../xfig-3.2.5-fhs.patch
+ patch -p1 < ../xfig.3.2.5-modularX.patch
+ patch -p1 < ../xfig-3.2.5-enable-Xaw3d.patch
+ patch -p1 < ../xfig-3.2.5-color-resources.patch
+ patch -p1 < ../xfig-3.2.5-urwfonts.patch
+ patch -p1 < ../xfig-3.2.5-missing-protos.patch
+ patch -p1 < ../xfig-3.2.5b-fix-eps-reading.patch
+ chmod 755 Libraries
+
+ xmkmf
+ make DOCDIR=/usr/share/doc
+}
+
+package() {
+ cd "${srcdir}/${pkgname}.${pkgver}"
+ make DESTDIR="${pkgdir}" DOCDIR=/usr/share/doc install.all
+ rm "${pkgdir}/usr/lib/X11/app-defaults"
+
+ find "${pkgdir}/usr/share/xfig/Libraries" -type f -exec chmod 0644 {} \;
+ find "${pkgdir}/usr/share/xfig/Libraries" -type d -exec chmod 0755 {} \;
+ find "${pkgdir}/usr/share/doc/xfig" -type f -exec chmod 0644 {} \;
+ find "${pkgdir}/usr/share/doc/xfig" -type d -exec chmod 0755 {} \;
+
+ install -D -m644 ../xfig.desktop "${pkgdir}/usr/share/applications/xfig.desktop"
+ install -D -m644 xfig.png "${pkgdir}/usr/share/pixmaps/xfig.png"
+ install -D -m644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/extra/xfig/xfig-3.2.4-redhat.patch b/extra/xfig/xfig-3.2.4-redhat.patch
new file mode 100644
index 000000000..da6f150b3
--- /dev/null
+++ b/extra/xfig/xfig-3.2.4-redhat.patch
@@ -0,0 +1,31 @@
+--- xfig.3.2.4/Fig.ad.redhat 2002-12-19 01:05:41.000000000 +0100
++++ xfig.3.2.4/Fig.ad 2003-05-06 11:45:15.000000000 +0200
+@@ -11,7 +11,7 @@
+ Fig*AllowShellResize: false
+
+ ! Image editor - can edit imported image
+-Fig.image_editor: xv
++Fig.image_editor: xdg-open
+
+ ! name of ghostscript (not ghostview)
+ Fig.ghostscript: gs
+@@ -20,16 +20,16 @@
+ ! This is for viewing the xfig html reference.
+ ! For netscape, this command will open the help pages in a running netscape,
+ ! or start a new netscape if one isn't already running
+-Fig.browser: firefox -remote 'openFile(%f)' || firefox %f
++Fig.browser: xdg-open %f
+
+ ! pdfviewer - put your favorite pdf viewer here.
+ ! This is for viewing the xfig how-to guide and man pages
+-Fig.pdfviewer: xpdf %f
++Fig.pdfviewer: xdg-open %f
+
+ ! Spell check program - put your favorite spelling check program here.
+ ! It must write the misspelled words to standard output.
+
+-Fig.spellcheckcommand: spell %f
++Fig.spellcheckcommand: aspell %f
+
+ ! delay before spinner automatically counts when pressed (milliseconds)
+ Fig.spinner_delay: 1000
diff --git a/extra/xfig/xfig-3.2.5-color-resources.patch b/extra/xfig/xfig-3.2.5-color-resources.patch
new file mode 100644
index 000000000..6cf1af906
--- /dev/null
+++ b/extra/xfig/xfig-3.2.5-color-resources.patch
@@ -0,0 +1,39 @@
+diff -up xfig.3.2.5/Fig-color.bisque.ad~ xfig.3.2.5/Fig-color.bisque.ad
+--- xfig.3.2.5/Fig-color.bisque.ad~ 2007-11-16 13:47:45.000000000 +0100
++++ xfig.3.2.5/Fig-color.bisque.ad 2007-11-16 13:47:52.000000000 +0100
+@@ -93,7 +93,7 @@ Fig*sideruler.background: gray95
+ Fig*topruler.background: gray95
+ Fig*sideruler.background: gray95
+ Fig*List*background: gray95
+-Fig*Scrollbar.background: gray95
++! Fig*Scrollbar.background: gray95
+
+ Fig*cancel.background: navajowhite1
+ Fig*dismiss.background: navajowhite1
+@@ -104,8 +104,8 @@ Fig*menu_divider.foreground: red
+ Fig*menu_divider.foreground: red
+
+ !##### Shadows
+-Fig*shadowWidth: 2
+-Fig*Label.shadowWidth: 1
++! Fig*shadowWidth: 2
++! Fig*Label.shadowWidth: 1
+ Fig*horizontal.shadowWidth: 2
+ Fig*Scrollbar.shadowWidth: 2
+ ! no shadows for update indicators
+@@ -136,3 +136,15 @@ Fig*color_box*topShadowPixel: gray80
+
+ Fig*toggle*bottomShadowPixel: gray80
+ Fig*toggle*topShadowPixel: gray50
++
++! repare damage done to scrollbar shadows non color resources file
++
++Fig*horizontal.topShadowPixel: gray95
++Fig*horizontal.bottomShadowPixel: gray50
++Fig*horizontal.topShadow: gray95
++Fig*horizontal.bottomShadow: gray50
++
++Fig*Scrollbar.topShadow: gray95
++Fig*Scrollbar.bottomShadow: gray50
++Fig*Scrollbar.topShadowPixel: gray95
++Fig*Scrollbar.bottomShadowPixel: gray50
diff --git a/extra/xfig/xfig-3.2.5-enable-Xaw3d.patch b/extra/xfig/xfig-3.2.5-enable-Xaw3d.patch
new file mode 100644
index 000000000..f4d113808
--- /dev/null
+++ b/extra/xfig/xfig-3.2.5-enable-Xaw3d.patch
@@ -0,0 +1,18 @@
+diff -up xfig.3.2.5/Imakefile.no-Xaw3d xfig.3.2.5/Imakefile
+--- xfig.3.2.5/Imakefile.no-Xaw3d 2007-11-16 10:38:18.000000000 +0100
++++ xfig.3.2.5/Imakefile 2007-11-16 10:38:49.000000000 +0100
+@@ -50,8 +50,8 @@ XAPPLOADDIR = /usr/share/X11/app-default
+ XCOMM Uncomment the following if you have David Hawkey's Xaw3D version 1.5E which has
+ XCOMM some new features, including "Tips", which replace xfig's "help balloons"
+ XCOMM NOTE: This is the default for many X systems now.
+
+-XCOMM #define XAW3D1_5E
++#define XAW3D1_5E
+
+ #ifdef XAW3D1_5E
+ DUSEXAW3D = -DXAW3D -DXAW3D1_5E
+- XAWLIB = -lXaw3d15e
++ XAWLIB = -lXaw3d
+ #else
+ XAW_SRC = w_menuentry.c SmeCascade.c SmeBSB.c SimpleMenu.c
+ XAW_OBJ = w_menuentry.o SmeCascade.o SmeBSB.o SimpleMenu.o
diff --git a/extra/xfig/xfig-3.2.5-fhs.patch b/extra/xfig/xfig-3.2.5-fhs.patch
new file mode 100644
index 000000000..a17d908a7
--- /dev/null
+++ b/extra/xfig/xfig-3.2.5-fhs.patch
@@ -0,0 +1,12 @@
+--- xfig.3.2.5/Imakefile.fhs 2006-10-11 01:19:22.000000000 +0200
++++ xfig.3.2.5/Imakefile 2007-04-16 14:04:45.000000000 +0200
+@@ -169,8 +169,7 @@
+ XFIGLIBDIR = $(LIBDIR)/xfig
+
+ XCOMM XFIGDOCDIR tells where the html and pdf documentation should go
+-XCOMM XFIGDOCDIR = $(DOCDIR)/xfig
+-XFIGDOCDIR = /usr/local/xfig/doc
++XFIGDOCDIR = $(DOCDIR)/xfig
+
+ XCOMM MANDIR tells where the standard man pages should go (no need to change it
+ XCOMM if you want the man pages installed in the standard place on your system
diff --git a/extra/xfig/xfig-3.2.5-missing-protos.patch b/extra/xfig/xfig-3.2.5-missing-protos.patch
new file mode 100644
index 000000000..181c52a69
--- /dev/null
+++ b/extra/xfig/xfig-3.2.5-missing-protos.patch
@@ -0,0 +1,11 @@
+diff -up xfig.3.2.5/u_draw.c~ xfig.3.2.5/u_draw.c
+--- xfig.3.2.5/u_draw.c~ 2008-04-03 15:58:23.000000000 +0200
++++ xfig.3.2.5/u_draw.c 2008-04-03 15:58:23.000000000 +0200
+@@ -43,6 +43,7 @@
+ #include "w_zoom.h"
+ #include "u_redraw.h"
+ #include "w_cursor.h"
++#include <X11/ImUtil.h>
+
+ static Boolean add_point(int x, int y);
+ static void init_point_array(void);
diff --git a/extra/xfig/xfig-3.2.5-urwfonts.patch b/extra/xfig/xfig-3.2.5-urwfonts.patch
new file mode 100644
index 000000000..7bc766bd9
--- /dev/null
+++ b/extra/xfig/xfig-3.2.5-urwfonts.patch
@@ -0,0 +1,79 @@
+--- xfig.3.2.4/u_fonts.c 2002-09-09 13:36:58.000000000 -0400
++++ new-xfig-3.2.4/u_fonts.c 2006-10-11 00:29:07.000000000 -0400
+@@ -22,41 +22,41 @@
+ /* X11 font names */
+
+ struct _xfstruct x_fontinfo[NUM_FONTS] = {
+- {"-*-times-medium-r-normal--", (struct xfont*) NULL},
+- {"-*-times-medium-i-normal--", (struct xfont*) NULL},
+- {"-*-times-bold-r-normal--", (struct xfont*) NULL},
+- {"-*-times-bold-i-normal--", (struct xfont*) NULL},
+- {"-*-avantgarde-book-r-normal--", (struct xfont*) NULL},
+- {"-*-avantgarde-book-o-normal--", (struct xfont*) NULL},
+- {"-*-avantgarde-demi-r-normal--", (struct xfont*) NULL},
+- {"-*-avantgarde-demi-o-normal--", (struct xfont*) NULL},
+- {"-*-bookman-light-r-normal--", (struct xfont*) NULL},
+- {"-*-bookman-light-i-normal--", (struct xfont*) NULL},
+- {"-*-bookman-demi-r-normal--", (struct xfont*) NULL},
+- {"-*-bookman-demi-i-normal--", (struct xfont*) NULL},
+- {"-*-courier-medium-r-normal--", (struct xfont*) NULL},
+- {"-*-courier-medium-o-normal--", (struct xfont*) NULL},
+- {"-*-courier-bold-r-normal--", (struct xfont*) NULL},
+- {"-*-courier-bold-o-normal--", (struct xfont*) NULL},
+- {"-*-helvetica-medium-r-normal--", (struct xfont*) NULL},
+- {"-*-helvetica-medium-o-normal--", (struct xfont*) NULL},
+- {"-*-helvetica-bold-r-normal--", (struct xfont*) NULL},
+- {"-*-helvetica-bold-o-normal--", (struct xfont*) NULL},
+- {"-*-helvetica-medium-r-narrow--", (struct xfont*) NULL},
+- {"-*-helvetica-medium-o-narrow--", (struct xfont*) NULL},
+- {"-*-helvetica-bold-r-narrow--", (struct xfont*) NULL},
+- {"-*-helvetica-bold-o-narrow--", (struct xfont*) NULL},
+- {"-*-new century schoolbook-medium-r-normal--", (struct xfont*) NULL},
+- {"-*-new century schoolbook-medium-i-normal--", (struct xfont*) NULL},
+- {"-*-new century schoolbook-bold-r-normal--", (struct xfont*) NULL},
+- {"-*-new century schoolbook-bold-i-normal--", (struct xfont*) NULL},
+- {"-*-palatino-medium-r-normal--", (struct xfont*) NULL},
+- {"-*-palatino-medium-i-normal--", (struct xfont*) NULL},
+- {"-*-palatino-bold-r-normal--", (struct xfont*) NULL},
+- {"-*-palatino-bold-i-normal--", (struct xfont*) NULL},
+- {"-*-symbol-medium-r-normal--", (struct xfont*) NULL},
+- {"-*-itc zapf chancery-medium-i-normal--", (struct xfont*) NULL},
+- {"-*-itc zapf dingbats-*-*-*--", (struct xfont*) NULL},
++ {"-urw-nimbus roman no9 l-medium-r-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus roman no9 l-medium-i-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus roman no9 l-bold-r-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus roman no9 l-bold-i-normal--", (struct xfont*) NULL},
++ {"-urw-urw gothic l-medium-r-normal--", (struct xfont*) NULL},
++ {"-urw-urw gothic l-medium-o-normal--", (struct xfont*) NULL},
++ {"-urw-urw gothic l-semibold-r-normal--", (struct xfont*) NULL},
++ {"-urw-urw gothic l-semibold-o-normal--", (struct xfont*) NULL},
++ {"-urw-urw bookman l-medium-r-normal--", (struct xfont*) NULL},
++ {"-urw-urw bookman l-medium-i-normal--", (struct xfont*) NULL},
++ {"-urw-urw bookman l-bold-r-normal--", (struct xfont*) NULL},
++ {"-urw-urw bookman l-bold-i-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus mono l-medium-r-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus mono l-medium-o-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus mono l-bold-r-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus mono l-bold-o-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus sans l-medium-r-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus sans l-medium-i-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus sans l-bold-r-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus sans l-bold-i-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus sans l condensed-medium-r-condensed--", (struct xfont*) NULL},
++ {"-urw-nimbus sans l condensed-medium-i-condensed--", (struct xfont*) NULL},
++ {"-urw-nimbus sans l condensed-bold-r-condensed--", (struct xfont*) NULL},
++ {"-urw-nimbus sans l condensed-bold-i-condensed--", (struct xfont*) NULL},
++ {"-urw-century schoolbook l-medium-r-normal--", (struct xfont*) NULL},
++ {"-urw-century schoolbook l-medium-i-normal--", (struct xfont*) NULL},
++ {"-urw-century schoolbook l-bold-r-normal--", (struct xfont*) NULL},
++ {"-urw-century schoolbook l-bold-i-normal--", (struct xfont*) NULL},
++ {"-urw-urw palladio l-medium-r-normal--", (struct xfont*) NULL},
++ {"-urw-urw palladio l-medium-i-normal--", (struct xfont*) NULL},
++ {"-urw-urw palladio l-bold-r-normal--", (struct xfont*) NULL},
++ {"-urw-urw palladio l-bold-i-normal--", (struct xfont*) NULL},
++ {"-urw-standard symbols l-medium-r-normal--", (struct xfont*) NULL},
++ {"-urw-urw chancery l-medium-i-normal--", (struct xfont*) NULL},
++ {"-urw-dingbats-medium-r-normal--", (struct xfont*) NULL},
+ };
+
+ /* Use the following font names for any font that doesn't exist in the table above.
diff --git a/extra/xfig/xfig-3.2.5b-fix-eps-reading.patch b/extra/xfig/xfig-3.2.5b-fix-eps-reading.patch
new file mode 100644
index 000000000..7601d20ea
--- /dev/null
+++ b/extra/xfig/xfig-3.2.5b-fix-eps-reading.patch
@@ -0,0 +1,46 @@
+diff -ur xfig.3.2.5b/f_readeps.c xfig.3.2.5b.new/f_readeps.c
+--- xfig.3.2.5b/f_readeps.c 2009-03-30 17:52:18.000000000 +0200
++++ xfig.3.2.5b.new/f_readeps.c 2010-11-25 16:53:54.328247928 +0100
+@@ -252,12 +252,13 @@
+ {
+ char buf[300];
+ FILE *tmpfp, *pixfile, *gsfile;
+- char *psnam, *driver;
++ char *driver;
+ int status, wid, ht, nbitmap, fd;
+ char tmpfile[PATH_MAX],
+ pixnam[PATH_MAX],
+ errnam[PATH_MAX],
+- gscom[2 * PATH_MAX];
++ gscom[2 * PATH_MAX],
++ psnam[PATH_MAX];
+
+ wid = urx - llx;
+ ht = ury - lly;
+@@ -307,19 +308,14 @@
+ /* for color, use pcx */
+ driver = "pcx256";
+ }
+- /* avoid absolute paths (for Cygwin with gswin32) by changing directory */
+- if (tmpfile[0] == '/') {
+- psnam = strrchr(tmpfile, '/');
+- *psnam = 0;
+- sprintf(gscom, "cd \"%s/\";", tmpfile);
+- *psnam++ = '/'; /* Restore name for unlink() below */
+- } else {
+- psnam = tmpfile;
+- gscom[0] = '\0';
++ /* Canonicalize the eps file filename, needed to "defeat" -dSAFER */
++ if (!realpath(tmpfile, psnam)) {
++ file_msg("Cannot canonicalize %s: %s\n", tmpfile, strerror(errno));
++ return False;
+ }
+- sprintf(&gscom[strlen(gscom)],
+- "%s -r72x72 -dSAFER -sDEVICE=%s -g%dx%d -sOutputFile=%s -q - > %s 2>&1",
+- appres.ghostscript, driver, wid, ht, pixnam, errnam);
++ sprintf(gscom,
++ "%s -r72x72 -sDEVICE=%s -g%dx%d -sOutputFile=%s -dDELAYSAFER -c '<< /PermitFileReading [ (%s)] >> setuserparams .locksafe' -dSAFER -q - > %s 2>&1",
++ appres.ghostscript, driver, wid, ht, pixnam, psnam, errnam);
+ if (appres.DEBUG)
+ fprintf(stderr,"calling: %s\n",gscom);
+ if ((gsfile = popen(gscom, "w")) == 0) {
diff --git a/extra/xfig/xfig.3.2.5-modularX.patch b/extra/xfig/xfig.3.2.5-modularX.patch
new file mode 100644
index 000000000..3b5ac5937
--- /dev/null
+++ b/extra/xfig/xfig.3.2.5-modularX.patch
@@ -0,0 +1,28 @@
+--- xfig.3.2.5/Imakefile.modularX 2007-04-16 14:27:49.000000000 +0200
++++ xfig.3.2.5/Imakefile 2007-04-16 14:29:18.000000000 +0200
+@@ -45,7 +45,7 @@
+ XCOMM different tree than the "correct" tree that your X system expects. The usual
+ XCOMM purpose of DESTDIR is to test an install process by installing in a benign area.
+
+-XCOMM XAPPLOADDIR = /home/user/xfig
++XAPPLOADDIR = /usr/share/X11/app-defaults
+
+ XCOMM Uncomment the following definition for XAW3D if you want to use
+ XCOMM the 3d Athena Widget Set (highly recommended!)
+@@ -166,12 +166,12 @@
+ XCOMM XFIGLIBDIR = $(LIBDIR)
+
+ XCOMM use this if you want the multi-key data base file in the standard X11 tree
+-XFIGLIBDIR = $(LIBDIR)/xfig
++XFIGLIBDIR = /usr/share/xfig
+
+ XCOMM XFIGDOCDIR tells where the html and pdf documentation should go
+ XFIGDOCDIR = $(DOCDIR)/xfig
+
+ XCOMM MANDIR tells where the standard man pages should go (no need to change it
+ XCOMM if you want the man pages installed in the standard place on your system
+-MANDIR = $(MANSOURCEPATH)$(MANSUFFIX)
++MANDIR = /usr/share/man/man1
+ XCOMM MANDIR = /usr/local/xfig/man
+
+ XCOMM If your system doesn't have strstr undefine the following definition
diff --git a/extra/xfig/xfig.desktop b/extra/xfig/xfig.desktop
new file mode 100644
index 000000000..c634a28e9
--- /dev/null
+++ b/extra/xfig/xfig.desktop
@@ -0,0 +1,47 @@
+[Desktop Entry]
+Encoding=UTF-8
+Categories=Application;Graphics;
+MimeType=image/fig;image/x-xfig;
+Exec=xfig
+Icon=xfig
+Type=Application
+Name=Xfig
+Name[eo]=XDesegno
+Name[et]=Ffig
+Name[ja]=xfig
+Name[no]=X-figur
+Comment=Xfig drawing application
+Comment[bg]=Xfig ïðîãðàìà çà ðèñóâàíå
+Comment[ca]=Aplicació de dibuix Xfig
+Comment[cs]=Aplikace pro kreslení vektorových obrázků
+Comment[da]=Xfig tegneprogram
+Comment[de]=Xfig-Zeichenprogramm
+Comment[el]=Xfig
+Comment[eo]=Desegnilo "Xfig"
+Comment[es]=Aplicación de diseño vectorial (objetos)
+Comment[et]=XFig joonistusprogramm
+Comment[fi]=Xfig vektoripiirto-ohjelma
+Comment[fr]=Programme de dessin objet Xfig
+Comment[gl]=Aplicación de debuxo (obxectos)
+Comment[he]=Xfig רויצה םושיי
+Comment[hr]=Program za crtanje
+Comment[hu]=Rajzolóprogram
+Comment[is]=Hlutbundið teikniforrit
+Comment[it]=Applicazione di disegno Xfig
+Comment[lt]=Xfig braižymo programa
+Comment[mk]=Едноставна апликација за векторско цртање
+Comment[nl]=Xfig-tekenprogramma
+Comment[no]=Xfig-tegneprogram
+Comment[no_NY]=Teikneprogrammet Xfig
+Comment[pl]=Aplikacja do kreślenia
+Comment[pt]=Aplicação de desenho
+Comment[ro]=Program de desenare vectorială
+Comment[ru]=Приложения для рисования векторной графики
+Comment[sk]=Xfig aplikácia pre kreslenie vektorových obrázkov
+Comment[sl]=Program za risanje Xfig
+Comment[sr]=Xfig prgram za vektorsko crtanje
+Comment[sv]=Xfig ritprogram
+Comment[ta]=Xfig Ũþø ÀÂýÀ¡Î
+Comment[tr]=Xfig çizim uygulaması
+Comment[uk]=Xfig
+Comment[zh_CN.GB2312]=Xfig 绘图应用程序
diff --git a/extra/xfig/xfig.install b/extra/xfig/xfig.install
new file mode 100644
index 000000000..f01585f79
--- /dev/null
+++ b/extra/xfig/xfig.install
@@ -0,0 +1,11 @@
+post_install() {
+ update-desktop-database -q
+ }
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install $1
+}