-
Notifications
You must be signed in to change notification settings - Fork 0
/
crimp_sgi.tcl
90 lines (63 loc) · 2.25 KB
/
crimp_sgi.tcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# -*- tcl -*-
# CRIMP, SGI Reader for the SGI raster image file format.
#
# (c) 2011-2016 Andreas Kupries http://wiki.tcl.tk/andreas%20kupries
#
# # ## ### ##### ######## #############
## Requisites
package require critcl 3
# # ## ### ##### ######## #############
if {![critcl::compiling]} {
error "Unable to build CRIMP::SGI, no proper compiler found."
}
# # ## ### ##### ######## #############
## Administrivia
critcl::license \
{Andreas Kupries} \
{Under a BSD license.}
critcl::summary \
{Extension of the CRIMP core to handle import and export of SGI raster images}
critcl::description {
This package provides the CRIMP eco-system with the functionality to handle
images stored as SGI raster images.
}
critcl::subject image {SGI raster image} {SGI raster import} {SGI raster export}
critcl::subject image {image import} {image export} SGI
# # ## ### ##### ######## #############
## Implementation.
critcl::tcl 8.5
# # ## ### ##### ######## #############
## Declare the Tcl layer aggregating the C primitives into useful
## commands. After the Tcl-based readers and writers to properly pick
## them up too in the ensembles.
critcl::tsources policy_sgi.tcl
# # ## ### ##### ######## #############
## C-level API (i.e. stubs and types)
critcl::api import crimp::core 0.2
# # ## ### ##### ######## #############
## Get the local support code. We source it directly because this is
## only needed for building the package, in any mode, and not during
## the runtime. Thus not added to the 'tsources'.
#
## This is shared between the various packages.
critcl::owns support.tcl
critcl::source support.tcl
# # ## ### ##### ######## #############
## Main C section.
critcl::ccode {}
critcl::csources format/c/sgi.c
critcl::cheaders format/c/sgi.h
# # ## ### ##### ######## #############
## Pull in the SGI raster-specific pieces. These are fit under the
## read/write namespaces.
critcl::owns format/*sgi*.crimp
crimp_source format/*sgi*.crimp
# # ## ### ##### ######## #############
## Make the C pieces ready. Immediate build of the binaries, no deferal.
if {![critcl::load]} {
error "Building and loading CRIMP::SGI failed."
}
# # ## ### ##### ######## #############
package provide crimp::sgi 0.2
return
# vim: set sts=4 sw=4 tw=80 et ft=tcl: