oregano-0.84.41/ 0000755 0001750 0001750 00000000000 13424071216 012332 5 ustar ruben ruben oregano-0.84.41/macports/ 0000755 0001750 0001750 00000000000 13413640652 014166 5 ustar ruben ruben oregano-0.84.41/macports/Portfile 0000644 0001750 0001750 00000004271 13413640652 015701 0 ustar ruben ruben # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id$
PortSystem 1.0
PortGroup github 1.0
PortGroup active_variants 1.1
PortGroup waf 1.0
github.setup drahnr oregano 0.83.2.1 v
categories gnome science
maintainers ahoi.io:bernhard openmaintainer
license GPL-2+
description A graphical software application for schematic capture and simulation of electrical circuits.
long_description ${description} It uses Gtk+ 3.x for the frontend and ngspice or gnucap as backend for crunching numbers. \
File bugs for this port at https://github.com/drahnr/oregano
platforms darwin
checksums rmd160 7a5c06c6d7f260143ea0bbd9f92759beacde920d \
sha256 d22ab0dc9f3717759983966ea3f7a8cd266e343fab47236ec4d841660bd72fa1
# be careful not to overwrite build dependencies
# declared by the waf port group
depends_build-append \
port:intltool \
port:libtool \
port:pkgconfig
depends_lib port:desktop-file-utils \
port:rarian \
port:shared-mime-info \
port:gtk3 \
port:gtksourceview3 \
port:goocanvas2
depends_run port:gnome-themes-standard \
port:ngspice
# shipped waf does not recognize --nocache
configure.args-delete \
--nocache
# shipped waf requires target debug or release not build
build.target debug
# allow port to build with either gtk3 +x11 or +quartz backend
variant quartz {}
if {[variant_isset quartz]} {
require_active_variants gtk3 quartz
} else {
require_active_variants gtk3 x11
depends_run-append port:yelp \
port:docbook-xml
}
post-activate {
system "${prefix}/bin/scrollkeeper-update"
system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
system "${prefix}/bin/update-mime-database ${prefix}/share/mime"
system "${prefix}/bin/glib-compile-schemas ${prefix}/share/glib-2.0/schemas"
}
oregano-0.84.41/.concourse/ 0000755 0001750 0001750 00000000000 13413640652 014414 5 ustar ruben ruben oregano-0.84.41/.concourse/ubuntu/ 0000755 0001750 0001750 00000000000 13413640652 015736 5 ustar ruben ruben oregano-0.84.41/.concourse/ubuntu/pkg.lst 0000644 0001750 0001750 00000000234 13413640652 017242 0 ustar ruben ruben git gnucap ngspice python libglib2.0-dev intltool libgtk-3-dev libxml2-dev libgoocanvas-2.0-dev libgtksourceview-3.0-dev gcc clang devscripts quilt libtool
oregano-0.84.41/.concourse/ubuntu/Dockerfile 0000644 0001750 0001750 00000000157 13413640652 017733 0 ustar ruben ruben FROM ubuntu:latest
COPY pkg.lst /tmp/pkg.lst
RUN apt-get update -y
RUN apt-get install -y $(cat /tmp/pkg.lst)
oregano-0.84.41/.concourse/fedora/ 0000755 0001750 0001750 00000000000 13413640652 015654 5 ustar ruben ruben oregano-0.84.41/.concourse/fedora/buildrpm.sh 0000755 0001750 0001750 00000001425 13413640652 020033 0 ustar ruben ruben #!/usr/bin/env bash
set -x
set -e
pwd 2>&1
RPMBUILD_DIR="$(pwd)/${1}/rpmbuild"
mkdir -p ${RPMBUILD_DIR}/{SOURCES,BUILD,RPMS,SRPMS,SPECS}
./waf configure rpmspec
cp -v build/rpmspec/oregano.spec ${RPMBUILD_DIR}/SPECS/
./waf dist
cp -v oregano*.tar.xz ${RPMBUILD_DIR}/SOURCES/
cd ${RPMBUILD_DIR}
rpmbuild \
--define "_topdir %(pwd)" \
--define "_builddir %{_topdir}/BUILD" \
--define "_rpmdir %{_topdir}/RPMS" \
--define "_srcrpmdir %{_topdir}/SRPMS" \
--define "_specdir %{_topdir}/SPECS" \
--define "_sourcedir %{_topdir}/SOURCES" \
-ba SPECS/oregano.spec || exit 1
mkdir -p $(pwd)/${1}/{,s}rpm/
rm -vf ${RPMBUILD_DIR}/RPMS/x86_64/oregano-*debug*.rpm
cp -vf ${RPMBUILD_DIR}/RPMS/x86_64/oregano-*.rpm $(pwd)/${1}/rpm/
cp -vf ${RPMBUILD_DIR}/SRPMS/oregano-*.src.rpm $(pwd)/${1}/srpm/
oregano-0.84.41/.concourse/fedora/pkg.lst 0000644 0001750 0001750 00000000306 13413640652 017160 0 ustar ruben ruben make git gnucap ngspice python gtk3-devel libxml2-devel gtksourceview3-devel intltool glib2-devel goocanvas2-devel desktop-file-utils clang gcc rpmdevtools xorg-x11-server-Xvfb xorg-x11-xauth which
oregano-0.84.41/.concourse/fedora/Dockerfile 0000644 0001750 0001750 00000000147 13413640652 017650 0 ustar ruben ruben FROM fedora:latest
COPY pkg.lst /tmp/pkg.lst
RUN dnf update -y
RUN dnf install -y $(cat /tmp/pkg.lst)
oregano-0.84.41/ARCHITECTURE.md 0000644 0001750 0001750 00000003514 13413640652 014545 0 ustar ruben ruben ## ARCHITECTURE
This document is targeted at oregano developers, giving a brief overview how all pieces connect together.
### Overview
The central elements are the `schematic`, `sheet`, `schemtic-view`, `node-store`, `engine`.
The `schematic-view` displays a schematic. The `schematic-view` is one oregano window including all its UI elements.
The most important child element is the `sheet`, a canvas drawing all `*-item`s.
The `schematic` is an abstract object saving a set of strings for simulation, `node-store`, authorship and a bunch of others.
The `node-store` saves all `node`s, `wire`s, `part`s (they are all derived from `item-data`). This is the *store* part of one `schematic-view`.
For actual simulation an `engine` object is used to transform the data contained in `schematic` and `node-store` to a string being piped to the actual backend engine.
The `sheet` handles mouse interaction, triggers the creation of new `sheet-item`s (like `wire-item`,`textbox-item`, etc.). These hold a pointer of type `item-data` to the actual object data, dependant of the subclass this is a `wire`, `node` or `part` (derived classes from `item-data`). The `*-item` objects exclusive task is to handle input events, creating context menus for that item, handling events when clicking these items, handling selection as well as moving of objects. This is the *view* part of one `schematic-view`.
Note that all these objects are local to the `schematic-view`. This is required to keep it reentrant and thus run multiple windows within one process.
### Issues
The above layout is quite complex and currently there are some issues which require new `item-data` derived classes be added _first_ to the schematic and _afterwards_ being set to the proper position.
Also there is a total lack of documentation within the sourcecode which is currently being addressed.
oregano-0.84.41/.clang-format 0000644 0001750 0001750 00000003326 13413640652 014715 0 ustar ruben ruben ---
Language: Cpp
AccessModifierOffset: -4
ConstructorInitializerIndentWidth: 4
AlignEscapedNewlinesLeft: false
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AlwaysBreakTemplateDeclarations: true
AlwaysBreakBeforeMultilineStrings: false
#AlwaysBreakAfterDefinitionReturnType: true
BreakBeforeBinaryOperators: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BinPackParameters: true
ColumnLimit: 100
ConstructorInitializerAllOnOneLineOrOnePerLine: false
DerivePointerAlignment: false
ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: false
IndentWrappedFunctionNames: false
IndentFunctionDeclarationAfterType: false
MaxEmptyLinesToKeep: 4
KeepEmptyLinesAtTheStartOfBlocks: true
NamespaceIndentation: None
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 120
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
SpacesBeforeTrailingComments: 1
Cpp11BracedListStyle: true
Standard: Cpp11
IndentWidth: 4
TabWidth: 4
UseTab: ForIndentation
BreakBeforeBraces: Linux
SpacesInParentheses: false
SpacesInAngles: false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: true
SpaceBeforeAssignmentOperators: true
ContinuationIndentWidth: 4
CommentPragmas: '^ IWYU pragma:'
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
SpaceBeforeParens: Always
DisableFormat: false
oregano-0.84.41/tools/ 0000755 0001750 0001750 00000000000 13413640652 013476 5 ustar ruben ruben oregano-0.84.41/tools/spice2to3.awk 0000644 0001750 0001750 00000016365 13413640652 016030 0 ustar ruben ruben
#==================================================== -*- AWK -*- =====
# spice2to3.awk
#
# This awk program file is used to convert Spice2 input files to
# Spice3 format.
#
# Specifically, nonlinear dependent sources are converted from
# the polynomial model to the more general BXXXXX nonlinear
# dependent source model used in Spice3.
#
#
# Usage:
# awk -f spice2to3.awk [comments=1] inputfile > outputfile
#
# If the optional comments=1 parameter is specified, the original
# input lines that are converted will be saved as comments in the
# output file.
#
# Limitations:
# - Cubic and higher order terms are not handled except for
# the special case of a single variable
# - Initial conditions are not handled (IC=...)
# - Continued lines are not handled
# - This program uses features from GNU awk
#
#
# Mike McCarrick Feb 1995
# mmccarri@apti.com APTI, Wash DC
#======================================================================
BEGIN {
IGNORECASE = 1;
}
#----------------------------------------------------------------------
# Utility functions
#----------------------------------------------------------------------
function min(a,b) {
return (a < b) ? a : b;
}
function max(a,b) {
return (a > b) ? a : b;
}
# Turn the original input line into a comment
function make_comment(inputline) {
print "*SPICE2:";
print "*" inputline;
print "*SPICE3:";
}
# Get leading whitespace from the input line
function get_leader(inputline)
{
if ((i = match(inputline, "[^ \t]")) != 0)
return substr(inputline, 1, i-1);
else
return "";
}
# Get trailing comments from the input line
function get_trailer(inputline)
{
if ((i = index(inputline, ";")) != 0)
return substr(inputline, i, length(inputline)-i+1);
else
return "";
}
# Canonicalize the input line
function canonicalize(inputline)
{
# Strip parentheses and commas from the input line
gsub(/\(/, " ", inputline);
gsub(/\)/, " ", inputline);
gsub(/,/, " ", inputline);
# chop off any trailing comments
if ((i = index(inputline, ";")) != 0)
inputline = substr(inputline, 1, i-1);
return inputline;
}
# Convert numerical values to canonical form (the scale factors are
# not recognized for B devices at least in 3f4)
function convert_num(strval)
{
sub(/T/, "E12", strval);
sub(/G/, "E9", strval);
sub(/MEG/, "E6", strval);
sub(/K/, "E3", strval);
sub(/M/, "E-3", strval);
sub(/U/, "E-6", strval);
sub(/N/, "E-9", strval);
sub(/P/, "E-12", strval);
sub(/F/, "E-15", strval);
return strval;
}
#----------------------------------------------------------------------
# E: Voltage controlled voltage source
# G: Voltage controlled current source
# H: Current controlled voltage source
# F: Current controlled current source
#----------------------------------------------------------------------
/^ *[EGHF].+POLY/ {
# Save the old line as a comment
origline = $0;
if (comments != 0)
make_comment(origline);
# Save any leading whitespace and trailing comments
leader = get_leader($0);
trailer = get_trailer($0);
# canonicalize the input line
$0 = canonicalize($0);
# Print the new source name with its node connections
printf("%sB%s %s %s ", leader, $1, $2, $3);
# The format differs for voltage vs current controlled sources
stype = toupper(substr($1, 1, 1));
if (stype == "E" || stype == "H")
printf("V = ");
else
printf("I = ");
nvars = $5;
inodes = 6;
if (stype == "E" || stype == "G")
{
v_controlled = 1;
nnodes = 2 * nvars;
}
else
{
v_controlled = 0;
nnodes = nvars;
}
icoeff = inodes + nnodes;
ncoeff = NF - icoeff + 1;
plusflag = 0;
# Constant term
if ($icoeff != 0.0)
{
printf("%s", convert_num($icoeff));
plusflag = 1;
}
icoeff++;
ncoeff--;
# Linear terms
nlinear = min(ncoeff, nvars);
for (ic = 0; ic < nlinear; ic++)
{
if ((val = convert_num($(icoeff + ic))) != 0.0)
{
if (plusflag)
printf(" + ");
if (v_controlled)
{
ip = inodes + 2 * ic;
im = ip + 1;
if (val != 1.0)
printf("%s*V(%s,%s)", val, $ip, $im);
else
printf("V(%s,%s)", $ip, $im);
}
else
{
is = inodes + ic;
if (val != 1.0)
printf("%s*I(%s)", val, $is);
else
printf("I(%s)", $is);
}
plusflag = 1;
}
}
icoeff += ic;
ncoeff -= ic;
# Quadratic terms
nquad = min(ncoeff, nvars*(nvars+1)/2);
for (n1 = ic = 0; n1 < nvars; n1++)
{
for (n2 = 0; n2 <= n1; n2++)
{
if (ic > nquad)
break;
if ((val = convert_num($(icoeff + ic))) != 0.0)
{
if (plusflag)
printf(" + ");
if (v_controlled)
{
ip1 = inodes + 2 * n1;
im1 = ip1 + 1;
ip2 = inodes + 2 * n2;
im2 = ip2 + 1;
if (val != 1.0)
printf("%s*V(%s,%s)*V(%s,%s)", val, $ip1, $im1, $ip2, $im2);
else
printf("V(%s,%s)*V(%s,%s)", $ip1, $im1, $ip2, $im2);
}
else
{
is1 = inodes + n1;
is2 = inodes + n2;
if (val != 1.0)
printf("%s*I(%s)*I(%s)", val, $is1, $is2);
else
printf("I(%s)*I(%s)", $is1, $is2);
}
plusflag = 1;
}
ic++;
}
}
icoeff += ic;
ncoeff -= ic;
# Cubic and higher order terms are handled only for a single variable
if (ncoeff > 0 && nvars > 1)
{
print "Warning: the following source line contains" > "/dev/stderr";
print "polynomial terms greater than second order." > "/dev/stderr";
print "Convert this line manually:" > "/dev/stderr";
print origline > "/dev/stderr";
# Add a warning message comment in the output file
printf(" ; ***ERROR CONVERTING SPICE2 ENTRY\n");
next;
}
# Single variable higher-order terms
for (ic = 0; ic < ncoeff; ic++)
{
if ((val = convert_num($(icoeff + ic))) != 0.0)
{
if (plusflag)
printf(" + ");
if (v_controlled)
{
ip = inodes + 2 * ic;
im = ip + 1;
if (val != 1.0)
printf("%s*V(%s,%s)^%d", val, $ip, $im, ic+3);
else
printf("V(%s,%s)^%d", $ip, $im, ic+3);
}
else
{
is = inodes + ic;
if (val != 1.0)
printf("%s*I(%s)^%d", val, $is, ic+3);
else
printf("I(%s)^%d", $is, ic+3);
}
plusflag = 1;
}
}
# Add trailing comments to the output line
printf(" %s\n", trailer);
next;
}
#----------------------------------------------------------------------
# Default: just print out the line
#----------------------------------------------------------------------
{
print $0;
}
oregano-0.84.41/tools/oregano-convert 0000755 0001750 0001750 00000000554 13413640652 016540 0 ustar ruben ruben #!/usr/bin/perl
# Fix the namespace.
while (<>) {
if (// xmlns:ogo="http:\/\/www.dtek.chalmers.se\/~d4hult\/oregano\/v1">/;
print;
last;
}
if (/) {
if (/<[a-zA-Z]/) {
s/