# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 102457 2013-02-03 21:02:21Z jeremyhu@macports.org $

PortSystem      1.0

name            mozplugger
categories      www x11
version         1.14.3
platforms       darwin
license         GPL-2+
maintainers     jeremyhu openmaintainer
description     Use popular X11 applications as plugins for firefox

long_description ${description}

homepage        http://mozplugger.mozdev.org/index.html
master_sites    http://mozplugger.mozdev.org/files/
use_bzip2       no

checksums           md5     ac2f916ac93c3b59dec2ebfc511d00a0 \
                    sha1    f23dfed9ee67fc33746f247922a750c2a6b1d579 \
                    rmd160  2d4157ef59ca417e712321c8cecbde9fdf868929

depends_lib     port:xorg-libX11

compiler.blacklist gcc-4.0

build.args-append \
    LDSHARED="${configure.cc} -shared"

patchfiles \
    destdir.patch \
    universal.patch

post-patch {
    reinplace -locale C "s:OPERA_DIR:MOZILLA_FIVE_HOME:" ${worksrcpath}/mozplugger.c
}

configure.env-append \
    MOZ_PLUGIN_PATH=${prefix}/lib/nsplugins
