Fix for #8581.
authorDaniel Ahlberg <aliz@gentoo.org>
Mon, 14 Oct 2002 17:58:53 +0000 (17:58 +0000)
committerDaniel Ahlberg <aliz@gentoo.org>
Mon, 14 Oct 2002 17:58:53 +0000 (17:58 +0000)
app-sci/magic/ChangeLog
app-sci/magic/files/defs.mak-7.1-r1 [new file with mode: 0644]
app-sci/magic/files/digest-magic-7.1-r1 [new file with mode: 0644]
app-sci/magic/files/magic-7.1-gcc3.2.patch [new file with mode: 0644]
app-sci/magic/magic-7.1-r1.ebuild [new file with mode: 0644]

index f6450fb46743d3bc2b654d0cb56ccdab8f3ef34c..16e7b9bc05e2017c1d0df5a0a6001ecd9bc968ca 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for app-sci/magic
 # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL
-# $Header: /var/cvsroot/gentoo-x86/app-sci/magic/ChangeLog,v 1.3 2002/07/25 16:18:19 aliz Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-sci/magic/ChangeLog,v 1.4 2002/10/14 17:58:53 aliz Exp $
+
+*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 proving the fix.
 
 * magic-7.1 (30 April 2002)
 
diff --git a/app-sci/magic/files/defs.mak-7.1-r1 b/app-sci/magic/files/defs.mak-7.1-r1
new file mode 100644 (file)
index 0000000..d763722
--- /dev/null
@@ -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/app-sci/magic/files/digest-magic-7.1-r1 b/app-sci/magic/files/digest-magic-7.1-r1
new file mode 100644 (file)
index 0000000..b5c06b5
--- /dev/null
@@ -0,0 +1 @@
+MD5 13364b77566f5b47fd3f2783e188d3df magic-7.1.tar.gz 3860487
diff --git a/app-sci/magic/files/magic-7.1-gcc3.2.patch b/app-sci/magic/files/magic-7.1-gcc3.2.patch
new file mode 100644 (file)
index 0000000..7e7ef10
--- /dev/null
@@ -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/app-sci/magic/magic-7.1-r1.ebuild b/app-sci/magic/magic-7.1-r1.ebuild
new file mode 100644 (file)
index 0000000..68fe738
--- /dev/null
@@ -0,0 +1,45 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/app-sci/magic/magic-7.1-r1.ebuild,v 1.1 2002/10/14 17:58:53 aliz Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="The VLSI design CAD tool"
+SRC_URI="http://vlsi.cornell.edu/${PN}/${P}.tar.gz"
+HOMEPAGE="http://vlsi.cornell.edu/magic/"
+KEYWORDS="x86"
+LICENSE="as-is"
+DEPEND="sys-apps/findutils
+       sys-devel/perl  
+       >=app-shells/tcsh-6.10-r3 
+       sys-libs/libtermcap-compat"
+RDEPEND="sys-libs/libtermcap-compat"
+SLOT="7"
+
+src_unpack() {
+       unpack ${A}
+
+       # Patch to use FHS paths
+       patch -p1 < ${FILESDIR}/${P}-fhs.patch 
+       
+       # Patch for GCC 3.2 compatibility
+       patch -p1 < ${FILESDIR}/${P}-gcc3.2.patch
+
+       # Insert our idea of configuration file
+       cp ${FILESDIR}/defs.mak-${PV}-r1 ${S}/defs.mak
+
+       # 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() {
+       emake || die
+}
+
+src_install () {
+       make DESTDIR=${D} install || die
+
+       insinto /etc/env.d
+       doins ${FILESDIR}/10magic
+}