Skip to content

Commit

Permalink
graphviz-devel: bring graphviz-gui-devel and gvedit-devel in as subports
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@99116 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
ryandesign committed Oct 27, 2012
1 parent 38fa4e4 commit 341f500
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 126 deletions.
95 changes: 91 additions & 4 deletions graphics/graphviz-devel/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ PortSystem 1.0
PortGroup conflicts_build 1.0
PortGroup xcodeversion 1.0

# Keep relevant lines in sync between graphviz-devel, graphviz-gui-devel and gvedit-devel.
# Please keep the graphviz and graphviz-devel ports as similar as possible.

name graphviz-devel
conflicts graphviz
set my_name graphviz
version 2.29.20121022.0445
set thisbranch [strsed ${name} "g/^${my_name}//"]
set otherbranch [expr {${thisbranch} == {} ? {-devel} : {}}]
categories graphics
maintainers ryandesign
license EPL-1
Expand Down Expand Up @@ -41,6 +42,11 @@ checksums rmd160 1442cabec67722dcc413bae5bca6f026fec3f723
# graphviz-gui needs Xcode 3.1.2+; see #18811
minimum_xcodeversions {9 3.1.2}

if {${name} == ${subport}} {
conflicts graphviz${otherbranch}

depends_build port:pkgconfig

depends_lib port:xorg-libXaw \
path:lib/pkgconfig/pango.pc:pango \
port:jpeg \
Expand All @@ -57,8 +63,6 @@ depends_lib port:xorg-libXaw \
port:zlib \
port:gettext

depends_build port:pkgconfig

depends_run port:urw-fonts

# nawk: illegal jump type 339
Expand Down Expand Up @@ -292,3 +296,86 @@ post-destroot {
livecheck.type regex
livecheck.url ${homepage}Download_source.php
livecheck.regex ${my_name}-(\[0-9\]+\\.\[0-9\]*\[13579\](\\.\[0-9\]+)*)\\.tar
} else {
livecheck.type none
}

subport graphviz-gui${thisbranch} {
PortGroup xcode 1.0

conflicts graphviz-gui${otherbranch} graphviz-oldgui

categories-append aqua

description OS X Aqua GUI for viewing and exporting \
Graphviz graphs

long_description ${description}.

depends_lib port:graphviz${thisbranch}

pre-fetch {
if {"darwin" != ${os.platform}} {
ui_error "${subport} requires OS X."
return -code error "incompatible operating system"
}
if {${os.major} < 9} {
ui_error "${subport} requires OS X 10.5 or greater. Try graphviz-oldgui instead."
return -code error "incompatible OS X version"
}
}

extract.post_args-append ${worksrcdir}/macosx ${worksrcdir}/doc

patchfiles patch-project.pbxproj.diff

xcode.configuration Release

build.dir ${worksrcpath}/macosx
xcode.build.settings PREFIX=${prefix}

xcode.destroot.settings ${xcode.build.settings}
}

subport gvedit${thisbranch} {
PortGroup app 1.0
PortGroup qt4 1.0

conflicts gvedit${otherbranch}

description Qt-based GUI for Graphviz

long_description gvedit is a ${description}. You may prefer \
the Mac-native GUI in the graphviz-gui${thisbranch} port.

depends_lib-append port:graphviz${thisbranch}

post-extract {
if {[get_short_version_string] == ""} {
return -code error "cannot find ${app.name} short version string"
}
}

patchfiles patch-cmd-gvedit-Makefile.in.diff

# nawk: illegal jump type 339
conflicts_build nawk

configure.args --disable-silent-rules \
--with-qt

build.dir ${worksrcpath}/cmd/gvedit

app.name GVEdit
app.executable gvedit
app.icon ${build.dir}/images/icon.png

pre-destroot {
app.short_version_string [get_short_version_string]
}

proc get_short_version_string {} {
global build.dir
return [exec /usr/bin/sed -E -n s/^\[\[:space:\]\]*"Version:\[\[:space:\]\]*(.+)".*/\\1/p ${build.dir}/mainwindow.cpp]
}
}
60 changes: 0 additions & 60 deletions graphics/graphviz-gui-devel/Portfile

This file was deleted.

62 changes: 0 additions & 62 deletions graphics/gvedit-devel/Portfile

This file was deleted.

0 comments on commit 341f500

Please sign in to comment.