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

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

rpm5x: upgrade to perl5.22 (#48365)

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