$OpenBSD: patch-PerlMagick_Makefile_PL,v 1.12 2007/11/22 17:20:56 okan Exp $
--- PerlMagick/Makefile.PL.orig	Tue Nov  6 21:29:54 2007
+++ PerlMagick/Makefile.PL	Mon Nov 19 15:24:16 2007
@@ -59,13 +59,13 @@ WriteMakefile
    'DEFINE'	=> ' -D_LARGE_FILES=1 -DHAVE_CONFIG_H',     # e.g., '-DHAVE_SOMETHING' 
 
    # Header search specfication and preprocessor flags
-   'INC'	=> '-I../ -I.. -I/usr/include/freetype2 -I/usr/include/libxml2',
+   'INC'	=> '-I../ -I.. -I%%X11BASE%%/include/freetype2 -I%%X11BASE%%/include/libxml2',
 
    # C pre-processor flags (e.g. -I & -D options)
    # 'CPPFLAGS'    => "$Config{'cppflags'} -I/usr/include/freetype2 -I/usr/include/libxml2",
 
    # C compiler flags (e.g. -O -g)
-   'CCFLAGS'     => "$Config{'ccflags'} -O3 -g -Wall -W -pthread",
+   'CCFLAGS'     => "$Config{'ccflags'} %%CFLAGS%%",
 
    # Linker flags for building an executable
    'LDFLAGS'    =>  "-L../magick/.libs -lMagick -L../wand/.libs -lWand $Config{'ldflags'} -L/usr/lib64 -lfreetype",
@@ -77,7 +77,7 @@ WriteMakefile
    'INSTALLBIN'	=> '/usr/bin',
 
    # Library specification
-   'LIBS'	=> [ '-L/usr/lib -L../magick/.libs -lMagick -L../wand/.libs -lWand' ],
+   'LIBS'	=> [ '-L%%LOCALBASE%%/lib -L%%X11BASE%%/lib -L../magick/.libs -lMagick -L../wand/.libs -lWand' ],
 
    # Perl binary name (if a Perl binary is built)
    'MAP_TARGET'	=> 'PerlMagick',
