Ignore:
Timestamp:
Jun 18, 2007, 12:51:08 PM (12 years ago)
Author:
jmpp@…
Message:

Major cleanup of the portfile, bringing it up to speed with current MacPorts best practices while still preserving its structure.
Changes not yet tested so the port may not actually build, the purpose of this commit is to distribute these changes so that Jeff
and Anders (and anyone else willing to contribute, of course ;) start the real work on a much more clearner base.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/sysutils/rpm/Portfile

    r26268 r26285  
    22
    33PortSystem 1.0
     4
    45name                    rpm
    56version                 4.4.9
     
    1617
    1718homepage                http://rpm5.org
    18 master_sites            http://rpm5.org/files/rpm/rpm-4.4/
    19 distfiles               rpm-${version}.tar.gz
     19master_sites            ${homepage}/files/${name}/${name}-4.4
    2020checksums               md5 210b768006e7d88dd8a3bcd498ea27f6
     21
     22depends_build           port:expat port:neon \
     23                        port:python24 port:popt \
     24                        port:readline port:beecrypt \
     25                        port:libiconv port:gettext
    2126
    2227depends_lib             lib:libhistory.5:readline port:gettext \
    2328                        lib:libsqlite3.0:sqlite3
    2429
    25 depends_build           port:expat port:neon \
    26                         port:python25 port:popt \
    27                         port:readline port:beecrypt \
    28                         port:libiconv port:gettext
    2930depends_run             port:gzip \
    3031                        port:openssl \
     
    3637                        ###"expat" is for libneon, and "readline" is for rpm lua
    3738                       
    38                         #"doxygen" is required for building the rpm API docs, default is --without
    39                         #bin:doxygen:doxygen
    40 
    41 worksrcdir      rpm-${version}
     39build.type      gnu
    4240
    4341configure.args          --disable-nls --without-javaglue --without-included-gettext \
    4442                        --with-libintl-prefix=${prefix} --with-libiconv-prefix=${prefix} \
    4543                        --mandir=${prefix}/share/man --infodir=${prefix}/share/info \
    46                         --with-python=2.5
     44                        --with-python=2.4
    4745
    48 configure.env           __PYTHON="${prefix}/bin/python"
    49 
    50 build.type      gnu
     46configure.cflags-append           __PYTHON="${prefix}/bin/python"
    5147
    5248
    53 variant darwin {
     49platform darwin {
    5450        patchfiles-append \
    5551                patch-macros.in \
     
    5753
    5854        post-patch {
    59                 file delete -force ${worksrcpath}/beecrypt
    60                 file delete -force ${worksrcpath}/elfutils
    61                 file delete -force ${worksrcpath}/neon
    62                 file delete -force ${worksrcpath}/sqlite
     55                delete ${worksrcpath}/beecrypt
     56                delete ${worksrcpath}/elfutils
     57                delete ${worksrcpath}/neon
     58                delete ${worksrcpath}/sqlite
    6359        }
    6460
     
    6763
    6864        pre-configure {
    69                 xinstall -d -m 755 ${workpath}/librt
    70                 system "ln -sf /usr/lib/libSystem.B.dylib \
    71                                 ${workpath}/librt/librt.dylib"
     65                      xinstall -d -m 755 ${workpath}/librt
     66                      ln -sf /usr/lib/libSystem.B.dylib \
     67                                ${workpath}/librt/librt.dylib
    7268
    73         #       system "touch ${worksrcpath}/aclocal.m4"
    74         #       system "touch ${worksrcpath}/config.h.in"
    75         }
     69#                     system "touch ${worksrcpath}/aclocal.m4"
     70#                     system "touch ${worksrcpath}/config.h.in"
    7671
    77         post-configure {
    78         #       system "find ${worksrcpath} -name Makefile.in | xargs touch"
    79         #       system "find ${worksrcpath} -name Makefile | xargs touch"
    8072        }
    8173
    8274        configure.args-append --disable-optimized --disable-aio \
    83                               --with-python=2.5 --with-lua --with-glob \
    84                               --enable-broken-chown --disable-rpath
     75                              --with-lua --with-glob --enable-broken-chown \
     76                              --disable-rpath
    8577
    86         # requires doxygen:
    87         #configure.args-append --with-apidocs
     78        configure.cflags-append -I/Library/Frameworks/Python.framework/Versions/2.4/include
     79        configure.cppflags-append -I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4
     80        configure.ldflags-append -L${workpath}/librt
    8881
    89         configure.args-append   \
    90                 LDFLAGS="-L${prefix}/lib -L${workpath}/librt" \
    91                 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"
     82#       post-configure {
     83#                      system "find ${worksrcpath} -name Makefile.in | xargs touch"
     84#                      system "find ${worksrcpath} -name Makefile | xargs touch"
     85#       }
    9286
    9387        post-destroot {
    9488                # Delete overlapping files.
    95                 file delete ${destroot}${prefix}/include/popt.h
    96                 system "rm -f ${destroot}${prefix}/share/man/man3/popt.3*"
    97                 system "rm -rf ${destroot}${prefix}/lib/libpopt.*"
    98                 system "rm -rf ${destroot}/System"
    99                 system "rm -rf ${destroot}/Library"
    100                 system "rm -f ${destroot}/usr/local/man/man3/RPM.3pm"
     89                delete ${destroot}${prefix}/include/popt.h
     90                delete ${destroot}${prefix}/share/man/man3/popt.3*
     91                delete ${destroot}${prefix}/lib/libpopt.*
     92                delete ${destroot}/System
     93                delete ${destroot}/Library
     94                delete ${destroot}/usr/local/man/man3/RPM.3pm
    10195
    10296                # MacOSX specific changes
     
    10498
    10599                # where the RPM database lives
    106                 destroot.keepdirs "${destroot}${prefix}/var/lib/rpm"
    107                 destroot.keepdirs-append "${destroot}${prefix}/src/apple/BUILD"
    108                 destroot.keepdirs-append "${destroot}${prefix}/src/apple/RPMS"
    109                 destroot.keepdirs-append "${destroot}${prefix}/src/apple/SOURCES"
    110                 destroot.keepdirs-append "${destroot}${prefix}/src/apple/SPECS"
    111                 destroot.keepdirs-append "${destroot}${prefix}/src/apple/SRPMS"
     100                destroot.keepdirs ${destroot}${prefix}/var/lib/rpm\
     101                                  ${destroot}${prefix}/src/apple/BUILD\
     102                                  ${destroot}${prefix}/src/apple/RPMS\
     103                                  ${destroot}${prefix}/src/apple/SOURCES\
     104                                  ${destroot}${prefix}/src/apple/SPECS\
     105                                  ${destroot}${prefix}/src/apple/SRPMS
    112106        }
    113107}
     108
     109variant docs {
     110        depends_run-append bin:doxygen:doxygen 
     111        configure.args-append --with-apidocs
     112}
Note: See TracChangeset for help on using the changeset viewer.