source: trunk/dports/sysutils/rpm54/Portfile @ 144466

Last change on this file since 144466 was 144466, checked in by devans@…, 3 years ago

rpm54: promote build deps to lib deps to prevent binary linking errors, increment revision (#50247, maintainer timeout).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.4 KB
Line 
1# $Id: Portfile 144466 2016-01-09 17:15:35Z devans@macports.org $
2
3PortSystem 1.0
4
5name                    rpm54
6version                 5.4.15
7revision                1
8set date                20140824
9set branch              [join [lrange [split ${version} .] 0 1] .]
10platforms               darwin freebsd linux
11license                 LGPL-2.1
12categories              sysutils archivers
13maintainers             mac.com:n3npq afb
14description             The RPM package management system.
15long_description        The RPM Package Manager (RPM) is a powerful command line driven \
16                        package management system capable of installing, uninstalling, \
17                        verifying, querying, and updating software packages. Each software \
18                        package consists of an archive of files along with information about \
19                        the package like its version, a description, etc.
20
21homepage                http://rpm5.org
22master_sites            ${homepage}/files/rpm/rpm-${branch}/
23distname                rpm-${version}-0.${date}
24extract.suffix          .src.rpm
25checksums               md5 d53782842ac11b3100a43fb2958c9bc0 \
26                        sha1 5e94f4679759c36ce76a4847401b22b660a97227 \
27                        rmd160 1b4af6831b864e485e6f9d9bee2c99f294e62cd8
28worksrcdir              rpm-${version}
29
30depends_build           port:libiconv
31
32depends_lib             port:beecrypt port:readline port:gettext \
33                        port:expat port:neon \
34                        port:python27 port:popt port:sqlite3 port:xar-devel \
35                        port:xz port:pcre port:ossp-uuid \
36                        port:db60 \
37                        port:perl5.22
38
39depends_run             path:lib/libssl.dylib:openssl \
40                        bin:gzip:gzip \
41                        bin:bzip2:bzip2 \
42                        bin:unzip:unzip
43
44extract.cmd             ${filespath}/rpm2cpio.sh
45extract.pre_args        ""
46extract.post_args       "| cpio -dvim"
47
48build.type              gnu
49
50configure.args          --disable-nls --without-javaglue --without-included-gettext \
51                        --with-libintl-prefix=${prefix} --with-libiconv-prefix=${prefix} \
52                        --mandir=${prefix}/share/man --infodir=${prefix}/share/info \
53                        --with-python=2.7 --with-perl --with-sqlite --with-db=external \
54                        --with-neon=external --with-beecrypt=external --with-popt=external \
55                        --with-xar=external --with-xz=external --with-pcre=external --with-uuid=external \
56                        --without-apidocs --sysconfdir=${prefix}/etc --with-path-cfg=${prefix}/etc/rpm
57configure.env           __PYTHON=${prefix}/bin/python2.7 __PERL=${prefix}/bin/perl5.22 \
58                        PERL=${prefix}/bin/perl5.22
59
60
61configure.args-append   --disable-openmp --with-lua=internal --with-syck=internal
62configure.cppflags-append       -I${prefix}/include/xar -I${prefix}/include/ossp
63
64configure.cppflags-append       -I${prefix}/include/db60
65configure.ldflags-append        -L${prefix}/lib/db60
66
67post-extract {
68        system -W ${workpath} "${portutil::autoconf::tar_command} -xzf rpm-${version}.tar.gz"
69}
70
71post-patch {
72        reinplace "s/, @ldaddr//" ${worksrcpath}/perl/Makefile.PL.in ; # remove -rpath flags
73}
74
75post-configure {
76        reinplace "s/--tag=CC/--tag=CXX/" ${worksrcpath}/Makefile
77        reinplace "s/--mode=link \$(CCLD)/--mode=link \$(CXX)/" ${worksrcpath}/Makefile
78}
79
80post-destroot {
81        xinstall -d -m 755 ${destroot}${prefix}/etc/rpm
82        system "${worksrcpath}/rpm --macros=${worksrcpath}/macros/macros --eval='%{_target_platform}' > ${destroot}${prefix}/etc/rpm/platform"
83        system "${worksrcpath}/rpm --macros=${worksrcpath}/macros/macros --eval='noarch-%{_target_vendor}-%{_target_os}%{?_gnu}' >> ${destroot}${prefix}/etc/rpm/platform"
84
85        delete [glob ${destroot}${prefix}/lib/perl5/*/*/*/auto/RPM/.packlist]
86        delete [glob ${destroot}${prefix}/lib/perl5/*/*/perllocal.pod]
87
88        # where the RPM database lives
89        destroot.keepdirs ${destroot}${prefix}/etc/rpm\
90                          ${destroot}${prefix}/var/lib/rpm\
91                          ${destroot}${prefix}/var/spool/repackage\
92                          ${destroot}${prefix}/src/rpm/BUILD\
93                          ${destroot}${prefix}/src/rpm/RPMS\
94                          ${destroot}${prefix}/src/rpm/SOURCES\
95                          ${destroot}${prefix}/src/rpm/SPECS\
96                          ${destroot}${prefix}/src/rpm/SRPMS
97}
98
99platform darwin {
100        configure.args-append --disable-optimized --disable-aio \
101                              --with-glob --enable-broken-chown \
102                              --disable-rpath
103                        # avoid bison-2.7 problems
104        configure.env-append    YACC='/usr/bin/bison -y'
105
106        post-destroot {
107                # Mac OS X specific changes
108        }
109}
110
111platform freebsd {
112
113        post-destroot {
114                # FreeBSD specific changes
115                reinplace "s;/usr/bin/tar;/usr/local/bin/gtar;" ${destroot}${prefix}/lib/rpm/macros
116                reinplace "s;/usr/bin/make;/usr/local/bin/gmake;" ${destroot}${prefix}/lib/rpm/macros
117        }
118}
119
120platform linux {
121
122        post-destroot {
123                # Linux specific changes
124        }
125}
126
127variant docs description "API documentation" {
128        depends_build-append port:doxygen path:bin/dot:graphviz
129        configure.args-delete --without-apidocs
130        configure.args-append --with-apidocs
131}
132
133livecheck.type  regex
134# get the last modified tarball
135livecheck.url   ${master_sites}
136livecheck.regex rpm-(\[0-9\\.\]+)(-\[0-9\\.\]+)?${extract.suffix}
Note: See TracBrowser for help on using the repository browser.