# $Id: Portfile 26264 2007-06-17 22:04:38Z n3npq@mac.com $ PortSystem 1.0 name rpm version 4.4.8 platforms darwin categories sysutils archivers maintainers n3npq@mac.com 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 http://rpm5.org/files/rpm/rpm-4.4/ distfiles rpm-${version}.tar.gz checksums md5 dc73bcebf6b206058457c9a90f944c55 depends_lib lib:libhistory.5:readline port:gettext \ lib:libsqlite3.0:sqlite3 depends_build port:expat port:neon \ port:python25 port:popt \ port:readline port:beecrypt \ port:libiconv port:gettext depends_run port:gzip \ port:openssl \ port:bzip2 \ port:perl5.8 ###zlib should be replaced with the internal rpm version: #lib:libz:zlib ###"expat" is for libneon, and "readline" is for rpm lua #"doxygen" is required for building the rpm API docs, default is --without #bin:doxygen:doxygen worksrcdir rpm-${version} 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.5 configure.env __PYTHON="${prefix}/bin/python" build.type gnu variant darwin { patchfiles-append \ patch-macros.in \ patch-lib-rpmds.c post-patch { file delete -force ${worksrcpath}/beecrypt file delete -force ${worksrcpath}/elfutils file delete -force ${worksrcpath}/neon file delete -force ${worksrcpath}/sqlite } # use_autoconf yes # use_automake yes pre-configure { xinstall -d -m 755 ${workpath}/librt system "ln -sf /usr/lib/libSystem.B.dylib \ ${workpath}/librt/librt.dylib" # system "touch ${worksrcpath}/aclocal.m4" # system "touch ${worksrcpath}/config.h.in" } post-configure { # system "find ${worksrcpath} -name Makefile.in | xargs touch" # system "find ${worksrcpath} -name Makefile | xargs touch" } configure.args-append --disable-optimized --disable-aio \ --with-python=2.5 --with-lua --with-glob \ --enable-broken-chown --disable-rpath # requires doxygen: #configure.args-append --with-apidocs configure.args-append \ LDFLAGS="-L${prefix}/lib -L${workpath}/librt" \ CFLAGS="-I/Library/Frameworks/Python.framework/Versions/2.4/include -I${prefix}/include" CPPFLAGS="-I${prefix}/include -I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4" post-destroot { # Delete overlapping files. file delete ${destroot}${prefix}/include/popt.h system "rm -f ${destroot}${prefix}/share/man/man3/popt.3*" system "rm -rf ${destroot}${prefix}/lib/libpopt.*" system "rm -rf ${destroot}/System" system "rm -rf ${destroot}/Library" system "rm -f ${destroot}/usr/local/man/man3/RPM.3pm" # MacOSX specific changes reinplace "s;%{_usrsrc}/redhat;%{_usrsrc}/apple;" ${destroot}${prefix}/lib/rpm/macros # where the RPM database lives destroot.keepdirs "${destroot}${prefix}/var/lib/rpm" destroot.keepdirs-append "${destroot}${prefix}/src/apple/BUILD" destroot.keepdirs-append "${destroot}${prefix}/src/apple/RPMS" destroot.keepdirs-append "${destroot}${prefix}/src/apple/SOURCES" destroot.keepdirs-append "${destroot}${prefix}/src/apple/SPECS" destroot.keepdirs-append "${destroot}${prefix}/src/apple/SRPMS" } }