spack/var/spack/repos/builtin/packages/unzip/package.py
Mark W. Krentel e628f1b4eb unzip: fix build for cray back-end
Fixes #12007.

The Cray cc wrappers don't handle the -s flag (strip) cleanly, It's
not essential to strip the binary, so just remove the flag on Cray.

Note: the default build on Cray is for the back end and the unzip
binary won't run on the front end.  To build for FE, use something
like arch=cray-fe-x86_64.
2019-07-31 20:44:40 -07:00

31 lines
1.0 KiB
Python

# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Unzip(MakefilePackage):
"""Unzip is a compression and file packaging/archive utility."""
homepage = 'http://www.info-zip.org/Zip.html'
url = 'http://downloads.sourceforge.net/infozip/unzip60.tar.gz'
version('6.0', '62b490407489521db863b523a7f86375')
# The Cray cc wrapper doesn't handle the '-s' flag (strip) cleanly.
@when('platform=cray')
def patch(self):
filter_file(r'^LFLAGS2=.*', 'LFLAGS2=', join_path('unix', 'configure'))
make_args = ['-f', join_path('unix', 'Makefile')]
build_targets = make_args + ['generic']
def url_for_version(self, version):
return 'http://downloads.sourceforge.net/infozip/unzip{0}.tar.gz'.format(version.joined)
@property
def install_targets(self):
return self.make_args + ['prefix={0}'.format(self.prefix), 'install']