# Contribution from IT4Innovations National Supercomputing Center, Czech Republic
# JK

easyblock = 'ConfigureMake'

name = 'libreoffice'
version = '7.4.1.1'
local_javasuffix = '-Java-13'

homepage = 'https://libreoffice.org'
description = """
LibreOffice is a free and powerful office suite, and a successor to OpenOffice.org (commonly known as OpenOffice).
"""

toolchain = {'name': 'GCCcore', 'version': '11.3.0'}

source_urls = ['http://download.documentfoundation.org/libreoffice/src/7.4.1/']
sources = ['%(name)s-%(version)s.tar.xz']
checksums = ['2c5c219c538776b4ec3815fe74c1915024cbe17dd0950e725e544ff49b20a28c']

builddependencies = [('Doxygen', '1.9.4')]

dependencies = [
    ('libxslt', '1.1.34'),
    ('Qt5', '5.15.5'),
    ('flex', '2.6.4'),
#    ('GStreamer', '1.20.2'), # GCC, --disable-gstreamer
    ('NSS', '3.79'), # --disable-nss, experimental, will use OpenSSL instead
#    ('NSPR', '4.34'), # fix for failed to initialize NSS library?
    ('GTK3', '3.24.33'),
    ('Python', '3.10.4'),
#    ('Java', ''), # --without-java
    ('gperf', '3.1'),
# Java dependencies, or --without-java
    ('ant', '1.10.11', local_javasuffix, True),
#    ('JUnit', '4.13.2', local_javasuffix, True), # --with-junit=${EBROOTJUNIT}
]

configure_cmd = "./autogen.sh"
configopts = '--disable-cups --disable-gstreamer-1.0 --disable-postgresql-sdbc --without-junit --disable-mariadb-sdbc'
buildopts = "verbose=t"

runtest = "check"

sanity_check_paths = {
    'files': [],
    'dirs': ["."]
}

moduleclass = 'tools'
