# -*- 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                raptor2
version             2.0.16
revision            3
set major           [lindex [split ${version} .] 0]
description         Raptor RDF Parser Toolkit
long_description    Raptor is an open source C library that provides a set of \
                    parsers and serializers that generate Resource Description \
                    Framework (RDF) triples by parsing syntaxes or serializing \
                    the triples into a syntax.
maintainers         nomaintainer
license             {Apache-2+ GPL-2+ LGPL-2.1+}
categories          www
homepage            https://librdf.org/raptor
master_sites        https://download.librdf.org/source/

checksums           rmd160  8eb0b4256d84150eac2b6872820430238eaad089 \
                    sha256  089db78d7ac982354bdbf39d973baf09581e6904ac4c92a98c5caadb3de44680 \
                    size    1750726

depends_build       path:bin/pkg-config:pkgconfig

depends_lib         port:curl \
                    path:lib/pkgconfig/icu-uc.pc:icu \
                    port:libxml2 \
                    port:libxslt \
                    port:yajl

patchfiles-append   patch-libxml_ver.diff
patch.pre_args-replace  -p0 -p1

# raptor_json.c: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'static'
# raptor_json.c: error: 'raptor_json_yajl_integer' undeclared here (not in a function)
compiler.c_standard 2011

# Use pkg-config; xml2-config causes overlinking
configure.args      --without-xml2-config

test.run            yes
test.target         check

livecheck.type      regex
livecheck.url       ${master_sites}
livecheck.regex     "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
