Skip to content

Commit

Permalink
Add quartz variant.
Browse files Browse the repository at this point in the history
Requested by:		Hadley Wickham <h.wickham@gmail.com>

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@19342 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Jim Mock committed Aug 30, 2006
1 parent 97fa8d5 commit ec7958c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions x11/gtk2/Portfile
Expand Up @@ -3,6 +3,7 @@
PortSystem 1.0
name gtk2
version 2.10.2
revision 1
categories x11
maintainers mij@opendarwin.org
description Gimp ToolKit version 2
Expand All @@ -26,6 +27,15 @@ use_bzip2 yes
depends_lib port:glib2 port:tiff port:libpng port:atk port:pango \
port:gettext lib:libX11.6:XFree86

pre-configure {
if {[variant_isset quartz]} {
if { ![file exists ${prefix}/include/cairo/cairo-quartz.h] } {
ui_msg "\nYou must first build cairo with the quartz variant enabled. Please\nuninstall (or deactivate) the cairo port and reinstall by running:\n\n\"port install cairo +quartz\"\n"
exit 1
}
}
}

configure.env LDFLAGS="-L${prefix}/lib -lpango-1.0" \
CPPFLAGS="-I${prefix}/include -no-cpp-precomp -DX_LOCALE" \
CFLAGS="-O3 -funroll-loops -fstrict-aliasing"
Expand All @@ -37,6 +47,8 @@ build.args CFLAGS+="-I${x11prefix}/include"

platform darwin 6 { patchfiles-append patch-gtk-xdgmime-xdgmimemagic.c }

variant quartz { configure.args-append --enable-gdktarget=quartz }

post-patch { reinplace "s|xdg_data_dirs = \"/usr|xdg_data_dirs = \"${prefix}/share:/usr|g" ${worksrcpath}/gtk/xdgmime/xdgmime.c
reinplace "s|g_strdup (\"/usr|g_strdup (\"${prefix}|g" ${worksrcpath}/gtk/gtkicontheme.c }

Expand Down

0 comments on commit ec7958c

Please sign in to comment.