source: trunk/dports/sysutils/rpm/Portfile @ 26259

Last change on this file since 26259 was 26259, checked in by n3npq@…, 12 years ago

Build rpm-4.4.6 from rpm5.org against python-2.5.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.6 KB
Line 
1# $Id: Portfile 26259 2007-06-17 20:14:54Z n3npq@mac.com $
2
3PortSystem 1.0
4name                    rpm
5version                 4.4.6
6revision                1
7platforms               darwin
8categories              sysutils archivers
9maintainers             n3npq@mac.com
10description             The RPM package management system.
11long_description        \
12        The RPM Package Manager (RPM) is a powerful command line driven \
13        package management system capable of installing, uninstalling, \
14        verifying, querying, and updating software packages. Each software \
15        package consists of an archive of files along with information about \
16        the package like its version, a description, etc.
17
18homepage                http://rpm5.org
19master_sites            http://rpm5.org/files/rpm/rpm-4.4/
20distfiles               rpm-${version}.tar.gz
21checksums               md5 baa6f371446c65b4080d1cd1f194a7ae
22
23depends_lib             lib:libhistory.5:readline port:gettext \
24                        lib:libsqlite3.0:sqlite3
25
26depends_build           port:expat port:neon \
27                        port:python25 port:popt \
28                        port:readline port:beecrypt \
29                        port:libiconv port:gettext
30depends_run             port:gzip \
31                        port:openssl \
32                        port:bzip2 \
33                        port:perl5.8
34
35                        ###zlib should be replaced with the internal rpm version:
36                        #lib:libz:zlib
37                        ###"expat" is for libneon, and "readline" is for rpm lua
38                       
39                        #"doxygen" is required for building the rpm API docs, default is --without
40                        #bin:doxygen:doxygen
41
42worksrcdir      rpm-${version}
43
44configure.args          --disable-nls --without-javaglue --without-included-gettext \
45                        --with-libintl-prefix=${prefix} --with-libiconv-prefix=${prefix} \
46                        --mandir=${prefix}/share/man --infodir=${prefix}/share/info \
47                        --with-python=2.5
48
49configure.env           __PYTHON="${prefix}/bin/python"
50
51build.type      gnu
52
53
54variant darwin {
55        patchfiles-append \
56                patch-file-src-Makefile.in \
57                patch-macros.in
58
59        post-patch {
60                file delete -force ${worksrcpath}/beecrypt
61                file delete -force ${worksrcpath}/elfutils
62                file delete -force ${worksrcpath}/neon
63                file delete -force ${worksrcpath}/sqlite
64        }
65
66#       use_autoconf    yes
67#       use_automake    yes
68
69        pre-configure {
70                xinstall -d -m 755 ${workpath}/librt
71                system "ln -sf /usr/lib/libSystem.B.dylib \
72                                ${workpath}/librt/librt.dylib"
73
74        #       system "touch ${worksrcpath}/aclocal.m4"
75        #       system "touch ${worksrcpath}/config.h.in"
76        }
77
78        post-configure {
79        #       system "find ${worksrcpath} -name Makefile.in | xargs touch"
80        #       system "find ${worksrcpath} -name Makefile | xargs touch"
81        }
82
83        configure.args-append --disable-optimized --disable-aio \
84                              --with-python=2.5 --with-lua --with-glob \
85                              --enable-broken-chown --disable-rpath
86
87        # requires doxygen:
88        #configure.args-append --with-apidocs
89
90        configure.args-append   \
91                LDFLAGS="-L${prefix}/lib -L${workpath}/librt" \
92                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"
93
94        post-destroot {
95                # Delete overlapping files.
96                file delete ${destroot}${prefix}/include/popt.h
97                system "rm -f ${destroot}${prefix}/share/man/man3/popt.3*"
98                system "rm -rf ${destroot}${prefix}/lib/libpopt.*"
99                system "rm -rf ${destroot}/System"
100                system "rm -rf ${destroot}/Library"
101                system "rm -f ${destroot}/usr/local/man/man3/RPM.3pm"
102
103                # MacOSX specific changes
104                reinplace "s;%{_usrsrc}/redhat;%{_usrsrc}/apple;" ${destroot}${prefix}/lib/rpm/macros
105
106                # where the RPM database lives
107                destroot.keepdirs "${destroot}${prefix}/var/lib/rpm"
108                destroot.keepdirs-append "${destroot}${prefix}/src/apple/BUILD"
109                destroot.keepdirs-append "${destroot}${prefix}/src/apple/RPMS"
110                destroot.keepdirs-append "${destroot}${prefix}/src/apple/SOURCES"
111                destroot.keepdirs-append "${destroot}${prefix}/src/apple/SPECS"
112                destroot.keepdirs-append "${destroot}${prefix}/src/apple/SRPMS"
113        }
114}
Note: See TracBrowser for help on using the repository browser.