Last active
March 10, 2017 22:07
-
-
Save amontalban/4fe3816e19005ce1258bcccfce3e2879 to your computer and use it in GitHub Desktop.
Image::Magick patch for FreeBSD/Linux support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Makefile.PL.orig 2017-03-10 22:02:48.408518250 +0000 | |
+++ Makefile.PL 2017-03-10 22:06:53.689076385 +0000 | |
@@ -160,12 +160,18 @@ | |
} | |
} | |
+if ($Config{osname} eq 'freebsd') { | |
+ $LIB_magick = "MagickCore-6"; | |
+} else { | |
+ $LIB_magick = "MagickCore-6.Q16"; | |
+} | |
+ | |
# defaults for LIBS & INC & CCFLAGS params that we later pass to Writemakefile | |
my $INC_magick = '-I/usr/local/include/ImageMagick-6 -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/libxml2 -I"' . $Config{'usrinc'} . '/ImageMagick-6"'; | |
-my $LIBS_magick = '-L/usr/local/lib -lMagickCore-6.Q16 -lperl -lm'; | |
+my $LIBS_magick = "-L/usr/local/lib -l$LIB_magick -lperl -lm"; | |
my $CCFLAGS_magick = "$Config{'ccflags'} -I/usr/include/freetype2 -g -O2 -Wall -pthread -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16"; | |
-my $LDFLAGS_magick = "-L/usr/local/lib -lMagickCore-6.Q16 $Config{'ldflags'} "; | |
-my $LDDLFLAGS_magick = "-L/usr/local/lib -lMagickCore-6.Q16 $Config{'lddlflags'} "; | |
+my $LDFLAGS_magick = "-L/usr/local/lib -l$LIB_magick $Config{'ldflags'} "; | |
+my $LDDLFLAGS_magick = "-L/usr/local/lib -l$LIB_magick $Config{'lddlflags'} "; | |
if (($^O eq 'MSWin32') && ($Config{cc} =~ /gcc/)) { | |
my($Ipaths, $Lpaths) = AutodetectWin32gcc(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment