summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Kursawe <phosphan@gentoo.org>2003-11-17 17:51:54 +0000
committerPatrick Kursawe <phosphan@gentoo.org>2003-11-17 17:51:54 +0000
commit68138b39bdf3a8a42f7e1635fb051579d08aeef9 (patch)
tree5a3ad6fe64dca15f6d84e71fc31019e044a9fc11 /app-sci
parentFixed version number in java-config (diff)
downloadhistorical-68138b39bdf3a8a42f7e1635fb051579d08aeef9.tar.gz
historical-68138b39bdf3a8a42f7e1635fb051579d08aeef9.tar.bz2
historical-68138b39bdf3a8a42f7e1635fb051579d08aeef9.zip
A few more little fixes.
Diffstat (limited to 'app-sci')
-rw-r--r--app-sci/magic/Manifest4
-rw-r--r--app-sci/magic/files/defs.mak-7.1-r260
-rw-r--r--app-sci/magic/files/magic-7.1-paths.patch80
-rw-r--r--app-sci/magic/magic-7.1-r2.ebuild23
4 files changed, 161 insertions, 6 deletions
diff --git a/app-sci/magic/Manifest b/app-sci/magic/Manifest
index a45f6e469f1d..46a9e1aa2dee 100644
--- a/app-sci/magic/Manifest
+++ b/app-sci/magic/Manifest
@@ -1,14 +1,16 @@
MD5 c2a27d44d0be46e39aba2a6390466cb4 magic-7.1.ebuild 1117
MD5 5b846a413bc6a8748980558985636cad magic-7.1-r1.ebuild 1203
MD5 d5a08621d97bb393555e846a92e76838 ChangeLog 1136
-MD5 2ae7f18a4c03f6396571e15381a776af magic-7.1-r2.ebuild 1461
+MD5 bdc0adbc890b7a70b9f0083d88bfee36 magic-7.1-r2.ebuild 1883
MD5 8c623e53daafa025137077c6b65815bd metadata.xml 156
MD5 d81dbf84695b280009964a0bad9cf42c files/magic-7.1-gcc3.2.patch 593
MD5 d8eb4daf3f4c752bf337ea47c9dc9d61 files/digest-magic-7.1 66
MD5 51ef467f914b14f163fb1ecfa092876d files/defs.mak-7.1 1895
MD5 ccf20deaf0d44a9a779f0f17695bd0b0 files/digest-magic-7.1-r1 62
MD5 ccf20deaf0d44a9a779f0f17695bd0b0 files/digest-magic-7.1-r2 62
+MD5 8d35901556f6e52f37dd73326a23769d files/magic-7.1-paths.patch 2967
MD5 9cd145fd8e71675bf5a1b7717e175e34 files/magic-7.1-fhs.patch 1310
MD5 0d2e71d71b6842be61c5974d10912010 files/magic-7.1-vararg.patch 10453
MD5 0b1ea7223162f5c38659ab26393d20ec files/defs.mak-7.1-r1 2098
+MD5 0d0472ae43dbddd46bc658a75f0c3b9e files/defs.mak-7.1-r2 2108
MD5 fdb38b03c3fbdbb89eff8081e9953744 files/10magic 14
diff --git a/app-sci/magic/files/defs.mak-7.1-r2 b/app-sci/magic/files/defs.mak-7.1-r2
new file mode 100644
index 000000000000..8e9cf4365c95
--- /dev/null
+++ b/app-sci/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/app-sci/magic/files/magic-7.1-paths.patch b/app-sci/magic/files/magic-7.1-paths.patch
new file mode 100644
index 000000000000..37c72fbf6114
--- /dev/null
+++ b/app-sci/magic/files/magic-7.1-paths.patch
@@ -0,0 +1,80 @@
+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)
diff --git a/app-sci/magic/magic-7.1-r2.ebuild b/app-sci/magic/magic-7.1-r2.ebuild
index 54381e7d0952..fbfb9d00b378 100644
--- a/app-sci/magic/magic-7.1-r2.ebuild
+++ b/app-sci/magic/magic-7.1-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-sci/magic/magic-7.1-r2.ebuild,v 1.1 2003/11/17 14:32:40 phosphan Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-sci/magic/magic-7.1-r2.ebuild,v 1.2 2003/11/17 17:51:47 phosphan Exp $
S=${WORKDIR}/${P}
DESCRIPTION="The VLSI design CAD tool"
@@ -30,19 +30,23 @@ src_unpack() {
cd ${S}
epatch ${FILESDIR}/${P}-vararg.patch
+ # modify hardcoded paths
+ epatch ${FILESDIR}/${P}-paths.patch
+
# Insert our idea of configuration file
- cp ${FILESDIR}/defs.mak-${PV}-r1 ${S}/defs.mak
+ 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/'
+ find ./ -name "*.[ch]" -or -name "proto.magic" | xargs -n 1 perl -pi -e 's/^\#endif..*$/\#endif/'
+ find ./ -name "*.[ch]" -or -name "proto.magic" | xargs -n 1 perl -pi -e 's/^\#else..*$/\#else/'
}
src_compile() {
- emake || die
+ # 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."
}
@@ -51,4 +55,13 @@ src_install () {
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/
+ dosym ../share/magic/sys magic/sy
+ dosym ../share/magic/scm magic/scm
}