Andreas Wacknitz
2024-03-31 783118944874d559e30eea1600352e3feb5263a7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source.  A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#
 
#
# Copyright 2013 Alexander Pyhalov.  All rights reserved.
# Copyright 2023 Friedrich Kink.  All rights reserved.
#
 
BUILD_BITS=64
include ../../../make-rules/shared-macros.mk
 
COMPONENT_NAME=        rrdtool
 
COMPONENT_VERSION=    1.8.0
COMPONENT_REVISION=    1
COMPONENT_FMRI=        image/rrdtool
COMPONENT_CLASSIFICATION=Applications/System Utilities
COMPONENT_SUMMARY=    Data analysis tool generating graphical representations
COMPONENT_DESCRIPTION=    RRDtool is the OpenSource industry standard, high performance data \
            logging and graphing system for time series data. RRDtool can be \
            easily integrated in shell scripts, perl, python, ruby, lua or tcl \
            applications.
COMPONENT_SRC=        $(COMPONENT_NAME)-1.x-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE=    v$(COMPONENT_VERSION).tar.gz
COMPONENT_ARCHIVE_HASH= sha256:88a59a645161d0cfd1af898459fc033af975816278cf132cc66bf0dd8d0559cc
COMPONENT_ARCHIVE_URL=    https://github.com/oetiker/$(COMPONENT_NAME)-1.x/archive/refs/tags/$(COMPONENT_ARCHIVE)
COMPONENT_PROJECT_URL=    https://oss.oetiker.ch/rrdtool/
COMPONENT_LICENSE=    GPLv2
COMPONENT_LICENSE_FILE=    LICENSE
 
RUBY_VER=        2.6
 
PATH=/usr/ruby/$(RUBY_VER)/bin:$(PATH.gnu)
RUBY_LIB_VER=2.6.0
 
include $(WS_MAKE_RULES)/common.mk
 
#rrd_config.h is obviously a leftover of a configure run in original source directors
#as such it has precedence in include search path (includes features.h which does not exist 
#in openindiana. Simply deleting is save as configure run will just create a correct 
#rrd_config.h ind build directory
COMPONENT_PREP_ACTION= (cd $(@D) && /bin/rm -f src/rrd_config.h && bootstrap ) 
 
COMPONENT_POST_INSTALL_ACTION=    $(shell /bin/chmod -R u+w $(@D) )
 
CONFIGURE_ENV+=        PYTHON=python$(PYTHON_VERSION)
CONFIGURE_ENV+=        PERL=$(PERL)
CONFIGURE_ENV+=        PERLCC=$(CC)
CONFIGURE_OPTIONS+=    --with-ruby-options="sitedir=/usr/ruby/$(RUBY_VER)/lib/ruby/$(RUBY_LIB_VER)/$(MACH64)-solaris$(SOLARIS_VERSION) libdir=/usr/ruby/$(RUBY_VER)/lib/$(MACH64)"
CONFIGURE_OPTIONS+=    --with-perl-options="CC=$(CC) LD=$(CC) LIB=/usr/perl5/$(PERL_VERSION)/lib"
CONFIGURE_OPTIONS+=     --enable-ruby
CONFIGURE_OPTIONS+=     --enable-tcl
CONFIGURE_OPTIONS+=     --enable-python
CONFIGURE_OPTIONS+=     --enable-static=no
CONFIGURE_OPTIONS+=    --without-systemdsystemunitdir
 
# Needed for "gmake test" to work successfully.
unexport SHELLOPTS
 
COMPONENT_TEST_TRANSFORMS += \
        '-n ' \
        '-e "/^TOTAL/p" ' \
        '-e "/^SKIP/p" ' \
        '-e "/^PASS/p" ' \
        '-e "/^XPASS/p" ' \
        '-e "/^XFAIL/p" ' \
        '-e "/^FAIL/p" ' \
        '-e "/^ERROR/p" '
 
#RRDs.so is installed with perm 555 which breaks RUNPATH stripping
install: $(INSTALL_64) ; $(shell /bin/chmod -R u+w $(@D) )
 
# manually added dependencies
REQUIRED_PACKAGES += runtime/perl
 
# Auto-generated dependencies
REQUIRED_PACKAGES += image/library/libpng16
REQUIRED_PACKAGES += library/desktop/cairo
REQUIRED_PACKAGES += library/desktop/pango
REQUIRED_PACKAGES += library/glib2
REQUIRED_PACKAGES += library/libxml2
REQUIRED_PACKAGES += runtime/lua
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/library/math