mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-02-03 11:37:15 +08:00
SuperTuxKart 0.8
This commit is contained in:
parent
41e819c443
commit
15aafb07eb
54
supertuxkart/FindEnet.cmake
Normal file
54
supertuxkart/FindEnet.cmake
Normal file
@ -0,0 +1,54 @@
|
||||
# Source: http://www.gitorious.org/tmw/mainline/blobs/master/CMake/Modules/FindENet.cmake
|
||||
#
|
||||
# - Try to find enet
|
||||
# Once done this will define
|
||||
#
|
||||
# ENET_FOUND - system has enet
|
||||
# ENET_INCLUDE_DIR - the enet include directory
|
||||
# ENET_LIBRARIES - the libraries needed to use enet
|
||||
# ENET_DEFINITIONS - Compiler switches required for using enet
|
||||
|
||||
IF (ENet_INCLUDE_DIR AND ENet_LIBRARY)
|
||||
SET(ENet_FIND_QUIETLY TRUE)
|
||||
ENDIF (ENet_INCLUDE_DIR AND ENet_LIBRARY)
|
||||
|
||||
# for Windows we rely on the environement variables
|
||||
# %INCLUDE% and %LIB%; FIND_LIBRARY checks %LIB%
|
||||
# automatically on Windows
|
||||
IF(WIN32)
|
||||
FIND_PATH(ENet_INCLUDE_DIR enet/enet.h
|
||||
$ENV{INCLUDE}
|
||||
)
|
||||
FIND_LIBRARY(ENet_LIBRARY
|
||||
NAMES enet
|
||||
)
|
||||
ELSE()
|
||||
FIND_PATH(ENet_INCLUDE_DIR enet/enet.h
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
)
|
||||
FIND_LIBRARY(ENet_LIBRARY
|
||||
NAMES enet
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
IF (ENet_INCLUDE_DIR AND ENet_LIBRARY)
|
||||
SET(ENET_FOUND TRUE)
|
||||
SET(ENET_INCLUDE_DIR ${ENet_INCLUDE_DIR})
|
||||
SET(ENET_LIBRARIES ${ENet_LIBRARY})
|
||||
ELSE ()
|
||||
SET(ENET_FOUND FALSE)
|
||||
ENDIF ()
|
||||
|
||||
IF (ENET_FOUND)
|
||||
IF (NOT ENet_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found enet: ${ENet_LIBRARY}")
|
||||
ENDIF (NOT ENet_FIND_QUIETLY)
|
||||
ELSE (ENET_FOUND)
|
||||
IF (ENet_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could NOT find enet")
|
||||
ENDIF (ENet_FIND_REQUIRED)
|
||||
ENDIF (ENET_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(ENet_INCLUDE_DIR ENet_LIBRARY)
|
78
supertuxkart/FindIrrlicht.cmake
Normal file
78
supertuxkart/FindIrrlicht.cmake
Normal file
@ -0,0 +1,78 @@
|
||||
# Source: http://classes.cs.kent.edu/gpg/trac/browser/trunk/RakNet/CmakeIncludes/FindIrrlicht.cmake
|
||||
#
|
||||
# - Try to find Irrlicht
|
||||
# Once done this will define
|
||||
#
|
||||
# IRRLICHT_FOUND - system has Irrlicht
|
||||
# IRRLICHT_INCLUDE_DIRS - the Irrlicht include directory
|
||||
# IRRLICHT_LIBRARIES - Link these to use Irrlicht
|
||||
# IRRLICHT_DEFINITIONS - Compiler switches required for using Irrlicht
|
||||
#
|
||||
# Copyright (c) 2006 Andreas Schneider <mail@cynapses.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the New
|
||||
# BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
#
|
||||
|
||||
|
||||
if (IRRLICHT_LIBRARIES AND IRRLICHT_INCLUDE_DIRS)
|
||||
# in cache already
|
||||
set(IRRLICHT_FOUND TRUE)
|
||||
else (IRRLICHT_LIBRARIES AND IRRLICHT_INCLUDE_DIRS)
|
||||
|
||||
find_path(IRRLICHT_INCLUDE_DIR
|
||||
NAMES
|
||||
irrlicht.h
|
||||
PATHS
|
||||
/usr/include
|
||||
/usr/include/irrlicht
|
||||
/usr/local/include
|
||||
/usr/local/include/irrlicht
|
||||
/opt/local/include
|
||||
/sw/include
|
||||
)
|
||||
|
||||
find_library(IRRLICHT_LIBRARY
|
||||
NAMES
|
||||
Irrlicht
|
||||
PATHS
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/local/lib
|
||||
/sw/lib
|
||||
)
|
||||
|
||||
if (IRRLICHT_LIBRARY)
|
||||
set(IRRLICHT_FOUND TRUE)
|
||||
endif (IRRLICHT_LIBRARY)
|
||||
|
||||
set(IRRLICHT_INCLUDE_DIRS
|
||||
${IRRLICHT_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
if (IRRLICHT_FOUND)
|
||||
set(IRRLICHT_LIBRARIES
|
||||
${IRRLICHT_LIBRARIES}
|
||||
${IRRLICHT_LIBRARY}
|
||||
)
|
||||
endif (IRRLICHT_FOUND)
|
||||
|
||||
if (IRRLICHT_INCLUDE_DIRS AND IRRLICHT_LIBRARIES)
|
||||
set(IRRLICHT_FOUND TRUE)
|
||||
endif (IRRLICHT_INCLUDE_DIRS AND IRRLICHT_LIBRARIES)
|
||||
|
||||
if (IRRLICHT_FOUND)
|
||||
if (NOT IRRLICHT_FIND_QUIETLY)
|
||||
message(STATUS "Found Irrlicht: ${IRRLICHT_LIBRARIES}")
|
||||
endif (NOT IRRLICHT_FIND_QUIETLY)
|
||||
else (IRRLICHT_FOUND)
|
||||
if (IRRLICHT_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could not find Irrlicht")
|
||||
endif (IRRLICHT_FIND_REQUIRED)
|
||||
endif (IRRLICHT_FOUND)
|
||||
|
||||
# show the IRRLICHT_INCLUDE_DIRS and IRRLICHT_LIBRARIES variables only in the advanced view
|
||||
mark_as_advanced(IRRLICHT_INCLUDE_DIRS IRRLICHT_LIBRARIES)
|
||||
|
||||
endif (IRRLICHT_LIBRARIES AND IRRLICHT_INCLUDE_DIRS)
|
99
supertuxkart/FindWiiUse.cmake
Normal file
99
supertuxkart/FindWiiUse.cmake
Normal file
@ -0,0 +1,99 @@
|
||||
# - try to find WiiUse library
|
||||
#
|
||||
# Cache Variables: (probably not for direct use in your scripts)
|
||||
# WIIUSE_INCLUDE_DIR
|
||||
# WIIUSE_LIBRARY
|
||||
#
|
||||
# Non-cache variables you might use in your CMakeLists.txt:
|
||||
# WIIUSE_FOUND
|
||||
# WIIUSE_INCLUDE_DIRS
|
||||
# WIIUSE_LIBRARIES
|
||||
# WIIUSE_RUNTIME_LIBRARIES - aka the dll for installing
|
||||
# WIIUSE_RUNTIME_LIBRARY_DIRS
|
||||
#
|
||||
# Requires these CMake modules:
|
||||
# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
|
||||
#
|
||||
# Original Author:
|
||||
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# http://academic.cleardefinition.com
|
||||
# Iowa State University HCI Graduate Program/VRAC
|
||||
#
|
||||
# Copyright Iowa State University 2009-2010.
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
set(WIIUSE_ROOT_DIR
|
||||
"${WIIUSE_ROOT_DIR}"
|
||||
CACHE
|
||||
PATH
|
||||
"Directory to search for WiiUse")
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P MATCHES "8")
|
||||
set(_LIBSUFFIXES /lib64 /lib)
|
||||
else()
|
||||
set(_LIBSUFFIXES /lib)
|
||||
endif()
|
||||
|
||||
find_library(WIIUSE_LIBRARY
|
||||
NAMES
|
||||
wiiuse
|
||||
PATHS
|
||||
"${WIIUSE_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
"${_LIBSUFFIXES}")
|
||||
|
||||
get_filename_component(_libdir "${WIIUSE_LIBRARY}" PATH)
|
||||
|
||||
find_path(WIIUSE_INCLUDE_DIR
|
||||
NAMES
|
||||
wiiuse.h
|
||||
HINTS
|
||||
"${_libdir}"
|
||||
"${_libdir}/.."
|
||||
PATHS
|
||||
"${WIIUSE_ROOT_DIR}"
|
||||
PATH_SUFFIXES
|
||||
include/)
|
||||
|
||||
set(_deps_check)
|
||||
if(WIN32)
|
||||
find_file(WIIUSE_RUNTIME_LIBRARY
|
||||
NAMES
|
||||
wiiuse.dll
|
||||
HINTS
|
||||
"${_libdir}"
|
||||
"${_libdir}/.."
|
||||
PATH_SUFFIXES
|
||||
bin)
|
||||
|
||||
set(WIIUSE_RUNTIME_LIBRARIES "${WIIUSE_RUNTIME_LIBRARY}")
|
||||
get_filename_component(WIIUSE_RUNTIME_LIBRARY_DIRS
|
||||
"${WIIUSE_RUNTIME_LIBRARY}"
|
||||
PATH)
|
||||
list(APPEND _deps_check WIIUSE_RUNTIME_LIBRARY)
|
||||
else()
|
||||
set(WIIUSE_RUNTIME_LIBRARY "${WIIUSE_LIBRARY}")
|
||||
set(WIIUSE_RUNTIME_LIBRARIES "${WIIUSE_RUNTIME_LIBRARY}")
|
||||
get_filename_component(WIIUSE_RUNTIME_LIBRARY_DIRS
|
||||
"${WIIUSE_LIBRARY}"
|
||||
PATH)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(WiiUse
|
||||
DEFAULT_MSG
|
||||
WIIUSE_LIBRARY
|
||||
WIIUSE_INCLUDE_DIR
|
||||
${_deps_check})
|
||||
|
||||
if(WIIUSE_FOUND)
|
||||
set(WIIUSE_LIBRARIES "${WIIUSE_LIBRARY}")
|
||||
set(WIIUSE_INCLUDE_DIRS "${WIIUSE_INCLUDE_DIR}")
|
||||
mark_as_advanced(WIIUSE_ROOT_DIR)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(WIIUSE_INCLUDE_DIR
|
||||
WIIUSE_LIBRARY
|
||||
WIIUSE_RUNTIME_LIBRARY)
|
@ -1,67 +1,60 @@
|
||||
#
|
||||
# Games Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# Maintainer: Adrián Chaves Fernández (Gallaecio) <adriyetichaves gmail.com>
|
||||
# Maintainer: Adrian Chaves Fernandez (Gallaecio) <adriyetichaves gmail.com>
|
||||
|
||||
pkgname=supertuxkart
|
||||
_pkgname=SuperTuxKart
|
||||
pkgver=0.7.3
|
||||
pkgrel=5
|
||||
pkgver=0.8
|
||||
pkgrel=1
|
||||
pkgdesc="Kart racing game featuring Tux and friends."
|
||||
url="http://supertuxkart.sourceforge.net/"
|
||||
arch=('i686' 'x86_64')
|
||||
license=('GPL3' 'GPL2' 'CCPL-by' 'CCPL-by-sa' 'custom:Creative Commons Sampling Plus 1.0' 'custom:SoundSnap license' 'custom:Public Domain')
|
||||
depends=('bzip2' 'enet' 'freeglut' 'irrlicht' 'libgl' 'libjpeg' 'libogg' 'libpng' 'libvorbis' 'openal')
|
||||
arch=('x86_64')
|
||||
license=('GPL3' 'GPL2' 'CCPL-by' 'CCPL-by-sa' 'custom:Public Domain')
|
||||
depends=('bullet' 'bzip2' 'curl' 'enet' 'fribidi' 'freeglut' 'irrlicht' 'libgl' 'libjpeg' 'libogg' 'libpng' 'libvorbis' 'openal' 'wiiuse')
|
||||
conflicts=('supertuxkart-svn')
|
||||
categories=('games')
|
||||
changelog=ChangeLog
|
||||
source=("http://downloads.sourceforge.net/project/${pkgname}/${_pkgname}/${pkgver}/${pkgname}-${pkgver}-src.tar.bz2")
|
||||
md5sums=('502664b2ec9ad5ab88b1882fef4c074d')
|
||||
source=("http://downloads.sourceforge.net/project/${pkgname}/${_pkgname}/${pkgver}/${pkgname}-${pkgver}-src.tar.bz2"
|
||||
"$pkgname-system-libs.diff"
|
||||
"FindEnet.cmake"
|
||||
"FindIrrlicht.cmake"
|
||||
"FindWiiUse.cmake")
|
||||
md5sums=('0b939ce601374758938119e0b0dd1fec'
|
||||
'4e7c61ed4b76ee06fd08e8765ff57eeb'
|
||||
'f63b2d5fbac6c53699aaaf97ed7f89d6'
|
||||
'78735ca4da9c04422a09f385561f5d9d'
|
||||
'b23cdd616cb27e2c114bbb1e3840274c')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
cd "${srcdir}/${_pkgname}-${pkgver}"
|
||||
|
||||
# Typo fixed in Irrlicht 1.8.0, already fixed in STK 0.8.0.
|
||||
sed -e "s#texureBlend#textureBlend#g" -i "src/graphics/material.cpp"
|
||||
# Patches.
|
||||
|
||||
# http://sourceforge.net/apps/trac/supertuxkart/changeset/10229
|
||||
sed -e "s#virtual video::SColor const \& getOverrideColor(#virtual video::SColor getOverrideColor(#" -i "src/guiengine/widgets/CGUIEditBox.h"
|
||||
sed -e "s#video::SColor const\& CGUIEditBox::getOverrideColor(#video::SColor CGUIEditBox::getOverrideColor(#" -i "src/guiengine/widgets/CGUIEditBox.cpp"
|
||||
# For using system libraries.
|
||||
patch -uN CMakeLists.txt $srcdir/$pkgname-system-libs.diff
|
||||
sed -e "s#wiiuse/wiiuse.h#wiiuse.h#" -i src/input/wiimote_manager.cpp
|
||||
cp $srcdir/*.cmake cmake/
|
||||
|
||||
LDFLAGS="-lpng -ljpeg -lpthread" \
|
||||
LIBS="-lbz2" \
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--datadir=/usr/share
|
||||
|
||||
mkdir -p build && cd build
|
||||
cmake \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DUSE_WIIUSE=ON \
|
||||
-DUSE_FRIBIDI=ON \
|
||||
..
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
cd "${srcdir}/${_pkgname}-${pkgver}/build"
|
||||
|
||||
make DESTDIR="${pkgdir}" install
|
||||
|
||||
# Desktop Integration
|
||||
sed -e "s@/usr/games@/usr/bin@" -i $pkgdir/usr/share/applications/$pkgname.desktop
|
||||
|
||||
# Add executable link from ‘/usr/bin’.
|
||||
mkdir -p "${pkgdir}/usr/bin"
|
||||
echo '#!/bin/bash' > "${pkgdir}/usr/bin/${pkgname}"
|
||||
echo "/usr/games/${pkgname} \"\${@}\"" >> "${pkgdir}/usr/bin/${pkgname}"
|
||||
chmod +x "${pkgdir}/usr/bin/${pkgname}"
|
||||
|
||||
# Set right game version in .desktop file.
|
||||
sed -i -e "s/0.5/${pkgver}/" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
|
||||
|
||||
# Remove AUTHORS file from documentation folder.
|
||||
rm "${pkgdir}/usr/share/doc/${pkgname}/AUTHORS"
|
||||
|
||||
# Create license folder.
|
||||
# Licensing
|
||||
install -d "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
|
||||
# Link credits from license folder.
|
||||
ln -s "${pkgdir}/usr/share/games/${pkgname}/data/CREDITS" "${pkgdir}/usr/share/licenses/${pkgname}/AUTHORS"
|
||||
|
||||
# Move license from documentation folder to license folder.
|
||||
mv "${pkgdir}/usr/share/doc/${pkgname}/COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
||||
|
71
supertuxkart/supertuxkart-system-libs.diff
Normal file
71
supertuxkart/supertuxkart-system-libs.diff
Normal file
@ -0,0 +1,71 @@
|
||||
--- CMakeLists.txt 2012-12-11 00:21:40.000000000 +0100
|
||||
+++ ../../CMakeLists.txt 2012-12-11 08:26:57.000000000 +0100
|
||||
@@ -25,17 +25,17 @@
|
||||
STRING "Install data folder to this directory, absolute or relative to CMAKE_INSTALL_PREFIX")
|
||||
|
||||
# Build the Bullet physics library
|
||||
-add_subdirectory("${PROJECT_SOURCE_DIR}/lib/bullet")
|
||||
-include_directories("${PROJECT_SOURCE_DIR}/lib/bullet/src")
|
||||
+find_package(Bullet REQUIRED)
|
||||
+include_directories(${BULLET_INCLUDE_DIRS})
|
||||
|
||||
# Build the ENet UDP network library
|
||||
-add_subdirectory("${PROJECT_SOURCE_DIR}/lib/enet")
|
||||
-include_directories("${PROJECT_SOURCE_DIR}/lib/enet/include")
|
||||
+find_package(Enet REQUIRED)
|
||||
+include_directories(${ENET_INCLUDE_DIRS})
|
||||
|
||||
# Build the Wiiuse library
|
||||
if(USE_WIIUSE)
|
||||
- add_subdirectory("${PROJECT_SOURCE_DIR}/lib/wiiuse")
|
||||
- include_directories("${PROJECT_SOURCE_DIR}/lib/wiiuse")
|
||||
+ find_package(WiiUse REQUIRED)
|
||||
+ include_directories(${WIIUSE_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
# Set include paths
|
||||
@@ -86,11 +86,8 @@
|
||||
|
||||
|
||||
# Irrlicht
|
||||
-if (APPLE)
|
||||
- set(IRRLICHT_LIBRARY "/Library/Frameworks/IrrFramework.framework")
|
||||
-else()
|
||||
- set(IRRLICHT_LIBRARY ${PROJECT_SOURCE_DIR}/lib/irrlicht/lib/Linux/libIrrlicht.a)
|
||||
-endif()
|
||||
+find_package(Irrlicht REQUIRED)
|
||||
+include_directories(${IRRLICHT_INCLUDE_DIRS})
|
||||
|
||||
|
||||
# Set some compiler options
|
||||
@@ -181,19 +178,14 @@
|
||||
#)
|
||||
#add_dependencies(supertuxkart stkirrlicht)
|
||||
|
||||
-include_directories(${PROJECT_SOURCE_DIR}/lib/irrlicht/include)
|
||||
-
|
||||
|
||||
# Common library dependencies
|
||||
target_link_libraries(supertuxkart
|
||||
- bulletdynamics
|
||||
- bulletcollision
|
||||
- bulletmath
|
||||
- enet
|
||||
+ ${BULLET_LIBRARIES}
|
||||
+ ${ENET_LIBRARIES}
|
||||
${CURL_LIBRARIES}
|
||||
${IRRLICHT_LIBRARIES}
|
||||
${OGGVORBIS_LIBRARIES}
|
||||
- ${IRRLICHT_LIBRARY}
|
||||
${IRRLICHT_XF86VM_LIBRARY}
|
||||
${OPENAL_LIBRARY}
|
||||
${OPENGL_LIBRARIES})
|
||||
@@ -204,7 +196,7 @@
|
||||
endif()
|
||||
|
||||
if(USE_WIIUSE)
|
||||
- target_link_libraries(supertuxkart wiiuse bluetooth)
|
||||
+ target_link_libraries(supertuxkart ${WIIUSE_LIBRARIES})
|
||||
add_definitions(-DENABLE_WIIUSE)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user