Debian Codegraph @

README

raw
1 NAME
2 Alien::SDL - building, finding and using SDL binaries
3
4 VERSION
5 Version 1.446
6
7 SYNOPSIS
8 Alien::SDL tries (in given order) during its installation:
9
10 * When given `--with-sdl-config' option use specified sdl-config script
11 to locate SDL libs.
12 perl Build.PL --with-sdl-config=/opt/sdl/bin/sdl-config
13
14 or using default script name 'sdl-config' by running:
15
16 perl Build.PL --with-sdl-config
17
18 IMPORTANT NOTE: Using --with-sdl-config avoids considering any other
19 build methods; no prompt with other available build options.
20
21 * Locate an already installed SDL via 'sdl-config' script.
22 * Check for SDL libs in directory specified by SDL_INST_DIR variable. In
23 this case the module performs SDL library detection via
24 '$SDL_INST_DIR/bin/sdl-config' script.
25 SDL_INST_DIR=/opt/sdl perl ./Build.PL
26
27 * Download prebuilt SDL binaries (if available for your platform).
28 * Build SDL binaries from source codes (if possible on your system).
29
30 Later you can use Alien::SDL in your module that needs to link agains
31 SDL and/or related libraries like this:
32
33 # Sample Makefile.pl
34 use ExtUtils::MakeMaker;
35 use Alien::SDL;
36
37 WriteMakefile(
38 NAME => 'Any::SDL::Module',
39 VERSION_FROM => 'lib/Any/SDL/Module.pm',
40 LIBS => Alien::SDL->config('libs', [-lAdd_Lib]),
41 INC => Alien::SDL->config('cflags'),
42 # + additional params
43 );
44
45 DESCRIPTION
46 Please see Alien for the manifesto of the Alien namespace.
47
48 In short `Alien::SDL' can be used to detect and get configuration
49 settings from an installed SDL and related libraries. Based on your
50 platform it offers the possibility to download and install prebuilt
51 binaries or to build SDL & co. from source codes.
52
53 The important facts:
54
55 * The module does not modify in any way the already existing SDL
56 installation on your system.
57 * If you reinstall SDL libs on your system you do not need to reinstall
58 Alien::SDL (providing that you use the same directory for the new
59 installation).
60 * The prebuild binaries and/or binaries built from sources are always
61 installed into perl module's 'share' directory.
62 * If you use prebuild binaries and/or binaries built from sources it
63 happens that some of the dynamic libraries (*.so, *.dll) will not
64 automaticly loadable as they will be stored somewhere under perl
65 module's 'share' directory. To handle this scenario Alien::SDL offers
66 some special functionality (see below).
67
68 METHODS
69 config()
70 This function is the main public interface to this module. Basic
71 functionality works in a very similar maner to 'sdl-config' script:
72
73 Alien::SDL->config('prefix'); # gives the same string as 'sdl-config --prefix'
74 Alien::SDL->config('version'); # gives the same string as 'sdl-config --version'
75 Alien::SDL->config('libs'); # gives the same string as 'sdl-config --libs'
76 Alien::SDL->config('cflags'); # gives the same string as 'sdl-config --cflags'
77
78 On top of that this function supports special parameters:
79
80 Alien::SDL->config('ld_shared_libs');
81
82 Returns a list of full paths to shared libraries (*.so, *.dll) that will
83 be required for running the resulting binaries you have linked with SDL
84 libs.
85
86 Alien::SDL->config('ld_paths');
87
88 Returns a list of full paths to directories with shared libraries (*.so,
89 *.dll) that will be required for running the resulting binaries you have
90 linked with SDL libs.
91
92 Alien::SDL->config('ld_shlib_map');
93
94 Returns a reference to hash of value pairs '<libnick>' =>
95 '<full_path_to_shlib'>, where '<libnick>' is shortname for SDL related
96 library like: SDL, SDL_gfx, SDL_net, SDL_sound ... + some non-SDL
97 shortnames e.g. smpeg, jpeg, png.
98
99 NOTE: config('ld_<something>') return an empty list/hash if you have
100 decided to use SDL libraries already installed on your system. This
101 concerns 'sdl-config' detection and detection via
102 '$SDL_INST_DIR/bin/sdl-config'.
103
104 check_header()
105 This function checks the availability of given header(s) when using
106 compiler options provided by "Alien::SDL->config('cflags')".
107
108 Alien::SDL->check_header('SDL.h');
109 Alien::SDL->check_header('SDL.h', 'SDL_net.h');
110
111 Returns 1 if all given headers are available, 0 otherwise.
112
113 get_header_version()
114 Tries to find a header file specified as a param in SDL prefix direcotry
115 and based on "#define" macros inside this header file tries to get a
116 version triplet.
117
118 Alien::SDL->get_header_version('SDL_mixer.h');
119 Alien::SDL->get_header_version('SDL_version.h');
120 Alien::SDL->get_header_version('SDL_gfxPrimitives.h');
121 Alien::SDL->get_header_version('SDL_image.h');
122 Alien::SDL->get_header_version('SDL_mixer.h');
123 Alien::SDL->get_header_version('SDL_net.h');
124 Alien::SDL->get_header_version('SDL_ttf.h');
125 Alien::SDL->get_header_version('smpeg.h');
126
127 Returns string like '1.2.3' or undef if not able to find and parse
128 version info.
129
130 BUGS
131 Please post issues and bugs at
132 http://rt.cpan.org/NoAuth/Bugs.html?Dist=Alien-SDL
133
134 AUTHOR
135 Kartik Thakore
136 CPAN ID: KTHAKORE
137 [email protected]
138 http://yapgh.blogspot.com
139
140 ACKNOWLEDGEMENTS
141 kmx - complete redesign between versions 0.7.x and 0.8.x
142
143 COPYRIGHT
144 This program is free software; you can redistribute it and/or modify it
145 under the same terms as Perl itself.
146
147 The full text of the license can be found in the LICENSE file included
148 with this module.
149