# $Id$ PortSystem 1.0 PortGroup perl5 1.0 name rpm54 version 5.4.15 revision 3 set date 20140824 set branch [join [lrange [split ${version} .] 0 1] .] platforms darwin freebsd linux license LGPL-2.1 categories sysutils archivers maintainers mac.com:n3npq afb 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 http://rpm5.org master_sites ${homepage}/files/rpm/rpm-${branch}/ distname rpm-${version}-0.${date} extract.suffix .src.rpm checksums md5 d53782842ac11b3100a43fb2958c9bc0 \ sha1 5e94f4679759c36ce76a4847401b22b660a97227 \ rmd160 1b4af6831b864e485e6f9d9bee2c99f294e62cd8 worksrcdir rpm-${version} depends_lib port:beecrypt port:readline port:gettext port:libiconv \ port:expat port:neon \ port:python27 port:popt port:sqlite3 port:xar-devel \ port:xz port:pcre port:ossp-uuid \ port:db60 depends_run path:lib/libssl.dylib:openssl \ bin:gzip:gzip \ bin:bzip2:bzip2 \ bin:unzip:unzip 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 # set default variant to perl5_24 (#52081) perl5.conflict_variants yes perl5.branches 5.24 perl5.default_branch 5.24 perl5.create_variants ${perl5.branches} configure.args --disable-nls --without-javaglue --without-included-gettext \ --with-libintl-prefix=${prefix} --with-libiconv-prefix=${prefix} \ --mandir=${prefix}/share/man --infodir=${prefix}/share/info \ --with-python=2.7 --with-perl --with-sqlite --with-db=external \ --with-neon=external --with-beecrypt=external --with-popt=external \ --with-xar=external --with-xz=external --with-pcre=external --with-uuid=external \ --without-apidocs --sysconfdir=${prefix}/etc --with-path-cfg=${prefix}/etc/rpm configure.env __PYTHON=${prefix}/bin/python2.7 __PERL=${perl5.bin} \ PERL=${perl5.bin} configure.args-append --disable-openmp --with-lua=internal --with-syck=internal configure.cppflags-append -I${prefix}/include/xar -I${prefix}/include/ossp 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-optimized --disable-aio \ --with-glob --enable-broken-chown \ --disable-rpath # 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 port:doxygen path:bin/dot:graphviz configure.args-delete --without-apidocs configure.args-append --with-apidocs } livecheck.type regex # get the last modified tarball livecheck.url ${master_sites} livecheck.regex rpm-(\[0-9\\.\]+)(-\[0-9\\.\]+)?${extract.suffix}