Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for OSX Compatibility #3

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions FFT3DFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@

#include <cstring>
#include <algorithm>

#include <cmath>
#include <stdlib.h>
#include "FFT3DFilter.h"
#include "info.h"

Expand Down Expand Up @@ -197,8 +198,8 @@ static void SigmasToPattern( float sigma, float sigma2, float sigma3, float sigm
{
/* it is not fast, but called only in constructor */
float sigmacur;
constexpr float ft2 = sqrt( 0.5f ) / 2; /* frequency for sigma2 */
constexpr float ft3 = sqrt( 0.5f ) / 4; /* frequency for sigma3 */
const float ft2 = sqrt( 0.5f ) / 2; /* frequency for sigma2 */
const float ft3 = sqrt( 0.5f ) / 4; /* frequency for sigma3 */
for( int h = 0; h < bh; h++ )
{
for( int w = 0; w < outwidth; w++ )
Expand Down
1 change: 1 addition & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ install: all
ifneq ($(IMPLIB),)
install -m 644 $(IMPLIB) $(DESTDIR)$(libdir)
else
$(RM) $(libdir)/lib$(BASENAME).*
Copy link
Contributor

@sl1pkn07 sl1pkn07 Jul 18, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this broken the DESTDIR behavior

make DESTDIR="/tmp/makepkg/vapoursynth-plugin-fft3dfilter-git/pkg/vapoursynth-plugin-fft3dfilter-git" install
install -d /tmp/makepkg/vapoursynth-plugin-fft3dfilter-git/pkg/vapoursynth-plugin-fft3dfilter-git/usr/lib /tmp/makepkg/vapoursynth-plugin-fft3dfilter-git/pkg/vapoursynth-plugin-fft3dfilter-git/usr/lib/vapoursynth
rm -f /usr/lib/libvsfft3dfilter.*
rm: no se puede borrar '/usr/lib/libvsfft3dfilter.so.22': Permiso denegado
make: *** [GNUmakefile:31: install] Error 1

fixed if add $(DESTDIR) before of $(libdir)

install -m 644 $(SONAME) $(DESTDIR)$(libdir)/$(SONAME)
$(if $(SONAME), ln -f -s $(libdir)/$(SONAME) $(DESTDIR)$(vsplugindir)/$(SONAME_LN))
endif
Expand Down
11 changes: 7 additions & 4 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -163,27 +163,30 @@ else
fi
case "$TARGET_OS" in
*mingw*|*cygwin*)
SYS="WIN32"
SOSUFFIX="dll"
SONAME="$BASENAME.$SOSUFFIX"
SOFLAGS="-Wl,--enable-auto-image-base -Wl,--export-all-symbols"
;;
*darwin*)
SYS="MACOSX"
SOSUFFIX="dylib"
SONAME="lib$BASENAME.$REV.$SOSUFFIX"
SONAME_LN="lib$BASENAME.$SOSUFFIX"
SOFLAGS="-dynamiclib -Wl,-single_module -Wl,-read_only_relocs,suppress -install_name ${DESTDIR}${libdir}/${SONAME}"
CXXFLAGS="$CXXFLAGS -fPIC"
LDFLAGS="-fPIC $LDFLAGS"
DEPLIBS="libfftw3f_threads $DEPLIBS libm"
;;
*)
*linux*)
SOSUFFIX="so"
SONAME="lib$BASENAME.$SOSUFFIX.$REV"
SONAME_LN="lib$BASENAME.$SOSUFFIX"
SOFLAGS="-Wl,-soname,$SONAME"
CXXFLAGS="$CXXFLAGS -fPIC"
LDFLAGS="-fPIC $LDFLAGS"
DEPLIBS="libfftw3f_threads $DEPLIBS libm"
;;
;;
*)
error_exit "target is unsupported system"
esac

# -- add extra --------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion fft3dfilter_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*****************************************************************************/

#include <algorithm>

#include <cmath>
#include <fftw3.h>

// since v1.7 we use outpitch instead of outwidth
Expand Down