summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fisette <ribosome@gentoo.org>2004-12-27 19:59:13 +0000
committerOlivier Fisette <ribosome@gentoo.org>2004-12-27 19:59:13 +0000
commit4e27fca51b63239cac3508385a5bd0e99ea1a4de (patch)
tree926d7875ab68c8997dd6b94b81802d0dabac57f9 /sci-electronics/magic
parentMoving to sci-electronics/magic (diff)
downloadgentoo-2-4e27fca51b63239cac3508385a5bd0e99ea1a4de.tar.gz
gentoo-2-4e27fca51b63239cac3508385a5bd0e99ea1a4de.tar.bz2
gentoo-2-4e27fca51b63239cac3508385a5bd0e99ea1a4de.zip
Moved from app-sci/magic to sci-electronics/magic.
Diffstat (limited to 'sci-electronics/magic')
-rw-r--r--sci-electronics/magic/ChangeLog43
-rw-r--r--sci-electronics/magic/Manifest11
-rw-r--r--sci-electronics/magic/files/10magic1
-rw-r--r--sci-electronics/magic/files/defs.mak-7.155
-rw-r--r--sci-electronics/magic/files/defs.mak-7.1-r160
-rw-r--r--sci-electronics/magic/files/defs.mak-7.1-r260
-rw-r--r--sci-electronics/magic/files/digest-magic-7.1-r21
-rw-r--r--sci-electronics/magic/files/magic-7.1-fhs.patch29
-rw-r--r--sci-electronics/magic/files/magic-7.1-gcc3.2.patch12
-rw-r--r--sci-electronics/magic/files/magic-7.1-misc.patch464
-rw-r--r--sci-electronics/magic/magic-7.1-r2.ebuild69
-rw-r--r--sci-electronics/magic/metadata.xml5
12 files changed, 810 insertions, 0 deletions
diff --git a/sci-electronics/magic/ChangeLog b/sci-electronics/magic/ChangeLog
new file mode 100644
index 000000000000..5f9c758784bf
--- /dev/null
+++ b/sci-electronics/magic/ChangeLog
@@ -0,0 +1,43 @@
+# ChangeLog for app-sci/magic
+# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-electronics/magic/ChangeLog,v 1.1 2004/12/27 19:59:13 ribosome Exp $
+
+*magic-7.1-r2 (27 Dec 2004)
+
+ 27 Dec 2004; Olivier Fisette <ribosome@gentoo.org> +metadata.xml,
+ +files/10magic, +files/defs.mak-7.1, +files/defs.mak-7.1-r1,
+ +files/defs.mak-7.1-r2, +files/magic-7.1-fhs.patch,
+ +files/magic-7.1-gcc3.2.patch, +files/magic-7.1-misc.patch,
+ +magic-7.1-r2.ebuild:
+ Moved from app-sci/magic to sci-electronics/magic.
+
+ 18 Nov 2003; Patrick Kursawe <phosphan@gentoo.org> magic-7.1-r2.ebuild,
+ files/magic-7.1-misc.patch, files/magic-7.1-paths.patch,
+ files/magic-7.1-vararg.patch:
+ Should compile _and_ work now.
+
+*magic-7.1-r2 (17 Nov 2003)
+
+ 17 Nov 2003; Patrick Kursawe <phosphan@gentoo.org> magic-7.1-r2.ebuild,
+ files/magic-7.1-vararg.patch:
+ Working on bug 32956 - package compiles fine now, paths are still incorrect.
+
+ 15 Dec 2002; Daniel Ahlberg <aliz@gentoo.org> magic-7.1-r1.ebuild :
+ Marked as stable.
+
+*magic-7.1-r1 (03 Oct 2002)
+
+ 03 Oct 2002; Daniel Ahlberg <aliz@gentoo.org> :
+ Closes #8581. Thanks to D Kindlund <gentoo@kindlund.net> for reporting this and
+ to Michael Nygard <michael.nygard@halleysfifth.com> for providing the fix.
+
+* magic-7.1 (30 April 2002)
+
+ 25 Jul 2002; Daniel Ahlberg <aliz@gentoo.org> magic-7.1.ebuild :
+ Added KEYWORDS.
+
+ 30 April 2002; Michael Nygard <michael.nygard@halleysfifth.com> ChangeLog :
+
+ First Gentoo release of this package. Magic predates autoconf, so has its
+ own (manual) configuration script. I may work with the upstream
+ developers to transition to autoconf.
diff --git a/sci-electronics/magic/Manifest b/sci-electronics/magic/Manifest
new file mode 100644
index 000000000000..626a7f354550
--- /dev/null
+++ b/sci-electronics/magic/Manifest
@@ -0,0 +1,11 @@
+MD5 15851894079def3404d10a73381b6802 ChangeLog 1326
+MD5 8c623e53daafa025137077c6b65815bd metadata.xml 156
+MD5 251252129c5d54ac7d7f66a9d4c54e7d magic-7.1-r2.ebuild 1893
+MD5 fd0c6a30a11d997a83b1142215a0de39 files/defs.mak-7.1 1887
+MD5 fdb38b03c3fbdbb89eff8081e9953744 files/10magic 14
+MD5 0b1ea7223162f5c38659ab26393d20ec files/defs.mak-7.1-r1 2098
+MD5 9cd145fd8e71675bf5a1b7717e175e34 files/magic-7.1-fhs.patch 1310
+MD5 d81dbf84695b280009964a0bad9cf42c files/magic-7.1-gcc3.2.patch 593
+MD5 0d0472ae43dbddd46bc658a75f0c3b9e files/defs.mak-7.1-r2 2108
+MD5 ccf20deaf0d44a9a779f0f17695bd0b0 files/digest-magic-7.1-r2 62
+MD5 992da190c2a177e9c61c1fc564c49723 files/magic-7.1-misc.patch 14546
diff --git a/sci-electronics/magic/files/10magic b/sci-electronics/magic/files/10magic
new file mode 100644
index 000000000000..4e5909911f5d
--- /dev/null
+++ b/sci-electronics/magic/files/10magic
@@ -0,0 +1 @@
+CAD_HOME=/usr
diff --git a/sci-electronics/magic/files/defs.mak-7.1 b/sci-electronics/magic/files/defs.mak-7.1
new file mode 100644
index 000000000000..b450b385d4a7
--- /dev/null
+++ b/sci-electronics/magic/files/defs.mak-7.1
@@ -0,0 +1,55 @@
+# Copyright 1999-2002 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Michael Nygard <michael.nygard@halleysfifth.com>
+# /space/gentoo/cvsroot/gentoo-x86/header.txt,v 1.4 2001/12/16 18:19:08 verwilst Exp
+
+SHELL = /bin/sh
+
+VERSION = 7.1
+
+# Change CADDIR to install in a different place
+CADDIR = ${DESTDIR}/usr/lib
+BINDIR = ${DESTDIR}/usr/bin
+LIBDIR = ${DESTDIR}/usr/lib
+MANDIR = ${DESTDIR}/usr/share/man
+SYSDIR = ${DESTDIR}/usr/lib/magic/sys
+SCMDIR = ${DESTDIR}/usr/lib/magic/scm
+
+SCRIPTS = ${MAGICDIR}/scripts
+
+MODULES +=
+
+# Define your make environment
+# MAKE = gmake
+# MAKEFLAGS = -j4
+
+RM = rm -f
+CP = cp
+AR = ar
+ARFLAGS = crv
+LD = ld -r
+RANLIB = ranlib
+
+CC = gcc
+CPP = /lib/cpp -P -traditional
+CPPFLAGS = -I. -I${MAGICDIR}
+DFLAGS = -Dlinux -DSYSV -DF_OK=0 -DW_OK=2 -D__NO_STRING_INLINES -DISC ${READLINE_DEFS} -DNONMANHATTAN
+
+DEPEND_FLAG = -MM
+DEPEND_FILE = Depend
+
+GR_CFLAGS = -DX11 -DXLIB -I/usr/X11R6/include
+GR_LIBS = -lX11 -L/usr/X11R6/lib/ -lbsd
+GR_SRCS = ${X11_SRCS}
+GR_HELPER_SRCS = ${X11HELPER_SRCS}
+GR_HELPER_PROG = ${X11HELP_PROG}
+
+# Set your .magic to be installed
+# proto.magic - original
+# proto.magic.new - with X11 extensions
+# proto.magic-scm - load scheme extensions
+DOT_MAGIC_FILES = proto.magic.new proto.magic-scm
+
+OBJS = ${SRCS:.c=.o}
+LIB_OBJS = ${LIB_SRCS:.c=.o}
+CLEANS = ${OBJS} ${LIB_OBJS} lib${MODULE}.a lib${MODULE}.o ${MODULE}
diff --git a/sci-electronics/magic/files/defs.mak-7.1-r1 b/sci-electronics/magic/files/defs.mak-7.1-r1
new file mode 100644
index 000000000000..d763722633cc
--- /dev/null
+++ b/sci-electronics/magic/files/defs.mak-7.1-r1
@@ -0,0 +1,60 @@
+# This file was auto-generated by running the scripts/config program. Feel free
+# to change the values in here to suit your needs. Beware that running scripts/config
+# again will overwrite any changes!
+
+SHELL = /bin/sh
+
+VERSION = 7.1
+
+# Change CADDIR to install in a different place
+CADDIR = ${DESTDIR}/usr
+BINDIR = ${CADDIR}/bin
+LIBDIR = ${CADDIR}/lib
+MANDIR = ${CADDIR}/man
+SYSDIR = ${CADDIR}/lib/magic/sys
+SCMDIR = ${CADDIR}/lib/magic/scm
+
+SCRIPTS = ${MAGICDIR}/scripts
+
+MODULES += readline
+
+# Define your make environment
+# MAKE = gmake
+# MAKEFLAGS = -j4
+
+RM = rm -f
+CP = cp
+AR = ar
+ARFLAGS = crv
+LD = ld -r
+RANLIB = ranlib
+
+CC = gcc
+CPP = /lib/cpp -P -traditional
+CPPFLAGS = -I. -I${MAGICDIR} -I${MAGICDIR}/readline
+DFLAGS = -Dlinux -DSYSV -DF_OK=0 -DW_OK=2 -D__NO_STRING_INLINES -DISC -DFILE_LOCKS -DNONMANHATTAN
+CFLAGS = -g -march=i486
+# These CFLAGS may include switches for an optimized compile
+# CFLAGS = -g -m486 -O6 -fomit-frame-pointer
+
+READLINE_DEFS =
+READLINE_LIBS = -L${MAGICDIR}/readline/readline -lreadline -ltermcap
+
+DEPEND_FLAG = -MM
+DEPEND_FILE = Depend
+
+GR_CFLAGS = -DX11 -DXLIB -I/usr/X11R6/include
+GR_LIBS = -lX11 -L/usr/X11R6/lib/ -lbsd
+GR_SRCS = ${X11_SRCS}
+GR_HELPER_SRCS = ${X11HELPER_SRCS}
+GR_HELPER_PROG = ${X11HELP_PROG}
+
+# Set your .magic to be installed
+# proto.magic - original
+# proto.magic.new - with X11 extensions
+# proto.magic-scm - load scheme extensions
+DOT_MAGIC_FILES = proto.magic.new proto.magic-scm
+
+OBJS = ${SRCS:.c=.o}
+LIB_OBJS = ${LIB_SRCS:.c=.o}
+CLEANS = ${OBJS} ${LIB_OBJS} lib${MODULE}.a lib${MODULE}.o ${MODULE}
diff --git a/sci-electronics/magic/files/defs.mak-7.1-r2 b/sci-electronics/magic/files/defs.mak-7.1-r2
new file mode 100644
index 000000000000..8e9cf4365c95
--- /dev/null
+++ b/sci-electronics/magic/files/defs.mak-7.1-r2
@@ -0,0 +1,60 @@
+# This file was auto-generated by running the scripts/config program. Feel free
+# to change the values in here to suit your needs. Beware that running scripts/config
+# again will overwrite any changes!
+
+SHELL = /bin/sh
+
+VERSION = 7.1
+
+# Change CADDIR to install in a different place
+CADDIR = ${DESTDIR}/usr
+BINDIR = ${CADDIR}/bin
+LIBDIR = ${CADDIR}/lib
+MANDIR = ${CADDIR}/share/man
+SYSDIR = ${CADDIR}/share/magic/sys
+SCMDIR = ${CADDIR}/share/magic/scm
+
+SCRIPTS = ${MAGICDIR}/scripts
+
+MODULES += readline
+
+# Define your make environment
+# MAKE = gmake
+# MAKEFLAGS = -j4
+
+RM = rm -f
+CP = cp
+AR = ar
+ARFLAGS = crv
+LD = ld -r
+RANLIB = ranlib
+
+CC = gcc
+CPP = /lib/cpp -P -traditional
+CPPFLAGS = -I. -I${MAGICDIR} -I${MAGICDIR}/readline
+DFLAGS = -Dlinux -DSYSV -DF_OK=0 -DW_OK=2 -D__NO_STRING_INLINES -DISC -DFILE_LOCKS -DNONMANHATTAN
+CFLAGS = -g -march=i486
+# These CFLAGS may include switches for an optimized compile
+# CFLAGS = -g -m486 -O6 -fomit-frame-pointer
+
+READLINE_DEFS =
+READLINE_LIBS = -L${MAGICDIR}/readline/readline -lreadline -ltermcap
+
+DEPEND_FLAG = -MM
+DEPEND_FILE = Depend
+
+GR_CFLAGS = -DX11 -DXLIB -I/usr/X11R6/include
+GR_LIBS = -lX11 -L/usr/X11R6/lib/ -lbsd
+GR_SRCS = ${X11_SRCS}
+GR_HELPER_SRCS = ${X11HELPER_SRCS}
+GR_HELPER_PROG = ${X11HELP_PROG}
+
+# Set your .magic to be installed
+# proto.magic - original
+# proto.magic.new - with X11 extensions
+# proto.magic-scm - load scheme extensions
+DOT_MAGIC_FILES = proto.magic.new proto.magic-scm
+
+OBJS = ${SRCS:.c=.o}
+LIB_OBJS = ${LIB_SRCS:.c=.o}
+CLEANS = ${OBJS} ${LIB_OBJS} lib${MODULE}.a lib${MODULE}.o ${MODULE}
diff --git a/sci-electronics/magic/files/digest-magic-7.1-r2 b/sci-electronics/magic/files/digest-magic-7.1-r2
new file mode 100644
index 000000000000..b5c06b5e7f42
--- /dev/null
+++ b/sci-electronics/magic/files/digest-magic-7.1-r2
@@ -0,0 +1 @@
+MD5 13364b77566f5b47fd3f2783e188d3df magic-7.1.tar.gz 3860487
diff --git a/sci-electronics/magic/files/magic-7.1-fhs.patch b/sci-electronics/magic/files/magic-7.1-fhs.patch
new file mode 100644
index 000000000000..31764796257b
--- /dev/null
+++ b/sci-electronics/magic/files/magic-7.1-fhs.patch
@@ -0,0 +1,29 @@
+diff -uNr tmp/magic-7.1/misc/paths.h other/magic-7.1/misc/paths.h
+--- tmp/magic-7.1/misc/paths.h 2001-04-16 09:43:43.000000000 -0500
++++ other/magic-7.1/misc/paths.h 2002-04-30 23:07:48.000000000 -0500
+@@ -27,18 +27,18 @@
+ *
+ */
+
+-#define EXT_PATH "~cad/lib/magic/%s ~cad/lib/magic/tutorial"
+-#define DOT_MAGIC_PATH "~cad/lib/magic/sys ~ ."
++#define EXT_PATH "~cad/share/lib/magic/%s ~cad/share/lib/magic/tutorial"
++#define DOT_MAGIC_PATH "~cad/share/lib/magic/sys ~ ."
+
+ /*
+ * Paths used by 'magic'.
+ *
+ */
+-#define MAGIC_CMOS_PATH "~cad/lib/magic/cmos ~cad/lib/magic/tutorial"
+-#define MAGIC_NMOS_PATH "~cad/lib/magic/nmos ~cad/lib/magic/tutorial"
+-#define MAGIC_SYS_PATH ". ~cad/lib/magic/sys ~cad/lib/magic/sys/current"
+-#define MAGIC_SYS_DOT "~cad/lib/magic/sys/.magic"
+-#define MAGIC_LIB_PATH "~cad/lib/magic/%s ~cad/lib/magic/tutorial"
++#define MAGIC_CMOS_PATH "~cad/share/lib/magic/cmos ~cad/share/lib/magic/tutorial"
++#define MAGIC_NMOS_PATH "~cad/share/lib/magic/nmos ~cad/share/lib/magic/tutorial"
++#define MAGIC_SYS_PATH ". ~cad/share/lib/magic/sys ~cad/share/lib/magic/sys/current"
++#define MAGIC_SYS_DOT "~cad/share/lib/magic/sys/.magic"
++#define MAGIC_LIB_PATH "~cad/share/lib/magic/%s ~cad/share/lib/magic/tutorial"
+ #define HELPER_PATH ". ~cad/bin" /* Used by graphics drivers */
+
+ /*
diff --git a/sci-electronics/magic/files/magic-7.1-gcc3.2.patch b/sci-electronics/magic/files/magic-7.1-gcc3.2.patch
new file mode 100644
index 000000000000..7e7ef10c74a8
--- /dev/null
+++ b/sci-electronics/magic/files/magic-7.1-gcc3.2.patch
@@ -0,0 +1,12 @@
+diff -uNr tmp/magic-7.1/textio/txInput.c other/magic-7.1/textio/txInput.c
+--- tmp/magic-7.1/textio/txInput.c 2002-10-02 16:36:25.000000000 -0500
++++ other/magic-7.1/textio/txInput.c 2002-10-02 16:36:59.000000000 -0500
+@@ -579,7 +579,7 @@
+
+ free(line);
+
+- matches = (completion_func) ? completion_matches(text, completion_func) : (char **)NULL;
++ matches = (completion_func != NULL) ? completion_matches(text, completion_func) : (char **)NULL;
+
+ /* If we match nothing, inhibit any matching, except when matching files */
+ rl_attempted_completion_over = (matches == (char **)NULL &&
diff --git a/sci-electronics/magic/files/magic-7.1-misc.patch b/sci-electronics/magic/files/magic-7.1-misc.patch
new file mode 100644
index 000000000000..7fad5879afac
--- /dev/null
+++ b/sci-electronics/magic/files/magic-7.1-misc.patch
@@ -0,0 +1,464 @@
+diff -p1 -ur ext2sim/ext2sim-6.4.5/ext2sim.c magic-7.1/ext2sim/ext2sim-6.4.5/ext2sim.c
+--- ext2sim/ext2sim-6.4.5/ext2sim.c 2003-11-17 11:15:49.000000000 +0100
++++ magic-7.1/ext2sim/ext2sim-6.4.5/ext2sim.c 2003-11-17 11:26:52.000000000 +0100
+@@ -31,3 +31,3 @@ static char rcsid[] = "$Header: /ufs/rep
+ #include <ctype.h>
+-#include <varargs.h>
++
+ #include "magic.h"
+diff -p1 -ur ext2sim/ext2sim-6.4.5/ext2sim6_3.c magic-7.1/ext2sim/ext2sim-6.4.5/ext2sim6_3.c
+--- ext2sim/ext2sim-6.4.5/ext2sim6_3.c 2003-11-17 11:15:49.000000000 +0100
++++ magic-7.1/ext2sim/ext2sim-6.4.5/ext2sim6_3.c 2003-11-17 11:26:52.000000000 +0100
+@@ -31,3 +31,3 @@ static char rcsid[] = "$Header: /ufs/rep
+ #include <ctype.h>
+-#include <varargs.h>
++
+ #include "magic.h"
+diff -p1 -ur ext2sim/ext2sim.c magic-7.1/ext2sim/ext2sim.c
+--- ext2sim/ext2sim.c 2003-11-17 11:15:49.000000000 +0100
++++ magic-7.1/ext2sim/ext2sim.c 2003-11-17 11:26:52.000000000 +0100
+@@ -21,3 +21,3 @@ static char rcsid[] = "$Header: /ufs/rep
+ #include <stdlib.h>
+-#include <varargs.h>
++
+ #include "misc/magic.h"
+diff -p1 -ur ext2spice/ext2spice-6.4.5/ext2spice.c magic-7.1/ext2spice/ext2spice-6.4.5/ext2spice.c
+--- ext2spice/ext2spice-6.4.5/ext2spice.c 2003-11-17 11:15:47.000000000 +0100
++++ magic-7.1/ext2spice/ext2spice-6.4.5/ext2spice.c 2003-11-17 11:26:50.000000000 +0100
+@@ -35,3 +35,3 @@ static char rcsid[] = "$Header: /ufs/rep
+ #include <ctype.h>
+-#include <varargs.h>
++
+ #include "magic.h"
+diff -p1 -ur ext2spice/ext2spice.c magic-7.1/ext2spice/ext2spice.c
+--- ext2spice/ext2spice.c 2003-11-17 11:15:47.000000000 +0100
++++ magic-7.1/ext2spice/ext2spice.c 2003-11-17 12:00:37.000000000 +0100
+@@ -20,3 +20,4 @@ static char rcsid[] = "$Header: /ufs/rep
+ #include <ctype.h>
+-#include <varargs.h>
++#include <stdarg.h>
++
+ #include "misc/magic.h"
+@@ -1588,3 +1589,3 @@ int l, w;
+ /* debugging stuff */
+-#include <varargs.h>
++
+
+@@ -1592,7 +1593,5 @@ int l, w;
+
+-DBPRINT( va_alist )
+- va_dcl
++DBPRINT( const char * fmt, ... )
+ {
+ va_list args;
+- char *fmt;
+ FILE *fp;
+@@ -1601,5 +1600,4 @@ DBPRINT( va_alist )
+ if ( DBG ) {
+- va_start( args );
++ va_start( args,fmt );
+ fp = stderr ;
+- fmt = va_arg( args, char * );
+ (void) vsprintf( buff, fmt, args );
+diff -p1 -ur extcheck/extcheck.c magic-7.1/extcheck/extcheck.c
+--- extcheck/extcheck.c 2003-11-17 11:15:47.000000000 +0100
++++ magic-7.1/extcheck/extcheck.c 2003-11-17 11:26:50.000000000 +0100
+@@ -30,3 +30,3 @@ static char rcsid[] = "$Header: /ufs/rep
+ #include <ctype.h>
+-#include <varargs.h>
++
+ #include "misc/magic.h"
+diff -p1 -ur extflat/EFargs.c magic-7.1/extflat/EFargs.c
+--- extflat/EFargs.c 2003-11-17 11:15:49.000000000 +0100
++++ magic-7.1/extflat/EFargs.c 2003-11-17 12:01:36.000000000 +0100
+@@ -26,3 +26,3 @@ static char rcsid[] = "$Header: /ufs/rep
+ #include <stdlib.h>
+-#include <varargs.h>
++#include <stdarg.h>
+ #ifdef SYSV
+diff -p1 -ur extflat/EFread.c magic-7.1/extflat/EFread.c
+--- extflat/EFread.c 2003-11-17 11:15:49.000000000 +0100
++++ magic-7.1/extflat/EFread.c 2003-11-17 11:50:53.000000000 +0100
+@@ -26,3 +26,4 @@ static char rcsid[] = "$Header: /ufs/rep
+ #include <stdlib.h>
+-#include <varargs.h>
++#include <stdarg.h>
++
+ #include "misc/magic.h"
+@@ -35,2 +36,5 @@ static char rcsid[] = "$Header: /ufs/rep
+
++
++void efReadError(const char *fmt, ...);
++
+ /*
+@@ -536,5 +540,4 @@ start:
+ /*VARARGS1*/
+-efReadError(fmt, va_alist)
+- char *fmt;
+- va_dcl
++
++void efReadError(const char *fmt, ...)
+ {
+@@ -543,3 +546,3 @@ efReadError(fmt, va_alist)
+ (void) printf("%s, line %d: ", efReadFileName, efReadLineNum);
+- va_start(args);
++ va_start(args,fmt);
+ vfprintf(stdout, fmt, args);
+diff -p1 -ur graphics/X11Helper.c magic-7.1/graphics/X11Helper.c
+--- graphics/X11Helper.c 2003-11-17 11:15:48.000000000 +0100
++++ magic-7.1/graphics/X11Helper.c 2003-11-17 12:11:09.000000000 +0100
+@@ -13,2 +13,4 @@
+
++#define X11HELP_PROG "XHelper7"
++
+ #include <stdio.h>
+diff -p1 -ur graphics/grMain.c magic-7.1/graphics/grMain.c
+--- graphics/grMain.c 2003-11-17 11:15:48.000000000 +0100
++++ magic-7.1/graphics/grMain.c 2003-11-17 11:26:51.000000000 +0100
+@@ -122,3 +122,3 @@ static char rcsid[]="$Header: /ufs/repos
+ #ifndef NO_VARARGS
+-#include <varargs.h>
++
+ #endif
+diff -p1 -ur graphics/grX11su1.c magic-7.1/graphics/grX11su1.c
+--- graphics/grX11su1.c 2003-11-17 11:15:48.000000000 +0100
++++ magic-7.1/graphics/grX11su1.c 2003-11-17 12:13:22.000000000 +0100
+@@ -19,2 +19,5 @@
+ */
++
++#define X11HELP_PROG "XHelper7"
++
+ #define HIRES
+diff -p1 -ur lisp/other/txOutput.c magic-7.1/lisp/other/txOutput.c
+--- lisp/other/txOutput.c 2003-11-17 11:15:47.000000000 +0100
++++ magic-7.1/lisp/other/txOutput.c 2003-11-17 11:26:49.000000000 +0100
+@@ -41,3 +41,3 @@ static char rcsid[] = "$Header: /ufs/rep
+ #ifndef NO_VARARGS
+-#include <varargs.h>
++
+ #endif
+diff -p1 -ur mpack/magicStubs.c magic-7.1/mpack/magicStubs.c
+--- mpack/magicStubs.c 2003-11-17 11:15:48.000000000 +0100
++++ magic-7.1/mpack/magicStubs.c 2003-11-17 12:23:32.000000000 +0100
+@@ -55,5 +55,5 @@ void SigDisableInterrupts(){}
+ /*VARARGS1*/
+-void
++/*void
+ TxError(format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20)
+-char *format;
++const char *format;
+ {
+@@ -64,5 +64,5 @@ char *format;
+ }
+-
++*/
+ /*VARARGS1*/
+-void
++/*void
+ TxPrintf(format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20)
+@@ -73,3 +73,3 @@ char *format;
+ }
+-
++*/
+ void
+diff -p1 -ur tech/tech.h magic-7.1/tech/tech.h
+--- tech/tech.h 2003-11-17 11:15:47.000000000 +0100
++++ magic-7.1/tech/tech.h 2003-11-17 11:53:25.000000000 +0100
+@@ -25,2 +25,2 @@ typedef int SectionID; /* Mask set by T
+ extern char *TechDefault; /* Name of default technology */
+-extern void TechError();
++extern void TechError(const char *fmt, ...);
+diff -p1 -ur textio/textio.h magic-7.1/textio/textio.h
+--- textio/textio.h 2003-11-17 11:15:50.000000000 +0100
++++ magic-7.1/textio/textio.h 2003-11-17 12:19:56.000000000 +0100
+@@ -31,6 +31,6 @@
+ /* printing procedures */
+-extern void TxPrintf();
++extern void TxPrintf(const char*, ...);
+ extern bool TxPrintOn(); /* enables TxPrintf output */
+ extern bool TxPrintOff(); /* disables TxPrintf output */
+-extern void TxError();
++extern void TxError(const char *, ...);
+ extern void TxFlush();
+diff -p1 -ur textio/textioInt.h magic-7.1/textio/textioInt.h
+--- textio/textioInt.h 2003-11-17 11:15:50.000000000 +0100
++++ magic-7.1/textio/textioInt.h 2003-11-17 12:16:13.000000000 +0100
+@@ -58,2 +58,2 @@ typedef struct {
+ extern int TxGetInputEvent();
+-extern void txFprintfBasic();
++extern void txFprintfBasic(FILE *, const char*, ...);
+diff -p1 -ur textio/txOutput.c magic-7.1/textio/txOutput.c
+--- textio/txOutput.c 2003-11-17 11:15:50.000000000 +0100
++++ magic-7.1/textio/txOutput.c 2003-11-17 12:21:19.000000000 +0100
+@@ -18,2 +18,4 @@
+
++#include <stdarg.h>
++
+ #ifndef lint
+@@ -44,3 +46,3 @@ static char rcsid[] = "$Header: /ufs/rep
+ #ifndef NO_VARARGS
+-#include <varargs.h>
++
+ #endif
+@@ -84,12 +86,7 @@ static bool txPrintFlag = TRUE;
+ void
+-txFprintfBasic(va_alist)
+-va_dcl
++txFprintfBasic(FILE *f, const char * fmt, ...)
+ {
+ va_list args;
+- char *fmt;
+- FILE *f;
+
+- va_start(args);
+- f = va_arg(args, FILE *);
+- fmt = va_arg(args, char *);
++ va_start(args, fmt);
+ (void) GrVfprintf(f, fmt, args);
+@@ -137,7 +134,5 @@ txFprintfBasic(f, format, a1, a2, a3, a4
+ void
+-TxPrintf(va_alist)
+-va_dcl
++TxPrintf(const char *fmt, ...)
+ {
+ va_list args;
+- char *fmt;
+ FILE *f;
+@@ -158,4 +153,3 @@ va_dcl
+ TxUnPrompt();
+- va_start(args);
+- fmt = va_arg(args, char *);
++ va_start(args, fmt);
+ (void) GrVfprintf(f, fmt, args);
+@@ -166,4 +160,3 @@ va_dcl
+ {
+- va_start(args);
+- fmt = va_arg(args, char *);
++ va_start(args, fmt);
+ (void) GrVfprintf(f, fmt, args);
+@@ -308,7 +301,5 @@ TxFlush()
+ void
+-TxError(va_alist)
+-va_dcl
++TxError(const char *fmt, ...)
+ {
+ va_list args;
+- char *fmt;
+ FILE *f;
+@@ -323,4 +314,3 @@ va_dcl
+ TxUnPrompt();
+- va_start(args);
+- fmt = va_arg(args, char *);
++ va_start(args, fmt);
+ (void) GrVfprintf(f, fmt, args);
+@@ -330,4 +320,3 @@ va_dcl
+ else {
+- va_start(args);
+- fmt = va_arg(args, char *);
++ va_start(args,fmt);
+ (void) GrVfprintf(f, fmt, args);
+diff -p1 -ur utils/LIBtextio.c magic-7.1/utils/LIBtextio.c
+--- utils/LIBtextio.c 2003-11-17 11:15:48.000000000 +0100
++++ magic-7.1/utils/LIBtextio.c 2003-11-17 12:25:20.000000000 +0100
+@@ -19,2 +19,4 @@
+
++#include <stdarg.h>
++
+ #ifndef lint
+@@ -24,3 +26,3 @@ static char rcsid[] = "$Header: /ufs/rep
+ #include <stdio.h>
+-#include <varargs.h>
++
+
+@@ -67,5 +69,3 @@ TxGetLine(buf, size)
+ /*VARARGS*/
+-TxError(fmt, va_alist)
+- char *fmt;
+- va_dcl
++TxError(const char *fmt, ...)
+ {
+@@ -75,3 +75,3 @@ TxError(fmt, va_alist)
+ (void) fflush(stderr);
+- va_start(ap);
++ va_start(ap,fmt);
+ vfprintf(stderr, fmt, ap);
+@@ -98,5 +98,3 @@ TxError(fmt, va_alist)
+ /*VARARGS*/
+-TxPrintf(fmt, va_alist)
+- char *fmt;
+- va_dcl
++TxPrintf(const char *fmt, ...)
+ {
+@@ -106,3 +104,3 @@ TxPrintf(fmt, va_alist)
+ (void) fflush(stdout);
+- va_start(ap);
++ va_start(ap,fmt);
+ vfprintf(stdout, fmt, ap);
+diff -p1 -ur windows/windCmdAM.c magic-7.1/windows/windCmdAM.c
+--- windows/windCmdAM.c 2003-11-17 11:15:50.000000000 +0100
++++ magic-7.1/windows/windCmdAM.c 2003-11-17 12:29:08.000000000 +0100
+@@ -304,6 +304,3 @@ windFilesCmd(w, cmd)
+ } else {
+- if (errno < sys_nerr)
+- TxError("file descriptor %d: %s\n", fd, STRERROR(errno));
+- else
+- TxError("file descriptor %d: unknown error\n", fd);
++ TxError("file descriptor %d: %s\n", fd, strerror(errno));
+ }
+--- tech/tech.c 2003-11-17 13:18:16.000000000 +0100
++++ tech/tech.c.new 2003-11-17 13:20:13.000000000 +0100
+@@ -22,6 +22,7 @@
+
+ #include <stdio.h>
+ #include <ctype.h>
++#include <stdarg.h>
+ #include "misc/magic.h"
+ #include "utils/geometry.h"
+ #include "utils/utils.h"
+@@ -30,10 +31,6 @@
+ #include "graphics/graphics.h"
+ #include "utils/malloc.h"
+
+-#ifndef NO_VARARGS
+-#include <varargs.h>
+-#endif NO_VARARGS
+-
+ global char *TechDefault = NULL;
+
+ int techLineNumber;
+@@ -415,15 +412,12 @@
+ /*VARARGS0*/
+
+ void
+-TechError(va_alist)
+-va_dcl
++TechError(const char *fmt, ...)
+ {
+ va_list args;
+- char *fmt;
+
+ TechPrintLine();
+- va_start(args);
+- fmt = va_arg(args, char *);
++ va_start(args, fmt);
+ (void) GrVfprintf(stderr, fmt, args);
+ va_end(args);
+ }
+diff -ru Makefile magic-7.1/Makefile
+--- Makefile 2001-01-14 20:22:26.000000000 +0100
++++ magic-7.1/Makefile 2003-11-17 17:05:41.000000000 +0100
+@@ -56,7 +56,7 @@
+
+ install-real: install-dirs
+ for dir in ${INSTALL_CAD_DIRS}; do \
+- (cd $$dir && ${MAKE} install); done
++ (cd $$dir && ${MAKE} DESTDIR="${DESTDIR}" install); done
+
+ install-dirs:
+ ${MAGICDIR}/scripts/mkdirs ${BINDIR} ${MANDIR} ${SYSDIR} ${SCMDIR}
+diff -ru misc/paths.h magic-7.1/misc/paths.h
+--- misc/paths.h 2003-11-17 17:01:50.000000000 +0100
++++ magic-7.1/misc/paths.h 2003-11-17 17:09:29.000000000 +0100
+@@ -27,18 +27,18 @@
+ *
+ */
+
+-#define EXT_PATH "~cad/share/lib/magic/%s ~cad/share/lib/magic/tutorial"
+-#define DOT_MAGIC_PATH "~cad/share/lib/magic/sys ~ ."
++#define EXT_PATH "/usr/share/magic/%s /usr/share/magic/tutorial"
++#define DOT_MAGIC_PATH "/usr/share/magic/sys ~ ."
+
+ /*
+ * Paths used by 'magic'.
+ *
+ */
+-#define MAGIC_CMOS_PATH "~cad/share/lib/magic/cmos ~cad/share/lib/magic/tutorial"
+-#define MAGIC_NMOS_PATH "~cad/share/lib/magic/nmos ~cad/share/lib/magic/tutorial"
+-#define MAGIC_SYS_PATH ". ~cad/share/lib/magic/sys ~cad/share/lib/magic/sys/current"
+-#define MAGIC_SYS_DOT "~cad/share/lib/magic/sys/.magic"
+-#define MAGIC_LIB_PATH "~cad/share/lib/magic/%s ~cad/share/lib/magic/tutorial"
++#define MAGIC_CMOS_PATH "/usr/share/magic/cmos /usr/share/magic/tutorial"
++#define MAGIC_NMOS_PATH "/usr/share/magic/nmos /usr/share/magic/tutorial"
++#define MAGIC_SYS_PATH ". /usr/share/magic/sys /usr/share/magic/sys/current"
++#define MAGIC_SYS_DOT "/usr/share/magic/sys/.magic"
++#define MAGIC_LIB_PATH "/usr/share/magic/%s /usr/share/magic/tutorial"
+ #define HELPER_PATH ". ~cad/bin" /* Used by graphics drivers */
+
+ /*
+diff -ru utils/flock.c magic-7.1/utils/flock.c
+--- utils/flock.c 2003-11-17 17:59:45.000000000 +0100
++++ utils/flock.c 2003-11-17 18:01:01.000000000 +0100
+@@ -123,7 +123,7 @@
+ struct timeval name_time;
+ struct timezone dtime;
+ char cur_path[400];
+- char *cad_path;
++ /* char *cad_path; */
+ char cad_buf[400];
+ FILE *lfile, *mfile; /* local file and master file */
+ char *normal_cad = "~cad";
+@@ -132,7 +132,7 @@
+ /* environment variable CAD_HOME overrides, otherwise do tilde expansion */
+ /* on "~cad". */
+
+- if ((cad_path = getenv("CAD_HOME")) == NULL)
++ /* if ((cad_path = getenv("CAD_HOME")) == NULL)
+ {
+ cad_path = cad_buf;
+ if (PaConvertTilde (&normal_cad, &cad_path, 400) == -1)
+@@ -145,7 +145,7 @@
+ }
+ }
+
+- sprintf(lock_buf, "%s/flock", cad_path);
++ */ strcpy(lock_buf,"/var/lock/magic");
+ dir = stat(lock_buf, &dirstat);
+ if((dir == -1) || !(( dirstat.st_mode) & S_IFDIR))
+ {
+@@ -161,7 +161,7 @@
+
+ /* Open the master file to create a link in CAD_HOME/flock */
+
+- sprintf(lock_buf, "%s/flock/lock_%u%u", cad_path,
++ sprintf(lock_buf, "/var/lock/magic/lock_%u%u",
+ name_time.tv_sec, name_time.tv_usec);
+
+ if ((mfile = fopen(lock_buf, "w")) == NULL)
+--- magic/proto.magic 2003-11-26 10:08:48.000000000 +0100
++++ magic/proto.magic.new 2003-11-26 10:12:36.000000000 +0100
+@@ -1,12 +1,4 @@
+-# $(CAD_HOME)/lib/sys/.magic
+-# System wide start up file for magic, defines default macros.
+-#
+-# rcsid $NO_RCS_Header: /ufs/repository/magic/magic/proto.magic,v 1.4 2001/09/26 18:24:39 tim Exp $
+-#
+ #ifndef USE_NEW_MACROS
+-###############################################################################
+-# Default .magic macro file (original)
+-###############################################################################
+ echo ""
+ macro s "select"
+ macro S "select more"
+@@ -222,19 +214,13 @@
+ macro XK_F11 "paint pc"
+ macro XK_F12 "paint via"
+ #endif
+-#endif (USE_NEW_MACROS)
++#endif
+ #ifndef NO_PLOT
+-#
+-# additions for plot package
+-#
+ plot parameter spoolCommand "echo use 'lpr -P%s -v -s -JMagic %s' to print plot"
+ plot parameter directory "."
+-#endif (NO_PLOT)
++#endif
+ #ifndef NO_SCHEME_INTERPRETER
+-#
+-# additions for default scm path
+-#
+ define scm-library-path "~cad/lib/magic/scm"
+ load-scm "default.scm"
+ load-scm "layout.scm"
+-#endif (NO_SCHEME_INTERPRETER)
++#endif
diff --git a/sci-electronics/magic/magic-7.1-r2.ebuild b/sci-electronics/magic/magic-7.1-r2.ebuild
new file mode 100644
index 000000000000..1f3c0d0dd9e2
--- /dev/null
+++ b/sci-electronics/magic/magic-7.1-r2.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-electronics/magic/magic-7.1-r2.ebuild,v 1.1 2004/12/27 19:59:13 ribosome Exp $
+
+inherit eutils
+
+DESCRIPTION="The VLSI design CAD tool"
+HOMEPAGE="http://vlsi.cornell.edu/magic/"
+SRC_URI="http://vlsi.cornell.edu/magic/${P}.tar.gz"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="x86"
+IUSE=""
+
+DEPEND="sys-apps/findutils
+ dev-lang/perl
+ >=app-shells/tcsh-6.10-r3
+ sys-libs/libtermcap-compat"
+RDEPEND="sys-libs/libtermcap-compat"
+
+src_unpack() {
+ unpack ${A}
+
+ # Patch to use FHS paths
+ epatch ${FILESDIR}/${P}-fhs.patch
+
+ # Patch for GCC 3.2 compatibility
+ epatch ${FILESDIR}/${P}-gcc3.2.patch
+
+ # some gcc 3.3 stuff, paths...
+ cd ${S}
+ # work around cvs problem
+ sed -i 's/\$Header/\$NO_RCS_Header/' magic/proto.magic
+ epatch ${FILESDIR}/${P}-misc.patch
+
+ # Insert our idea of configuration file
+ cp ${FILESDIR}/defs.mak-${PV}-r2 ${S}/defs.mak
+
+ scripts/makedbh database/database.h.in database/database.h
+
+ # Clean up all the pre-GCC-3.2 preprocessor directives
+ einfo "Cleansing preprocessor directives"
+ find ./ -name "*.[ch]" | xargs -n 1 perl -pi -e 's/^\#endif..*$/\#endif/'
+ find ./ -name "*.[ch]" | xargs -n 1 perl -pi -e 's/^\#else..*$/\#else/'
+}
+
+src_compile() {
+ # this program does not like optimizations or parallel builds
+ make || die
+ egrep -q "^make.*Error" make.log && die "Error while compiling - please add ${S}/make.log to your error report."
+}
+
+src_install() {
+ make DESTDIR=${D} install || die
+
+ insinto /etc/env.d
+ doins ${FILESDIR}/10magic
+ keepdir /var/lock/magic
+ chmod +t ${D}/var/lock/magic
+ chmod ugo+rwx ${D}/var/lock/magic
+ cd ${D}/usr/lib/magic
+ mv * ${D}/usr/share/magic/
+ cd ${D}/usr/lib
+ mv *.h *.a magic/
+ ln -s ../../share/magic/sys magic/sys
+ ln -s ../../share/magic/scm magic/scm
+ ln -s ../../share/magic/tutorial magic/tutorial
+}
diff --git a/sci-electronics/magic/metadata.xml b/sci-electronics/magic/metadata.xml
new file mode 100644
index 000000000000..b229aec85b8f
--- /dev/null
+++ b/sci-electronics/magic/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci</herd>
+</pkgmetadata>