-
Notifications
You must be signed in to change notification settings - Fork 65
/
CMWin32ZLib.class.st
96 lines (74 loc) · 2.09 KB
/
CMWin32ZLib.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
Class {
#name : #CMWin32ZLib,
#superclass : #CMThirdpartyLibrary,
#category : #'CMakeVMMaker-Libs'
}
{ #category : #'as yet unclassified' }
CMWin32ZLib class >> canonicalName [
^ 'zlib'
]
{ #category : #'as yet unclassified' }
CMWin32ZLib class >> supports: aConfig [
^ aConfig platformName = 'win32'
]
{ #category : #'package properties' }
CMWin32ZLib >> archiveMD5Sum [
"answer the MD5 checksum (in string) for downloaded library archive
(to check that downloaded file is not corrupt).
You can take this sum by issuing:
md5 filename
from command line
"
^ '44d667c142d7cda120332623eab69f40'
]
{ #category : #'generating actions' }
CMWin32ZLib >> build [
' COMMAND ./configure --prefix="${installPrefix}" --archs="-arch i386" '.
gen
puts: '
add_custom_command(OUTPUT "${libzInstalled}"
COMMAND make -fwin32/Makefile.gcc
COMMAND make install -fwin32/Makefile.gcc prefix="${installPrefix}" INCLUDE_PATH="${installPrefix}/include" LIBRARY_PATH="${installPrefix}/lib" BINARY_PATH="${installPrefix}/bin" SHARED_MODE=1
WORKING_DIRECTORY "${libSourcesDir}"
DEPENDS "${unpackTarget}"
COMMENT "Building ${libName}"
)
'
]
{ #category : #'generating actions' }
CMWin32ZLib >> copyArtefacts [
self
copy: '${libzInstalled}'
to: '${externalModulesDir}/${libraryFileName}'
]
{ #category : #'generating actions' }
CMWin32ZLib >> defineAsTarget [
gen puts:
'add_custom_target(', self buildTarget , '
DEPENDS
"${externalModulesDir}/${libraryFileName}"
)'
"${externalModulesDir}/${libraryFileName}"
]
{ #category : #'generating actions' }
CMWin32ZLib >> defineGlobalTargets [
]
{ #category : #'package properties' }
CMWin32ZLib >> downloadURL [
^ 'http://zlib.net/zlib-1.2.8.tar.gz'
]
{ #category : #'package properties' }
CMWin32ZLib >> libraryFileName [
^ 'zlib1.dll'
]
{ #category : #'generating actions' }
CMWin32ZLib >> setVariables [
super setVariables.
gen
set: #libraryFileName to: self libraryFileName;
set: #libzInstalled toString: '${installPrefix}/bin/${libraryFileName}'.
]
{ #category : #'package properties' }
CMWin32ZLib >> unpackedDirName [
^ 'zlib-1.2.8'
]