Ticket #48131: oxygengtk2.diff

File oxygengtk2.diff, 3.9 KB (added by RJVB (René Bertin), 9 years ago)
  • oxygen-gtk2/Portfile

    old new  
    11# -*- 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
    22# kate: backspace-indents true; indent-pasted-text true; indent-width 4; keep-extra-spaces true; remove-trailing-spaces modified; replace-tabs true; replace-tabs-save true; syntax Tcl/Tk; tab-indents true; tab-width 4;
    3 # $Id: Portfile 137819 2015-06-20 19:26:29Z mk@macports.org $
     3# $Id: Portfile Thu Jun  5 12:10:38 UTC 2014 rjvbertin@gmail.com $
    44
    55PortSystem          1.0
     6PortGroup           cmake 1.0
    67PortGroup           muniversal 1.0
    78
    89name                oxygen-gtk2
    910subport             oxygen-gtk3 {}
     11revision            1
    1012
    1113categories          x11 gtk
    1214
     
    2628maintainers         gmail.com:rjvbertin
    2729
    2830homepage            http://kde-look.org/content/show.php/Oxygen+Gtk?content=136216
     31default master_sites {"kde:stable/${subport}/${version}/src/
     32                    ftp://ftp.kde.org/pub/kde/stable/${subport}/${version}/src"}
     33default distname    {${subport}-${version}}
    2934
    3035if {${subport} eq "oxygen-gtk3"} {
    3136    version             1.4.1
    32     distname            ${subport}-${version}
    3337
    34     PortGroup           cmake 1.0
    35     cmake.out_of_source yes
    36 
    37     master_sites        kde:stable/${subport}/${version}/src/ \
    38                         ftp://ftp.kde.org/pub/kde/stable/${subport}/${version}/src
    3938    livecheck.regex     "oxygen-gtk3 - version.*(1\\.\\d+?(\\.\\d+))"
    4039
    4140    checksums           rmd160  3279bfd21840cd4c7fa85e4d411c2a962cffa9e3 \
     
    4544} else {
    4645    version             1.4.5
    4746
    48     PortGroup           cmake 1.0
    49     cmake.out_of_source yes
    50 
    51     master_sites        kde:stable/${name}/${version}/src/ \
    52                         ftp://ftp.kde.org/pub/kde/stable/${name}/${version}/src
    5347    livecheck.regex     "Oxygen Gtk.*(1\\.\\d+?(\\.\\d+))"
    5448
    5549    checksums           rmd160  51360c2b16887b22d093e29fea3456210d92e335 \
     
    6862                    path:lib/pkgconfig/cairo.pc:cairo \
    6963                    port:dbus
    7064
    71 post-configure {
    72     # Default libraries extension is ".dylib" on Darwin, not ".so", but gtk-engines must have a .so extension
    73     # NB: replacing the extension post-destroot seems to work too, but this seems cleaner to me even if more complicated.
    74     if {[variant_isset universal]} {
    75         reinplace {s/liboxygen-gtk\.dylib/liboxygen-gtk\.so/} ${workpath}/build-x86_64/src/CMakeFiles/oxygen-gtk.dir/build.make \
    76             ${workpath}/build-x86_64/src/CMakeFiles/oxygen-gtk.dir/cmake_clean.cmake \
    77             ${workpath}/build-x86_64/src/CMakeFiles/oxygen-gtk.dir/link.txt \
    78             ${workpath}/build-x86_64/src/cmake_install.cmake
    79         reinplace {s/liboxygen-gtk\.dylib/liboxygen-gtk\.so/} ${workpath}/build-i386/src/CMakeFiles/oxygen-gtk.dir/build.make \
    80             ${workpath}/build-i386/src/CMakeFiles/oxygen-gtk.dir/cmake_clean.cmake \
    81             ${workpath}/build-i386/src/CMakeFiles/oxygen-gtk.dir/link.txt \
    82             ${workpath}/build-i386/src/cmake_install.cmake
    83     } else {
    84         reinplace {s/liboxygen-gtk\.dylib/liboxygen-gtk\.so/} ${workpath}/build/src/CMakeFiles/oxygen-gtk.dir/build.make \
    85             ${workpath}/build/src/CMakeFiles/oxygen-gtk.dir/cmake_clean.cmake \
    86             ${workpath}/build/src/CMakeFiles/oxygen-gtk.dir/link.txt \
    87             ${workpath}/build/src/cmake_install.cmake
    88     }
     65cmake.out_of_source yes
     66
     67post-patch {
     68    # build the engine as a shared module (= bundle), which means cmake will give it the .so extension
     69    # which is what GTk expects.
     70    # Cf. BKO #349475 (oxygen-gtk2) and BKO #349476 (oxygen-gtk3)
     71    reinplace "s|add_library(.*oxygen-gtk.*SHARED|add_library(oxygen-gtk MODULE|g" ${worksrcpath}/src/CMakeLists.txt
    8972}