libusb: disable udev (#19713)

* libusb: disable udev

spack has no libudev/systemd package currently

* convert to AutotoolsPackage

* remove spack import
This commit is contained in:
Andrew W Elble 2020-11-03 17:47:38 -05:00 committed by GitHub
parent ddd2aa0ffc
commit efb26bb14f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,10 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Libusb(Package):
class Libusb(AutotoolsPackage):
"""Library for USB device access."""
homepage = "https://libusb.info/"
@ -22,14 +20,13 @@ class Libusb(Package):
depends_on('automake', type='build', when='@master')
depends_on('libtool', type='build', when='@master')
phases = ['autogen', 'install']
@when('@master')
def patch(self):
mkdir('m4')
def autogen(self, spec, prefix):
if self.spec.satisfies('@master'):
autogen = Executable('./autogen.sh')
autogen()
def install(self, spec, prefix):
configure('--disable-dependency-tracking',
'--prefix=%s' % self.spec.prefix)
make('install')
def configure_args(self):
args = []
args.append('--disable-dependency-tracking')
# no libudev/systemd package currently in spack
args.append('--disable-udev')
return args