mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
Add cad/rubygem-gdsii, Ruby library for GDSII reader and writer.
This commit is contained in:
parent
d06c86d08a
commit
1d72c5f0ff
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=415343
14 changed files with 235 additions and 0 deletions
|
@ -72,6 +72,7 @@
|
|||
SUBDIR += qmls
|
||||
SUBDIR += qucs
|
||||
SUBDIR += repsnapper
|
||||
SUBDIR += rubygem-gdsii
|
||||
SUBDIR += sceptre
|
||||
SUBDIR += scotch
|
||||
SUBDIR += spice
|
||||
|
|
17
cad/rubygem-gdsii/Makefile
Normal file
17
cad/rubygem-gdsii/Makefile
Normal file
|
@ -0,0 +1,17 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= ruby-gdsii
|
||||
PORTVERSION= 1.0.0
|
||||
CATEGORIES= cad rubygems
|
||||
MASTER_SITES= RG
|
||||
|
||||
MAINTAINER= hrs@FreeBSD.org
|
||||
COMMENT= GDSII reader and writer
|
||||
|
||||
LICENSE= MIT
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
|
||||
|
||||
USES= gem
|
||||
USE_RUBY= yes
|
||||
|
||||
.include <bsd.port.mk>
|
3
cad/rubygem-gdsii/distinfo
Normal file
3
cad/rubygem-gdsii/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
TIMESTAMP = 1463383716
|
||||
SHA256 (rubygem/ruby-gdsii-1.0.0.gem) = ac9e9f7c894c9ebb8a42e4801b48eafe4aa7614cf332393203fd7710273f8883
|
||||
SIZE (rubygem/ruby-gdsii-1.0.0.gem) = 53760
|
15
cad/rubygem-gdsii/files/patch-bin_rgds-join
Normal file
15
cad/rubygem-gdsii/files/patch-bin_rgds-join
Normal file
|
@ -0,0 +1,15 @@
|
|||
--- bin/rgds-join.orig 2016-05-16 07:41:38 UTC
|
||||
+++ bin/rgds-join
|
||||
@@ -45,9 +45,9 @@ opts = GetoptLong.new(
|
||||
|
||||
opts.each do |option, argument|
|
||||
case option
|
||||
- when '--help' : abort usage
|
||||
- when '--structs' : structs = argument.split(/\s+/)
|
||||
- when '--force' : force = true
|
||||
+ when '--help' then abort usage
|
||||
+ when '--structs' then structs = argument.split(/\s+/)
|
||||
+ when '--force' then force = true
|
||||
end
|
||||
end
|
||||
|
19
cad/rubygem-gdsii/files/patch-bin_rgds-sremove
Normal file
19
cad/rubygem-gdsii/files/patch-bin_rgds-sremove
Normal file
|
@ -0,0 +1,19 @@
|
|||
--- bin/rgds-sremove.orig 2016-05-16 07:41:38 UTC
|
||||
+++ bin/rgds-sremove
|
||||
@@ -58,11 +58,11 @@ opts = GetoptLong.new(
|
||||
|
||||
opts.each do |option, argument|
|
||||
case option
|
||||
- when '--structs' : structs = argument.split(/\s+/)
|
||||
- when '--force' : force = true
|
||||
- when '--keep-refs' : keep_refs = true
|
||||
- when '--keep-structs' : keep_structs = true
|
||||
- when '--help' : abort usage
|
||||
+ when '--structs' then structs = argument.split(/\s+/)
|
||||
+ when '--force' then force = true
|
||||
+ when '--keep-refs' then keep_refs = true
|
||||
+ when '--keep-structs' then keep_structs = true
|
||||
+ when '--help' then abort usage
|
||||
end
|
||||
end
|
||||
|
17
cad/rubygem-gdsii/files/patch-bin_rgds-ssplit
Normal file
17
cad/rubygem-gdsii/files/patch-bin_rgds-ssplit
Normal file
|
@ -0,0 +1,17 @@
|
|||
--- bin/rgds-ssplit.orig 2016-05-16 07:41:38 UTC
|
||||
+++ bin/rgds-ssplit
|
||||
@@ -60,10 +60,10 @@ opts = GetoptLong.new(
|
||||
|
||||
opts.each do |option, argument|
|
||||
case option
|
||||
- when '--help' : abort usage
|
||||
- when '--structs' : structs = argument.split(/\s+/)
|
||||
- when '--extension' : ext = argument
|
||||
- when '--force' : force = true
|
||||
+ when '--help' then abort usage
|
||||
+ when '--structs' then structs = argument.split(/\s+/)
|
||||
+ when '--extension' then ext = argument
|
||||
+ when '--force' then force = true
|
||||
end
|
||||
end
|
||||
|
13
cad/rubygem-gdsii/files/patch-bin_rgds-stats
Normal file
13
cad/rubygem-gdsii/files/patch-bin_rgds-stats
Normal file
|
@ -0,0 +1,13 @@
|
|||
--- bin/rgds-stats.orig 2016-05-16 07:41:38 UTC
|
||||
+++ bin/rgds-stats
|
||||
@@ -44,8 +44,8 @@ opts = GetoptLong.new(
|
||||
|
||||
opts.each do |option, argument|
|
||||
case option
|
||||
- when '--help' : abort usage
|
||||
- when '--structs' : structs = argument.split(/\s+/)
|
||||
+ when '--help' then abort usage
|
||||
+ when '--structs' then structs = argument.split(/\s+/)
|
||||
end
|
||||
end
|
||||
|
30
cad/rubygem-gdsii/files/patch-bin_rgds-tree
Normal file
30
cad/rubygem-gdsii/files/patch-bin_rgds-tree
Normal file
|
@ -0,0 +1,30 @@
|
|||
--- bin/rgds-tree.orig 2016-05-16 07:41:38 UTC
|
||||
+++ bin/rgds-tree
|
||||
@@ -64,11 +64,11 @@ opts = GetoptLong.new(
|
||||
|
||||
opts.each do |option, argument|
|
||||
case option
|
||||
- when '--top-structs' : top_structs = argument.split(/\s+/)
|
||||
- when '--inst-counts' : show_inst_counts = argument
|
||||
- when '--broken-refs' : broken_refs = argument
|
||||
- when '--delimiter' : delimiter = argument
|
||||
- when '--help' : abort usage
|
||||
+ when '--top-structs' then top_structs = argument.split(/\s+/)
|
||||
+ when '--inst-counts' then show_inst_counts = argument
|
||||
+ when '--broken-refs' then broken_refs = argument
|
||||
+ when '--delimiter' then delimiter = argument
|
||||
+ when '--help' then abort usage
|
||||
end
|
||||
end
|
||||
|
||||
@@ -111,8 +111,8 @@ class HierStruct
|
||||
else
|
||||
# broken reference; deal with appropriately
|
||||
case @broken_refs
|
||||
- when :annotate : $stdout.puts string + '(MISSING)'
|
||||
- when :prune : nil
|
||||
+ when :annotate then $stdout.puts string + '(MISSING)'
|
||||
+ when :prune then nil
|
||||
else
|
||||
$stdout.puts string + @delimiter + struct_name + cnt_suffix
|
||||
end
|
15
cad/rubygem-gdsii/files/patch-bin_rgds2rb
Normal file
15
cad/rubygem-gdsii/files/patch-bin_rgds2rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
--- bin/rgds2rb.orig 2016-05-16 07:41:38 UTC
|
||||
+++ bin/rgds2rb
|
||||
@@ -47,9 +47,9 @@ opts = GetoptLong.new(
|
||||
|
||||
opts.each do |option, argument|
|
||||
case option
|
||||
- when '--help' : abort usage
|
||||
- when '--structs' : structs = argument.split(/\s+/)
|
||||
- when '--force' : force = true
|
||||
+ when '--help' then abort usage
|
||||
+ when '--structs' then structs = argument.split(/\s+/)
|
||||
+ when '--force' then force = true
|
||||
end
|
||||
end
|
||||
|
23
cad/rubygem-gdsii/files/patch-lib_gdsii_element.rb
Normal file
23
cad/rubygem-gdsii/files/patch-lib_gdsii_element.rb
Normal file
|
@ -0,0 +1,23 @@
|
|||
--- lib/gdsii/element.rb.orig 2016-05-16 07:41:38 UTC
|
||||
+++ lib/gdsii/element.rb
|
||||
@@ -56,13 +56,13 @@ module Gdsii
|
||||
def Element.read(file, *args)
|
||||
rec = Record.peek(file)
|
||||
case rec.type
|
||||
- when GRT_BOUNDARY : Boundary.read_el(file, *args)
|
||||
- when GRT_TEXT : Text.read_el(file, *args)
|
||||
- when GRT_PATH : Path.read_el(file, *args)
|
||||
- when GRT_SREF : SRef.read_el(file, *args)
|
||||
- when GRT_AREF : ARef.read_el(file, *args)
|
||||
- when GRT_BOX : Box.read_el(file, *args)
|
||||
- when GRT_NODE : Node.read_el(file, *args)
|
||||
+ when GRT_BOUNDARY then Boundary.read_el(file, *args)
|
||||
+ when GRT_TEXT then Text.read_el(file, *args)
|
||||
+ when GRT_PATH then Path.read_el(file, *args)
|
||||
+ when GRT_SREF then SRef.read_el(file, *args)
|
||||
+ when GRT_AREF then ARef.read_el(file, *args)
|
||||
+ when GRT_BOX then Box.read_el(file, *args)
|
||||
+ when GRT_NODE then Node.read_el(file, *args)
|
||||
else
|
||||
# end of the element, increment the counter and move on
|
||||
nil
|
44
cad/rubygem-gdsii/files/patch-lib_gdsii_record.rb
Normal file
44
cad/rubygem-gdsii/files/patch-lib_gdsii_record.rb
Normal file
|
@ -0,0 +1,44 @@
|
|||
--- lib/gdsii/record.rb.orig 2016-05-16 07:41:38 UTC
|
||||
+++ lib/gdsii/record.rb
|
||||
@@ -102,13 +102,13 @@ module Gdsii
|
||||
|
||||
# convert to a data type object
|
||||
@data = case RECORD_INFO[type].data_type
|
||||
- when GDT_ASCII : Ascii.new(data, self)
|
||||
- when GDT_INT2 : Int2.new(data)
|
||||
- when GDT_INT4 : Int4.new(data)
|
||||
- when GDT_REAL8 : Real8.new(data)
|
||||
- when GDT_BITARRAY : BitArray.new(data)
|
||||
- when GDT_NO_DATA : NoData.new()
|
||||
- when GDT_REAL4 : Real4.new(data)
|
||||
+ when GDT_ASCII then Ascii.new(data, self)
|
||||
+ when GDT_INT2 then Int2.new(data)
|
||||
+ when GDT_INT4 then Int4.new(data)
|
||||
+ when GDT_REAL8 then Real8.new(data)
|
||||
+ when GDT_BITARRAY then BitArray.new(data)
|
||||
+ when GDT_NO_DATA then NoData.new()
|
||||
+ when GDT_REAL4 then Real4.new(data)
|
||||
else
|
||||
raise TypeError, "Given record type (#{type}) is invalid"
|
||||
end
|
||||
@@ -246,13 +246,13 @@ module Gdsii
|
||||
end
|
||||
|
||||
data = case data_type
|
||||
- when GDT_ASCII : Ascii.read(file, bytes_left)
|
||||
- when GDT_INT2 : Int2.read(file, bytes_left)
|
||||
- when GDT_INT4 : Int4.read(file, bytes_left)
|
||||
- when GDT_REAL8 : Real8.read(file, bytes_left)
|
||||
- when GDT_BITARRAY : BitArray.read(file, bytes_left)
|
||||
- when GDT_NO_DATA : NoData.read(file, bytes_left)
|
||||
- when GDT_REAL4 : Real4.read(file, bytes_left)
|
||||
+ when GDT_ASCII then Ascii.read(file, bytes_left)
|
||||
+ when GDT_INT2 then Int2.read(file, bytes_left)
|
||||
+ when GDT_INT4 then Int4.read(file, bytes_left)
|
||||
+ when GDT_REAL8 then Real8.read(file, bytes_left)
|
||||
+ when GDT_BITARRAY then BitArray.read(file, bytes_left)
|
||||
+ when GDT_NO_DATA then NoData.read(file, bytes_left)
|
||||
+ when GDT_REAL4 then Real4.read(file, bytes_left)
|
||||
else
|
||||
raise TypeError, "Given record type (#{type}) is invalid"
|
||||
end
|
24
cad/rubygem-gdsii/files/patch-lib_gdsii_record_consts.rb
Normal file
24
cad/rubygem-gdsii/files/patch-lib_gdsii_record_consts.rb
Normal file
|
@ -0,0 +1,24 @@
|
|||
--- lib/gdsii/record/consts.rb.orig 2016-05-16 07:41:38 UTC
|
||||
+++ lib/gdsii/record/consts.rb
|
||||
@@ -55,8 +55,8 @@ module Gdsii
|
||||
# Returns the minimum number of items necessary for this record type.
|
||||
def min_items
|
||||
case @data_type
|
||||
- when GDT_NO_DATA : 0
|
||||
- when GDT_ASCII : (@size == 0) ? 1 : @min_len/@size
|
||||
+ when GDT_NO_DATA then 0
|
||||
+ when GDT_ASCII then (@size == 0) ? 1 : @min_len/@size
|
||||
else
|
||||
@min_len/@size
|
||||
end
|
||||
@@ -65,8 +65,8 @@ module Gdsii
|
||||
# Returns the maximum number of items necessary for this record type.
|
||||
def max_items
|
||||
case @data_type
|
||||
- when GDT_NO_DATA : 0
|
||||
- when GDT_ASCII : (@size == 0) ? 1 : @max_len/@size
|
||||
+ when GDT_NO_DATA then 0
|
||||
+ when GDT_ASCII then (@size == 0) ? 1 : @max_len/@size
|
||||
else
|
||||
@max_len/@size
|
||||
end
|
4
cad/rubygem-gdsii/pkg-descr
Normal file
4
cad/rubygem-gdsii/pkg-descr
Normal file
|
@ -0,0 +1,4 @@
|
|||
The GDSII Ruby Library provides an easy-to-use interface using
|
||||
Ruby to reading and writing GDSII files.
|
||||
|
||||
WWW: http://rubyforge.org/projects/gdsii/
|
10
cad/rubygem-gdsii/pkg-plist
Normal file
10
cad/rubygem-gdsii/pkg-plist
Normal file
|
@ -0,0 +1,10 @@
|
|||
bin/rgds-debug
|
||||
bin/rgds-dump
|
||||
bin/rgds-join
|
||||
bin/rgds-layers
|
||||
bin/rgds-sremove
|
||||
bin/rgds-ssplit
|
||||
bin/rgds-stats
|
||||
bin/rgds-structs
|
||||
bin/rgds-tree
|
||||
bin/rgds2rb
|
Loading…
Add table
Reference in a new issue