# -*- 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               cmake 1.1

name                    socketxx
# There seems to be little upstream work on socketxx (a.k.a. socket++).
# Use the version supplied by GDCM instead.
set gdcm_version        3.0.5
# see ${worksrcpath}/CMakeLists.txt
version                 1.12.12
revision                2
categories              devel
license                 BSD
maintainers             {mcalhoun @MarcusCalhoun-Lopez} openmaintainer
platforms               darwin
description             a family of C++ classes that gives the same interface as the iostream classes for input and output for communication between processes
long_description        Socket++ is {*}${description}.

homepage                https://github.com/malaterre/socketxx-1
master_sites            sourceforge:gdcm
distname                gdcm-${gdcm_version}
dist_subdir             gdcm

checksums               rmd160  3150b9dc8219baedec372463992d380432ab7620 \
                        sha256  9f1f32ba553ed5df0d9251427a824e4646d7d47dbdfb3afef0c9c3b5b677a2c4 \
                        size    3862334

compiler.cxx_standard   2011

worksrcdir              gdcm-${gdcm_version}/Utilities/socketxx

patchfiles-append       patch-include.diff

configure.args-append   -DBUILD_SHARED_LIBS=ON \
                        -DSOCKETXX_INSTALL_INCLUDE_DIR=include/socket++

post-destroot {
    xinstall -m 0644 ${extract.dir}/build/socket++/config.h ${destroot}${prefix}/include/socket++
    copy ${destroot}${prefix}/lib/libsocketxx.dylib ${destroot}${prefix}/lib/libsocket++.dylib
}

livecheck.version       ${gdcm_version}
