-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpackage.py
37 lines (29 loc) · 880 Bytes
/
package.py
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
name = "libraw"
@early() # type: ignore
def version():
from datetime import datetime
version = "master-{}".format(datetime.now().strftime("%Y%m%d"))
#version = "0.20.2"
return version
variants = [
["platform-linux"]
]
@early() # type: ignore
def build_requires():
# check if the system gcc is too old <9
# then we require devtoolset-9
from subprocess import check_output
gcc_major = int(check_output(r"gcc -dumpversion | cut -f1 -d.", shell=True).strip().decode())
if gcc_major < 9:
return ["devtoolset-9"]
return []
requires = [
"jpegturbo-2"
]
build_command = "make -f {root}/Makefile {install}"
def commands():
env.PATH.prepend("{root}/bin")
env.LD_LIBRARY_PATH.append("{root}/lib")
if building:
env.LibRaw_ROOT="{root}" # CMake Hint
env.PKG_CONFIG_PATH.append("{root}/lib/pkgconfig")