Skip to content
Permalink
Browse files

bbcolors: new port, version 1.0.1

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@68766 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
ryandesign committed Jun 12, 2010
1 parent 115d631 commit 8d21683db6eb2fe4535f3559682dd7036447ddec
Showing with 113 additions and 0 deletions.
  1. +91 −0 sysutils/bbcolors/Portfile
  2. +14 −0 sysutils/bbcolors/files/launcher
  3. +8 −0 sysutils/bbcolors/files/patch-bbcolors
@@ -0,0 +1,91 @@
# $Id$

PortSystem 1.0

name bbcolors
version 1.0.1
platforms darwin
categories sysutils
maintainers ryandesign
license GPL-1+ Artistic

description a tool for saving and loading text color \
preference schemes for BBEdit and TextWrangler.

long_description ${name} is ${description}.

homepage http://daringfireball.net/projects/bbcolors/
master_sites http://daringfireball.net/projects/downloads/:main \
${homepage}schemes/:schemes
use_zip yes

distname ${name}_${version}
set bell_dark_distname {Bell Dark.bbcolors}
set gruber_dark_distname {Gruber Dark.bbcolors}
set gruber_light_distname {Gruber Light.bbcolors}

set bbcolors_distfile [suffix ${distname}]
set bell_dark_distfile [suffix ${bell_dark_distname}]
set gruber_dark_distfile [suffix ${gruber_dark_distname}]
set gruber_light_distfile [suffix ${gruber_light_distname}]

distfiles ${bbcolors_distfile}:main \
${bell_dark_distfile}:schemes \
${gruber_dark_distfile}:schemes \
${gruber_light_distfile}:schemes

checksums ${bbcolors_distfile} \
md5 43ae9c44f0a423fcf3e6a21ed3afaec4 \
sha1 ce47e5ffbcafb01c21acdf242372f351215a80bf \
rmd160 07f7c2e2aa3fd3ba2178b749bf7ac40a2c88d6f3 \
${bell_dark_distfile} \
md5 2fe37f9966992bc856a45318888b0889 \
sha1 71191b45393916d17c235505cbbf58a3fa52cdf0 \
rmd160 e6170b8a71b0d30340587ed12dec88fdb1e4b901 \
${gruber_dark_distfile} \
md5 56a4942ab04fdd045f7d9093cf3a796d \
sha1 ffe45f7033705e26faa647fce6137e3b9f859070 \
rmd160 761d8217a42aaace169aa4bc70db5a50c0c3141d \
${gruber_light_distfile} \
md5 7620dd83ab446b6282f21b8d34a99722 \
sha1 b98a08a6a3458e7efd110f17432def07346e6dfa \
rmd160 cab408c89df901f73ba345ff4c82da72efc013bf

depends_lib path:bin/perl:perl5

supported_archs noarch

extract.mkdir yes

post-extract {
xinstall -W ${filespath} launcher ${worksrcpath}
}

patchfiles patch-bbcolors

post-patch {
reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/bbcolors ${worksrcpath}/launcher
}

use_configure no

build {
system "cd ${worksrcpath} && ${prefix}/bin/pod2man bbcolors > bbcolors.1"
}

destroot {
xinstall -d ${destroot}${prefix}/libexec/${name}
xinstall -W ${worksrcpath} bbcolors ${destroot}${prefix}/libexec/${name}
xinstall -W ${worksrcpath} launcher ${destroot}${prefix}/bin/bbcolors
ln -s bbcolors ${destroot}${prefix}/bin/twcolors

xinstall -W ${worksrcpath} bbcolors.1 ${destroot}${prefix}/share/man/man1
ln -s bbcolors.1 ${destroot}${prefix}/share/man/man1/twcolors.1

xinstall -d ${destroot}${prefix}/share/${name}/schemes
xinstall -W ${worksrcpath} -m 644 \
${bell_dark_distname} \
${gruber_dark_distname} \
${gruber_light_distname} \
${destroot}${prefix}/share/${name}/schemes
}
@@ -0,0 +1,14 @@
#!/bin/bash

# Install default color schemes
SCHEMES="$HOME/Library/Application Support/BBColors"
mkdir -p "$SCHEMES"
cp -np @PREFIX@/share/bbcolors/schemes/*.bbcolors "$SCHEMES"

# Affect TextWrangler instead of BBEdit if called as "twcolors"
EXTRA=""
if [ "twcolors" == "$(basename "$0")" ]; then
EXTRA="-tw"
fi

@PREFIX@/libexec/bbcolors/bbcolors $EXTRA "$@"
@@ -0,0 +1,8 @@
--- bbcolors.orig 2006-10-15 22:34:46.000000000 -0500
+++ bbcolors 2010-06-12 15:41:49.000000000 -0500
@@ -1,4 +1,4 @@
-#!/usr/bin/env perl
+#!@PREFIX@/bin/perl
#
# bbcolors -- A text color scheme manager for BBEdit and TextWrangler.
#

0 comments on commit 8d21683

Please sign in to comment.
You can’t perform that action at this time.