Changeset 73979


Ignore:
Timestamp:
Nov 30, 2010, 10:08:58 PM (7 years ago)
Author:
michaelld@…
Message:

libgpod changes:

  • revert primary install location back to ${prefix} because only the Python parts should be installed there;
  • allow for python variants (25, 26, others if required); default is python26;
  • allow for not using Python at all;
  • allow for use of LIBUSB 1.0 if requested, correctly;
  • do universal install correctly; and
  • fix port dependencies.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/multimedia/libgpod/Portfile

    r72399 r73979  
     1# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
    12# $Id$
    23
     
    56name                libgpod
    67version             0.8.0
    7 revision            1
     8revision            2
    89categories          multimedia
    910platforms           darwin
     
    2324
    2425depends_lib         port:p5-xml-parser \
    25                     port:py26-gobject \
    26                     port:libplist
     26                    port:libplist \
     27                    port:gdk-pixbuf2 \
     28                    port:taglib
    2729
    28 set python.branch   2.6
    29 set python.prefix   ${frameworks_dir}/Python.framework/Versions/${python.branch}
    30 set python.bin      ${python.prefix}/bin/python${python.branch}
     30universal_variant   yes
    3131
    32 configure.args-append  --prefix=${python.prefix}
    33 configure.env-append    PYGOBJECT_CODEGEN=${python.prefix}/bin/pygobject-codegen-2.0
    34 configure.pkg_config_path  ${python.prefix}/lib/pkgconfig
     32# make sure to not use already-installed files,
     33# to the best of our ability
     34configure.ldflags-delete "-L${prefix}/lib"
     35configure.cppflags-delete "-I${prefix}/include"
     36
     37variant python25 conflicts python26 \
     38description {Build Bindings for Python 2.5} {}
     39
     40variant python26 conflicts python25 \
     41description {Build Bindings for Python 2.6} {}
     42
     43# default to python26 bindings
     44if {![variant_isset python25] && ![variant_isset python26]} {
     45    default_variants +python26
     46}
     47
     48set python.branch ""
     49if {[variant_isset python25]} {
     50    set python.branch 2.5
     51} elseif {[variant_isset python26]} {
     52    set python.branch 2.6
     53}
     54
     55if {${python.branch} != ""} {
     56    set python.prefix ${frameworks_dir}/Python.framework/Versions/${python.branch}
     57    set pyver [join [split ${python.branch} "."] ""]
     58    depends_lib-append  port:py${pyver}-gobject port:py${pyver}-mutagen
     59    configure.env-append PYGOBJECT_CODEGEN=${python.prefix}/bin/pygobject-codegen-2.0
     60    configure.pkg_config_path ${python.prefix}/lib/pkgconfig
     61    configure.env-append PYTHON=${prefix}/bin/python${python.branch}
     62} else {
     63    configure.args-append --disable-pygobject --with-python=no
     64}
     65
     66configure.args-append --disable-silent-rules
     67
     68variant libusb description {Include enhanced USB support} {
     69    depends_lib-append port:libusb
     70}
     71
     72post-patch {
     73    if {![variant_isset libusb]} {
     74        reinplace "/have_libusb/s@=yes@=no@g" \
     75            ${worksrcpath}/configure
     76    }
     77}
     78
     79post-destroot {
     80    # fix instal location of Python stuff, if installed
     81    if {${python.branch} != ""} {
     82        set dr_python_dir ${destroot}${python.prefix}/lib
     83        xinstall -m 755 -d ${dr_python_dir}
     84        move ${destroot}${prefix}/lib/python${python.branch} \
     85            ${dr_python_dir}
     86    }
     87}
    3588
    3689livecheck.type          regex
Note: See TracChangeset for help on using the changeset viewer.