unzip: fix build for XCode 12 on macosx (#19453)

- [x] `build_targets` should use `macosx` on macOS, `generic` on other systems
- [x] enable `LARGE_FILE_SUPPORT` by default
This commit is contained in:
Todd Gamblin 2020-10-21 15:31:29 -07:00 committed by GitHub
parent a1278bfba0
commit 93e7267dcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,8 +19,15 @@ class Unzip(MakefilePackage):
def patch(self):
filter_file(r'^LFLAGS2=.*', 'LFLAGS2=', join_path('unix', 'configure'))
make_args = ['-f', join_path('unix', 'Makefile')]
build_targets = make_args + ['generic']
make_args = [
'-f', join_path('unix', 'Makefile'),
"LOC=-DLARGE_FILE_SUPPORT"
]
@property
def build_targets(self):
target = "macosx" if "platform=darwin" in self.spec else "generic"
return self.make_args + [target]
def url_for_version(self, version):
return 'http://downloads.sourceforge.net/infozip/unzip{0}.tar.gz'.format(version.joined)