-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Portfile
100 lines (85 loc) · 4.03 KB
/
Portfile
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
# $Id$
PortSystem 1.0
PortGroup archcheck 1.0
name dcraw
version 9.02-20100611030700
set version_number [lindex [split ${version} -] 0]
categories graphics
maintainers ryandesign
platforms darwin
homepage http://www.cybercom.net/~dcoffin/dcraw/
master_sites ${homepage}archive/
distname ${name}-${version_number}
worksrcdir $name
dist_subdir ${name}/${version}
use_configure no
use_parallel_build yes
description Digital camera raw photo decoding software supporting \
hundreds of cameras
long_description ${name} is a small program for processing raw, \
unprocessed CCD data files from any of hundreds of \
digital cameras with better quality output than the \
tools provided by camera vendors.
checksums md5 a692c02f2f341bb3408a042b34e0be89 \
sha1 f369d974bc2655a5425724408e7c518fa23b1b9b \
rmd160 a8b413069b2f1df59f6762c1ecf09351d1d77892
depends_lib port:gettext \
port:libiconv \
port:jpeg \
port:lcms
archcheck.files lib/libintl.dylib \
lib/libiconv.dylib \
lib/libjpeg.dylib \
lib/liblcms.dylib
post-extract {
xinstall -W ${filespath} Makefile.in ${worksrcpath}/Makefile
}
variant universal {
configure.cflags-append ${configure.universal_cflags}
configure.cppflags-append ${configure.universal_cppflags}
configure.ldflags-append ${configure.universal_ldflags}
}
pre-configure {
# ufraw 0.15 and earlier provided its own copy of dcraw, but 0.16 now
# depends on the dcraw port instead. To prevent activation conflicts
# when upgrading to ufraw 0.16, ensure an old dcraw-providing ufraw
# is not active.
if {[file exists ${prefix}/bin/ufraw]} {
ui_debug "ufraw is installed; determining version"
set ufraw_minimum_version 0.16
set ufraw_installed_version [exec ${prefix}/bin/msgunfmt ${prefix}/share/locale/de/LC_MESSAGES/ufraw.mo | sed -E -n s/^.*Project-Id-Version:\ \(\[0-9.\]+\).*\$/\\1/p]
if {[rpm-vercomp ${ufraw_installed_version} ${ufraw_minimum_version}] < 0} {
ui_debug "ufraw ${ufraw_installed_version} is installed; needs to be deactivated first"
return -code error "Please deactivate your currently-installed ufraw port, then try again"
} else {
ui_debug "ufraw ${ufraw_installed_version} is installed; ok"
}
} else {
ui_debug "ufraw is not installed; ok"
}
}
pre-build {
build.args CC=${configure.cc} \
CFLAGS="[join ${configure.cflags}]" \
CPPFLAGS="[join ${configure.cppflags}]" \
LDFLAGS="[join ${configure.ldflags}]" \
PREFIX=${prefix}
}
destroot.args PREFIX=${prefix}
set my_locales {ca cs da de eo es fr hu it nl pl pt ru sv zh_CN zh_TW}
post-destroot {
xinstall -m 644 -W ${worksrcpath} dcraw.1 ${destroot}${prefix}/share/man/man1
foreach locale ${my_locales} {
if {[file exist ${worksrcpath}/dcraw_${locale}.1]} {
xinstall -m 755 -d ${destroot}${prefix}/share/man/${locale}/man1
xinstall -m 644 -W ${worksrcpath} dcraw_${locale}.1 ${destroot}${prefix}/share/man/${locale}/man1/dcraw.1
}
if {[file exist ${worksrcpath}/build/dcraw_${locale}.mo]} {
xinstall -m 755 -d ${destroot}${prefix}/share/locale/${locale}/LC_MESSAGES
xinstall -m 644 -W ${worksrcpath}/build dcraw_${locale}.mo ${destroot}${prefix}/share/locale/${locale}/LC_MESSAGES/dcraw.mo
}
}
}
livecheck.type regex
livecheck.url http://www.ryandesign.com/macports/version.php/${name}
livecheck.regex (.*)