Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions packages/epics-asyn/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack.package import *


class EpicsAsyn(MakefilePackage):
"""A general purpose facility for interfacing device specific code to low level drivers. asynDriver allows non-blocking device support that works with both blocking and non-blocking drivers."""

homepage = "https://epics-modules.github.io/master/asyn/"
url = "https://github.com/epics-modules/asyn/archive/R4-43.tar.gz"

# https://github.com/epics-modules/asyn/blob/master/LICENSE
license("Other", checked_by="eflumerf")

version("4-43", sha256="2cd1da9bafc6e09d18992d00797ea4b966d7404be2fb0d309bc3f542e6b3c7ba")

depends_on("c", type="build")
depends_on("cxx", type="build")

depends_on("epics-base")
depends_on("libtirpc")

def edit(self, spec, prefix):
release = FileFilter("configure/RELEASE")
release.filter("^#EPICS_BASE *=.*", f"EPICS_BASE = {spec['epics-base'].prefix}")
config_site = FileFilter("configure/CONFIG_SITE")
config_site.filter("^# TIRPC=YES", "TIRPC=YES")
pass

def install(self, spec, prefix):
make("INSTALL_LOCATION=" + prefix, "install")
38 changes: 38 additions & 0 deletions packages/epics-streamdevice/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack.package import *


class EpicsStreamdevice(MakefilePackage):
"""StreamDevice is a generic EPICS device support for devices with a "byte stream" based communication interface.
That means devices that can be controlled by sending and receiving strings (in the broadest sense, including non-printable characters and even null-bytes).
Examples for this type of communication interface are serial line (RS-232, RS-485, ...), IEEE-488 (also known as GPIB or HP-IB), and telnet-like TCP/IP."""

homepage = "https://paulscherrerinstitute.github.io/StreamDevice/"
url = "https://github.com/paulscherrerinstitute/StreamDevice/archive/refs/tags/2.8.26.tar.gz"

license("LGPL-3.0-only", checked_by="eflumerf")

version("2.8.26", sha256="0c212245fb4626a94e291a6744f5483343b3b896907693c6a71048de68faabc4")

variant("asyn", default=True, description="Enable asyn support")
variant("pcre", default=True, description="Enable pcre support")

depends_on("epics-base")
depends_on("epics-asyn", when="+asyn")
depends_on("pcre", when="+pcre")

def edit(self, spec, prefix):
release = FileFilter("configure/RELEASE")
release.filter("^EPICS_BASE *=.*", f"EPICS_BASE = {spec['epics-base'].prefix}")
if "+asyn" in spec:
release.filter("^ASYN *=.*", f"ASYN = {spec['epics-asyn'].prefix}")
if "+pcre" in spec:
release.filter("^PCRE *=.*", f"PCRE_INCLUDE = {spec['pcre'].prefix.include}\nPCRE_LIB = {spec['pcre'].prefix.lib}")
release.filter("CALC *=.*", "#CALC") # No CALC support for now
pass

def install(self, spec, prefix):
make("INSTALL_LOCATION=" + prefix, "install")