Files
Ryan Carsten Schmidt 6cb872607c libwmf: Use a simpler method to use built-in gd
Use --without-sys-gd flag to tell the build not to use MacPorts gd2.

Also, since -I flags are in the wrong order, switch -I${prefix}/include
to -isystem${prefix}/include even though the build succeeded for me
without that.

Also, re-fix the bug that gdk-pixbuf2 would be used if present. This
partially reverts 7724df84d5.

Also, switch homepage to the new fork.

Closes: https://trac.macports.org/ticket/73947
2026-04-30 21:18:30 -05:00

68 lines
2.3 KiB
Tcl

# -*- 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
PortSystem 1.0
PortGroup github 1.0
github.setup caolanm libwmf 0.2.15 v
revision 1
categories graphics fonts
# Originally LGPL; unclear if now GPL.
# https://github.com/caolanm/libwmf/issues/29
license LGPL
maintainers nomaintainer
description Library for converting WMF (Window Metafile Format) files
long_description \
libwmf is a library for reading vector images in Microsoft's native \
Windows Metafile Format (WMF) and for either (a) displaying them in, \
e.g., an X window, or (b) converting them to more standard/open file \
formats.
github.tarball_from releases
checksums rmd160 e3c3ae693afd3ac0a4b43b4c8c9c5bdaf151873f \
sha256 bbc90f22b9e86d5f1890d7da11cf7a8e61f429d4c220d900c285021deabe7a52 \
size 2766626
depends_build \
path:bin/pkg-config:pkgconfig
depends_lib \
port:zlib \
port:libpng \
path:include/turbojpeg.h:libjpeg-turbo \
port:freetype \
port:expat
patchfiles-append no-gdk-pixbuf2.patch
configure.args --disable-silent-rules \
--with-jpeg \
--with-expat \
--without-sys-gd \
--without-x \
--with-fontdir=${prefix}/share/fonts/${name}
# Don't use already-installed MacPorts headers instead of project local headers.
configure.cppflags-replace -I${prefix}/include -isystem${prefix}/include
post-destroot {
xinstall -m 0755 -d ${destroot}${prefix}/share/doc/${name}
xinstall -m 0644 -W ${worksrcpath} AUTHORS COPYING CREDITS ChangeLog \
NEWS README TODO ${destroot}${prefix}/share/doc/${name}
}
variant x11 {
depends_lib-append port:xorg-libX11
depends_build-append port:mkfontscale
configure.args-replace --without-x --with-x
post-destroot {
system "mkfontscale ${destroot}${prefix}/share/fonts/${name} && mkfontdir ${destroot}${prefix}/share/fonts/${name}"
}
}
variant xml2 description {Use libxml2 not expat} {
depends_lib-replace port:expat port:libxml2
configure.args-replace --with-expat --with-libxml2
}