source: scripts/untested/blfs-scripts/blfs-sdl.sh@ f118837

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since f118837 was 1c379e4, checked in by Jim Gifford <clfs@…>, 19 years ago

r589@server (orig r587): ryan | 2005-08-05 22:57:16 -0700
Add a pile of new scripts, and add -32 and -64 symlinks



  • Property mode set to 100755
File size: 2.4 KB
RevLine 
[1c379e4]1#!/bin/bash
2
3### SDL ###
4
5cd ${SRC}
6LOG=SDL-blfs.log
7
8USE_DIRECTFB=Y
9USE_LIBCACA=Y
10
11SELF=`basename ${0}`
12set_buildenv
13set_libdirname
14setup_multiarch
15if [ ! "${libdirname}" = "lib" ]; then
16 extra_conf="--libdir=/usr/${libdirname}"
17fi
18
19unpack_tarball SDL-${SDL_VER}
20cd ${PKGDIR}
21
22apply_patch SDL-1.2.8-gentoo-fixes
23
24if [ "${USE_DIRECTFB}" = "Y" ]; then
25 extra_conf="${extra_conf} --enable-video-directfb"
26fi
27
28if [ "${USE_LIBCACA}" = "Y" ]; then
29 # Patch from libcaca home page
30 apply_patch patch-libsdl1.2-libcaca0.7
31 ./autogen.sh || barf
32 extra_conf="${extra_conf} --enable-video-caca"
33fi
34
35# Hack configure to produce correct rpath settings
36sed -i "/SDL_RLD_FLAGS=/s@lib@${libdirname}@g" \
37 configure
38
39# HACK -
40#echo "====================== H A C K ============================"
41#echo "for some reason -lgcc_s doesn't get brought in when linking"
42#echo "other packages against libSDL (lgcc_s needed by libstdc++)"
43#echo "on amd64... here we hack -lgcc_s to the end of the list of"
44#echo "shared libraries in sdl-config.in (but only on amd64)."
45#echo "Please check whether things are sane on other arches..."
46#echo "====================== H A C K ============================"
47#case ${TGT_ARCH} in
48# x86_64 )
49# sed -i '/^@ENABLE_SHARED_TRUE@/s|@SHARED_SYSTEM_LIBS@|& -lgcc_s|' \
50# sdl-config.in
51# ;;
52#esac
53echo "====================== H A C K ============================"
54echo "for some reason -lgcc_s doesn't get brought in when linking"
55echo "against libstdc++ on amd64 (lgcc_s needed by libstdc++)."
56echo "Here we add -Wl,--as-needed -lgcc_s -Wl,--no-as-needed to"
57echo "LDFLAGS so that it is provided when needed..."
58echo "Please check whether things are sane on other arches..."
59echo "====================== H A C K ============================"
60
61max_log_init SDL ${SDL_VER} "blfs (shared)" ${CONFLOGS} ${LOG}
62CC="${CC-gcc} ${ARCH_CFLAGS}" \
63CXX="${CXX-g++} ${ARCH_CFLAGS}" \
64CFLAGS="-O2 -pipe ${TGT_CFLAGS}" \
65CXXFLAGS="-O2 -pipe ${TGT_CFLAGS}" \
66LDFLAGS="-L/usr/${libdirname} -Wl,--as-needed -lgcc_s -Wl,--no-as-needed" \
67./configure --prefix=/usr ${extra_conf} \
68 --disable-debug --enable-video-aalib \
69 >> ${LOGFILE} 2>&1 &&
70echo " o Configure OK" &&
71
72min_log_init ${BUILDLOGS} &&
73make \
74 >> ${LOGFILE} 2>&1 &&
75echo " o Build OK" &&
76
77min_log_init ${INSTLOGS} &&
78make install \
79 >> ${LOGFILE} 2>&1 &&
80echo " o ALL OK" || barf
81
82if [ "${MULTIARCH}" = "Y" ]; then
83 use_wrapper /usr/bin/sdl-config
84fi
85
Note: See TracBrowser for help on using the repository browser.