Skip to content

Commit

Permalink
gimp2-launcher: add new port
Browse files Browse the repository at this point in the history
gimp2-launcher is an alternative to gimp-app.
The major difference to end users is the icons.
  • Loading branch information
MarcusCalhoun-Lopez committed Jan 16, 2017
1 parent c374f0a commit 405fda5
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aqua/gimp-app/Portfile
Expand Up @@ -26,6 +26,8 @@ checksums sha1 e923c2b145814db35a747ef947ba1ce7da32edbc \

worksrcdir GIMPskel/ScriptExecCocoa

conflicts-append gimp2-launcher

set gimpapp ${workpath}/GIMPskel/GIMP.app

post-extract {
Expand Down
62 changes: 62 additions & 0 deletions aqua/gimp2-launcher/Portfile
@@ -0,0 +1,62 @@
# -*- 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

name gimp2-launcher
# should match gimp2 version
version 2.8.18
categories aqua graphics
platforms darwin
license GPL-3+
maintainers mcalhoun openmaintainer
description GIMP.app application bundle
long_description ${description}
homepage http://www.gimp.org/
set branch [join [lrange [split ${version} .] 0 1] .]
master_sites gimp:gimp/v${branch}/osx

# name has an architecture in it, but we delete architecture dependent components
distfiles gimp-${version}-x86_64-1.dmg

checksums rmd160 1614a7a2b1417995e452c1b82b93a43d4927fc3a \
sha256 e9f67f7a8b29871a977bb3d1c9129e473da2a52c3b46c2d42663cbbf939ded68

use_configure no
supported_archs noarch

#use_dmg yes
# use_dmg requires root access
# unable to reproduce error in portextract.tcl that justifies this
set dmg_mount [mkdtemp "/tmp/mports.XXXXXXXX"]
option extract.cmd [findBinary hdiutil ${portutil::autoconf::hdiutil_path}]
option extract.pre_args attach
option extract.post_args "-private -readonly -nobrowse -mountpoint \\\"${dmg_mount}\\\" && cd \\\"${dmg_mount}\\\" && [findBinary find ${portutil::autoconf::find_path}] . -depth -perm -+r -print0 | [findBinary cpio ${portutil::autoconf::cpio_path}] -0 -p -d -m -u \\\"${extract.dir}/${distname}\\\"; status=\$?; cd / && ${extract.cmd} detach \\\"${dmg_mount}\\\" && [findBinary rmdir ${portutil::autoconf::rmdir_path}] \\\"${dmg_mount}\\\"; exit \$status"

conflicts-append gimp-app
depends_run-append path:bin/gimp:gimp2

patchfiles-append patch-Info.plist.diff

post-extract {
delete {*}[glob ${worksrcpath}/GIMP.app/Contents/Resources/*.lproj]
delete ${worksrcpath}/GIMP.app/Contents/Resources/bin
delete ${worksrcpath}/GIMP.app/Contents/Resources/etc
delete ${worksrcpath}/GIMP.app/Contents/Resources/share
delete ${worksrcpath}/GIMP.app/Contents/Resources/lib
delete {*}[glob ${worksrcpath}/GIMP.app/Contents/MacOS/*]
}

build {
set script [open "${worksrcpath}/GIMP.app/Contents/MacOS/GIMP" w 0755]
puts ${script} "#!/bin/sh"
puts ${script} ""
puts ${script} "exec ${prefix}/bin/gimp"
close ${script}
}

destroot {
copy ${worksrcpath}/GIMP.app ${destroot}${applications_dir}
}

livecheck.url https://github.com/macports/macports-ports/blob/master/graphics/gimp2/Portfile
livecheck.regex {version +(\d+(?:\.\d+)*)}
16 changes: 16 additions & 0 deletions aqua/gimp2-launcher/files/patch-Info.plist.diff
@@ -0,0 +1,16 @@
--- GIMP.app/Contents/Info.plist.orig 2016-07-16 12:52:03.000000000 -0700
+++ GIMP.app/Contents/Info.plist 2017-01-15 05:57:02.000000000 -0700
@@ -26,13 +26,6 @@
<string>2.8.18</string>
<key>NSHumanReadableCopyright</key>
<string>© 1995-2016 The GIMP Development Team</string>
- <key>LSMinimumSystemVersion</key>
- <string>10.6.0</string>
- <key>LSMinimumSystemVersionByArchitecture</key>
- <dict>
- <key>x86_64</key>
- <string>10.6.0</string>
- </dict>
<key>NSHighResolutionCapable</key>
<true />
<key>CFBundleDocumentTypes</key>

0 comments on commit 405fda5

Please sign in to comment.