Skip to content
Permalink
Showing with 37 additions and 22 deletions.
  1. +37 −22 graphics/netpbm/Portfile
@@ -1,10 +1,18 @@
# -*- 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

# Download distfile from GitHub mirror because fetching from svn keeps being
# problematic.
github.setup chneukirchen netpbm-mirror 3642751efdc205fb08bcc4f5c4d5879fc6077a72
name netpbm
version 10.81.03
svn.revision 3155
set source_branch advanced
set userguide_branch userguide
set userguide_commit d07fb0a8b5d8fd9aa3ca6aa53694400cda4ba425
set userguide_revision 3157
categories graphics
platforms darwin freebsd linux
maintainers {ryandesign @ryandesign} openmaintainer
@@ -20,24 +28,33 @@ long_description A whole bunch of utilities for primitive manipulation \

homepage http://netpbm.sourceforge.net/

fetch.type svn
svn.url http://svn.code.sf.net/p/netpbm/code/
svn.method checkout
svn.post_args-append \
--non-recursive ${svn.dir}
worksrcdir advanced

post-fetch {
svn.args-replace ${svn.method} update
svn.args-replace ${svn.url} -r${svn.revision}
svn.args-append advanced userguide
svn.post_args-delete \
--non-recursive ${svn.dir}
system -W ${svn.dir} "${svn.cmd} ${svn.pre_args} ${svn.args} ${svn.post_args}"
distname ${source_branch}-r${svn.revision}
set source_distfile ${distfiles}
set userguide_distname ${userguide_branch}-r${userguide_revision}
set userguide_distfile ${userguide_distname}${extract.suffix}

distfiles ${source_distfile}:source \
${userguide_distfile}:userguide

master_sites ${github.master_sites}:source \
${github.homepage}/tarball/${userguide_commit}:userguide

checksums ${source_distfile} \
rmd160 cf28b08664f8af12806d3e5112f42f90dd54c05e \
sha256 0fb5efaea421fc445422c16e74d65249dc956779a5889b60612ea88b862793a3 \
size 2777098 \
${userguide_distfile} \
rmd160 6149e7b4677f9acc85c0728c7f512cd454e879a7 \
sha256 6c449ec679854666c33064351054b730ef99468617de584939b15ad348b805e6 \
size 719106

post-extract {
move ${workpath}/${github.author}-${github.project}-[string range ${git.branch} 0 6] ${workpath}/${distname}
move ${workpath}/${github.author}-${github.project}-[string range ${userguide_commit} 0 6] ${workpath}/${userguide_distname}

# Delete the manpages that aren't for this subport.
set libmanpages {libnetpbm pam pbm pgm pnm ppm}
foreach f [glob ${svn.dir}/userguide/*.html] {
foreach f [glob ${workpath}/${userguide_distname}/*.html] {
if {([lsearch -exact ${libmanpages} [file rootname [file tail ${f}]]] == -1) == (${subport} ne ${name})} {
delete ${f}
}
@@ -120,15 +137,15 @@ set pkgtargets {}

post-build {
# Build manpages from html files.
system -W ${workpath}/userguide "${build.cmd} MAKEMAN='${worksrcpath}/buildtools/makeman -v' USERGUIDE=. -f ${worksrcpath}/buildtools/manpage.mk manpages"
system -W ${workpath}/${userguide_distname} "${build.cmd} MAKEMAN='${worksrcpath}/buildtools/makeman -v' USERGUIDE=. -f ${worksrcpath}/buildtools/manpage.mk manpages"

# The tests can only be run after things have been destrooted ("packaged").
system -W ${worksrcpath} "${build.cmd} ${pkgtargets} pkgdir=${destroot}${prefix}"
}

destroot {
# Install manpages.
system -W ${workpath}/userguide "${build.cmd} MANDIR=${destroot}${prefix}/share/man USERGUIDE=. -f ${worksrcpath}/buildtools/manpage.mk installman"
system -W ${workpath}/${userguide_distname} "${build.cmd} MANDIR=${destroot}${prefix}/share/man USERGUIDE=. -f ${worksrcpath}/buildtools/manpage.mk installman"

move ${destroot}${prefix}/misc ${destroot}${prefix}/share/${name}

@@ -141,7 +158,7 @@ destroot {
}

if {${subport} eq ${name}} {
revision 0
revision 1
installs_libs no

# TODO: Don't build libnetpbm again in netpbm subport.
@@ -202,15 +219,13 @@ if {${subport} eq ${name}} {

default_variants +x11

livecheck.type regex
livecheck.url https://sourceforge.net/p/netpbm/code/HEAD/log/?path=/advanced/version.mk&limit=1
livecheck.regex {>[^\d>]*(\d+(\.\d+)+)[^\d<]*<}
github.livecheck.branch ${source_branch}
} else {
livecheck.type none
}

subport libnetpbm {
revision 0
revision 1
license Permissive

# TODO: descriptions

0 comments on commit 9192b32

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