/
Portfile
188 lines (159 loc) · 6.52 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup active_variants 1.1
PortGroup perl5 1.0
name rpm54
version 5.4.15
revision 9
set date 20140824
set branch [join [lrange [split ${version} .] 0 1] .]
platforms darwin freebsd linux
license LGPL-2.1
categories sysutils archivers
maintainers nomaintainer
conflicts rpm
description The RPM package management system.
long_description The RPM Package Manager (RPM) is a powerful command line driven \
package management system capable of installing, uninstalling, \
verifying, querying, and updating software packages. Each software \
package consists of an archive of files along with information about \
the package like its version, a description, etc.
# host rpm5.org no longer resolves, further updates unlikely
# use substitute homepage and macports_distfiles for master_sites
homepage https://www.openhub.net/p/rpm5
master_sites macports_distfiles:${name}
distname rpm-${version}-0.${date}
extract.suffix .src.rpm
checksums rmd160 1b4af6831b864e485e6f9d9bee2c99f294e62cd8 \
sha256 d4ae5e9ed5df8ab9931b660f491418d20ab5c4d72eb17ed9055b80b71ef6c4ee \
size 15691310
worksrcdir rpm-${version}
patchfiles patch-rpmuuid.c.diff
depends_build port:gawk \
port:pkgconfig
depends_lib port:beecrypt \
port:db60 \
port:expat \
port:gettext \
port:libiconv \
port:libmagic \
port:neon \
port:ossp-uuid \
port:pcre \
port:popt \
port:python27 \
port:readline \
port:sqlite3 \
port:xar \
port:xz
depends_run bin:bzip2:bzip2 \
bin:gzip:gzip \
bin:unzip:unzip \
path:lib/libssl.dylib:openssl
extract.cmd ${filespath}/rpm2cpio.sh
extract.pre_args ""
extract.post_args "| cpio -dvim"
build.type gnu
# use perl5 port group to create variants to match dependency ossp-uuid
# ensure ossp-uuid uses same variant
perl5.require_variant yes
perl5.conflict_variants yes
perl5.branches 5.28 5.30 5.32 5.34
perl5.default_branch 5.34
perl5.create_variants ${perl5.branches}
require_active_variants ossp-uuid ${perl5.variant}
configure.args --disable-nls \
--infodir=${prefix}/share/info \
--mandir=${prefix}/share/man \
--sysconfdir=${prefix}/etc \
--with-beecrypt=external \
--with-db=external \
--with-libintl-prefix=${prefix} \
--with-libiconv-prefix=${prefix} \
--with-neon=external \
--with-path-cfg=${prefix}/etc/rpm \
--with-pcre=external \
--with-perl \
--with-popt=external \
--with-python=2.7 \
--with-sqlite \
--with-uuid=external \
--with-xar=external \
--with-xz=external \
--without-apidocs \
--without-javaglue \
--without-included-gettext \
configure.env PERL=${perl5.bin} \
__PERL=${perl5.bin} \
__PYTHON=${prefix}/bin/python2.7
configure.args-append --disable-openmp \
--with-lua=internal \
--with-syck=internal
configure.cppflags-append -I${prefix}/include/ossp \
-I${prefix}/include/xar
configure.cppflags-append -I${prefix}/include/db60
configure.ldflags-append -L${prefix}/lib/db60
post-extract {
system -W ${workpath} "${portutil::autoconf::tar_command} -xzf rpm-${version}.tar.gz"
}
post-patch {
reinplace "s/, @ldaddr//" ${worksrcpath}/perl/Makefile.PL.in ; # remove -rpath flags
}
post-configure {
reinplace "s/--tag=CC/--tag=CXX/" ${worksrcpath}/Makefile
reinplace "s/--mode=link \$(CCLD)/--mode=link \$(CXX)/" ${worksrcpath}/Makefile
}
post-destroot {
xinstall -d -m 755 ${destroot}${prefix}/etc/rpm
system "${worksrcpath}/rpm --macros=${worksrcpath}/macros/macros --eval='%{_target_platform}' > ${destroot}${prefix}/etc/rpm/platform"
system "${worksrcpath}/rpm --macros=${worksrcpath}/macros/macros --eval='noarch-%{_target_vendor}-%{_target_os}%{?_gnu}' >> ${destroot}${prefix}/etc/rpm/platform"
delete [glob ${destroot}${prefix}/lib/perl5/*/*/*/auto/RPM/.packlist]
delete [glob ${destroot}${prefix}/lib/perl5/*/*/perllocal.pod]
# where the RPM database lives
destroot.keepdirs ${destroot}${prefix}/etc/rpm \
${destroot}${prefix}/var/lib/rpm \
${destroot}${prefix}/var/spool/repackage \
${destroot}${prefix}/src/rpm/BUILD \
${destroot}${prefix}/src/rpm/RPMS \
${destroot}${prefix}/src/rpm/SOURCES \
${destroot}${prefix}/src/rpm/SPECS \
${destroot}${prefix}/src/rpm/SRPMS
}
platform darwin {
configure.args-append \
--disable-aio \
--disable-optimized \
--disable-rpath \
--enable-broken-chown \
--with-glob
# avoid bison-2.7 problems
configure.env-append \
"YACC=/usr/bin/bison -y"
post-destroot {
# Mac OS X specific changes
}
}
platform freebsd {
post-destroot {
# FreeBSD specific changes
reinplace "s;/usr/bin/tar;/usr/local/bin/gtar;" ${destroot}${prefix}/lib/rpm/macros
reinplace "s;/usr/bin/make;/usr/local/bin/gmake;" ${destroot}${prefix}/lib/rpm/macros
}
}
platform linux {
post-destroot {
# Linux specific changes
}
}
variant docs description "API documentation" {
depends_build-append \
path:bin/doxygen:doxygen \
path:bin/dot:graphviz
configure.args-replace \
--without-apidocs \
--with-apidocs
}
test.run yes
test.target check
# new releases unlikely
livecheck.type none