Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new Portfile eso-flames-fposs #27711

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions science/eso-flames-fposs/Portfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# -*- coding: utf-8; mode: tcl; tab-width: 2; 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 compilers 1.0

set instrument flames

name eso-flames-fposs

version 115.0.3
revision 0

categories science
license GPL-2+
maintainers eso.org:john.pritchard
homepage http://www.eso.org/sci/observing/phase2/SMGuidelines/FPOSS.FLAMES.html
description ESO FLAMES Observation Preparation software
long_description ESO FLAMES Observation Preparation software.

master_sites https://ftp.eso.org/pub/usg/fposs/
distname flames-fposs-${version}
distfiles fposs-${version}.tar.gz

checksums fposs-115.0.3.tar.gz \
rmd160 065a65f558317661d1356bfeee579f8790c14ecb \
sha256 9d16463dacfaa493a2221c352b2aa323bd0edd2f86c3d1fcafe6588a11f0989b \
size 2319171

set worksrcpath ${workpath}/fposs-${version}

#compilers.choose cc cxx
#compilers.setup gcc

configure.cflags-append -std=c11
configure.cxxflags-append -std=c11

#default_variants +${compilers.gcc_default}
use_parallel_build no

depends_run port:tk port:tcl \
port:ncurses \
port:xorg-server

#variant xquartz description {Use this variant if you have XQuartz installed.} {
# depends_run-remove port:xorg-server
# depends_run-append port:xorg-libX11
#}

configure {
reinplace "s@\$(CC) \$(CFLAGS) -c \$(PAFCHK_MODULE)@\$(CC) -DFLAMES_ONLY -DDRAMA_BUILD \$(CWARNINGS) \$(COPT) -I\$(PAFCHK_MODULE)/include -c \$(PAFCHK_MODULE)@" \
${worksrcpath}/fposs/src/Makefile_Darwin
reinplace "s@^CC\[\[:space:\]\].*=.*@CC = ${configure.cc}@" \
${worksrcpath}/fposs/src/Makefile_Darwin
reinplace "s@gcc-mp-\[0-9\]*@${configure.cc}@g" \
${worksrcpath}/pafchk/src/makefile.novlt
}

build {
reinplace "s?@@FPOSSBASEPATH@@?${prefix}/libexec/${name}/lib/fposs?" ${worksrcpath}/fposs/scripts/fposs.sh.tpl
reinplace "s?@@BINPATH@@?${prefix}/libexec/${name}/lib/fposs/bin?" ${worksrcpath}/fposs/scripts/fposs.sh.tpl
reinplace "s?@@LIBPATH@@?${prefix}/libexec/${name}/lib/fposs/lib?" ${worksrcpath}/fposs/scripts/fposs.sh.tpl
reinplace "s?@@USER@@?.fposs?" ${worksrcpath}/fposs/scripts/fposs.sh.tpl
reinplace "s?../doc?doc?" ${worksrcpath}/fposs/scripts/fposs.sh.tpl
reinplace "s@^bashlib=.*$@bashlib=${prefix}/libexec/${name}/bin/bash_library.sh@" ${worksrcpath}/fposs/scripts/fposs.sh.tpl
system "cd ${worksrcpath}/pafchk/src && \
CFLAGS='${configure.cflags}' CXXFLAGS='${configure.cxxflags}' \
make -f makefile.novlt"
system "cd ${worksrcpath}/fposs/src && \
CFLAGS='${configure.cflags}' CXXFLAGS='${configure.cxxflags}' \
make"
}

destroot {
system "cd ${worksrcpath}/fposs/src && make INTROOT='${destroot}${prefix}/libexec/${name}' install"
system "/usr/bin/install -d ${destroot}${prefix}/bin"
system "/usr/bin/install -d ${destroot}${prefix}/libexec/${name}/bin"
system "/usr/bin/install ${worksrcpath}/fposs/scripts/fposs.sh.tpl ${destroot}${prefix}/libexec/${name}/bin/fposs.sh"
system "/usr/bin/install ${worksrcpath}/fposs/scripts/bash_library.sh ${destroot}${prefix}/libexec/${name}/bin"
system "/usr/bin/install ${worksrcpath}/fposs/scripts/fposs_fixINSfilename.sh ${destroot}${prefix}/libexec/${name}/bin"
ln -s ${prefix}/libexec/${name}/bin/fposs.sh ${destroot}${prefix}/bin
#ln -s ${prefix}/libexec/${name}/bin/fposs_fixINSfilename.sh ${destroot}${prefix}/bin
ln -s ${prefix}/libexec/${name}/share/fposs ${destroot}${prefix}/share/fposs
}

livecheck.type regex
livecheck.url https://ftp.eso.org/pub/usg/fposs/ver_info.html
livecheck.regex ".*https://ftp.eso.org/pub/usg/fposs/eso-fposs-\"(\\d+(?:\\.\\d+)*)\.tar.gz.*"