-
Notifications
You must be signed in to change notification settings - Fork 65
/
CMPixman.class.st
108 lines (87 loc) · 2.32 KB
/
CMPixman.class.st
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
Class {
#name : #CMPixman,
#superclass : #CMCairoBundle,
#category : #'CMakeVMMaker-Libs'
}
{ #category : #'as yet unclassified' }
CMPixman class >> canonicalName [
^ 'pixman'
]
{ #category : #'package properties' }
CMPixman >> archiveMD5Sum [
^ '6563b6400b9fa23b47fd52105faf72b4'
]
{ #category : #'generating actions' }
CMPixman >> build [
gen
puts:
'
add_custom_command(OUTPUT "${libpixmanInstalled}"
COMMAND ./configure --prefix=''${installPrefix}'' PKG_CONFIG="${pkgconfigPath}"
PKG_CONFIG_PATH="${installPrefix}/lib/pkgconfig" CFLAGS=''-arch i386'' LDFLAGS=''-arch i386''
COMMAND make
COMMAND make install
WORKING_DIRECTORY "${libSourcesDir}"
DEPENDS "${unpackTarget}" pkg-config
COMMENT "Building ${libName}"
)
'
]
{ #category : #'generating actions' }
CMPixman >> copyArtefacts [
gen puts:
'add_custom_command(
OUTPUT "${externalModulesDir}/${libraryFileName}"
COMMAND cp ${libpixmanInstalled} ${externalModulesDir}/${libraryFileName}
DEPENDS "${libpixmanInstalled}"
)'
]
{ #category : #'generating actions' }
CMPixman >> defineAsTarget [
gen puts:
'add_custom_target(${libName}
DEPENDS libpng "${externalModulesDir}/${libraryFileName}"
)'
]
{ #category : #'generating actions' }
CMPixman >> defineGlobalTargets [
| var |
var := self canonicalName , '_LIB'.
vmGen set: var toString: self targetForLinking.
"
define a library as imported one
and make it depend from it's build target
"
vmGen
puts:
('add_library("{1}" SHARED IMPORTED GLOBAL)
set_target_properties("{1}" PROPERTIES IMPORTED_LOCATION "{1}")
add_dependencies("{1}" "{2}")
' format: { '${',var, '}' . self buildTarget }
).
vmGen cmd: 'add_dependencies' params:
vmGen moduleName , ' ' , self buildTarget
]
{ #category : #'package properties' }
CMPixman >> dependencies [
^ #( 'pkg-config' 'libpng')
]
{ #category : #'package properties' }
CMPixman >> downloadURL [
^ 'http://www.cairographics.org/releases/pixman-0.26.0.tar.gz'
]
{ #category : #'package properties' }
CMPixman >> libraryFileName [
^ 'libpixman-1.0.dylib'
]
{ #category : #'generating actions' }
CMPixman >> setVariables [
super setVariables.
gen
set: #libraryFileName to: self libraryFileName;
set: #libpixmanInstalled toString: '${installPrefix}/lib/${libraryFileName}'.
]
{ #category : #'package properties' }
CMPixman >> unpackedDirName [
^ 'pixman-0.26.0'
]