giflib: define prefix and libversion also when building (#25263)
This commit is contained in:
parent
2738bc17a1
commit
8c8b934fd8
@ -24,14 +24,24 @@ class Giflib(MakefilePackage, SourceforgePackage):
|
||||
|
||||
patch('bsd-head.patch')
|
||||
|
||||
def prefix_and_libversion_args(self):
|
||||
args = []
|
||||
if self.spec.satisfies('@5.2.0:'):
|
||||
args.extend([
|
||||
'PREFIX={0}'.format(self.spec.prefix),
|
||||
'LIBMAJOR={0}'.format(self.spec.version.up_to(1)),
|
||||
'LIBVER={0}'.format(self.spec.version)
|
||||
])
|
||||
return args
|
||||
|
||||
@property
|
||||
def build_targets(self):
|
||||
targets = ['all'] + self.prefix_and_libversion_args()
|
||||
return targets
|
||||
|
||||
@property
|
||||
def install_targets(self):
|
||||
targets = ['install']
|
||||
if self.spec.satisfies('@5.2.0:'):
|
||||
targets.append('PREFIX={0}'.format(self.spec.prefix))
|
||||
targets.append('LIBMAJOR={0}'.format(self.spec.version.up_to(1)))
|
||||
targets.append('LIBVER={0}'.format(self.spec.version))
|
||||
|
||||
targets = ['install'] + self.prefix_and_libversion_args()
|
||||
return targets
|
||||
|
||||
def check(self):
|
||||
|
Loading…
Reference in New Issue
Block a user