source: trunk/dports/sysutils/rpm54/Portfile

Last change on this file was 154389, checked in by mojca@…, 11 months ago

rpm54: remove the perl5_22 variant (#52081)

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