aboutsummaryrefslogtreecommitdiff
path: root/libs_toolkit/sdl/sdl.build
blob: 1d74551ef6786f28f4b0c39276fa03154d18a7eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
#!/bin/bash
#
# Maintainer: Deposite Pirate <ofni.sknuplatem@etaripd>

source /usr/src/ports/Build/build.sh

NAME=sdl
VERSION=1.2.15
BUILD=2
DEPENDS=('sound >= 1.0.26-1')

# Description

cat > ${PKG}/install/slack-desc <<EOF
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct.  It's also
# customary to leave one space after the ':'.

$(padd)|-----handy-ruler------------------------------------------------------|
${NAME}: SDL (Simple DirectMedia Layer)
${NAME}:
${NAME}: SDL is a library which has a generic API that provides low level
${NAME}: access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL,
${NAME}: and 2D framebuffer across multiple platforms. It is mostly used for
${NAME}: games. Since a lot of games and other applications such as avi-xmms
${NAME}: use this library you probably need to install it.
${NAME}:
${NAME}: Homepage: http://libsdl.org
${NAME}:
${NAME}:
EOF

# Sources

SRCNAME[0]=SDL
SRCVERS[0]=${VERSION}
SRCPACK[0]=http://www.libsdl.org/release/${SRCNAME[0]}-${SRCVERS[0]}.tar.gz

configure()
{
sed -i 's|$(libdir)/pkgconfig|$(datarootdir)/pkgconfig|g' Makefile.in
CFLAGS="${FLAGS}" CXXFLAGS="${FLAGS}" \
./configure \
 --build="${ARCH}-slackware-linux" \
 --enable-dependency-tracking=no \
 --enable-shared=yes \
 --enable-static=no \
 --disable-rpath \
 --prefix="${SYS_DIR[usr]}" \
 --mandir="${SYS_DIR[man]}" \
 --sysconfdir="${SYS_DIR[etc]}" \
 --libdir="${SYS_DIR[lib]}" \
 --localstatedir="${SYS_DIR[var]}" \
 ${*}
}

build0()
{
configure \
 --disable-nasm \
 --with-x \
 --disable-x11-shared \
 --disable-video-svga \
 --disable-video-ggi \
 --disable-video-aalib \
 --disable-oss \
 --disable-esd \
 --disable-arts \
 --enable-sdl-dlopen \
 --enable-video-x11 \
 --enable-alsa \
 --enable-pthreads
# --enable-pulseaudio-shared
make ${JOBS} CFLAGS="${FLAGS}"
make install DESTDIR="${PKG}"
doc CREDITS
changelog WhatsNew
#install.dir ${PKG}/${SYS_DIR[html]}/${SRCNAME[0]}
#install.doc docs.html docs/html/*.html \
# ${PKG}/${SYS_DIR[html]}/${SRCNAME[0]}
}

SRCNAME[1]=SDL_mixer
SRCVERS[1]=1.2.12
SRCPACK[1]=http://www.libsdl.org/projects/${SRCNAME[1]}/release/${SRCNAME[1]}-${SRCVERS[1]}.tar.gz
SRCCOPY[1]="ZLIB"

build1()
{
SDL_CFLAGS="-D_GNU_SOURCE=1 -D_REENTRANT -I${PKG}${SYS_DIR[include]}/SDL" \
SDL_LIBS="-L${PKG}${SYS_DIR[lib]} -lSDL -lpthread" \
CPPFLAGS="-I${SYS_DIR[include]}/mad" \
configure \
 --enable-music-mp3-mad-gpl \
 --enable-music-mod-modplug
make ${JOBS}
make install DESTDIR="${PKG}"
changelog CHANGES
}

SRCNAME[2]=SDL_image
SRCVERS[2]=1.2.12
SRCPACK[2]=http://www.libsdl.org/projects/${SRCNAME[2]}/release/${SRCNAME[2]}-${SRCVERS[2]}.tar.gz
SRCCOPY[2]="ZLIB"

build2()
{
SDL_CFLAGS="-D_GNU_SOURCE=1 -D_REENTRANT -I${PKG}${SYS_DIR[include]}/SDL" \
SDL_LIBS="-L${PKG}${SYS_DIR[lib]} -lSDL -lpthread" \
configure \
 --disable-jpg-shared \
 --disable-png-shared \
 --disable-tif-shared \
 --enable-tif \
 --enable-xcf
make ${JOBS}
make install DESTDIR="${PKG}"
changelog CHANGES
}

SRCNAME[3]=SDL_net
SRCVERS[3]=1.2.8
SRCPACK[3]=http://www.libsdl.org/projects/${SRCNAME[3]}/release/${SRCNAME[3]}-${SRCVERS[3]}.tar.gz
SRCCOPY[3]="ZLIB"

build3()
{
CPPFLAGS="-I${PKG}${SYS_DIR[include]}/SDL" \
LDFLAGS="-L${PKG}${SYS_DIR[lib]}" \
configure \
 --with-sdl-prefix="${PKG}${SYS_DIR[usr]}" \
 --with-sdl-exec-prefix="${PKG}${SYS_DIR[usr]}" \
 --disable-sdltest \
 --disable-gui
make ${JOBS}
make install DESTDIR="${PKG}"
changelog CHANGES
}

SRCNAME[4]=SDL_ttf
SRCVERS[4]=2.0.11
SRCPACK[4]=http://www.libsdl.org/projects/${SRCNAME[4]}/release/${SRCNAME[4]}-${SRCVERS[4]}.tar.gz
SRCCOPY[4]="ZLIB"

build4()
{
SDL_CFLAGS="-D_GNU_SOURCE=1 -D_REENTRANT -I${PKG}${SYS_DIR[include]}/SDL" \
SDL_LIBS="-L${PKG}${SYS_DIR[lib]} -lSDL -lpthread" \
configure
make ${JOBS}
make install DESTDIR="${PKG}"
changelog CHANGES
}

SRCNAME[5]=SDL_sound
SRCVERS[5]=1.0.3
SRCPACK[5]=http://icculus.org/${SRCNAME[5]}/downloads/${SRCNAME[5]}-${SRCVERS[5]}.tar.gz
SRCCOPY[5]="LGPL21"

build5()
{
CPPFLAGS="-I${PKG}${SYS_DIR[include]}/SDL" \
LDFLAGS="-L${PKG}${SYS_DIR[lib]}" \
configure \
 --with-sdl-prefix="${PKG}${SYS_DIR[usr]}" \
 --with-sdl-exec-prefix="${PKG}${SYS_DIR[usr]}" \
 --disable-sdltest
make ${JOBS}
make install DESTDIR="${PKG}"
doc CREDITS
changelog CHANGELOG
rm -f ${PKG}${SYS_DIR[bin]}/playsound*
}