You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
50c61ae740
Upstream Release: https://github.com/Hamlib/Hamlib/blob/master/NEWS
107 lines
3.6 KiB
Tcl
107 lines
3.6 KiB
Tcl
# -*- 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 github 1.0
|
|
PortGroup legacysupport 1.0
|
|
|
|
# clock_gettime
|
|
legacysupport.newest_darwin_requires_legacy 15
|
|
|
|
name hamlib
|
|
categories science
|
|
license LGPL GPL
|
|
maintainers {ra1nb0w @ra1nb0w} openmaintainer
|
|
|
|
description Ham Radio Control Libraries
|
|
|
|
long_description Flexible and portable shared libraries that offer a \
|
|
standardized API to control any radio oriented equipment \
|
|
through a computer interface.
|
|
|
|
homepage https://hamlib.github.io
|
|
|
|
github.setup Hamlib Hamlib 4.7.2
|
|
github.tarball_from releases
|
|
revision 0
|
|
|
|
checksums rmd160 ac977be95a1c2ffb7f3ca8fec6c4c29efbfe5f7d \
|
|
sha256 ae1fcf2dbc80ea0786ea8f047b09399c3f7737d1930442f61a031708ed33e88f \
|
|
size 3107379
|
|
|
|
distname hamlib-${version}
|
|
|
|
depends_build-append \
|
|
port:pkgconfig
|
|
|
|
depends_lib-append \
|
|
port:libtool \
|
|
port:libusb-compat \
|
|
port:libxml2 \
|
|
port:readline
|
|
|
|
compiler.cxx_standard 2011
|
|
|
|
set python_versions { 3.10 3.11 3.12 3.13 3.14}
|
|
# python binding is not enabled by default
|
|
set default_python_variant ""
|
|
|
|
# Define the available variants
|
|
foreach py_ver ${python_versions} {
|
|
set py_ver_no_dot [join [split ${py_ver} "."] ""]
|
|
set variant_line {variant python${py_ver_no_dot} description "Build with python ${py_ver} support"}
|
|
foreach py_over ${python_versions} {
|
|
if { ${py_ver} == ${py_over} } { continue }
|
|
set py_over_no_dot [join [split ${py_over} "."] ""]
|
|
append variant_line " conflicts python${py_over_no_dot}"
|
|
}
|
|
append variant_line { { } }
|
|
eval $variant_line
|
|
if {[variant_isset python${py_ver_no_dot}]} {
|
|
if {${default_python_variant} != "+python${py_ver_no_dot}"} {
|
|
set default_python_variant ""
|
|
}
|
|
}
|
|
}
|
|
|
|
# set default python variant if not selected
|
|
if {${default_python_variant} != ""} {
|
|
default_variants-append "${default_python_variant}"
|
|
}
|
|
|
|
# If a python variant is enabled, activate it
|
|
set active_python_version ""
|
|
set active_python_version_no_dot ""
|
|
foreach py_ver ${python_versions} {
|
|
set py_ver_no_dot [join [split ${py_ver} "."] ""]
|
|
if {[variant_isset python${py_ver_no_dot}]} {
|
|
set active_python_version ${py_ver}
|
|
set active_python_version_no_dot ${py_ver_no_dot}
|
|
|
|
depends_build-append \
|
|
port:swig-python
|
|
|
|
depends_lib-append \
|
|
port:python${active_python_version_no_dot}
|
|
|
|
configure.args-append \
|
|
--with-python-binding
|
|
|
|
# specify the Python version to use
|
|
set python_framework_dir ${frameworks_dir}/Python.framework/Versions/${active_python_version}
|
|
configure.args-append \
|
|
PYTHON=${python_framework_dir}/bin/python${active_python_version} \
|
|
PYTHON_EXECUTABLE=${python_framework_dir}/bin/python${active_python_version} \
|
|
PYTHON_INCLUDE_DIR=${python_framework_dir}/Headers \
|
|
PYTHON_LIBRARY=${python_framework_dir}/Python \
|
|
PYTHON_VERSION=${py_ver}
|
|
|
|
# install the binding in the right directory
|
|
set python_site_dir ${python_framework_dir}/lib/python${active_python_version}/site-packages
|
|
destroot.args-append \
|
|
pythondir=${python_site_dir} \
|
|
pyexecdir=${python_site_dir} \
|
|
pkgpythondir=${python_site_dir}/${name} \
|
|
pkgpyexecdir=${python_site_dir}/${name}
|
|
}
|
|
}
|