VFR-maniac / L-SMASH-Works

Works based on L-SMASH project
98 stars 48 forks source link

$(DESTDIR) in 'make install' don't works as it should #34

Closed sl1pkn07 closed 9 years ago

sl1pkn07 commented 9 years ago

Hi

When specify DESTDIR= in 'make install', the symlink set the origin path to DESTDIR, this wrong if use in distro package manager.

example in Arch PKGBUILD script:

make DESTDIR=${pkgdir} install

install -d /home/sl1pkn07/aplicaciones/vapoursynth-plugin-lsmashsource-git/pkg/vapoursynth-plugin-lsmashsource-git/usr/lib /home/sl1pkn07/aplicaciones/vapoursynth-plugin-lsmashsource-git/pkg/vapoursynth-plugin-lsmashsource-git/usr/lib/vapoursynth
install -m 644 libvslsmashsource.so.780 /home/sl1pkn07/aplicaciones/vapoursynth-plugin-lsmashsource-git/pkg/vapoursynth-plugin-lsmashsource-git/usr/lib/libvslsmashsource.so.780
ln -f -s /home/sl1pkn07/aplicaciones/vapoursynth-plugin-lsmashsource-git/pkg/vapoursynth-plugin-lsmashsource-git/usr/lib/libvslsmashsource.so.780 /home/sl1pkn07/aplicaciones/vapoursynth-plugin-lsmashsource-git/pkg/vapoursynth-plugin-lsmashsource-git/usr/lib/vapoursynth/libvslsmashsource.so

This is wrong because when install by package manager, the 'libvslsmashsource.so.780' is installed in '/usr/lib/libvslsmashsource.so.780' (without DESTDIR). but the 'libvslsmashsource.so' (installed in '/usr/lib/vapoursynth/libvslsmashsource.so', without DESTDIR) point the origin to '/home/sl1pkn07/aplicaciones/vapoursynth-plugin-lsmashsource-git/pkg/vapoursynth-plugin-lsmashsource-git/usr/lib/libvslsmashsource.so.780'

this behavior is fixed if change the line

$(if $(SONAME), ln -f -s $(DESTDIR)$(libdir)/$(SONAME) $(DESTDIR)$(vsplugindir)/$(SONAME_LN))

to

$(if $(SONAME), ln -f -s $(libdir)/$(SONAME) $(DESTDIR)$(vsplugindir)/$(SONAME_LN))

then:

install -d /home/sl1pkn07/aplicaciones/vapoursynth-plugin-lsmashsource-git/pkg/vapoursynth-plugin-lsmashsource-git/usr/lib /home/sl1pkn07/aplicaciones/vapoursynth-plugin-lsmashsource-git/pkg/vapoursynth-plugin-lsmashsource-git/usr/lib/vapoursynth
install -m 644 libvslsmashsource.so.780 /home/sl1pkn07/aplicaciones/vapoursynth-plugin-lsmashsource-git/pkg/vapoursynth-plugin-lsmashsource-git/usr/lib/libvslsmashsource.so.780
ln -f -s /usr/lib/libvslsmashsource.so.780 /home/sl1pkn07/aplicaciones/vapoursynth-plugin-lsmashsource-git/pkg/vapoursynth-plugin-lsmashsource-git/usr/lib/vapoursynth/libvslsmashsource.so

'libvslsmashsource.so.780' is installed in '/usr/lib/libvslsmashsource.so.780', and the symlink is installed in '/usr/lib/vapoursynth/libvslsmashsource.so' with the origin point to '/usr/lib/libvslsmashsource.so.780'

EDIT: this is applicable to VapourSynth-FFT3DFilter and VapourSynth-TNLMeans (have the same behavior) EDIT2: better description, i think (sorry. my english is catastrophic)

greetings

VFR-maniac commented 9 years ago

Please PullRequest or send patch to fix this issue.