• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

bin/H21-Feb-2015-1911

inc/My/H21-Feb-2015-1,3871,167

lib/Alien/H21-Feb-2015-349147

patches/H21-Feb-2015-38,51533,571

t/H21-Feb-2015-11986

Build.PLH A D03-May-20227.2 KiB233199

ChangesH A D21-Feb-201511.8 KiB276221

LICENSEH A D21-Feb-201520.1 KiB384309

MANIFESTH A D21-Feb-20151.7 KiB5857

META.jsonH A D21-Feb-20152.1 KiB8281

META.ymlH A D21-Feb-20151.3 KiB5655

READMEH A D21-Feb-20155.6 KiB150112

README.mdH A D21-Feb-20155.7 KiB152113

TODOH A D21-Feb-2015300 75

README

1NAME
2    Alien::SDL - building, finding and using SDL binaries
3
4VERSION
5    Version 1.446
6
7SYNOPSIS
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
45DESCRIPTION
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
68METHODS
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
130BUGS
131    Please post issues and bugs at
132    http://rt.cpan.org/NoAuth/Bugs.html?Dist=Alien-SDL
133
134AUTHOR
135        Kartik Thakore
136        CPAN ID: KTHAKORE
137        Thakore.Kartik@gmail.com
138        http://yapgh.blogspot.com
139
140ACKNOWLEDGEMENTS
141        kmx - complete redesign between versions 0.7.x and 0.8.x
142
143COPYRIGHT
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
150

README.md

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