2013-09-26 17:14:40 +02:00

33 lines
1.3 KiB
Plaintext

$NetBSD: patch-aa,v 1.5 2012/03/04 22:27:08 wiz Exp $
Does not ignore CFLAGS.
--- c_stuff/Makefile.PL.orig 2008-07-02 23:07:14.000000000 +0200
+++ c_stuff/Makefile.PL
@@ -34,7 +34,7 @@ system("sdl-config --cflags 2>/dev/null
ccompile('#include <SDL.h>
#include <SDL_mixer.h>',
'',
- chomp_(`sdl-config --cflags`),
+ chomp_($ENV{CFLAGS} . ' ' . `sdl-config --cflags`),
chomp_(`sdl-config --libs`) . ' -lSDL_mixer')
or
die_ 'SDL_mixer development environment seems to be missing (failed to compile and link a simple program against libSDL_mixer)';
@@ -43,7 +43,7 @@ ccompile('#include <SDL.h>
ccompile('#include <SDL.h>
#include <SDL_mixer.h>',
'Mix_FadeInMusicPos(NULL, 0, 0, 0);',
- chomp_(`sdl-config --cflags`),
+ chomp_($ENV{CFLAGS} . ' ' . `sdl-config --cflags`),
chomp_(`sdl-config --libs`) . ' -lSDL_mixer')
or
die_ 'SDL_mixer >= 1.2.2 is needed (impossible to create an executable with function Mix_FadeInMusicPos)';
@@ -77,6 +77,6 @@ WriteMakefile(
'VERSION_FROM' => 'fb_c_stuff.pm', # finds VERSION
'OBJECT' => 'fb_c_stuff.o',
'INC' => chomp_(`sdl-config --cflags`) . ' ' . chomp_(`pkg-config SDL_Pango --cflags`) . ' -I.',
- 'OPTIMIZE' => '-O2 -Wall',
+ 'OPTIMIZE' => chomp_($ENV{CFLAGS} . ' -O2 -Wall'),
'MAKEFILE' => 'Makefile_c',
);