Remove unneeded FriBidi and libraqm files

This commit is contained in:
Benau 2020-08-24 00:58:07 +08:00
parent 369c346857
commit dc0a5a9c66
10 changed files with 2 additions and 2514 deletions

View File

@ -44,7 +44,6 @@ CMAKE_DEPENDENT_OPTION(USE_WIIUSE "Support for wiimote input devices" ON
if(APPLE AND NOT IOS)
list(APPEND CMAKE_PREFIX_PATH /usr/local/opt)
include_directories(/usr/local/opt/fribidi/include/)
include_directories(/usr/local/opt/openssl@1.1/include/)
include_directories(/usr/local/opt/openssl@1.1/include/openssl/)
include_directories(/usr/local/opt/freetype/include/freetype2/)
@ -370,7 +369,7 @@ if(NOT SERVER_ONLY)
add_definitions(-DENABLE_SOUND)
endif()
# Text handling in STK (We use freetype, harfbuzz, fribidi and libraqm for i18n text handling)
# Text handling in STK (We use freetype, harfbuzz and SheenBidifor i18n text handling)
if (NOT SERVER_ONLY)
# SheenBidi
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/sheenbidi")
@ -396,28 +395,6 @@ if (NOT SERVER_ONLY)
include_directories("${HARFBUZZ_INCLUDEDIR}")
MESSAGE(STATUS "Use system harfbuzz: ${HARFBUZZ_LIBRARY}")
endif()
# Fribidi
find_package(Fribidi)
if(FRIBIDI_FOUND)
include_directories(${FRIBIDI_INCLUDE_DIRS})
else()
message(FATAL_ERROR "Fribidi not found. "
"Fribidi is required to display characters in SuperTuxKart.")
endif()
# Libraqm
find_library(RAQM_LIBRARY NAMES raqm libraqm)
find_path(RAQM_INCLUDEDIR NAMES raqm.h PATHS)
if (NOT RAQM_LIBRARY OR NOT RAQM_INCLUDEDIR)
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/libraqm")
include_directories("${PROJECT_SOURCE_DIR}/lib/libraqm")
SET(RAQM_LIBRARY raqm)
message(STATUS "System libraqm not found, use the bundled one.")
else()
include_directories("${RAQM_INCLUDEDIR}")
MESSAGE(STATUS "Use system libraqm: ${RAQM_LIBRARY}")
endif()
endif()
# OpenGL
@ -665,8 +642,6 @@ if(NOT SERVER_ONLY)
${JPEG_LIBRARIES}
${OGGVORBIS_LIBRARIES}
${OPENAL_LIBRARY}
${RAQM_LIBRARY}
${FRIBIDI_LIBRARIES}
${FREETYPE_LIBRARIES}
${HARFBUZZ_LIBRARY}
${SDL2_LIBRARY}

View File

@ -72,13 +72,6 @@ include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# Fribidi
LOCAL_MODULE := fribidi
LOCAL_SRC_FILES := obj/fribidi/lib/.libs/libfribidi.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# Freetype
LOCAL_MODULE := freetype
LOCAL_SRC_FILES := obj/freetype/objs/.libs/libfreetype.a
@ -93,23 +86,6 @@ include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
# Raqm
LOCAL_MODULE := raqm
LOCAL_PATH := .
LOCAL_CPP_FEATURES += rtti
LOCAL_SRC_FILES := $(wildcard ../lib/libraqm/*.c)
LOCAL_CFLAGS := -Iobj/fribidi/include \
-Iobj/freetype/include \
-Iobj/harfbuzz/include \
-DHAVE_DECL_HB_BUFFER_FLAG_REMOVE_DEFAULT_IGNORABLES \
-DHAVE_HB_BUFFER_SET_INVISIBLE_GLYPH \
-DHAVE_HB_FT_FONT_CREATE_REFERENCED \
-DHAVE_HB_FT_FONT_SET_LOAD_FLAGS \
-std=c99
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
# ifaddrs
LOCAL_MODULE := ifaddrs
LOCAL_PATH := .
@ -258,7 +234,6 @@ LOCAL_SRC_FILES := $(wildcard ../src/*.cpp) \
LOCAL_LDLIBS := -llog -landroid -lGLESv1_CM -lGLESv3 -lOpenSLES -ldl -lm
LOCAL_CFLAGS := -I../lib/angelscript/include \
-I../lib/bullet/src \
-I../lib/libraqm \
-I../lib/sheenbidi/Headers \
-I../lib/enet/include \
-I../lib/ifaddrs \
@ -269,7 +244,6 @@ LOCAL_CFLAGS := -I../lib/angelscript/include \
-I../lib/sdl2/include \
-I../src \
-Iobj/curl/include \
-Iobj/fribidi/include \
-Iobj/freetype/include \
-Iobj/harfbuzz/include \
-Iobj/libogg/include \
@ -290,8 +264,7 @@ LOCAL_CPPFLAGS := -std=gnu++0x
LOCAL_STATIC_LIBRARIES := irrlicht bullet enet ifaddrs angelscript mcpp SDL2 \
vorbisfile vorbis ogg openal curl libssl libcrypto \
c++_static raqm fribidi sheenbidi harfbuzz freetype \
graphics_utils
c++_static sheenbidi harfbuzz freetype graphics_utils
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)

View File

@ -322,21 +322,6 @@ if [ ! -f "$DIRNAME/obj/libpng.stamp" ]; then
touch "$DIRNAME/obj/libpng.stamp"
fi
# Fribidi
if [ ! -f "$DIRNAME/obj/fribidi.stamp" ]; then
echo "Compiling fribidi"
mkdir -p "$DIRNAME/obj/fribidi"
cp -a -f "$DIRNAME/../lib/fribidi/"* "$DIRNAME/obj/fribidi"
cd "$DIRNAME/obj/fribidi"
./configure --host=$HOST --enable-static=yes &&
make $@
check_error
mkdir -p "$DIRNAME/obj/fribidi/include/fribidi"
cp $DIRNAME/obj/fribidi/lib/*.h "$DIRNAME/obj/fribidi/include/fribidi"
touch "$DIRNAME/obj/fribidi.stamp"
fi
# Freetype bootstrap
if [ ! -f "$DIRNAME/obj/freetype_bootstrap.stamp" ]; then
echo "Compiling freetype"

View File

@ -1,35 +0,0 @@
# - Find Fribidi
# Find the Fribidi includes and libraries
#
# Following variables are provided:
# FRIBIDI_FOUND
# True if Fribidi has been found
# FRIBIDI_INCLUDE_DIRS
# The include directories of Fribidi
# FRIBIDI_LIBRARIES
# Fribidi library list
if(UNIX AND NOT APPLE)
include(FindPkgConfig)
pkg_check_modules(FRIBIDI fribidi)
else()
set(FRIBIDI_FOUND 0)
endif()
if(NOT FRIBIDI_FOUND)
find_path(FRIBIDI_INCLUDE_DIR NAMES fribidi/fribidi.h PATHS /Library/Frameworks/fribidi.framework/Headers "${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/include")
find_library(FRIBIDI_LIBRARY NAMES fribidi libfribidi PATHS /Library/Frameworks/fribidi.framework "${PROJECT_SOURCE_DIR}/${DEPENDENCIES}/lib")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Fribidi DEFAULT_MSG FRIBIDI_INCLUDE_DIR FRIBIDI_LIBRARY)
if(APPLE)
set(FRIBIDI_INCLUDE_DIR "/Library/Frameworks/fribidi.framework/Headers")
endif()
# Publish variables
set(FRIBIDI_INCLUDE_DIRS ${FRIBIDI_INCLUDE_DIR})
set(FRIBIDI_LIBRARIES ${FRIBIDI_LIBRARY})
endif()
mark_as_advanced(FRIBIDI_INCLUDE_DIR FRIBIDI_LIBRARY)

View File

@ -1,43 +0,0 @@
cmake_minimum_required(VERSION 2.6)
if (NOT MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
endif()
include(CheckFunctionExists)
include(CheckCSourceCompiles)
set(CMAKE_REQUIRED_INCLUDES ${HARFBUZZ_INCLUDEDIR})
set(CMAKE_REQUIRED_LIBRARIES ${HARFBUZZ_LIBRARY})
CHECK_FUNCTION_EXISTS(hb_ft_font_create_referenced HAVE_hb_ft_font_create_referenced)
if (HAVE_hb_ft_font_create_referenced)
add_definitions(-DHAVE_HB_FT_FONT_CREATE_REFERENCED)
endif()
CHECK_FUNCTION_EXISTS(hb_ft_font_set_load_flags HAVE_hb_ft_font_set_load_flags)
if (HAVE_hb_ft_font_set_load_flags)
add_definitions(-DHAVE_HB_FT_FONT_SET_LOAD_FLAGS)
endif()
CHECK_FUNCTION_EXISTS(hb_buffer_set_invisible_glyph HAVE_hb_buffer_set_invisible_glyph)
if (HAVE_hb_buffer_set_invisible_glyph)
add_definitions(-DHAVE_HB_BUFFER_SET_INVISIBLE_GLYPH)
endif()
CHECK_C_SOURCE_COMPILES(
"
#include <harfbuzz/hb.h>
int main ()
{
#ifndef HB_BUFFER_FLAG_REMOVE_DEFAULT_IGNORABLES
(void)HB_BUFFER_FLAG_REMOVE_DEFAULT_IGNORABLES;
#endif
return 0;
}
"
HAVE_DECL_HB_BUFFER_FLAG_REMOVE_DEFAULT_IGNORABLES)
if (HAVE_DECL_HB_BUFFER_FLAG_REMOVE_DEFAULT_IGNORABLES)
add_definitions(-DHAVE_DECL_HB_BUFFER_FLAG_REMOVE_DEFAULT_IGNORABLES)
endif()
add_library(raqm STATIC raqm.c)

View File

@ -1,44 +0,0 @@
/*
* Copyright © 2011 Google, Inc.
*
* This is part of HarfBuzz, a text shaping library.
*
* Permission is hereby granted, without written agreement and without
* license or royalty fees, to use, copy, modify, and distribute this
* software and its documentation for any purpose, provided that the
* above copyright notice and the following two paragraphs appear in
* all copies of this software.
*
* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
* Google Author(s): Behdad Esfahbod
*/
#ifndef _RAQM_H_IN_
#error "Include <raqm.h> instead."
#endif
#ifndef _RAQM_VERSION_H_
#define _RAQM_VERSION_H_
#define RAQM_VERSION_MAJOR 0
#define RAQM_VERSION_MINOR 7
#define RAQM_VERSION_MICRO 0
#define RAQM_VERSION_STRING "0.7.0"
#define RAQM_VERSION_ATLEAST(major,minor,micro) \
((major)*10000+(minor)*100+(micro) <= \
RAQM_VERSION_MAJOR*10000+RAQM_VERSION_MINOR*100+RAQM_VERSION_MICRO)
#endif /* _RAQM_VERSION_H_ */

View File

@ -1,44 +0,0 @@
/*
* Copyright © 2011 Google, Inc.
*
* This is part of HarfBuzz, a text shaping library.
*
* Permission is hereby granted, without written agreement and without
* license or royalty fees, to use, copy, modify, and distribute this
* software and its documentation for any purpose, provided that the
* above copyright notice and the following two paragraphs appear in
* all copies of this software.
*
* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
* Google Author(s): Behdad Esfahbod
*/
#ifndef _RAQM_H_IN_
#error "Include <raqm.h> instead."
#endif
#ifndef _RAQM_VERSION_H_
#define _RAQM_VERSION_H_
#define RAQM_VERSION_MAJOR @RAQM_VERSION_MAJOR@
#define RAQM_VERSION_MINOR @RAQM_VERSION_MINOR@
#define RAQM_VERSION_MICRO @RAQM_VERSION_MICRO@
#define RAQM_VERSION_STRING "@RAQM_VERSION@"
#define RAQM_VERSION_ATLEAST(major,minor,micro) \
((major)*10000+(minor)*100+(micro) <= \
RAQM_VERSION_MAJOR*10000+RAQM_VERSION_MINOR*100+RAQM_VERSION_MICRO)
#endif /* _RAQM_VERSION_H_ */

File diff suppressed because it is too large Load Diff

View File

@ -1,185 +0,0 @@
/*
* Copyright © 2015 Information Technology Authority (ITA) <foss@ita.gov.om>
* Copyright © 2016 Khaled Hosny <khaledhosny@eglug.org>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
*/
#ifndef _RAQM_H_
#define _RAQM_H_
#define _RAQM_H_IN_
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdbool.h>
#include <stdint.h>
#include <ft2build.h>
#include FT_FREETYPE_H
#ifdef __cplusplus
extern "C" {
#endif
#include "raqm-version.h"
/**
* raqm_t:
*
* This is the main object holding all state of the currently processed text as
* well as its output.
*
* Since: 0.1
*/
typedef struct _raqm raqm_t;
/**
* raqm_direction_t:
* @RAQM_DIRECTION_DEFAULT: Detect paragraph direction automatically.
* @RAQM_DIRECTION_RTL: Paragraph is mainly right-to-left text.
* @RAQM_DIRECTION_LTR: Paragraph is mainly left-to-right text.
* @RAQM_DIRECTION_TTB: Paragraph is mainly vertical top-to-bottom text.
*
* Base paragraph direction, see raqm_set_par_direction().
*
* Since: 0.1
*/
typedef enum
{
RAQM_DIRECTION_DEFAULT,
RAQM_DIRECTION_RTL,
RAQM_DIRECTION_LTR,
RAQM_DIRECTION_TTB
} raqm_direction_t;
/**
* raqm_glyph_t:
* @index: the index of the glyph in the font file.
* @x_advance: the glyph advance width in horizontal text.
* @y_advance: the glyph advance width in vertical text.
* @x_offset: the horizontal movement of the glyph from the current point.
* @y_offset: the vertical movement of the glyph from the current point.
* @cluster: the index of original character in input text.
* @ftface: the @FT_Face of the glyph.
*
* The structure that holds information about output glyphs, returned from
* raqm_get_glyphs().
*/
typedef struct raqm_glyph_t {
unsigned int index;
int x_advance;
int y_advance;
int x_offset;
int y_offset;
uint32_t cluster;
FT_Face ftface;
} raqm_glyph_t;
raqm_t *
raqm_create (void);
raqm_t *
raqm_reference (raqm_t *rq);
void
raqm_destroy (raqm_t *rq);
bool
raqm_set_text (raqm_t *rq,
const uint32_t *text,
size_t len);
bool
raqm_set_text_utf8 (raqm_t *rq,
const char *text,
size_t len);
bool
raqm_set_par_direction (raqm_t *rq,
raqm_direction_t dir);
bool
raqm_set_language (raqm_t *rq,
const char *lang,
size_t start,
size_t len);
bool
raqm_add_font_feature (raqm_t *rq,
const char *feature,
int len);
bool
raqm_set_freetype_face (raqm_t *rq,
FT_Face face);
bool
raqm_set_freetype_face_range (raqm_t *rq,
FT_Face face,
size_t start,
size_t len);
bool
raqm_set_freetype_load_flags (raqm_t *rq,
int flags);
bool
raqm_set_invisible_glyph (raqm_t *rq,
int gid);
bool
raqm_layout (raqm_t *rq);
raqm_glyph_t *
raqm_get_glyphs (raqm_t *rq,
size_t *length);
bool
raqm_index_to_position (raqm_t *rq,
size_t *index,
int *x,
int *y);
bool
raqm_position_to_index (raqm_t *rq,
int x,
int y,
size_t *index);
void
raqm_version (unsigned int *major,
unsigned int *minor,
unsigned int *micro);
const char *
raqm_version_string (void);
bool
raqm_version_atleast (unsigned int major,
unsigned int minor,
unsigned int micro);
#ifdef __cplusplus
}
#endif
#undef _RAQM_H_IN_
#endif /* _RAQM_H_ */

View File

@ -168,20 +168,6 @@ build_stk()
touch "$DEPENDENCIES_DIR/libpng.stamp"
fi
# Fribidi
if [ ! -f "$DEPENDENCIES_DIR/fribidi.stamp" ]; then
echo "Compiling fribidi"
mkdir -p "$DEPENDENCIES_DIR/fribidi"
cp -a -f "$DEPENDENCIES_DIR/../lib/fribidi/"* "$DEPENDENCIES_DIR/fribidi"
cd "$DEPENDENCIES_DIR/fribidi"
./configure --prefix="$INSTALL_DIR" &&
make -j$THREADS_NUMBER &&
make install
check_error
touch "$DEPENDENCIES_DIR/fribidi.stamp"
fi
# Freetype bootstrap
if [ ! -f "$DEPENDENCIES_DIR/freetype_bootstrap.stamp" ]; then
echo "Compiling freetype"