/
Portfile
166 lines (137 loc) · 5.46 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
# -*- 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 perl5 1.0
name rpm
version 4.4.9
revision 23
perl5.branches 5.34
platforms darwin freebsd linux
license GPL-2 LGPL-2
categories sysutils archivers
maintainers nomaintainer
conflicts rpm54
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.
homepage https://rpm.org
master_sites macports_distfiles:${name}
checksums rmd160 4abae3d8262a71eb3136c7817c5ae95bd8cd48e5 \
sha256 1da0dd4fd6743db9a5cb89d04e2ee192130a7ac861d0344589c712f2faeb74fa
depends_build port:perl${perl5.major} \
port:python27
depends_lib port:beecrypt \
port:gettext \
port:libiconv \
port:popt \
port:neon \
port:sqlite3
depends_run bin:bzip2:bzip2 \
bin:gzip:gzip \
bin:unzip:unzip \
path:lib/libssl.dylib:openssl
build.type gnu
build.jobs 1
configure.args --disable-nls \
--infodir=${prefix}/share/info \
--mandir=${prefix}/share/man \
--sysconfdir=${prefix}/etc \
--with-libintl-prefix=${prefix} \
--with-libiconv-prefix=${prefix} \
--with-perl=${perl5.major} \
--with-python=2.7 \
--without-apidocs \
--without-included-gettext \
--without-javaglue \
configure.libs-append \
-liconv
configure.env __PERL=${perl5.bin} \
__PYTHON=${prefix}/bin/python2.7
# needed because it checks for sqlite3_open in sqlite lib...
configure.env-append \
ac_cv_lib_sqlite_sqlite3_open=yes
# needed because db3 configure breaks with a two-word CXX...
configure.ccache no
patchfiles patch-neon.diff \
patch-macros.in \
patch-configure \
patch-db3-configure \
patch-zlib-configure \
patch-Makefile.in \
patch-Makefile.PL \
patch-darwin.prov \
patch-fts.c \
patch-rpmdav.c \
patch-rpmsq.c \
patch-rpmevr.h \
patch-parseBuildInstallClean.c \
patch-db-mutex-mut_pthread.c \
patch-scripts-brp-nobuildrootpath
post-patch {
# use external popt library
delete ${worksrcpath}/popt
}
post-destroot {
# MacPorts specific changes
reinplace "s;%{_usrsrc}/rpm;%{_usrsrc}/macports;" ${destroot}${prefix}/lib/rpm/macros
xinstall -d -m 755 ${prefix}/etc/rpm
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/macports/BUILD\
${destroot}${prefix}/src/macports/RPMS\
${destroot}${prefix}/src/macports/SOURCES\
${destroot}${prefix}/src/macports/SPECS\
${destroot}${prefix}/src/macports/SRPMS
}
platform darwin {
configure.args-append \
--disable-aio \
--disable-optimized \
--disable-rpath \
--enable-broken-chown \
--with-glob
configure.cppflags-append \
-I${frameworks_dir}/Python.framework/Versions/2.7/include/python2.7
post-configure {
exec patch -d ${worksrcpath} -p0 < ${filespath}/patch-implicit-declaration
}
post-destroot {
# Mac OS X specific changes
reinplace "s;\blibtoolize\b;glibtoolize;" ${destroot}${prefix}/lib/rpm/macros
}
}
platform freebsd {
post-configure {
reinplace "s;-lrt;;" ${worksrcpath}/lua/Makefile
}
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 {
patchfiles-append \
patch-rpmdb-Makefile.am
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
}
livecheck.type regex
livecheck.url ${homepage}/download.html
livecheck.regex "${name}-(\\d+(?:\\.\\d+)+)"