update to magic-8.2.190, from maintainer Alessandro De Laurenzis, ok cwen@

This is a major update and now has working OpenGL rendering (magic -d OGL),
much better than the normal default x11 rendering. (There is also cairo-based
rendering but this doesn't seem to work correctly on OpenBSD yet).
This commit is contained in:
sthen 2020-03-08 12:47:35 +00:00
parent d6474cd639
commit e2e1ab2a27
11 changed files with 341 additions and 58 deletions

View File

@ -1,17 +1,17 @@
# $OpenBSD: Makefile,v 1.4 2019/07/12 20:43:45 sthen Exp $
# $OpenBSD: Makefile,v 1.5 2020/03/08 12:47:35 sthen Exp $
COMMENT = interactive system for VLSI circuit layouts
DISTNAME = magic-8.1.224
DISTNAME = magic-8.2.190
EXTRACT_SUFX = .tgz
CATEGORIES = cad
HOMEPAGE = http://opencircuitdesign.com/magic/
MAINTAINER = Alessandro De Laurenzis <just22@atlantide.t28.net>
MAINTAINER = Alessandro De Laurenzis <just22@atlantide.mooo.com>
# MIT (Magic, scmos), GPLv2 only (readline)
PERMIT_PACKAGE = Yes
WANTLIB = ${MODTK_WANTLIB} c m GL GLU X11
WANTLIB = ${MODTK_WANTLIB} c cairo fontconfig freetype m GL GLU X11
MASTER_SITES = http://opencircuitdesign.com/magic/archive/
@ -22,17 +22,18 @@ COMPILER_LANGS = c
MODULES = x11/tk
BUILD_DEPENDS = devel/m4
RUN_DEPENDS = shells/bash
LIB_DEPENDS = ${MODTK_LIB_DEPENDS}
LIB_DEPENDS = ${MODTK_LIB_DEPENDS} \
graphics/cairo
PATCHORIG = .patch.orig
RUN_DEPENDS = shells/bash
WRKCONF = ${WRKSRC}/scripts
CONFIGURE_STYLE = gnu
CONFIGURE_ARGS += --with-tcl=${MODTCL_LIBDIR} \
CONFIGURE_ARGS += --with-distdir=${PREFIX} \
--with-tcl=${MODTCL_LIBDIR} \
--with-tk=${MODTK_LIBDIR} \
--with-opengl=no
--with-cairo=${LOCALBASE}/include \
--enable-cairo-offscreen
USE_GMAKE = Yes
@ -43,6 +44,8 @@ post-patch:
@${SUBST_CMD} ${WRKSRC}/utils/paths.h
post-install:
mv ${PREFIX}/share/man/* ${PREFIX}/man/
rmdir ${PREFIX}/share/man
mv ${PREFIX}/lib/magic/doc ${PREFIX}/share/doc/magic
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/magic
mv ${PREFIX}/lib/magic/tutorial ${PREFIX}/share/examples/magic/

View File

@ -1,2 +1,2 @@
SHA256 (magic-8.1.224.tgz) = YYuHLGnykf0k36R9c4B6A/gOm7SseB3uaBCQUGxnm9g=
SIZE (magic-8.1.224.tgz) = 3937007
SHA256 (magic-8.2.190.tgz) = BWy27LRp60DPIR6976S2l18qdGeLNx0sL26ZJ2r6Axc=
SIZE (magic-8.2.190.tgz) = 4031738

View File

@ -1,9 +1,9 @@
$OpenBSD: patch-Makefile,v 1.1.1.1 2019/03/18 08:35:35 bentley Exp $
$OpenBSD: patch-Makefile,v 1.2 2020/03/08 12:47:36 sthen Exp $
Index: Makefile
--- Makefile.patch.orig
--- Makefile.orig
+++ Makefile
@@ -18,12 +18,10 @@ include defs.mak
@@ -18,12 +18,10 @@ INSTALL_CAD_DIRS = windows doc ${TECH}
all: $(ALL_TARGET)
standard:
@ -18,19 +18,19 @@ Index: Makefile
force: clean all
@@ -67,7 +65,7 @@ install: $(INSTALL_TARGET)
@@ -68,7 +66,7 @@ install: $(INSTALL_TARGET)
install-magic:
@echo --- installing executable to $(DESTDIR)${BINDIR}
@echo --- installing runtime files to $(DESTDIR)${LIBDIR}
@echo --- installing executable to $(DESTDIR)${INSTALL_BINDIR}
@echo --- installing runtime files to $(DESTDIR)${INSTALL_LIBDIR}
- @${MAKE} install-real 2>&1 >> install.log
+ @${MAKE} install-real
install-real: install-dirs
for dir in ${INSTALL_CAD_DIRS}; do \
@@ -86,7 +84,7 @@ install-dirs:
@@ -89,7 +87,7 @@ install-dirs:
install-tcl:
@echo --- installing executable to $(DESTDIR)${BINDIR}
@echo --- installing runtime files to $(DESTDIR)${LIBDIR}
@echo --- installing executable to $(DESTDIR)${INSTALL_BINDIR}
@echo --- installing runtime files to $(DESTDIR)${INSTALL_LIBDIR}
- @${MAKE} install-tcl-real 2>&1 >> install.log
+ @${MAKE} install-tcl-real

View File

@ -0,0 +1,283 @@
$OpenBSD: patch-magic_proto_magicrc_in,v 1.1 2020/03/08 12:47:36 sthen Exp $
Index: magic/proto.magicrc.in
--- magic/proto.magicrc.in.orig
+++ magic/proto.magicrc.in
@@ -1,44 +1,44 @@
-# $(CAD_ROOT)/magic/sys/.magicrc
-# System wide start up file for magic, defines default macros.
-#
-#
-# Source file proto.magicrc.in
-# Process this file with the cpp macro processor
-#
+/* $(CAD_ROOT)/magic/sys/.magicrc */
+/* System wide start up file for magic, defines default macros. */
+/* */
+/* */
+/* Source file proto.magicrc.in */
+/* Process this file with the cpp macro processor */
+/* */
#ifdef MAGIC_WRAPPER
puts stdout "Processing system .magicrc file"
#endif /* MAGIC_WRAPPER */
#ifdef USE_NEW_MACROS
-###############################################################################
-# Default .magicrc macro file (new macros)
-###############################################################################
-# A key
+/* ############################################################################### */
+/* # Default .magicrc macro file (new macros) */
+/* ############################################################################### */
+/* # A key */
macro a "select visible"
macro A "select more visible"
macro ^A "select less visible"
-# B key
+/* # B key */
macro b "box"
macro B "findbox"
-# C key
+/* # C key */
macro c "copy"
-# D key
+/* # D key */
macro d "delete"
macro ^D "erase $"
-# E key
+/* # E key */
macro e "edit"
-# F key
+/* # F key */
macro f "sideways"
macro F "upsidedown"
-# G key
+/* # G key */
macro g "grid"
macro G "grid 2"
-# I key
+/* # I key */
macro i "select cell"
macro I "select more cell"
#ifdef XLIB
macro Control_XK_i "select less cell"
#endif
-# L key
+/* # L key */
#ifdef USE_READLINE
imacro l "label "
#endif /* (USE_READLINE) */
@@ -47,74 +47,74 @@ imacro l "label "
#endif /* (MAGIC_WRAPPER) */
macro L "shell ls"
macro ^L "redraw"
-# M key
+/* # M key */
macro m "move"
macro M "stretch"
-# N key
+/* # N key */
macro ^N ""
-# O key
+/* # O key */
macro o "openwindow"
macro O "closewindow"
-# P key
+/* # P key */
#ifdef USE_READLINE
imacro p "paint "
#endif /* (USE_READLINE) */
#ifdef MAGIC_WRAPPER
imacro p "paint "
#endif /* (MAGIC_WRAPPER) */
-# Q key
+/* # Q key */
#ifdef XLIB
macro Control_Shift_XK_q "quit"
#endif /* (XLIB) */
-# R key
+/* # R key */
macro r "clockwise"
macro R "clockwise 270"
macro ^R "clockwise 180"
-# S key
+/* # S key */
macro s "select"
macro S "select more"
macro ^S "select less"
#ifdef XLIB
macro Control_Shift_XK_s "undo ; select"
#endif /* (XLIB) */
-# U key
+/* # U key */
macro u "undo"
macro U "redo"
-# V key
+/* # V key */
macro v "view"
macro V "xview"
-# W key
+/* # W key */
macro w "writeall"
macro W "writeall force"
-# X key
+/* # X key */
macro x "expand"
macro X "unexpand"
macro ^X "expand toggle"
-# Z key
+/* # Z key */
macro z "zoom .5"
macro Z "zoom 2"
macro ^Z "findbox zoom"
#ifdef XLIB
macro Control_Shift_XK_z "center"
#endif /* (XLIB) */
-# Question mark
+/* # Question mark */
macro ? "drc why"
macro / "select area; what ; select clear"
-# Comma key
+/* # Comma key */
macro , "select clear"
-# Exclamation mark
+/* # Exclamation mark */
#ifdef USE_READLINE
imacro ! "shell "
#endif /* (USE_READLINE) */
-# Space bar
+/* # Space bar */
macro " " "tool"
-# Colon and semicolon (interactive command)
+/* # Colon and semicolon (interactive command) */
imacro XK_colon ":"
imacro XK_semicolon ":"
#ifdef XLIB
macro Shift_XK_space "tool box"
macro Control_XK_space "tool wiring"
-# Arrow keys (X11 versions only)
+/* # Arrow keys (X11 versions only) */
macro XK_Left "scroll l .1 w"
macro Shift_XK_Left "scroll l 1 w"
macro Control_XK_Left "box grow w 1"
@@ -131,8 +131,8 @@ macro XK_Down "scroll d .1 w"
macro Shift_XK_Down "scroll d 1 w"
macro Control_XK_Down "box grow s 1"
macro Control_Shift_XK_Down "box shrink n 1"
-# Keypad keys (X11 versions only)
-# Functions duplicated for use both with Num_Lock ON and OFF
+/* # Keypad keys (X11 versions only) */
+/* # Functions duplicated for use both with Num_Lock ON and OFF */
macro XK_KP_Delete "box size 0 0"
macro XK_KP_Insert "box size 4 4"
macro XK_KP_0 "box size 7 2"
@@ -164,10 +164,10 @@ macro XK_KP_8 "stretch u 1"
macro Shift_XK_KP_8 "stretch u 1"
macro XK_8 "stretch u 1"
macro XK_KP_Prior "move ne 1"
-# Scroll wheel bindings
+/* # Scroll wheel bindings */
macro XK_Pointer_Button4 "scroll u .05 w"
macro XK_Pointer_Button5 "scroll d .05 w"
-# Quick macro function keys for scmos tech (X11 versions only)
+/* # Quick macro function keys for scmos tech (X11 versions only) */
macro XK_F1 "paint ndiff"
macro XK_F2 "paint pdiff"
macro XK_F3 "paint poly"
@@ -182,9 +182,9 @@ macro XK_F11 "paint pc"
macro XK_F12 "paint via"
#endif /* (XLIB) */
#else /* USE_NEW_MACROS */
-###############################################################################
-# Default .magicrc macro file (original)
-###############################################################################
+/* ############################################################################### */
+/* # Default .magicrc macro file (original) */
+/* ############################################################################### */
echo ""
macro s "select"
macro S "select more"
@@ -230,12 +230,12 @@ imacro XK_semicolon ":"
macro ^R "iroute route -dBox"
macro ^N "iroute route -dSelection"
#endif /* USE_NEW_MACROS */
-# Allow some box manipulation from all tools.
+/* # Allow some box manipulation from all tools. */
#ifdef MAGIC_WRAPPER
macro Control_Button1 "*bypass box move bl cursor"
macro Control_Button2 "*bypass paint cursor"
macro Control_Button3 "*bypass box corner ur cursor"
-# Box tool button bindings
+/* # Box tool button bindings */
macro Button1 "*bypass box move bl cursor"
macro Shift_Button1 "*bypass box corner bl cursor"
macro Button2 "*bypass paint cursor"
@@ -246,7 +246,7 @@ macro Shift_Button3 "*bypass box move ur cursor"
macro Control_Button1 "box move bl cursor"
macro Control_Button2 "paint cursor"
macro Control_Button3 "box corner ur cursor"
-# Box tool button bindings
+/* # Box tool button bindings */
macro Button1 "box move bl cursor"
macro Shift_Button1 "box corner bl cursor"
macro Button2 "paint cursor"
@@ -254,7 +254,7 @@ macro Shift_Button2 "erase cursor"
macro Button3 "box corner ur cursor"
macro Shift_Button3 "box move ur cursor"
#endif /* (!MAGIC_WRAPPER) */
-# Color window button bindings
+/* # Color window button bindings */
macro color Button1 "pushbutton left"
macro color Button2 "pushbutton middle"
macro color Button3 "pushbutton right"
@@ -262,11 +262,11 @@ macro color u "undo"
macro color U "redo"
macro color plus "color next"
macro color minus "color last"
-# Netlist window button bindings
+/* # Netlist window button bindings */
macro netlist Button1 "pushbutton left"
macro netlist Button2 "pushbutton middle"
macro netlist Button3 "pushbutton right"
-# Wind3D window key bindings
+/* # Wind3D window key bindings */
macro wind3d L "level up"
macro wind3d l "level down"
macro wind3d C "cif"
@@ -294,15 +294,15 @@ macro wind3d XK_equal "view 0 0 -1 rel"
macro wind3d XK_greater "zoom 1 2.0 rel"
macro wind3d XK_less "zoom 1 0.5 rel"
#endif /* (XLIB) */
-#
-# Load basic set of fonts
-#
+/* # */
+/* # Load basic set of fonts */
+/* # */
setlabel font FreeSans.pt3 0.58
setlabel font FreeSerif.pt3 0.58
setlabel font FreeMono.pt3 0.6
-#
-# Additions for Tcl GUI wrapper
-#
+/* # */
+/* # Additions for Tcl GUI wrapper */
+/* # */
#ifdef MAGIC_WRAPPER
magic::suspendout
if {![catch {set Opts(tools)}]} { magic::enable_tools }
@@ -311,11 +311,10 @@ set VDD "vdd!"
magic::resumeout
catch {source ${CAD_ROOT}/magic/sys/site.def}
#endif /* (!MAGIC_WRAPPER) */
-#
#ifdef SCHEME_INTERPRETER
-#
-# additions for default scm path
-#
+/* # */
+/* # additions for default scm path */
+/* # */
define scm-library-path "CAD_DIR/lib/magic/scm"
load-scm "default.scm"
load-scm "layout.scm"

View File

@ -1,9 +1,9 @@
$OpenBSD: patch-scripts_configure,v 1.1.1.1 2019/03/18 08:35:35 bentley Exp $
$OpenBSD: patch-scripts_configure,v 1.2 2020/03/08 12:47:36 sthen Exp $
Index: scripts/configure
--- scripts/configure.patch.orig
--- scripts/configure.orig
+++ scripts/configure
@@ -830,7 +830,7 @@ pdfdir='${docdir}'
@@ -836,7 +836,7 @@ pdfdir='${docdir}'
psdir='${docdir}'
libdir='${exec_prefix}/lib'
localedir='${datarootdir}/locale'
@ -12,8 +12,8 @@ Index: scripts/configure
ac_prev=
ac_dashdash=
@@ -7884,7 +7884,7 @@ fi
CFLAGS="${CFLAGS} -l/usr/X11R6/include"
@@ -8047,7 +8047,7 @@ fi
CFLAGS="${CFLAGS} -L/usr/X11R6/include"
;;
- *-netbsd*|*-openbsd*)
@ -21,7 +21,7 @@ Index: scripts/configure
# Not available on all versions: check for include file.
ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
if test "x$ac_cv_header_dlfcn_h" = xyes; then :
@@ -7900,6 +7900,12 @@ fi
@@ -8063,6 +8063,12 @@ fi
fi
;;
@ -34,7 +34,7 @@ Index: scripts/configure
*-nextstep*)
LDDL_FLAGS="-nostdlib -r"
;;
@@ -9298,16 +9304,5 @@ else
@@ -9501,16 +9507,5 @@ else
echo
fi
fi

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-tcltk_magic_sh_in,v 1.1.1.1 2019/03/18 08:35:35 bentley Exp $
$OpenBSD: patch-tcltk_magic_sh_in,v 1.2 2020/03/08 12:47:36 sthen Exp $
Index: tcltk/magic.sh.in
--- tcltk/magic.sh.in.patch.orig
--- tcltk/magic.sh.in.orig
+++ tcltk/magic.sh.in
@@ -1,4 +1,4 @@
-#!/bin/bash

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-textio_textioInt_h,v 1.1.1.1 2019/03/18 08:35:35 bentley Exp $
$OpenBSD: patch-textio_textioInt_h,v 1.2 2020/03/08 12:47:36 sthen Exp $
Index: textio/textioInt.h
--- textio/textioInt.h.patch.orig
--- textio/textioInt.h.orig
+++ textio/textioInt.h
@@ -41,7 +41,7 @@ typedef struct {
#define TX_CMD_PROMPT ":"

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-textio_txInput_c,v 1.1.1.1 2019/03/18 08:35:35 bentley Exp $
$OpenBSD: patch-textio_txInput_c,v 1.2 2020/03/08 12:47:36 sthen Exp $
Index: textio/txInput.c
--- textio/txInput.c.patch.orig
--- textio/txInput.c.orig
+++ textio/txInput.c
@@ -1215,6 +1215,15 @@ txGetTermState(buf)
ioctl( fileno( stdin ), TCGETA, buf);

View File

@ -1,21 +1,18 @@
$OpenBSD: patch-utils_magsgtty_h,v 1.1.1.1 2019/03/18 08:35:35 bentley Exp $
$OpenBSD: patch-utils_magsgtty_h,v 1.2 2020/03/08 12:47:36 sthen Exp $
Index: utils/magsgtty.h
--- utils/magsgtty.h.patch.orig
--- utils/magsgtty.h.orig
+++ utils/magsgtty.h
@@ -21,12 +21,14 @@
#ifndef _MAGSGTTY_H
#define _MAGSGTTY_H
-#if !defined(SYSV) && !defined(CYGWIN)
+#if !defined(SYSV) && !defined(CYGWIN) && !defined(__OpenBSD__)
# ifdef ALPHA
# undef MAX
# undef MIN
@@ -33,7 +33,12 @@
# endif
#include <sgtty.h>
+#elif defined(__OpenBSD__)
#include <sys/ioctl.h>
+
+#if defined(__OpenBSD__)
+#include <termios.h>
+#else
#include <sys/ioctl_compat.h>
+#endif
#else
#include <termio.h>
#endif

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-utils_paths_h,v 1.1.1.1 2019/03/18 08:35:35 bentley Exp $
$OpenBSD: patch-utils_paths_h,v 1.2 2020/03/08 12:47:36 sthen Exp $
Index: utils/paths.h
--- utils/paths.h.patch.orig
--- utils/paths.h.orig
+++ utils/paths.h
@@ -28,20 +28,20 @@
*

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2019/03/18 08:35:35 bentley Exp $
@comment $OpenBSD: PLIST,v 1.2 2020/03/08 12:47:36 sthen Exp $
bin/ext2sim
bin/ext2spice
bin/magic
@ -35,16 +35,16 @@ lib/magic/sys/windows22.glyphs
lib/magic/sys/windows7.glyphs
lib/magic/tcl/
lib/magic/tcl/bitmaps/
lib/magic/tcl/bitmaps/down.xbm
lib/magic/tcl/bitmaps/left.xbm
lib/magic/tcl/bitmaps/down.gif
lib/magic/tcl/bitmaps/left.gif
lib/magic/tcl/bitmaps/lock.xbm
lib/magic/tcl/bitmaps/right.xbm
lib/magic/tcl/bitmaps/up.xbm
lib/magic/tcl/bitmaps/zoom.xbm
lib/magic/tcl/bitmaps/right.gif
lib/magic/tcl/bitmaps/up.gif
lib/magic/tcl/bitmaps/zoom.gif
lib/magic/tcl/bsitools.tcl
lib/magic/tcl/cellmgr.tcl
lib/magic/tcl/console.tcl
lib/magic/tcl/drc.tcl
lib/magic/tcl/drcmgr.tcl
lib/magic/tcl/libmgr.tcl
lib/magic/tcl/magic.tcl
@bin lib/magic/tcl/magicdnull
@ -52,7 +52,7 @@ lib/magic/tcl/magic.tcl
lib/magic/tcl/mazeroute.tcl
lib/magic/tcl/socketcmd.tcl
lib/magic/tcl/strip_reflibs.tcl
@bin lib/magic/tcl/tclmagic.so
@so lib/magic/tcl/tclmagic.so
lib/magic/tcl/techbuilder.tcl
lib/magic/tcl/texthelper.tcl
lib/magic/tcl/tkcon.tcl