forked from organicmaps/organicmaps
Compare commits
1 commit
master
...
rt-weblate
Author | SHA1 | Date | |
---|---|---|---|
8565a615b9 |
14015 changed files with 1124358 additions and 1510488 deletions
|
@ -4,7 +4,7 @@
|
|||
BasedOnStyle: Google
|
||||
IndentWidth: 2
|
||||
BreakBeforeBraces: Allman
|
||||
ColumnLimit: 120
|
||||
ColumnLimit: 100
|
||||
|
||||
---
|
||||
Language: Cpp
|
||||
|
@ -21,7 +21,7 @@ IndentCaseLabels: false
|
|||
NamespaceIndentation: None
|
||||
PointerAlignment: Middle
|
||||
SortIncludes: true
|
||||
Standard: c++20
|
||||
Standard: Cpp11
|
||||
IncludeBlocks: Regroup
|
||||
IncludeCategories:
|
||||
# Tests --------------------------------------------------------------------------------------------
|
||||
|
@ -163,6 +163,8 @@ IncludeCategories:
|
|||
- Regex: '^"openlr/openlr_stat/'
|
||||
Priority: 19400
|
||||
|
||||
- Regex: '^"mapshot/'
|
||||
Priority: 19500
|
||||
|
||||
- Regex: '^"search/search_quality/booking_dataset_generator/'
|
||||
Priority: 19707
|
||||
|
@ -258,6 +260,9 @@ IncludeCategories:
|
|||
- Regex: '^"editor/'
|
||||
Priority: 48310
|
||||
|
||||
- Regex: '^"software_renderer/'
|
||||
Priority: 48400
|
||||
|
||||
- Regex: '^"drape_frontend/'
|
||||
Priority: 48500
|
||||
|
||||
|
@ -301,22 +306,22 @@ IncludeCategories:
|
|||
- Regex: '^"pyhelpers/'
|
||||
Priority: 49800
|
||||
|
||||
- Regex: '^"app/organicmaps/util/'
|
||||
- Regex: '^"com/mapswithme/util/'
|
||||
Priority: 49840
|
||||
|
||||
- Regex: '^"app/organicmaps/maps/'
|
||||
- Regex: '^"com/mapswithme/maps/'
|
||||
Priority: 49850
|
||||
|
||||
- Regex: '^"app/organicmaps/platform/'
|
||||
- Regex: '^"com/mapswithme/platform/'
|
||||
Priority: 49860
|
||||
|
||||
- Regex: '^"app/organicmaps/opengl/'
|
||||
- Regex: '^"com/mapswithme/opengl/'
|
||||
Priority: 49870
|
||||
|
||||
- Regex: '^"app/organicmaps/vulkan/'
|
||||
- Regex: '^"com/mapswithme/vulkan/'
|
||||
Priority: 49880
|
||||
|
||||
- Regex: '^"app/organicmaps/core/'
|
||||
- Regex: '^"com/mapswithme/core/'
|
||||
Priority: 49890
|
||||
|
||||
- Regex: '^"private\.h"$'
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
6aa73face8b5eb8e026cfafa40d1983d4a0502c0
|
||||
480fa6c2fcf53be296504ac6ba8e6b3d70f92b42
|
||||
a6ede2b1466f0c9d8a443600ef337ba6b5832e58
|
||||
1377b81bf1cac72bb6da192da7fed6696d5d5281
|
69
.github/CODEOWNERS
vendored
69
.github/CODEOWNERS
vendored
|
@ -1,69 +0,0 @@
|
|||
# All non-assigned.
|
||||
* @organicmaps/mergers
|
||||
# Visual design.
|
||||
/android/app/src/main/res/drawable*/ @organicmaps/design
|
||||
/android/app/src/main/res/font/ @organicmaps/design
|
||||
/android/app/src/main/res/mipmap*/ @organicmaps/design
|
||||
/data/*.ttf @organicmaps/design
|
||||
/data/resources-svg/ @organicmaps/design
|
||||
/data/search-icons/ @organicmaps/design
|
||||
/iphone/Maps/Images.xcassets/ @organicmaps/design
|
||||
# Android.
|
||||
/android/ @organicmaps/android
|
||||
/android/app/src/main/java/app/organicmaps/car/ @organicmaps/android-auto
|
||||
/docs/ANDROID_LOCATION_TEST.md @organicmaps/android
|
||||
/docs/JAVA_STYLE.md @organicmaps/android
|
||||
# no owner for translation changes
|
||||
/android/app/src/main/res/values*/strings.xml
|
||||
# iOS.
|
||||
/iphone/ @organicmaps/ios
|
||||
/xcode/ @organicmaps/ios
|
||||
/docs/OBJC_STYLE.md @organicmaps/ios
|
||||
# no owner for translation changes
|
||||
/iphone/plist.txt
|
||||
/iphone/Maps/LocalizedStrings/
|
||||
# Qt
|
||||
/qt/ @organicmaps/qt
|
||||
# Rendering
|
||||
/drape/ @organicmaps/rendering
|
||||
/drape_frontend/ @organicmaps/rendering
|
||||
# Map Data.
|
||||
/tools/python/maps_generator/ @organicmaps/data
|
||||
/generator/ @organicmaps/data
|
||||
/topography_generator/ @organicmaps/data
|
||||
/data/borders/ @organicmaps/data
|
||||
/data/conf/isolines/ @organicmaps/data
|
||||
/docs/SUBWAY_GENERATION.md @organicmaps/data
|
||||
/docs/MAPS.md @organicmaps/data
|
||||
/docs/EXPERIMENTAL_PUBLIC_TRANSPORT_SUPPORT.md @organicmaps/data
|
||||
# no owner (changed often to add a new POI)
|
||||
/generator/generator_tests/osm_type_test.cpp
|
||||
# Map Styles.
|
||||
/data/styles/ @organicmaps/styles
|
||||
/data/types.txt @organicmaps/styles
|
||||
/data/visibility.txt @organicmaps/styles
|
||||
/data/mapcss-mapping.csv @organicmaps/styles
|
||||
/data/replaced_tags.txt @organicmaps/styles
|
||||
/data/classificator.txt @organicmaps/styles
|
||||
/data/drules_* @organicmaps/styles
|
||||
/docs/STYLES.md
|
||||
/tools/kothic/ @organicmaps/styles
|
||||
# DevOps.
|
||||
/.github/workflows @organicmaps/devops
|
||||
/android/*gradle* @organicmaps/devops
|
||||
/docs/RELEASE_MANAGEMENT.md @organicmaps/devops
|
||||
/xcode/fastlane/ @organicmaps/devops
|
||||
# Growth.
|
||||
README.md @organicmaps/growth
|
||||
/.github/FUNDING.yml @organicmaps/growth
|
||||
/android/app/src/fdroid/play/ @organicmaps/growth
|
||||
/android/app/src/google/play/ @organicmaps/growth
|
||||
/iphone/metadata/ @organicmaps/growth
|
||||
# Legal.
|
||||
LEGAL @organicmaps/legal
|
||||
LICENSE @organicmaps/legal
|
||||
NOTICE @organicmaps/legal
|
||||
CONTRIBUTORS @organicmaps/legal
|
||||
/docs/CODE_OF_CONDUCT.md @organicmaps/legal
|
||||
/docs/DCO.md @organicmaps/legal
|
||||
/docs/GOVERNANCE.md @organicmaps/legal
|
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
|
@ -1,4 +1,2 @@
|
|||
github: organicmaps
|
||||
liberapay: OrganicMaps
|
||||
open_collective: organicmaps
|
||||
custom: ["https://organicmaps.app/donate/", "https://donate.organicmaps.app/"]
|
||||
|
|
38
.github/ISSUE_TEMPLATE/bug_report.md
vendored
38
.github/ISSUE_TEMPLATE/bug_report.md
vendored
|
@ -1,38 +0,0 @@
|
|||
---
|
||||
name: Bug Report
|
||||
about: Describe your issue in detail to help us improve Organic Maps
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
⚠ Have you searched for similar, already existing issues?
|
||||
|
||||
**Describe the issue**
|
||||
Please write a clear and concise description of the issue here.
|
||||
|
||||
|
||||
**Steps to reproduce**
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
|
||||
**Expected behaviour**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots or screen recordings to help explain your problem.
|
||||
|
||||
|
||||
**System information:**
|
||||
- Operating system and its version: [iOS 12, Android 10, Ubuntu 22, MacOS Big Sur, etc.]
|
||||
- Organic Maps version: [you can find it by tapping the button with the green Organic Maps logo]
|
||||
- Device Model: [e.g. iPhone 6, Samsung S22]
|
||||
|
||||
|
||||
**Additional context**
|
||||
Please add any other context or comments here that may be useful.
|
11
.github/ISSUE_TEMPLATE/config.yml
vendored
11
.github/ISSUE_TEMPLATE/config.yml
vendored
|
@ -1,11 +0,0 @@
|
|||
blank_issues_enabled: true
|
||||
contact_links:
|
||||
- name: Discussions
|
||||
url: https://github.com/organicmaps/organicmaps/discussions
|
||||
about: Discuss the usage of Organic Maps, ask questions, or talk about ideas that aren't yet actionable.
|
||||
- name: Translations
|
||||
url: https://github.com/organicmaps/organicmaps/blob/master/docs/TRANSLATIONS.md
|
||||
about: Translate Organic Maps into your language
|
||||
- name: News
|
||||
url: https://organicmaps.app/news/
|
||||
about: Check the latest project news
|
27
.github/ISSUE_TEMPLATE/feature_request.md
vendored
27
.github/ISSUE_TEMPLATE/feature_request.md
vendored
|
@ -1,27 +0,0 @@
|
|||
---
|
||||
name: Feature Request
|
||||
about: Suggest an idea for Organic Maps
|
||||
title: ''
|
||||
labels: []
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
⚠ Have you searched for similar, already existing issues?
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. For example:
|
||||
I'm always frustrated when [...]
|
||||
|
||||
|
||||
**Describe the ideal solution**
|
||||
A clear and concise description of what you want to see in Organic Maps.
|
||||
|
||||
|
||||
**Describe alternatives you have considered**
|
||||
- How do you solve this issue now with Organic Maps or other apps?
|
||||
- Attach any examples, screenshots, or screen recordings from other apps that help us to better understand the idea.
|
||||
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
53
.github/workflows/android-beta.yaml
vendored
53
.github/workflows/android-beta.yaml
vendored
|
@ -1,13 +1,11 @@
|
|||
name: Android Beta
|
||||
on:
|
||||
workflow_dispatch: # Manual trigger
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- .gitignore
|
||||
- .github/**
|
||||
- '!.github/workflows/android-beta.yaml' # Run check on self change
|
||||
- '**/*_tests/**'
|
||||
- '**/CMakeLists.txt'
|
||||
- CONTRIBUTORS
|
||||
|
@ -15,25 +13,14 @@ on:
|
|||
- NOTICE
|
||||
- README.md
|
||||
- iphone/**
|
||||
- data/strings/**
|
||||
- xcode/**
|
||||
- docs/**
|
||||
- generator/**
|
||||
- packaging/**
|
||||
- platform/*apple*
|
||||
- platform/*_ios*
|
||||
- platform/*_linux*
|
||||
- platform/*_mac*
|
||||
- platform/*qt*
|
||||
- platform/*_win*
|
||||
- pyhelpers/**
|
||||
- qt*/**
|
||||
- skin_generator/**
|
||||
- tools/**
|
||||
- track_generator/**
|
||||
- xcode/**
|
||||
|
||||
env:
|
||||
JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin
|
||||
|
||||
jobs:
|
||||
android-google-beta:
|
||||
|
@ -47,33 +34,37 @@ jobs:
|
|||
sudo apt-get update -y
|
||||
sudo apt-get install -y ninja-build
|
||||
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 100 # enough to get all commits for the current day
|
||||
|
||||
- name: Parallel submodules checkout
|
||||
shell: bash
|
||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
||||
run: git submodule update --init --recursive --jobs=$(($(nproc) * 2))
|
||||
|
||||
- name: Restore beta keys
|
||||
- name: Checkout private keys
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: ${{ secrets.PRIVATE_REPO }}
|
||||
ssh-key: ${{ secrets.PRIVATE_SSH_KEY }}
|
||||
ref: master
|
||||
path: private.git
|
||||
|
||||
- name: Configure repo with private keys
|
||||
shell: bash
|
||||
run: |
|
||||
echo "$PRIVATE_H" | base64 -d > private.h
|
||||
echo "$FIREBASE_APP_DISTRIBUTION_JSON" | base64 -d > android/app/firebase-app-distribution.json
|
||||
echo "$GOOGLE_SERVICES_JSON" | base64 -d > android/app/google-services.json
|
||||
echo "$SECURE_PROPERTIES" | base64 -d > android/app/secure.properties
|
||||
echo "$RELEASE_KEYSTORE" | base64 -d > android/app/release.keystore
|
||||
env:
|
||||
PRIVATE_H: ${{ secrets.PRIVATE_H }}
|
||||
FIREBASE_APP_DISTRIBUTION_JSON: ${{ secrets.FIREBASE_APP_DISTRIBUTION_JSON }}
|
||||
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
|
||||
SECURE_PROPERTIES: ${{ secrets.SECURE_PROPERTIES }}
|
||||
RELEASE_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE }}
|
||||
./configure.sh ./private.git
|
||||
rm -rf ./private.git
|
||||
|
||||
- name: Configure repository
|
||||
- name: Set up SDK
|
||||
shell: bash
|
||||
run: ./configure.sh
|
||||
run: (cd tools/android; ./set_up_android.py --sdk $ANDROID_SDK_ROOT)
|
||||
|
||||
- name: Compile
|
||||
shell: bash
|
||||
|
@ -81,7 +72,7 @@ jobs:
|
|||
run: |
|
||||
cmake --version
|
||||
ninja --version
|
||||
./gradlew -Pfirebase assembleGoogleBeta uploadCrashlyticsSymbolFileGoogleBeta uploadCrashlyticsMappingFileGoogleBeta
|
||||
./gradlew -x lint -x lintVitalGoogleBeta assembleGoogleBeta uploadCrashlyticsMappingFileGoogleRelease
|
||||
|
||||
- name: Upload beta apk to App Distribution
|
||||
shell: bash
|
||||
|
|
25
.github/workflows/android-check-metadata.yaml
vendored
25
.github/workflows/android-check-metadata.yaml
vendored
|
@ -1,25 +0,0 @@
|
|||
name: Android Check Metadata
|
||||
on:
|
||||
workflow_dispatch: # Manual trigger
|
||||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/android-check-metadata.yaml # Run check on self change
|
||||
- android/app/src/fdroid/**
|
||||
- android/app/src/google/**
|
||||
- tools/python/check_store_metadata.py
|
||||
|
||||
jobs:
|
||||
android-check-metadata:
|
||||
name: Check app metadata
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
sparse-checkout: |
|
||||
android
|
||||
tools/python/check_store_metadata.py
|
||||
|
||||
- name: Check metadata
|
||||
run: ./tools/python/check_store_metadata.py android
|
102
.github/workflows/android-check.yaml
vendored
102
.github/workflows/android-check.yaml
vendored
|
@ -1,82 +1,29 @@
|
|||
name: Android Check
|
||||
on:
|
||||
workflow_dispatch: # Manual trigger
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- .gitignore
|
||||
- .github/**
|
||||
- '!.github/workflows/android-check.yaml' # Run check on self change
|
||||
- '**/*_tests/**'
|
||||
- CONTRIBUTORS
|
||||
- LICENSE
|
||||
- NOTICE
|
||||
- README.md
|
||||
- android/app/src/fdroid/**
|
||||
- android/app/src/google/**
|
||||
- iphone/**
|
||||
- data/strings/**
|
||||
- xcode/**
|
||||
- docs/**
|
||||
- generator/**
|
||||
- packaging/**
|
||||
- platform/*apple*
|
||||
- platform/*_ios*
|
||||
- platform/*_linux*
|
||||
- platform/*_mac*
|
||||
- platform/*qt*
|
||||
- platform/*_win*
|
||||
- pyhelpers/**
|
||||
- qt*/**
|
||||
- skin_generator/**
|
||||
- tools/**
|
||||
- track_generator/**
|
||||
- xcode/**
|
||||
|
||||
env:
|
||||
JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Android Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Parallel submodules checkout
|
||||
shell: bash
|
||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
||||
|
||||
- name: Configure repository
|
||||
shell: bash
|
||||
run: ./configure.sh
|
||||
|
||||
- name: Lint
|
||||
shell: bash
|
||||
working-directory: android
|
||||
run: ./gradlew -Pandroidauto=true lint
|
||||
|
||||
android-check:
|
||||
name: Build Android Debug
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
flavor: [WebDebug, FdroidDebug]
|
||||
include:
|
||||
- flavor: WebDebug
|
||||
arch: arm64
|
||||
- flavor: FdroidDebug
|
||||
arch: arm32
|
||||
# Cancels previous jobs if the same branch or PR was updated again.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ matrix.flavor }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
steps:
|
||||
- name: Install build tools and dependencies
|
||||
shell: bash
|
||||
|
@ -84,38 +31,49 @@ jobs:
|
|||
sudo apt-get update -y
|
||||
sudo apt-get install -y ninja-build
|
||||
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
fetch-depth: 200 # enough to get all commits for the current day
|
||||
java-version: 11
|
||||
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 100 # enough to get all commits for the current day
|
||||
|
||||
- name: Parallel submodules checkout
|
||||
shell: bash
|
||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
||||
run: git submodule update --init --recursive --jobs=$(($(nproc) * 2))
|
||||
|
||||
- name: Configure repository
|
||||
- name: Configure in Open Source mode
|
||||
shell: bash
|
||||
run: ./configure.sh
|
||||
|
||||
- name: Configure ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ${{ github.workflow }}-${{ matrix.flavor }}
|
||||
- name: Set up SDK
|
||||
shell: bash
|
||||
run: (cd tools/android; ./set_up_android.py --sdk $ANDROID_SDK_ROOT)
|
||||
|
||||
- name: Compile ${{ matrix.flavor }}
|
||||
- name: Compile
|
||||
shell: bash
|
||||
working-directory: android
|
||||
env:
|
||||
CMAKE_C_COMPILER_LAUNCHER: ccache
|
||||
CMAKE_CXX_COMPILER_LAUNCHER: ccache
|
||||
run: |
|
||||
cmake --version
|
||||
ninja --version
|
||||
./gradlew -P${{ matrix.arch }} assemble${{ matrix.flavor }}
|
||||
./gradlew -Parm64 assembleWebDebug
|
||||
|
||||
- name: Upload ${{ matrix.flavor }} apk
|
||||
uses: actions/upload-artifact@v4
|
||||
- name: Upload arm64-v8a debug apk
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: android-${{ matrix.flavor }}
|
||||
path: android/app/build/outputs/apk/**/OrganicMaps-*.apk
|
||||
name: android-web-arm64-v8a-debug
|
||||
path: android/build/outputs/apk/web/debug/OrganicMaps-*-web-debug.apk
|
||||
if-no-files-found: error
|
||||
|
||||
android-check-metadata:
|
||||
name: Check app metadata
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Check metadata
|
||||
run: ./tools/python/check_store_metadata.py android
|
||||
|
|
75
.github/workflows/android-monkey.yaml
vendored
75
.github/workflows/android-monkey.yaml
vendored
|
@ -2,10 +2,7 @@ name: Android Monkey
|
|||
on:
|
||||
workflow_dispatch: # Manual trigger
|
||||
schedule:
|
||||
- cron: '0 5 * * 0' # Once per week at 05:00 UTC
|
||||
|
||||
env:
|
||||
JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin
|
||||
- cron: '0 5 * * *' # Once per day at 05:00 UTC
|
||||
|
||||
jobs:
|
||||
precondition:
|
||||
|
@ -13,7 +10,7 @@ jobs:
|
|||
name: Check preconditions
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1000 # fetch month or so
|
||||
|
||||
|
@ -24,15 +21,15 @@ jobs:
|
|||
DIRS="android base drape drape_frontend editor ge0 map platform routing search shaders storage traffic transit"
|
||||
if [ '${{ github.event_name }}' != 'schedule' ] ||
|
||||
[ $(git rev-list --count --since="24 hours" HEAD $DIRS) -gt 0 ]; then
|
||||
echo "updated=true" >> $GITHUB_OUTPUT
|
||||
echo "::set-output name=updated::true"
|
||||
else
|
||||
echo "updated=" >> $GITHUB_OUTPUT
|
||||
echo "::set-output name=updated::"
|
||||
fi
|
||||
outputs:
|
||||
updated: ${{ steps.check.outputs.updated }}
|
||||
|
||||
android-google-beta:
|
||||
name: Android Google Beta
|
||||
android-google-debug:
|
||||
name: Android Google Debug
|
||||
runs-on: ubuntu-latest
|
||||
needs: precondition
|
||||
if: ${{ needs.precondition.outputs.updated != '' }}
|
||||
|
@ -44,38 +41,40 @@ jobs:
|
|||
sudo apt-get update -y
|
||||
sudo apt-get install -y ninja-build
|
||||
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
|
||||
- name: Install Google SDK
|
||||
uses: google-github-actions/setup-gcloud@v0
|
||||
uses: google-github-actions/setup-gcloud@master
|
||||
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 100 # enough to get all commits for the current day
|
||||
|
||||
- name: Parallel submodules checkout
|
||||
shell: bash
|
||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
||||
run: git submodule update --init --recursive --jobs=$(($(nproc) * 2))
|
||||
|
||||
- name: Restore beta keys
|
||||
- name: Checkout private keys
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: ${{ secrets.PRIVATE_REPO }}
|
||||
ssh-key: ${{ secrets.PRIVATE_SSH_KEY }}
|
||||
ref: master
|
||||
path: private.git
|
||||
|
||||
- name: Configure repo with private keys
|
||||
shell: bash
|
||||
run: |
|
||||
echo "$PRIVATE_H" | base64 -d > private.h
|
||||
echo "$FIREBASE_TEST_LAB_JSON" | base64 -d > android/app/firebase-test-lab.json
|
||||
echo "$FIREBASE_APP_DISTRIBUTION_JSON" | base64 -d > android/app/firebase-app-distribution.json
|
||||
echo "$GOOGLE_SERVICES_JSON" | base64 -d > android/app/google-services.json
|
||||
echo "$SECURE_PROPERTIES" | base64 -d > android/app/secure.properties
|
||||
echo "$RELEASE_KEYSTORE" | base64 -d > android/app/release.keystore
|
||||
env:
|
||||
PRIVATE_H: ${{ secrets.PRIVATE_H }}
|
||||
FIREBASE_TEST_LAB_JSON: ${{ secrets.FIREBASE_TEST_LAB_JSON }}
|
||||
FIREBASE_APP_DISTRIBUTION_JSON: ${{ secrets.FIREBASE_APP_DISTRIBUTION_JSON }}
|
||||
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
|
||||
SECURE_PROPERTIES: ${{ secrets.SECURE_PROPERTIES }}
|
||||
RELEASE_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE }}
|
||||
./configure.sh ./private.git
|
||||
rm -rf ./private.git
|
||||
|
||||
- name: Configure repository
|
||||
- name: Set up SDK
|
||||
shell: bash
|
||||
run: ./configure.sh
|
||||
run: (cd tools/android; ./set_up_android.py --sdk $ANDROID_SDK_ROOT)
|
||||
|
||||
- name: Compile
|
||||
shell: bash
|
||||
|
@ -83,20 +82,16 @@ jobs:
|
|||
run: |
|
||||
cmake --version
|
||||
ninja --version
|
||||
./gradlew -Pfirebase -Parm64 -Parmeabi-v7a assembleGoogleBeta uploadCrashlyticsSymbolFileGoogleBeta uploadCrashlyticsMappingFileGoogleBeta
|
||||
./gradlew -Parm64 -Parm32 -Pfirebase assembleGoogleDebug
|
||||
|
||||
- name: Run monkey
|
||||
run: |
|
||||
gcloud auth activate-service-account --key-file android/app/firebase-test-lab.json
|
||||
gcloud auth activate-service-account --key-file android/firebase-test-lab.json
|
||||
gcloud config set project omapsapp
|
||||
gcloud firebase test android run --app ./android/app/build/outputs/apk/google/beta/OrganicMaps-*-google-beta.apk \
|
||||
--device model=husky,version=34 \
|
||||
--device model=tangorpro,version=33,orientation=landscape \
|
||||
--device model=bluejay,version=32 \
|
||||
--device model=a51,version=31 \
|
||||
--device model=f2q,version=30,orientation=landscape \
|
||||
--device model=a10,version=29,orientation=landscape \
|
||||
--device model=cactus,version=27 \
|
||||
--device model=sailfish,version=25 \
|
||||
--device model=harpia,version=23 \
|
||||
gcloud firebase test android run --app ./android/build/outputs/apk/google/debug/OrganicMaps-*-google-debug.apk \
|
||||
--device model=redfin,version=30 \
|
||||
--device model=a10,version=29 \
|
||||
--device model=dipper,version=28 \
|
||||
--device model=OnePlus3T,version=26 \
|
||||
--device model=flo,version=21,orientation=landscape \
|
||||
--timeout 15m
|
||||
|
|
28
.github/workflows/android-release-metadata.yaml
vendored
28
.github/workflows/android-release-metadata.yaml
vendored
|
@ -2,9 +2,6 @@ name: Android Release Metadata
|
|||
on:
|
||||
workflow_dispatch: # Manual trigger
|
||||
|
||||
env:
|
||||
JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin
|
||||
|
||||
jobs:
|
||||
android-release-metadata:
|
||||
name: Upload Google Play metadata
|
||||
|
@ -12,31 +9,36 @@ jobs:
|
|||
environment: production
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Parallel submodules checkout
|
||||
shell: bash
|
||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
||||
run: git submodule update --init --recursive --jobs=$(($(nproc) * 2))
|
||||
|
||||
- name: Checkout screenshots
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: ${{ secrets.SCREENSHOTS_REPO }}
|
||||
ssh-key: ${{ secrets.SCREENSHOTS_SSH_KEY }}
|
||||
ref: master
|
||||
path: screenshots
|
||||
|
||||
- name: Restore release keys
|
||||
- name: Checkout private keys
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: ${{ secrets.PRIVATE_REPO }}
|
||||
ssh-key: ${{ secrets.PRIVATE_SSH_KEY }}
|
||||
ref: master
|
||||
path: private.git
|
||||
|
||||
- name: Configure repo with private keys
|
||||
shell: bash
|
||||
run: |
|
||||
echo "$PRIVATE_H" | base64 -d > private.h
|
||||
echo "$GOOGLE_PLAY_JSON" | base64 -d > android/app/google-play.json
|
||||
env:
|
||||
PRIVATE_H: ${{ secrets.PRIVATE_H }}
|
||||
GOOGLE_PLAY_JSON: ${{ secrets.GOOGLE_PLAY_JSON }}
|
||||
./configure.sh ./private.git
|
||||
rm -rf ./private.git
|
||||
|
||||
- name: Upload
|
||||
shell: bash
|
||||
run: ./gradlew prepareGoogleReleaseListing publishGoogleReleaseListing
|
||||
run: ./gradlew publishGoogleReleaseListing
|
||||
working-directory: android
|
||||
timeout-minutes: 5
|
||||
|
|
79
.github/workflows/android-release.yaml
vendored
79
.github/workflows/android-release.yaml
vendored
|
@ -1,11 +1,10 @@
|
|||
name: Android Release
|
||||
on:
|
||||
workflow_dispatch: # Manual trigger
|
||||
workflow_dispatch: # Manual trigger
|
||||
|
||||
env:
|
||||
RELEASE_NOTES: android/app/src/google/play/release-notes/en-US/default.txt
|
||||
FDROID_VERSION: android/app/src/fdroid/play/version.yaml
|
||||
JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin
|
||||
RELEASE_NOTES: android/src/google/play/release-notes/en-US/default.txt
|
||||
FDROID_VERSION: android/src/fdroid/play/version.yaml
|
||||
|
||||
jobs:
|
||||
tag:
|
||||
|
@ -14,9 +13,9 @@ jobs:
|
|||
environment: production
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 100 # Enough to get all commits for the last day.
|
||||
fetch-depth: 100 # enough to get all commits for the current day
|
||||
ssh-key: ${{ secrets.RELEASE_SSH_KEY }}
|
||||
|
||||
- name: Tag
|
||||
|
@ -24,14 +23,16 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -x
|
||||
timestamp=$(date +%s)
|
||||
git config user.name '${{ github.actor }}'
|
||||
git config user.email '${{ github.actor }}@users.noreply.github.com'
|
||||
version=$(tools/unix/version.sh ios_version)
|
||||
# +1 because below a "Bump versions" commit is created.
|
||||
# TODO: Find a way to refactor FDroid versioning without that additional commit.
|
||||
build=$(($(tools/unix/version.sh count) + 1))
|
||||
code=$(($(tools/unix/version.sh android_code) + 1))
|
||||
tag=$version-$build-android
|
||||
export GIT_COMMITTER_DATE=$timestamp
|
||||
export GIT_AUTHOR_DATE=$timestamp
|
||||
current_date=$(date -d @$timestamp '+%Y-%m-%d')
|
||||
build=$(($(git rev-list --count --after="${current_date}T00:00:00Z" HEAD) + 1))
|
||||
version=$(date -d @$timestamp '+%Y.%m.%d')
|
||||
code=$(date -d @$timestamp '+%y%m%d')$(printf "%02d" ${build})
|
||||
tag=${version}-${build}-android
|
||||
echo "::set-output name=version::$version"
|
||||
echo "::set-output name=build::$build"
|
||||
echo "::set-output name=tag::$tag"
|
||||
|
@ -75,8 +76,13 @@ jobs:
|
|||
sudo apt-get update -y
|
||||
sudo apt-get install -y ninja-build
|
||||
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 100 # enough to get all commits for the current day
|
||||
ref: 'refs/tags/${{ needs.tag.outputs.tag }}'
|
||||
|
@ -90,40 +96,33 @@ jobs:
|
|||
|
||||
- name: Parallel submodules checkout
|
||||
shell: bash
|
||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
||||
run: git submodule update --init --recursive --jobs=$(($(nproc) * 2))
|
||||
|
||||
- name: Checkout screenshots
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: ${{ secrets.SCREENSHOTS_REPO }}
|
||||
ssh-key: ${{ secrets.SCREENSHOTS_SSH_KEY }}
|
||||
ref: master
|
||||
path: screenshots
|
||||
|
||||
- name: Restore release keys
|
||||
- name: Checkout private keys
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: ${{ secrets.PRIVATE_REPO }}
|
||||
ssh-key: ${{ secrets.PRIVATE_SSH_KEY }}
|
||||
ref: master
|
||||
path: private.git
|
||||
|
||||
- name: Configure repo with private keys
|
||||
shell: bash
|
||||
run: |
|
||||
echo "$PRIVATE_H" | base64 -d > private.h
|
||||
echo "$GOOGLE_PLAY_JSON" | base64 -d > android/app/google-play.json
|
||||
echo "$HUAWEI_APPGALLERY_JSON" | base64 -d > android/app/huawei-appgallery.json
|
||||
echo "$AGCONNECT_SERVICES_JSON" | base64 -d > android/app/agconnect-services.json
|
||||
echo "$SECURE_PROPERTIES" | base64 -d > android/app/secure.properties
|
||||
echo "$RELEASE_KEYSTORE" | base64 -d > android/app/release.keystore
|
||||
env:
|
||||
PRIVATE_H: ${{ secrets.PRIVATE_H }}
|
||||
GOOGLE_PLAY_JSON: ${{ secrets.GOOGLE_PLAY_JSON }}
|
||||
HUAWEI_APPGALLERY_JSON: ${{ secrets.HUAWEI_APPGALLERY_JSON }}
|
||||
AGCONNECT_SERVICES_JSON: ${{ secrets.AGCONNECT_SERVICES_JSON }}
|
||||
SECURE_PROPERTIES: ${{ secrets.SECURE_PROPERTIES }}
|
||||
RELEASE_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE }}
|
||||
|
||||
- name: Configure repository
|
||||
shell: bash
|
||||
run: ./configure.sh
|
||||
./configure.sh ./private.git
|
||||
rm -rf ./private.git
|
||||
|
||||
- name: Set up SDK
|
||||
shell: bash
|
||||
run: echo "sdk.dir=$ANDROID_SDK_ROOT" > android/local.properties
|
||||
run: (cd tools/android; ./set_up_android.py --sdk $ANDROID_SDK_ROOT)
|
||||
|
||||
- name: Compile and upload to Google Play
|
||||
shell: bash
|
||||
|
@ -151,16 +150,11 @@ jobs:
|
|||
if: ${{ matrix.flavor == 'web' }}
|
||||
shell: bash
|
||||
run: |
|
||||
(cd ./android/app/build/outputs/apk/web/release/ && sha256sum OrganicMaps-${{ needs.tag.outputs.code }}-web-release.apk > OrganicMaps-${{ needs.tag.outputs.code }}-web-release.apk.sha256sum)
|
||||
{
|
||||
cat ${{ env.RELEASE_NOTES }}
|
||||
echo ""
|
||||
echo "See [a detailed announce](https://organicmaps.app/news/) on our website when app updates are published in all stores."
|
||||
echo "You can get automatic app updates from GitHub [using Obtainium](https://github.com/organicmaps/organicmaps/wiki/Installing-Organic-Maps-from-GitHub-using-Obtainium)."
|
||||
echo ""
|
||||
echo "sha256sum:"
|
||||
echo -e '\n```'
|
||||
tr -d '\n' < ./android/app/build/outputs/apk/web/release/OrganicMaps-${{ needs.tag.outputs.code }}-web-release.apk.sha256sum
|
||||
(cd ./android/build/outputs/apk/web/release/ && sha256sum OrganicMaps-${{ needs.tag.outputs.code }}-web-release.apk) | tr -d '\n'
|
||||
echo -e '\n```'
|
||||
} > ${{ runner.temp }}/release-notes.txt
|
||||
|
||||
|
@ -173,8 +167,5 @@ jobs:
|
|||
name: ${{ needs.tag.outputs.tag }}
|
||||
tag_name: ${{ needs.tag.outputs.tag }}
|
||||
discussion_category_name: 'Announcements'
|
||||
prerelease: true
|
||||
files: |
|
||||
./android/app/build/outputs/apk/web/release/OrganicMaps-${{ needs.tag.outputs.code }}-web-release.apk
|
||||
./android/app/build/outputs/apk/web/release/OrganicMaps-${{ needs.tag.outputs.code }}-web-release.apk.sha256sum
|
||||
files: ./android/build/outputs/apk/web/release/OrganicMaps-${{ needs.tag.outputs.code }}-web-release.apk
|
||||
fail_on_unmatched_files: true
|
||||
|
|
40
.github/workflows/appstream-check.yaml
vendored
40
.github/workflows/appstream-check.yaml
vendored
|
@ -1,40 +0,0 @@
|
|||
name: Validate appstream metadata xml
|
||||
on:
|
||||
workflow_dispatch: # Manual trigger
|
||||
pull_request:
|
||||
paths:
|
||||
- packaging/app.organicmaps.desktop.metainfo.xml
|
||||
- .github/workflows/appstream-check.yaml # Run check on self change
|
||||
|
||||
jobs:
|
||||
validate-appstream:
|
||||
name: Validate appstream metadata xml
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
sparse-checkout: |
|
||||
packaging/app.organicmaps.desktop.metainfo.xml
|
||||
|
||||
- name: Install appstream validator and flatpak Builder
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt update -y
|
||||
sudo apt install -y \
|
||||
flatpak
|
||||
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
sudo flatpak install -y org.freedesktop.appstream-glib org.flatpak.Builder
|
||||
|
||||
- name: Validate appstream data
|
||||
shell: bash
|
||||
run: flatpak run org.freedesktop.appstream-glib validate --nonet packaging/app.organicmaps.desktop.metainfo.xml
|
||||
|
||||
- name: Lint appstream data with flatpak Builder
|
||||
shell: bash
|
||||
run: flatpak run --command=flatpak-builder-lint org.flatpak.Builder appstream packaging/app.organicmaps.desktop.metainfo.xml
|
||||
|
||||
- name: Run appstreamcli in pedantic mode
|
||||
shell: bash
|
||||
run: flatpak run --command=appstreamcli org.flatpak.Builder validate --pedantic packaging/app.organicmaps.desktop.metainfo.xml
|
30
.github/workflows/cleanup_caches.yml
vendored
30
.github/workflows/cleanup_caches.yml
vendored
|
@ -1,30 +0,0 @@
|
|||
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#force-deleting-cache-entries
|
||||
name: Cleanup caches by a branch
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
|
||||
jobs:
|
||||
cleanup:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Cleanup
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
REPO: ${{ github.repository }}
|
||||
BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||
run: |
|
||||
gh extension install actions/gh-actions-cache
|
||||
|
||||
echo "Fetching list of cache key"
|
||||
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )
|
||||
|
||||
## Setting this to not fail the workflow while deleting cache keys.
|
||||
set +e
|
||||
echo "Deleting caches..."
|
||||
for cacheKey in $cacheKeysForPR
|
||||
do
|
||||
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
|
||||
done
|
||||
echo "Done"
|
162
.github/workflows/coverage-check.yaml
vendored
162
.github/workflows/coverage-check.yaml
vendored
|
@ -1,162 +0,0 @@
|
|||
name: Coverage Report
|
||||
on:
|
||||
workflow_dispatch: # Manual trigger
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- labeled
|
||||
- unlabeled
|
||||
paths-ignore:
|
||||
- .gitignore
|
||||
- CONTRIBUTORS
|
||||
- LICENSE
|
||||
- NOTICE
|
||||
- README.md
|
||||
- docs/**
|
||||
- packaging/**
|
||||
- platform/*apple*
|
||||
- platform/*_android*
|
||||
- platform/*_ios*
|
||||
- platform/*_mac*
|
||||
- platform/*_win*
|
||||
- pyhelpers/**
|
||||
- tools/**
|
||||
- '!tools/python/test_server/**'
|
||||
- xcode/**
|
||||
|
||||
# Cancels previous jobs if the same branch or PR was updated again.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-coverage-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
should-run-check:
|
||||
name: Should run coverage
|
||||
runs-on: ubuntu-24.04
|
||||
outputs:
|
||||
run-from-pr: ${{ steps.run-from-pr.outputs.run-from-pr }}
|
||||
manually-triggered: ${{ steps.manually-triggered.outputs.manually-triggered }}
|
||||
steps:
|
||||
- name: Check if PR has 'Coverage' label
|
||||
id: run-from-pr
|
||||
if: github.event_name == 'pull_request'
|
||||
env:
|
||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
LABEL_NAME="Coverage"
|
||||
LABELS=$(gh pr view https://github.com/$GITHUB_REPOSITORY/pull/$PR_NUMBER --json labels)
|
||||
if echo "$LABELS" | jq -e '.labels[].name' | grep -q "$LABEL_NAME"; then
|
||||
echo "run-from-pr=true" >> $GITHUB_OUTPUT
|
||||
echo "'Coverage' label found in PR."
|
||||
fi
|
||||
- name: Check if manually triggered
|
||||
id: manually-triggered
|
||||
if: github.event_name == 'workflow_dispatch'
|
||||
run: echo "manually-triggered=true" >> $GITHUB_OUTPUT
|
||||
|
||||
coverage:
|
||||
needs: should-run-check
|
||||
name: Generate coverage report
|
||||
runs-on: ubuntu-24.04
|
||||
if: ${{ needs.should-run-check.outputs.run-from-pr == 'true' || needs.should-run-check.outputs.manually-triggered == 'true'}}
|
||||
steps:
|
||||
- name: Free disk space by removing .NET, Android and Haskell
|
||||
shell: bash
|
||||
run: |
|
||||
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
|
||||
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 100 # enough to get all commits for the current day
|
||||
|
||||
- name: Parallel submodules checkout
|
||||
shell: bash
|
||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
||||
|
||||
- name: Install build tools and dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt update -y
|
||||
sudo apt install -y \
|
||||
ninja-build \
|
||||
libgl1-mesa-dev \
|
||||
libglvnd-dev \
|
||||
qt6-base-dev \
|
||||
libfreetype-dev \
|
||||
libharfbuzz-dev \
|
||||
libqt6svg6-dev \
|
||||
qt6-positioning-dev \
|
||||
libqt6positioning6-plugins \
|
||||
libqt6positioning6 \
|
||||
llvm \
|
||||
gcovr
|
||||
|
||||
- name: Configure repository
|
||||
shell: bash
|
||||
run: ./configure.sh
|
||||
|
||||
- name: Configure ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ${{ github.workflow }}-coverage
|
||||
|
||||
- name: CMake
|
||||
shell: bash
|
||||
env:
|
||||
CC: clang-18
|
||||
CXX: clang++-18
|
||||
CMAKE_C_COMPILER_LAUNCHER: ccache
|
||||
CMAKE_CXX_COMPILER_LAUNCHER: ccache
|
||||
# -g1 should slightly reduce build time.
|
||||
run: |
|
||||
cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug \
|
||||
-DCMAKE_CXX_FLAGS=-g1 -DCOVERAGE_REPORT=ON
|
||||
|
||||
- name: Compile
|
||||
shell: bash
|
||||
working-directory: build
|
||||
run: ninja
|
||||
|
||||
- name: Tests
|
||||
shell: bash
|
||||
working-directory: build
|
||||
env:
|
||||
QT_QPA_PLATFORM: "offscreen"
|
||||
# generator_integration_tests - https://github.com/organicmaps/organicmaps/issues/225
|
||||
# opening_hours_integration_tests - https://github.com/organicmaps/organicmaps/issues/219
|
||||
# opening_hours_supported_features_tests - https://github.com/organicmaps/organicmaps/issues/219
|
||||
# routing_integration_tests - https://github.com/organicmaps/organicmaps/issues/221
|
||||
# shaders_tests - https://github.com/organicmaps/organicmaps/issues/223
|
||||
# world_feed_integration_tests - https://github.com/organicmaps/organicmaps/issues/215
|
||||
CTEST_EXCLUDE_REGEX: "generator_integration_tests|opening_hours_integration_tests|opening_hours_supported_features_tests|routing_benchmarks|routing_integration_tests|routing_quality_tests|search_quality_tests|storage_integration_tests|shaders_tests|world_feed_integration_tests"
|
||||
run: |
|
||||
sudo locale-gen en_US
|
||||
sudo locale-gen en_US.UTF-8
|
||||
sudo locale-gen es_ES
|
||||
sudo locale-gen es_ES.UTF-8
|
||||
sudo locale-gen fr_FR
|
||||
sudo locale-gen fr_FR.UTF-8
|
||||
sudo locale-gen ru_RU
|
||||
sudo locale-gen ru_RU.UTF-8
|
||||
sudo update-locale
|
||||
ctest -L "omim-test" -E "$CTEST_EXCLUDE_REGEX" --output-on-failure
|
||||
|
||||
- name: Run coverage report generation
|
||||
shell: bash
|
||||
working-directory: build
|
||||
run: |
|
||||
cmake --build . --target omim_coverage
|
||||
cat coverage_report/summary.txt
|
||||
|
||||
- name: Archive the coverage report
|
||||
working-directory: build/coverage_report
|
||||
run: zip -r coverage_report.zip html/
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: coverage-report
|
||||
path: build/coverage_report/coverage_report.zip
|
30
.github/workflows/desktop-file-check.yaml
vendored
30
.github/workflows/desktop-file-check.yaml
vendored
|
@ -1,30 +0,0 @@
|
|||
name: Validate .desktop file
|
||||
on:
|
||||
workflow_dispatch: # Manual trigger
|
||||
pull_request:
|
||||
paths:
|
||||
- qt/res/app.organicmaps.desktop.desktop
|
||||
- .github/workflows/desktop-file-check.yaml # Run check on self change
|
||||
|
||||
jobs:
|
||||
validate-desktop-file:
|
||||
name: Validate .desktop file
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
sparse-checkout: |
|
||||
qt/res/app.organicmaps.desktop.desktop
|
||||
|
||||
- name: Install desktop-file-validate tool
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt update -y
|
||||
sudo apt install -y \
|
||||
desktop-file-utils
|
||||
|
||||
- name: Validate desktop file
|
||||
shell: bash
|
||||
run: desktop-file-validate qt/res/app.organicmaps.desktop.desktop && echo "Successfully validated .desktop file"
|
60
.github/workflows/ios-beta.yaml
vendored
60
.github/workflows/ios-beta.yaml
vendored
|
@ -1,13 +1,11 @@
|
|||
name: iOS Beta
|
||||
on:
|
||||
workflow_dispatch: # Manual trigger
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- rt-ios-testflight # TODO: remove
|
||||
paths-ignore:
|
||||
- .gitignore
|
||||
- .github/**
|
||||
- '!.github/workflows/ios-beta.yaml' # Run check on self change
|
||||
- '**/*_tests/**'
|
||||
- '**/CMakeLists.txt'
|
||||
- CONTRIBUTORS
|
||||
|
@ -15,72 +13,46 @@ on:
|
|||
- NOTICE
|
||||
- README.md
|
||||
- android/**
|
||||
- data/strings/**
|
||||
- docs/**
|
||||
- generator/**
|
||||
- packaging/**
|
||||
- platform/*_android*
|
||||
- platform/*_linux*
|
||||
- platform/*_mac*
|
||||
- platform/*qt*
|
||||
- platform/*_win*
|
||||
- pyhelpers/**
|
||||
- qt*/**
|
||||
- skin_generator/**
|
||||
- tools/**
|
||||
- track_generator/**
|
||||
|
||||
jobs:
|
||||
ios-beta:
|
||||
name: Apple TestFlight
|
||||
runs-on: macos-15
|
||||
env:
|
||||
DEVELOPER_DIR: /Applications/Xcode_16.app/Contents/Developer
|
||||
LANG: en_US.UTF-8 # Fastlane complains that the terminal is using ASCII.
|
||||
LANGUAGE: en_US.UTF-8
|
||||
LC_ALL: en_US.UTF-8
|
||||
runs-on: macos-latest
|
||||
environment: beta
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 100 # enough to get all commits for the current day
|
||||
|
||||
- name: Parallel submodules checkout
|
||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(sysctl -n hw.logicalcpu) * 20))
|
||||
run: git submodule update --init --recursive --jobs=4
|
||||
|
||||
- name: Restore beta keys
|
||||
shell: bash
|
||||
- name: Checkout private keys
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: ${{ secrets.PRIVATE_REPO }}
|
||||
ssh-key: ${{ secrets.PRIVATE_SSH_KEY }}
|
||||
ref: master
|
||||
path: private.git
|
||||
|
||||
- name: Configure repo with private keys
|
||||
run: |
|
||||
mkdir -p xcode/keys
|
||||
echo "$PRIVATE_H" | base64 -d > private.h
|
||||
echo "$APPSTORE_JSON" | base64 -d > xcode/keys/appstore.json
|
||||
echo "$CERTIFICATES_DEV_P12" | base64 -d > xcode/keys/CertificatesDev.p12
|
||||
echo "$CERTIFICATES_DISTR_P12" | base64 -d > xcode/keys/CertificatesDistr.p12
|
||||
env:
|
||||
PRIVATE_H: ${{ secrets.PRIVATE_H }}
|
||||
APPSTORE_JSON: ${{ secrets.APPSTORE_JSON }}
|
||||
CERTIFICATES_DEV_P12: ${{ secrets.CERTIFICATES_DEV_P12 }}
|
||||
CERTIFICATES_DISTR_P12: ${{ secrets.CERTIFICATES_DISTR_P12 }}
|
||||
|
||||
- name: Configure repository
|
||||
shell: bash
|
||||
run: ./configure.sh
|
||||
./configure.sh ./private.git
|
||||
rm -rf ./private.git
|
||||
|
||||
- name: Compile and upload to TestFlight
|
||||
run: |
|
||||
echo "IOS_VERSION=$(../tools/unix/version.sh ios_version)-$(../tools/unix/version.sh ios_build)" >> "$GITHUB_ENV"
|
||||
./fastlane.sh upload_testflight
|
||||
run: ./fastlane.sh upload_testflight
|
||||
env:
|
||||
APPSTORE_CERTIFICATE_PASSWORD: '${{ secrets.APPSTORE_CERTIFICATE_PASSWORD }}'
|
||||
working-directory: xcode
|
||||
|
||||
- name: Upload ipa and DSYMs artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ipa and DSYM archive ${{ env.IOS_VERSION }}
|
||||
path: xcode/build/*
|
||||
if-no-files-found: error
|
||||
|
|
24
.github/workflows/ios-check-metadata.yaml
vendored
24
.github/workflows/ios-check-metadata.yaml
vendored
|
@ -1,24 +0,0 @@
|
|||
name: iOS Check metadata
|
||||
on:
|
||||
workflow_dispatch: # Manual trigger
|
||||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/ios-check-metadata.yaml # Run check on self change
|
||||
- iphone/metadata/**
|
||||
- tools/python/check_store_metadata.py
|
||||
|
||||
jobs:
|
||||
ios-check-metadata:
|
||||
name: Check app metadata
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
sparse-checkout: |
|
||||
iphone/metadata
|
||||
tools/python/check_store_metadata.py
|
||||
|
||||
- name: Check metadata
|
||||
run: ./tools/python/check_store_metadata.py ios
|
94
.github/workflows/ios-check.yaml
vendored
94
.github/workflows/ios-check.yaml
vendored
|
@ -1,14 +1,10 @@
|
|||
name: iOS Check
|
||||
on:
|
||||
workflow_dispatch: # Manual trigger
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- .gitignore
|
||||
- .github/**
|
||||
- '!.github/workflows/ios-check.yaml' # Run check on self change
|
||||
- '**/*_tests/**'
|
||||
- '**/CMakeLists.txt'
|
||||
- CONTRIBUTORS
|
||||
|
@ -16,91 +12,59 @@ on:
|
|||
- NOTICE
|
||||
- README.md
|
||||
- android/**
|
||||
- data/strings/**
|
||||
- docs/**
|
||||
- generator/**
|
||||
- iphone/metadata/**
|
||||
- packaging/**
|
||||
- platform/*_android*
|
||||
- platform/*_linux*
|
||||
- platform/*_mac*
|
||||
- platform/*qt*
|
||||
- platform/*_win*
|
||||
- pyhelpers/**
|
||||
- qt*/**
|
||||
- skin_generator/**
|
||||
- tools/**
|
||||
- track_generator/**
|
||||
|
||||
jobs:
|
||||
ios-check:
|
||||
name: Build iOS
|
||||
runs-on: macos-15
|
||||
env:
|
||||
DEVELOPER_DIR: /Applications/Xcode_16.app/Contents/Developer
|
||||
LANG: en_US.UTF-8 # Fastlane complains that the terminal is using ASCII.
|
||||
LANGUAGE: en_US.UTF-8
|
||||
LC_ALL: en_US.UTF-8
|
||||
TEST_RESULTS_BUNDLE_NAME: OMaps-Test-Results
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
buildType: [Debug, Release]
|
||||
# Cancels previous jobs if the same branch or PR was updated again.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ matrix.buildType }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
name: Build iOS Debug
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Parallel submodules checkout
|
||||
shell: bash
|
||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(sysctl -n hw.logicalcpu) * 20))
|
||||
run: git submodule update --init --recursive --jobs=4
|
||||
|
||||
- name: Configure repository
|
||||
- name: Configure
|
||||
shell: bash
|
||||
run: ./configure.sh
|
||||
|
||||
- name: Configure XCode cache
|
||||
uses: irgaly/xcode-cache@v1
|
||||
with:
|
||||
key: xcode-cache-deriveddata-${{ github.workflow }}-${{ matrix.buildType }}-${{ github.sha }}
|
||||
restore-keys: xcode-cache-deriveddata-${{ github.workflow }}-${{ matrix.buildType }}
|
||||
|
||||
- name: Build and Run Tests (Debug)
|
||||
if: matrix.buildType == 'Debug'
|
||||
- name: Compile
|
||||
shell: bash
|
||||
# Just check compilation
|
||||
run: |
|
||||
xcodebuild test \
|
||||
# Run twice as a workaround for a dependency problem.
|
||||
# https://github.com/organicmaps/organicmaps/issues/133
|
||||
xcodebuild \
|
||||
-workspace xcode/omim.xcworkspace \
|
||||
-scheme OMaps \
|
||||
-configuration Debug \
|
||||
-sdk iphonesimulator \
|
||||
-destination 'platform=iOS Simulator,name=iPhone 16 Pro Max,OS=latest' \
|
||||
-quiet \
|
||||
-resultBundlePath ${{ env.TEST_RESULTS_BUNDLE_NAME }}.xcresult \
|
||||
-configuration Debug build \
|
||||
'generic/platform=iOS' \
|
||||
CODE_SIGNING_REQUIRED=NO \
|
||||
CODE_SIGNING_ALLOWED=NO
|
||||
|
||||
- name: Upload Test Results On Failure (Debug)
|
||||
if: ${{ matrix.buildType == 'Debug' && failure() }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.TEST_RESULTS_BUNDLE_NAME }}-${{ github.run_number }}.xcresult
|
||||
path: ${{ env.TEST_RESULTS_BUNDLE_NAME }}.xcresult
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Build (Release)
|
||||
if: matrix.buildType == 'Release'
|
||||
shell: bash
|
||||
run: |
|
||||
xcodebuild build \
|
||||
CODE_SIGNING_ALLOWED=NO \
|
||||
|xcpretty || true
|
||||
xcodebuild \
|
||||
-workspace xcode/omim.xcworkspace \
|
||||
-scheme OMaps \
|
||||
-configuration Release \
|
||||
-destination 'generic/platform=iOS' \
|
||||
-quiet \
|
||||
-configuration Debug build \
|
||||
'generic/platform=iOS' \
|
||||
CODE_SIGNING_REQUIRED=NO \
|
||||
CODE_SIGNING_ALLOWED=NO
|
||||
CODE_SIGNING_ALLOWED=NO \
|
||||
|xcpretty
|
||||
|
||||
ios-check-metadata:
|
||||
name: Check app metadata
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Check metadata
|
||||
run: ./tools/python/check_store_metadata.py ios
|
||||
|
|
40
.github/workflows/ios-release.yaml
vendored
40
.github/workflows/ios-release.yaml
vendored
|
@ -5,45 +5,35 @@ on:
|
|||
jobs:
|
||||
ios-release:
|
||||
name: iOS Release
|
||||
runs-on: macos-15
|
||||
env:
|
||||
DEVELOPER_DIR: /Applications/Xcode_16.app/Contents/Developer
|
||||
LANG: en_US.UTF-8 # Fastlane complains that the terminal is using ASCII.
|
||||
LANGUAGE: en_US.UTF-8
|
||||
LC_ALL: en_US.UTF-8
|
||||
runs-on: macos-latest
|
||||
environment: production
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Restore release keys
|
||||
- name: Checkout private keys
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: ${{ secrets.PRIVATE_REPO }}
|
||||
ssh-key: ${{ secrets.PRIVATE_SSH_KEY }}
|
||||
ref: master
|
||||
path: ./private.git
|
||||
|
||||
- name: Configure repo with private keys
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p xcode/keys
|
||||
echo "$APPSTORE_JSON" | base64 -d > xcode/keys/appstore.json
|
||||
env:
|
||||
APPSTORE_JSON: ${{ secrets.APPSTORE_JSON }}
|
||||
mkdir -p xcode/keys/
|
||||
cp -p ./private.git/xcode/keys/appstore.json xcode/keys/
|
||||
rm -rf ./private.git
|
||||
|
||||
- name: Checkout screenshots
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: ${{ secrets.SCREENSHOTS_REPO }}
|
||||
ssh-key: ${{ secrets.SCREENSHOTS_SSH_KEY }}
|
||||
ref: master
|
||||
path: screenshots
|
||||
|
||||
- name: Checkout keywords
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ secrets.KEYWORDS_REPO }}
|
||||
ssh-key: ${{ secrets.KEYWORDS_SSH_KEY }}
|
||||
ref: master
|
||||
path: keywords
|
||||
|
||||
- name: Update metadata
|
||||
shell: bash
|
||||
run: ./tools/python/check_store_metadata.py ios
|
||||
|
||||
# NOTE: a new iOS draft must be created before this step
|
||||
- name: Upload metadata
|
||||
shell: bash
|
||||
|
|
181
.github/workflows/linux-check.yaml
vendored
181
.github/workflows/linux-check.yaml
vendored
|
@ -1,127 +1,38 @@
|
|||
name: Linux Check
|
||||
on:
|
||||
workflow_dispatch: # Manual trigger
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- .gitignore
|
||||
- .github/**
|
||||
- '!.github/workflows/linux-check.yaml' # Run check on self change
|
||||
- CONTRIBUTORS
|
||||
- LICENSE
|
||||
- NOTICE
|
||||
- README.md
|
||||
- android/**
|
||||
- iphone/**
|
||||
- data/strings/**
|
||||
- xcode/**
|
||||
- docs/**
|
||||
- packaging/**
|
||||
- platform/*apple*
|
||||
- platform/*_android*
|
||||
- platform/*_ios*
|
||||
- platform/*_mac*
|
||||
- platform/*_win*
|
||||
- pyhelpers/**
|
||||
- tools/**
|
||||
- '!tools/python/test_server/**'
|
||||
- xcode/**
|
||||
|
||||
jobs:
|
||||
linux-no-unity:
|
||||
name: Linux no unity build
|
||||
runs-on: ubuntu-24.04
|
||||
# Cancels previous jobs if the same branch or PR was updated again.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-no-unity-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
linux-debug:
|
||||
name: Linux Debug Build and Test
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Free disk space by removing .NET, Android and Haskell
|
||||
shell: bash
|
||||
run: |
|
||||
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
|
||||
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 100 # enough to get all commits for the current day
|
||||
|
||||
- name: Parallel submodules checkout
|
||||
shell: bash
|
||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
||||
|
||||
- name: Install build tools and dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt update -y
|
||||
sudo apt install -y \
|
||||
ninja-build \
|
||||
libgl1-mesa-dev \
|
||||
libglvnd-dev \
|
||||
libharfbuzz-dev \
|
||||
libxrandr-dev \
|
||||
libxinerama-dev \
|
||||
libxcursor-dev \
|
||||
libxi-dev \
|
||||
qt6-base-dev \
|
||||
libqt6svg6-dev \
|
||||
qt6-positioning-dev \
|
||||
libqt6positioning6-plugins \
|
||||
libqt6positioning6
|
||||
|
||||
- name: Configure repository
|
||||
shell: bash
|
||||
run: ./configure.sh
|
||||
|
||||
- name: Configure ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ${{ github.workflow }}-no-unity
|
||||
|
||||
- name: CMake
|
||||
shell: bash
|
||||
env:
|
||||
CC: clang-18
|
||||
CXX: clang++-18
|
||||
CMAKE_C_COMPILER_LAUNCHER: ccache
|
||||
CMAKE_CXX_COMPILER_LAUNCHER: ccache
|
||||
# -g1 should slightly reduce build time.
|
||||
run: |
|
||||
cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug \
|
||||
-DCMAKE_CXX_FLAGS=-g1 -DUNITY_DISABLE=ON
|
||||
|
||||
- name: Compile
|
||||
shell: bash
|
||||
working-directory: build
|
||||
run: ninja
|
||||
|
||||
linux-matrix:
|
||||
name: Linux builds and tests
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
compiler: [{ CXX: g++-14, CC: gcc-14 }, { CXX: clang++-18, CC: clang-18 }]
|
||||
CMAKE_BUILD_TYPE: [Debug, RelWithDebInfo]
|
||||
# Cancels previous jobs if the same branch or PR was updated again.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-unity-${{ matrix.compiler.CC }}-${{ matrix.CMAKE_BUILD_TYPE }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
compiler: [{ CXX: g++-10, CC: gcc-10 }, { CXX: clang++, CC: clang }]
|
||||
|
||||
steps:
|
||||
- name: Free disk space by removing .NET, Android and Haskell
|
||||
shell: bash
|
||||
run: |
|
||||
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
|
||||
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Parallel submodules checkout
|
||||
shell: bash
|
||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
||||
run: git submodule update --init --recursive --jobs=$(($(nproc) * 2))
|
||||
|
||||
- name: Install build tools and dependencies
|
||||
shell: bash
|
||||
|
@ -129,66 +40,56 @@ jobs:
|
|||
sudo apt update -y
|
||||
sudo apt install -y \
|
||||
ninja-build \
|
||||
libgl1-mesa-dev \
|
||||
libglvnd-dev \
|
||||
libharfbuzz-dev \
|
||||
libxrandr-dev \
|
||||
libxinerama-dev \
|
||||
libxcursor-dev \
|
||||
libxi-dev \
|
||||
qt6-base-dev \
|
||||
libqt6svg6-dev \
|
||||
qt6-positioning-dev \
|
||||
libqt6positioning6-plugins \
|
||||
libqt6positioning6
|
||||
qtbase5-dev \
|
||||
libqt5svg5-dev \
|
||||
clang-tools-11
|
||||
|
||||
- name: Configure repository
|
||||
- name: Configure
|
||||
shell: bash
|
||||
run: ./configure.sh
|
||||
|
||||
- name: Configure ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ${{ github.workflow }}-unity-${{ matrix.compiler.CC }}-${{ matrix.CMAKE_BUILD_TYPE }}
|
||||
|
||||
- name: CMake
|
||||
shell: bash
|
||||
env:
|
||||
CC: ${{ matrix.compiler.CC }}
|
||||
CXX: ${{ matrix.compiler.CXX }}
|
||||
CMAKE_C_COMPILER_LAUNCHER: ccache
|
||||
CMAKE_CXX_COMPILER_LAUNCHER: ccache
|
||||
# -g1 should slightly reduce build time.
|
||||
run: |
|
||||
echo "Building ${{ matrix.CMAKE_BUILD_TYPE }}"
|
||||
cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.CMAKE_BUILD_TYPE }} \
|
||||
-DCMAKE_C_FLAGS=-g1 -DCMAKE_CXX_FLAGS=-g1
|
||||
run: cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS_DEBUG=-g1
|
||||
|
||||
- name: Compile
|
||||
shell: bash
|
||||
working-directory: build
|
||||
run: ninja
|
||||
|
||||
- name: Checkout world_feed_integration_tests_data
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: omapsapp/world_feed_integration_tests_data
|
||||
path: data/world_feed_integration_tests_data
|
||||
|
||||
- name: Tests
|
||||
shell: bash
|
||||
working-directory: build
|
||||
env:
|
||||
QT_QPA_PLATFORM: "offscreen"
|
||||
# generator_integration_tests - https://github.com/organicmaps/organicmaps/issues/225
|
||||
# opening_hours_integration_tests - https://github.com/organicmaps/organicmaps/issues/219
|
||||
# opening_hours_supported_features_tests - https://github.com/organicmaps/organicmaps/issues/219
|
||||
# routing_integration_tests - https://github.com/organicmaps/organicmaps/issues/221
|
||||
# shaders_tests - https://github.com/organicmaps/organicmaps/issues/223
|
||||
# world_feed_integration_tests - https://github.com/organicmaps/organicmaps/issues/215
|
||||
CTEST_EXCLUDE_REGEX: "generator_integration_tests|opening_hours_integration_tests|opening_hours_supported_features_tests|routing_benchmarks|routing_integration_tests|routing_quality_tests|search_quality_tests|storage_integration_tests|shaders_tests|world_feed_integration_tests"
|
||||
# generator_integration_tests - https://github.com/organicmaps/organicmaps/issues/225
|
||||
# routing_integration_tests - https://github.com/organicmaps/organicmaps/issues/221
|
||||
# routing_quality_tests - https://github.com/organicmaps/organicmaps/issues/215
|
||||
# drape_tests - requires X Window
|
||||
|
||||
# Separate run of OH boost-based test
|
||||
run: |
|
||||
sudo locale-gen en_US
|
||||
sudo locale-gen en_US.UTF-8
|
||||
sudo locale-gen es_ES
|
||||
sudo locale-gen es_ES.UTF-8
|
||||
sudo locale-gen fr_FR
|
||||
sudo locale-gen fr_FR.UTF-8
|
||||
sudo locale-gen ru_RU
|
||||
sudo locale-gen ru_RU.UTF-8
|
||||
sudo update-locale
|
||||
ctest -L "omim-test" -E "$CTEST_EXCLUDE_REGEX" --output-on-failure
|
||||
./build/opening_hours_tests |
|
||||
./tools/python/run_desktop_tests.py \
|
||||
-f ./build \
|
||||
-u ./data \
|
||||
-d ./data \
|
||||
-e generator_integration_tests \
|
||||
-e routing_integration_tests \
|
||||
-e routing_quality_tests \
|
||||
-e world_feed_integration_tests \
|
||||
-e drape_tests \
|
||||
-e shaders_tests \
|
||||
\
|
||||
-e opening_hours_tests \
|
||||
-e opening_hours_integration_tests \
|
||||
-e routing_consistency_tests \
|
||||
-e opening_hours_supported_features_tests \
|
||||
-e storage_integration_tests \
|
||||
|
|
97
.github/workflows/macos-check.yaml
vendored
97
.github/workflows/macos-check.yaml
vendored
|
@ -1,97 +0,0 @@
|
|||
name: macOS Check
|
||||
on:
|
||||
workflow_dispatch: # Manual trigger
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- .gitignore
|
||||
- .github/**
|
||||
- '!.github/workflows/macos-check.yaml' # Run check on self change
|
||||
- CONTRIBUTORS
|
||||
- LICENSE
|
||||
- NOTICE
|
||||
- README.md
|
||||
- android/**
|
||||
- iphone/**
|
||||
- data/strings/**
|
||||
- docs/**
|
||||
- packaging/**
|
||||
- platform/*_android*
|
||||
- platform/*_ios*
|
||||
- platform/*_linux*
|
||||
- platform/*_win*
|
||||
- pyhelpers/**
|
||||
- tools/**
|
||||
- '!tools/python/test_server/**'
|
||||
- xcode/**
|
||||
|
||||
jobs:
|
||||
macos-matrix:
|
||||
name: macOS builds and tests
|
||||
runs-on: macos-15
|
||||
env:
|
||||
DEVELOPER_DIR: /Applications/Xcode_16.app/Contents/Developer
|
||||
HOMEBREW_NO_ANALYTICS: 1
|
||||
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
CMAKE_BUILD_TYPE: [Debug, RelWithDebInfo]
|
||||
# Cancels previous jobs if the same branch or PR was updated again.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ matrix.CMAKE_BUILD_TYPE }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Parallel submodules checkout
|
||||
shell: bash
|
||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(sysctl -n hw.logicalcpu) * 20))
|
||||
|
||||
- name: Install build tools and dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install ninja qt@6
|
||||
|
||||
- name: Configure repository
|
||||
shell: bash
|
||||
run: ./configure.sh
|
||||
|
||||
- name: Configure ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ${{ github.workflow }}-${{ matrix.CMAKE_BUILD_TYPE }}
|
||||
|
||||
- name: CMake
|
||||
shell: bash
|
||||
env:
|
||||
CMAKE_C_COMPILER_LAUNCHER: ccache
|
||||
CMAKE_CXX_COMPILER_LAUNCHER: ccache
|
||||
run: |
|
||||
echo "Building ${{ matrix.CMAKE_BUILD_TYPE }}"
|
||||
cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.CMAKE_BUILD_TYPE }} \
|
||||
-DCMAKE_C_FLAGS=-g1 -DCMAKE_CXX_FLAGS=-g1
|
||||
|
||||
- name: Compile
|
||||
shell: bash
|
||||
working-directory: build
|
||||
run: ninja
|
||||
|
||||
- name: Tests
|
||||
shell: bash
|
||||
working-directory: build
|
||||
env:
|
||||
# drape_tests - requires X Window
|
||||
# generator_integration_tests - https://github.com/organicmaps/organicmaps/issues/225
|
||||
# opening_hours_integration_tests - https://github.com/organicmaps/organicmaps/issues/219
|
||||
# opening_hours_supported_features_tests - https://github.com/organicmaps/organicmaps/issues/219
|
||||
# routing_integration_tests - https://github.com/organicmaps/organicmaps/issues/221
|
||||
# shaders_tests - https://github.com/organicmaps/organicmaps/issues/223
|
||||
# world_feed_integration_tests - https://github.com/organicmaps/organicmaps/issues/215
|
||||
CTEST_EXCLUDE_REGEX: "drape_tests|generator_integration_tests|opening_hours_integration_tests|opening_hours_supported_features_tests|routing_benchmarks|routing_integration_tests|routing_quality_tests|search_quality_tests|storage_integration_tests|shaders_tests|world_feed_integration_tests"
|
||||
run: |
|
||||
ctest -L "omim-test" -E "$CTEST_EXCLUDE_REGEX" --output-on-failure
|
22
.github/workflows/stale.yml
vendored
22
.github/workflows/stale.yml
vendored
|
@ -1,22 +0,0 @@
|
|||
name: Close stale PRs
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *" # Runs every day at midnight
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-pr-stale: 180 # 6 months before warning
|
||||
days-before-pr-close: 365 # Closed after 12 months
|
||||
stale-pr-label: "stale"
|
||||
stale-pr-message: "Hi! This PR has been inactive for 6 months. If it's still relevant, please update it to let us know you’d like to keep it open 😊"
|
||||
close-pr-message: "This PR has been automatically closed after 12 months of inactivity."
|
||||
days-before-issue-stale: -1 # Issues are never stale
|
||||
days-before-issue-close: -1 # Issues are never closed
|
||||
remove-stale-when-updated: true
|
23
.github/workflows/strings-check.yaml
vendored
Normal file
23
.github/workflows/strings-check.yaml
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
name: strings.txt check
|
||||
on:
|
||||
workflow_dispatch: # Manual trigger
|
||||
pull_request:
|
||||
paths:
|
||||
- 'data/strings/strings.txt'
|
||||
|
||||
jobs:
|
||||
check-strings-txt:
|
||||
name: Check strings.txt format
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3'
|
||||
|
||||
- name: Check strings.txt
|
||||
shell: bash
|
||||
run: |
|
||||
./tools/python/clean_strings_txt.py -s
|
||||
git diff --quiet HEAD
|
36
.gitignore
vendored
36
.gitignore
vendored
|
@ -16,15 +16,24 @@ screenlog.0
|
|||
|
||||
data/styles/*/*/out/*
|
||||
data/resources-*_design/*
|
||||
data/drules_proto_default_design.bin
|
||||
data/drules_proto_design.bin
|
||||
data/colors_design.txt
|
||||
data/patterns_design.txt
|
||||
data/bookmarks
|
||||
data/edits.xml
|
||||
|
||||
# Compiled Python
|
||||
*.pyc
|
||||
|
||||
# Symbian
|
||||
.obj/*
|
||||
*.mmp
|
||||
*.cache
|
||||
*.inf
|
||||
*.loc
|
||||
*.rss
|
||||
*.pkg
|
||||
*.d
|
||||
|
||||
# Windows generated files
|
||||
*.vcxproj*
|
||||
ipch/*
|
||||
|
@ -56,8 +65,7 @@ iphone/*/*.xcodeproj/project.xcworkspace/*
|
|||
iphone/*/build/*
|
||||
tools/emacsmode/build
|
||||
**/DerivedData/*
|
||||
**/xcshareddata/*
|
||||
!iphone/Maps/Maps.xcodeproj/xcshareddata/xcschemes/OMaps.xcscheme
|
||||
**/xcshareddata
|
||||
**/xcuserdata
|
||||
**/xcschemes
|
||||
iphone/**/*.moved-aside
|
||||
|
@ -77,6 +85,7 @@ iphone/Maps/3party/Carthage/Build/iOS/*.dSYM
|
|||
iphone/Maps/3party/Carthage/Build/*.version
|
||||
|
||||
# GeneratedFiles
|
||||
version/version.hpp
|
||||
tools/win/MapsWithMe*
|
||||
GeneratedFiles
|
||||
|
||||
|
@ -85,7 +94,6 @@ data/[0-9][0-9][0-9][0-9][0-9][0-9]
|
|||
data/gps_track.dat
|
||||
# temporary files for downloader
|
||||
data/settings.ini
|
||||
data/test_data/world_feed_integration_tests_data
|
||||
|
||||
# benchmark results
|
||||
data/benchmarks/*.trace
|
||||
|
@ -124,13 +132,11 @@ tizen/*/.*
|
|||
tizen/*/crash-info/*
|
||||
.idea/*
|
||||
.idea
|
||||
!android/.idea/icon.svg
|
||||
|
||||
# Private repository files.
|
||||
.private_repository_url
|
||||
.private_repository_branch
|
||||
private.h
|
||||
# ignore old android secrets during the transition period to the new project structure
|
||||
android/release.keystore
|
||||
android/secure.properties
|
||||
android/libnotify.properties
|
||||
|
@ -140,14 +146,13 @@ android/firebase-app-distribution.json
|
|||
android/firebase-test-lab.json
|
||||
android/huawei-appgallery.json
|
||||
android/res/xml/network_security_config.xml
|
||||
./server/
|
||||
server
|
||||
iphone/Maps/app.omaps/
|
||||
|
||||
*.li
|
||||
|
||||
*.autosave
|
||||
|
||||
# CMake
|
||||
cmake-build-*
|
||||
build/
|
||||
|
||||
|
@ -159,7 +164,7 @@ designer_version.h
|
|||
*.sw?
|
||||
|
||||
# Build version
|
||||
platform/platform_qt_version.cpp
|
||||
build_version.hpp
|
||||
|
||||
#python modules building
|
||||
tools/python/*/build
|
||||
|
@ -178,14 +183,9 @@ tools/python/routing/etc/*.ini
|
|||
/node_modules/
|
||||
/package-lock.json
|
||||
|
||||
# Visual Studio
|
||||
.vs
|
||||
|
||||
# VS Code
|
||||
.vscode
|
||||
|
||||
# AppStore metadata
|
||||
screenshots/
|
||||
android/src/google/play/listings/
|
||||
keywords/
|
||||
iphone/metadata/**/keywords.txt
|
||||
# Screenshots
|
||||
screenshots
|
||||
android/src/google/play/listings/??-??/graphics/*
|
||||
|
|
52
.gitmodules
vendored
52
.gitmodules
vendored
|
@ -1,23 +1,29 @@
|
|||
[submodule "tools/osmctools"]
|
||||
path = tools/osmctools
|
||||
url = https://git.omaps.dev/organicmaps/osmctools.git
|
||||
url = https://github.com/organicmaps/osmctools.git
|
||||
[submodule "tools/kothic"]
|
||||
path = tools/kothic
|
||||
url = https://git.omaps.dev/organicmaps/kothic.git
|
||||
url = https://github.com/organicmaps/kothic.git
|
||||
[submodule "tools/macdeployqtfix"]
|
||||
path = tools/macdeployqtfix
|
||||
url = https://github.com/aurelien-rainone/macdeployqtfix.git
|
||||
[submodule "3party/protobuf/protobuf"]
|
||||
path = 3party/protobuf/protobuf
|
||||
url = https://git.omaps.dev/organicmaps/protobuf.git
|
||||
url = https://github.com/organicmaps/protobuf.git
|
||||
[submodule "tools/twine"]
|
||||
path = tools/twine
|
||||
url = https://github.com/organicmaps/twine.git
|
||||
[submodule "3party/Vulkan-Headers"]
|
||||
path = 3party/Vulkan-Headers
|
||||
url = https://github.com/KhronosGroup/Vulkan-Headers.git
|
||||
[submodule "3party/boost"]
|
||||
path = 3party/boost
|
||||
url = https://github.com/boostorg/boost.git
|
||||
branch = boost-1.85.0
|
||||
branch = boost-1.76.0
|
||||
ignore = dirty
|
||||
[submodule "3party/just_gtfs"]
|
||||
path = 3party/just_gtfs
|
||||
url = https://git.omaps.dev/organicmaps/just_gtfs.git
|
||||
url = https://github.com/organicmaps/just_gtfs.git
|
||||
branch = for-usage-as-submodule
|
||||
[submodule "3party/expat"]
|
||||
path = 3party/expat
|
||||
|
@ -29,39 +35,3 @@
|
|||
[submodule "3party/icu/icu"]
|
||||
path = 3party/icu/icu
|
||||
url = https://github.com/unicode-org/icu.git
|
||||
[submodule "3party/freetype/freetype"]
|
||||
path = 3party/freetype/freetype
|
||||
url = https://git.omaps.dev/organicmaps/freetype.git
|
||||
[submodule "3party/googletest"]
|
||||
path = 3party/googletest
|
||||
url = https://github.com/google/googletest.git
|
||||
[submodule "3party/fast_double_parser"]
|
||||
path = 3party/fast_double_parser
|
||||
url = https://github.com/lemire/fast_double_parser.git
|
||||
[submodule "3party/pugixml/pugixml"]
|
||||
path = 3party/pugixml/pugixml
|
||||
url = https://github.com/zeux/pugixml.git
|
||||
[submodule "3party/jansson/jansson"]
|
||||
path = 3party/jansson/jansson
|
||||
url = https://github.com/akheron/jansson.git
|
||||
[submodule "3party/gflags"]
|
||||
path = 3party/gflags
|
||||
url = https://github.com/gflags/gflags
|
||||
[submodule "3party/fast_obj"]
|
||||
path = 3party/fast_obj
|
||||
url = https://github.com/thisistherk/fast_obj
|
||||
[submodule "3party/harfbuzz/harfbuzz"]
|
||||
path = 3party/harfbuzz/harfbuzz
|
||||
url = https://github.com/harfbuzz/harfbuzz.git
|
||||
[submodule "3party/utfcpp"]
|
||||
path = 3party/utfcpp
|
||||
url = https://github.com/nemtrif/utfcpp.git
|
||||
[submodule "3party/glfw"]
|
||||
path = 3party/glfw
|
||||
url = https://github.com/glfw/glfw.git
|
||||
[submodule "3party/CMake-MetalShaderSupport"]
|
||||
path = 3party/CMake-MetalShaderSupport
|
||||
url = https://github.com/dpogue/CMake-MetalShaderSupport.git
|
||||
[submodule "3party/imgui/imgui"]
|
||||
path = 3party/imgui/imgui
|
||||
url = https://github.com/ocornut/imgui
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 989857d2e5e54869c35ad06fb21a67d12a2dbc67
|
|
@ -1,84 +0,0 @@
|
|||
# Fixes CMake deprecation warning:
|
||||
# Compatibility with CMake < 3.5 will be removed from a future version of CMake.
|
||||
set(CMAKE_WARN_DEPRECATED OFF CACHE BOOL "" FORCE)
|
||||
|
||||
if (NOT WITH_SYSTEM_PROVIDED_3PARTY)
|
||||
# Suppress "Policy CMP0077 is not set: option() honors normal variables"
|
||||
# for the freetype, expat and jansson options.
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
|
||||
# Suppress "Policy CMP0063 is not set: Honor visibility properties for all target types."
|
||||
# for jansson
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0063 NEW)
|
||||
|
||||
# Configure expat library.
|
||||
set(EXPAT_BUILD_TOOLS OFF)
|
||||
set(EXPAT_BUILD_EXAMPLES OFF)
|
||||
set(EXPAT_BUILD_TESTS OFF)
|
||||
set(EXPAT_BUILD_DOCS OFF)
|
||||
set(EXPAT_BUILD_PKGCONFIG OFF)
|
||||
set(EXPAT_ENABLE_INSTALL OFF)
|
||||
set(EXPAT_SHARED_LIBS OFF)
|
||||
set(EXPAT_GE OFF)
|
||||
set(EXPAT_DTD OFF)
|
||||
set(EXPAT_NS ON)
|
||||
add_subdirectory(expat/expat)
|
||||
|
||||
# Configure Jansson library.
|
||||
set(JANSSON_BUILD_DOCS OFF)
|
||||
set(JANSSON_BUILD_MAN OFF)
|
||||
set(JANSSON_EXAMPLES OFF)
|
||||
set(JANSSON_INSTALL OFF)
|
||||
set(JANSSON_WITHOUT_TESTS ON)
|
||||
add_subdirectory(jansson/jansson/)
|
||||
target_include_directories(jansson INTERFACE "${PROJECT_BINARY_DIR}/3party/jansson/jansson/include")
|
||||
add_library(jansson::jansson ALIAS jansson)
|
||||
|
||||
# Add gflags library.
|
||||
add_subdirectory(gflags)
|
||||
target_compile_options(gflags_nothreads_static PRIVATE $<$<CXX_COMPILER_ID:GNU>:-Wno-subobject-linkage>)
|
||||
|
||||
# Add pugixml library.
|
||||
add_subdirectory(pugixml)
|
||||
|
||||
# Add protobuf library.
|
||||
add_subdirectory(protobuf)
|
||||
|
||||
if (NOT PLATFORM_LINUX)
|
||||
add_subdirectory(freetype)
|
||||
add_subdirectory(icu)
|
||||
add_subdirectory(harfbuzz)
|
||||
endif()
|
||||
|
||||
add_library(utf8cpp INTERFACE)
|
||||
add_library(utf8cpp::utf8cpp ALIAS utf8cpp)
|
||||
target_include_directories(utf8cpp INTERFACE "${OMIM_ROOT}/3party/utfcpp/source")
|
||||
endif()
|
||||
|
||||
add_subdirectory(agg)
|
||||
add_subdirectory(bsdiff-courgette)
|
||||
add_subdirectory(minizip)
|
||||
add_subdirectory(open-location-code)
|
||||
add_subdirectory(opening_hours)
|
||||
add_subdirectory(stb_image)
|
||||
add_subdirectory(succinct)
|
||||
|
||||
add_subdirectory(vulkan_wrapper)
|
||||
|
||||
if (PLATFORM_DESKTOP)
|
||||
add_subdirectory(libtess2)
|
||||
|
||||
set(GLFW_BUILD_DOCS OFF CACHE BOOL "")
|
||||
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "")
|
||||
set(GLFW_BUILD_TESTS OFF CACHE BOOL "")
|
||||
set(GLFW_INSTALL OFF CACHE BOOL "")
|
||||
set(GLFW_VULKAN_STATIC OFF CACHE BOOL "")
|
||||
set(GLFW_BUILD_WAYLAND OFF CACHE BOOL "")
|
||||
# Disable ARC for glfw and re-enable after it because it's globally set in the root CMakeLists.txt
|
||||
set(CMAKE_OBJC_FLAGS "")
|
||||
add_subdirectory(glfw)
|
||||
set_target_properties(glfw PROPERTIES UNITY_BUILD OFF)
|
||||
set_target_properties(glfw PROPERTIES XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC NO)
|
||||
set(CMAKE_OBJC_FLAGS -fobjc-arc)
|
||||
|
||||
add_subdirectory(imgui)
|
||||
endif()
|
|
@ -1 +1 @@
|
|||
Subproject commit 595c8d4794410a4e64b98dc58d27c0310d7ea2fd
|
||||
Subproject commit 084c2624eed5ed59e33752ecf1205de63263ec9c
|
|
@ -1,6 +1,12 @@
|
|||
project(agg)
|
||||
|
||||
set(SRC
|
||||
add_clang_compile_options("-Wno-deprecated-declarations")
|
||||
add_gcc_compile_options("-Wno-deprecated-declarations")
|
||||
|
||||
set(CMAKE_PREFIX_PATH ./)
|
||||
|
||||
set(
|
||||
SRC
|
||||
agg_curves.cpp
|
||||
agg_vcgen_stroke.cpp
|
||||
)
|
||||
|
|
|
@ -422,7 +422,7 @@ namespace agg
|
|||
inline bool is_close(unsigned c)
|
||||
{
|
||||
return (c & ~(path_flags_cw | path_flags_ccw)) ==
|
||||
(unsigned(path_cmd_end_poly) | path_flags_close);
|
||||
(path_cmd_end_poly | path_flags_close);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------is_next_poly
|
||||
|
|
|
@ -68,7 +68,7 @@ namespace agg
|
|||
*x = m_vertices[m_vertex];
|
||||
*y = m_vertices[m_vertex + 1];
|
||||
m_vertex += 2;
|
||||
return (m_vertex == 2) ? unsigned(path_cmd_move_to) : m_cmd;
|
||||
return (m_vertex == 2) ? path_cmd_move_to : m_cmd;
|
||||
}
|
||||
|
||||
// Supplemantary functions. num_vertices() actually returns doubled
|
||||
|
|
|
@ -429,7 +429,7 @@ namespace agg
|
|||
static value_type luminance(const rgba& c)
|
||||
{
|
||||
// Calculate grayscale value as per ITU-R BT.709.
|
||||
return value_type(uround((0.2126 * c.r + 0.7152 * c.g + 0.0722 * c.b) * double(base_mask)));
|
||||
return value_type(uround((0.2126 * c.r + 0.7152 * c.g + 0.0722 * c.b) * base_mask));
|
||||
}
|
||||
|
||||
static value_type luminance(const rgba16& c)
|
||||
|
@ -530,13 +530,13 @@ namespace agg
|
|||
//--------------------------------------------------------------------
|
||||
static AGG_INLINE double to_double(value_type a)
|
||||
{
|
||||
return double(a) / double(base_mask);
|
||||
return double(a) / base_mask;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
static AGG_INLINE value_type from_double(double a)
|
||||
{
|
||||
return value_type(uround(a * double(base_mask)));
|
||||
return value_type(uround(a * base_mask));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -674,7 +674,7 @@ namespace agg
|
|||
else
|
||||
{
|
||||
calc_type v_ = (calc_type(v) * base_mask) / a;
|
||||
v = value_type((v_ > base_mask) ? calc_type(base_mask) : v_);
|
||||
v = value_type((v_ > base_mask) ? base_mask : v_);
|
||||
}
|
||||
}
|
||||
return *this;
|
||||
|
@ -684,7 +684,7 @@ namespace agg
|
|||
self_type gradient(self_type c, double k) const
|
||||
{
|
||||
self_type ret;
|
||||
calc_type ik = uround(k * double(base_scale));
|
||||
calc_type ik = uround(k * base_scale);
|
||||
ret.v = lerp(v, c.v, ik);
|
||||
ret.a = lerp(a, c.a, ik);
|
||||
return ret;
|
||||
|
@ -921,7 +921,7 @@ namespace agg
|
|||
//--------------------------------------------------------------------
|
||||
static AGG_INLINE value_type mult_cover(value_type a, cover_type b)
|
||||
{
|
||||
return value_type(a * value_type(b) / value_type(cover_mask));
|
||||
return value_type(a * b / cover_mask);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
|
|
@ -323,13 +323,13 @@ namespace agg
|
|||
//--------------------------------------------------------------------
|
||||
static AGG_INLINE double to_double(value_type a)
|
||||
{
|
||||
return double(a) / double(base_mask);
|
||||
return double(a) / base_mask;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
static AGG_INLINE value_type from_double(double a)
|
||||
{
|
||||
return value_type(uround(a * double(base_mask)));
|
||||
return value_type(uround(a * base_mask));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -701,13 +701,13 @@ namespace agg
|
|||
//--------------------------------------------------------------------
|
||||
static AGG_INLINE double to_double(value_type a)
|
||||
{
|
||||
return double(a) / double(base_mask);
|
||||
return double(a) / base_mask;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
static AGG_INLINE value_type from_double(double a)
|
||||
{
|
||||
return value_type(uround(a * double(base_mask)));
|
||||
return value_type(uround(a * base_mask));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -888,7 +888,7 @@ namespace agg
|
|||
AGG_INLINE self_type gradient(const self_type& c, double k) const
|
||||
{
|
||||
self_type ret;
|
||||
calc_type ik = uround(k * double(base_mask));
|
||||
calc_type ik = uround(k * base_mask);
|
||||
ret.r = lerp(r, c.r, ik);
|
||||
ret.g = lerp(g, c.g, ik);
|
||||
ret.b = lerp(b, c.b, ik);
|
||||
|
@ -1120,7 +1120,7 @@ namespace agg
|
|||
//--------------------------------------------------------------------
|
||||
static AGG_INLINE value_type mult_cover(value_type a, cover_type b)
|
||||
{
|
||||
return value_type(a * double(b) / double(cover_mask));
|
||||
return value_type(a * b / cover_mask);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
|
|
@ -98,7 +98,6 @@ namespace agg
|
|||
m_markers.remove_all();
|
||||
m_last_cmd = m_source->vertex(&m_start_x, &m_start_y);
|
||||
m_status = accumulate;
|
||||
[[fallthrough]];
|
||||
|
||||
case accumulate:
|
||||
if(is_stop(m_last_cmd)) return path_cmd_stop;
|
||||
|
@ -138,7 +137,6 @@ namespace agg
|
|||
}
|
||||
m_generator.rewind(0);
|
||||
m_status = generate;
|
||||
[[fallthrough]];
|
||||
|
||||
case generate:
|
||||
cmd = m_generator.vertex(x, y);
|
||||
|
|
|
@ -398,7 +398,7 @@ namespace agg
|
|||
if(m_closed && !m_stop)
|
||||
{
|
||||
m_stop = true;
|
||||
return unsigned(path_cmd_end_poly) | path_flags_close;
|
||||
return path_cmd_end_poly | path_flags_close;
|
||||
}
|
||||
return path_cmd_stop;
|
||||
}
|
||||
|
@ -463,7 +463,7 @@ namespace agg
|
|||
if(m_closed && !m_stop)
|
||||
{
|
||||
m_stop = true;
|
||||
return unsigned(path_cmd_end_poly) | path_flags_close;
|
||||
return path_cmd_end_poly | path_flags_close;
|
||||
}
|
||||
return path_cmd_stop;
|
||||
}
|
||||
|
@ -525,7 +525,7 @@ namespace agg
|
|||
if(m_closed && !m_stop)
|
||||
{
|
||||
m_stop = true;
|
||||
return unsigned(path_cmd_end_poly) | path_flags_close;
|
||||
return path_cmd_end_poly | path_flags_close;
|
||||
}
|
||||
return path_cmd_stop;
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace agg
|
|||
|
||||
if (cover < cover_full)
|
||||
{
|
||||
double x = double(cover) / double(cover_full);
|
||||
double x = double(cover) / cover_full;
|
||||
c.r *= x;
|
||||
c.g *= x;
|
||||
c.b *= x;
|
||||
|
|
|
@ -659,7 +659,7 @@ namespace agg
|
|||
while(nb)
|
||||
{
|
||||
cell_ptr = *block_ptr++;
|
||||
i = (nb > unsigned(cell_block_size)) ? unsigned(cell_block_size) : nb;
|
||||
i = (nb > cell_block_size) ? cell_block_size : nb;
|
||||
nb -= i;
|
||||
while(i--)
|
||||
{
|
||||
|
@ -683,7 +683,7 @@ namespace agg
|
|||
while(nb)
|
||||
{
|
||||
cell_ptr = *block_ptr++;
|
||||
i = (nb > unsigned(cell_block_size)) ? unsigned(cell_block_size) : nb;
|
||||
i = (nb > cell_block_size) ? cell_block_size : nb;
|
||||
nb -= i;
|
||||
while(i--)
|
||||
{
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace agg
|
|||
}
|
||||
static int xi(int v) { return v; }
|
||||
static int yi(int v) { return v; }
|
||||
static int upscale(double v) { return iround(v * double(poly_subpixel_scale)); }
|
||||
static int upscale(double v) { return iround(v * poly_subpixel_scale); }
|
||||
static int downscale(int v) { return v; }
|
||||
};
|
||||
|
||||
|
@ -51,7 +51,7 @@ namespace agg
|
|||
static int yi(int v) { return v; }
|
||||
static int upscale(double v)
|
||||
{
|
||||
return saturation<poly_max_coord>::iround(v * double(poly_subpixel_scale));
|
||||
return saturation<poly_max_coord>::iround(v * poly_subpixel_scale);
|
||||
}
|
||||
static int downscale(int v) { return v; }
|
||||
};
|
||||
|
@ -66,7 +66,7 @@ namespace agg
|
|||
}
|
||||
static int xi(int v) { return v * 3; }
|
||||
static int yi(int v) { return v; }
|
||||
static int upscale(double v) { return iround(v * double(poly_subpixel_scale)); }
|
||||
static int upscale(double v) { return iround(v * poly_subpixel_scale); }
|
||||
static int downscale(int v) { return v; }
|
||||
};
|
||||
|
||||
|
@ -78,8 +78,8 @@ namespace agg
|
|||
{
|
||||
return a * b / c;
|
||||
}
|
||||
static int xi(double v) { return iround(v * double(poly_subpixel_scale)); }
|
||||
static int yi(double v) { return iround(v * double(poly_subpixel_scale)); }
|
||||
static int xi(double v) { return iround(v * poly_subpixel_scale); }
|
||||
static int yi(double v) { return iround(v * poly_subpixel_scale); }
|
||||
static double upscale(double v) { return v; }
|
||||
static double downscale(int v) { return v / double(poly_subpixel_scale); }
|
||||
};
|
||||
|
@ -92,8 +92,8 @@ namespace agg
|
|||
{
|
||||
return a * b / c;
|
||||
}
|
||||
static int xi(double v) { return iround(v * double(poly_subpixel_scale) * 3); }
|
||||
static int yi(double v) { return iround(v * double(poly_subpixel_scale)); }
|
||||
static int xi(double v) { return iround(v * poly_subpixel_scale * 3); }
|
||||
static int yi(double v) { return iround(v * poly_subpixel_scale); }
|
||||
static double upscale(double v) { return v; }
|
||||
static double downscale(int v) { return v / double(poly_subpixel_scale); }
|
||||
};
|
||||
|
|
|
@ -196,11 +196,11 @@ namespace agg
|
|||
|
||||
case end_poly1:
|
||||
m_status = m_prev_status;
|
||||
return unsigned(path_cmd_end_poly) | path_flags_close | path_flags_ccw;
|
||||
return path_cmd_end_poly | path_flags_close | path_flags_ccw;
|
||||
|
||||
case end_poly2:
|
||||
m_status = m_prev_status;
|
||||
return unsigned(path_cmd_end_poly) | path_flags_close | path_flags_cw;
|
||||
return path_cmd_end_poly | path_flags_close | path_flags_cw;
|
||||
|
||||
case stop:
|
||||
cmd = path_cmd_stop;
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit ab7968a0bbcf574a7859240d1d8443f58ed6f6cf
|
||||
Subproject commit ccb2ab3b4384a16deafaa849de509bce2b2cbada
|
|
@ -1,6 +1,11 @@
|
|||
project(bsdiff)
|
||||
|
||||
set(SRC
|
||||
add_clang_compile_options("-Wno-shorten-64-to-32")
|
||||
|
||||
include_directories(bsdiff divsufsort)
|
||||
|
||||
set(
|
||||
SRC
|
||||
bsdiff/bsdiff.h
|
||||
bsdiff/bsdiff_common.h
|
||||
bsdiff/bsdiff_search.h
|
||||
|
@ -12,5 +17,4 @@ set(SRC
|
|||
)
|
||||
|
||||
add_library(${PROJECT_NAME} ${SRC})
|
||||
|
||||
omim_add_test_subdirectory(bsdiff/bsdiff_tests)
|
||||
|
|
|
@ -103,7 +103,7 @@ struct MemStream {
|
|||
MemStream(): m_writer(m_buf) {}
|
||||
|
||||
MemWriter<std::vector<uint8_t>> & GetWriter() { return m_writer; }
|
||||
size_t Size() const { return m_buf.size(); }
|
||||
size_t const Size() const { return m_buf.size(); }
|
||||
std::vector<uint8_t> const & GetBuf() const { return m_buf; }
|
||||
|
||||
private:
|
||||
|
|
|
@ -1,7 +1,20 @@
|
|||
project(bsdiff_tests)
|
||||
|
||||
set(SRC bsdiff_search_tests.cpp)
|
||||
set(
|
||||
SRC
|
||||
bsdiff_search_tests.cpp
|
||||
)
|
||||
|
||||
omim_add_test(${PROJECT_NAME} ${SRC})
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} bsdiff)
|
||||
omim_link_libraries(
|
||||
${PROJECT_NAME}
|
||||
bsdiff
|
||||
platform
|
||||
coding
|
||||
base
|
||||
oauthcpp
|
||||
${LIBZ}
|
||||
)
|
||||
|
||||
link_qt5_core(${PROJECT_NAME})
|
||||
|
|
|
@ -19,7 +19,7 @@ UNIT_TEST(BSDiffSearchTest_Search)
|
|||
// 012345678901234567890123456789012345678901234
|
||||
string const str = "the quick brown fox jumps over the lazy dog.";
|
||||
int const size = static_cast<int>(str.size());
|
||||
auto buf = reinterpret_cast<unsigned char const *>(str.data());
|
||||
auto buf = reinterpret_cast<unsigned char const * const>(str.data());
|
||||
vector<divsuf::saidx_t> suffix_array(size + 1);
|
||||
divsuf::divsufsort_include_empty(buf, suffix_array.data(), size);
|
||||
|
||||
|
@ -63,7 +63,7 @@ UNIT_TEST(BSDiffSearchTest_Search)
|
|||
{
|
||||
auto const & testCase = testCases[idx];
|
||||
int const querySize = static_cast<int>(testCase.m_query_str.size());
|
||||
auto query_buf = reinterpret_cast<unsigned char const *>(testCase.m_query_str.data());
|
||||
auto query_buf = reinterpret_cast<unsigned char const * const>(testCase.m_query_str.data());
|
||||
|
||||
// Perform the search.
|
||||
bsdiff::SearchResult const match =
|
||||
|
@ -106,7 +106,7 @@ UNIT_TEST(BSDiffSearchTest_SearchExact)
|
|||
{
|
||||
int const size = static_cast<int>(testCases[idx].size());
|
||||
unsigned char const * const buf =
|
||||
reinterpret_cast<unsigned char const *>(testCases[idx].data());
|
||||
reinterpret_cast<unsigned char const * const>(testCases[idx].data());
|
||||
|
||||
vector<divsuf::saidx_t> suffix_array(size + 1);
|
||||
divsuf::divsufsort_include_empty(buf, suffix_array.data(), size);
|
||||
|
@ -120,7 +120,7 @@ UNIT_TEST(BSDiffSearchTest_SearchExact)
|
|||
int querySize = static_cast<int>(query.size());
|
||||
CHECK_EQUAL(querySize, hi - lo, ());
|
||||
unsigned char const * const query_buf =
|
||||
reinterpret_cast<unsigned char const *>(query.c_str());
|
||||
reinterpret_cast<unsigned char const * const>(query.c_str());
|
||||
bsdiff::SearchResult const match =
|
||||
bsdiff::search<decltype(suffix_array)>(suffix_array, buf, size, query_buf, querySize);
|
||||
|
||||
|
|
|
@ -32,4 +32,3 @@ List of changes made to original code:
|
|||
- Added namespace divsuf.
|
||||
- Added divsufsort_with_empty().
|
||||
- Added unit tests.
|
||||
- Patch to avoid int/uint comparison warnings.
|
||||
|
|
|
@ -57,8 +57,8 @@ sort_typeBstar(const sauchar_t *T, saidx_it SA,
|
|||
saint_t c0, c1;
|
||||
|
||||
/* Initialize bucket arrays. */
|
||||
for(i = 0; i < static_cast<saidx_t>(BUCKET_A_SIZE); ++i) { bucket_A[i] = 0; }
|
||||
for(i = 0; i < static_cast<saidx_t>(BUCKET_B_SIZE); ++i) { bucket_B[i] = 0; }
|
||||
for(i = 0; i < BUCKET_A_SIZE; ++i) { bucket_A[i] = 0; }
|
||||
for(i = 0; i < BUCKET_B_SIZE; ++i) { bucket_B[i] = 0; }
|
||||
|
||||
/* Count the number of occurrences of the first one or two characters of each
|
||||
type A, B and B* suffix. Moreover, store the beginning position of all
|
||||
|
@ -84,11 +84,11 @@ note:
|
|||
*/
|
||||
|
||||
/* Calculate the index of start/end point of each bucket. */
|
||||
for(c0 = 0, i = 0, j = 0; c0 < static_cast<saint_t>(ALPHABET_SIZE); ++c0) {
|
||||
for(c0 = 0, i = 0, j = 0; c0 < ALPHABET_SIZE; ++c0) {
|
||||
t = i + BUCKET_A(c0);
|
||||
BUCKET_A(c0) = i + j; /* start point */
|
||||
i = t + BUCKET_B(c0, c0);
|
||||
for(c1 = c0 + 1; c1 < static_cast<saint_t>(ALPHABET_SIZE); ++c1) {
|
||||
for(c1 = c0 + 1; c1 < ALPHABET_SIZE; ++c1) {
|
||||
j += BUCKET_BSTAR(c0, c1);
|
||||
BUCKET_BSTAR(c0, c1) = j; /* end point */
|
||||
i += BUCKET_B(c0, c1);
|
||||
|
@ -178,9 +178,10 @@ construct_SA(const sauchar_t *T, saidx_it SA,
|
|||
the sorted order of type B* suffixes. */
|
||||
for(c1 = ALPHABET_SIZE - 2; 0 <= c1; --c1) {
|
||||
/* Scan the suffix array from right to left. */
|
||||
for (i = SA + BUCKET_BSTAR(c1, c1 + 1), j = SA + BUCKET_A(c1 + 1) - 1,
|
||||
k = nullptr, c2 = -1;
|
||||
i <= j; --j) {
|
||||
for(i = SA + BUCKET_BSTAR(c1, c1 + 1),
|
||||
j = SA + BUCKET_A(c1 + 1) - 1, k = NULL, c2 = -1;
|
||||
i <= j;
|
||||
--j) {
|
||||
if(0 < (s = *j)) {
|
||||
assert(T[s] == c1);
|
||||
assert(((s + 1) < n) && (T[s] <= T[s + 1]));
|
||||
|
@ -238,24 +239,16 @@ divsufsort(const sauchar_t *T, saidx_it SA, saidx_t n) {
|
|||
saint_t err = 0;
|
||||
|
||||
/* Check arguments. */
|
||||
if ((T == nullptr) || (SA == nullptr) || (n < 0)) {
|
||||
return -1;
|
||||
} else if (n == 0) {
|
||||
return 0;
|
||||
} else if (n == 1) {
|
||||
SA[0] = 0;
|
||||
return 0;
|
||||
} else if (n == 2) {
|
||||
m = (T[0] < T[1]);
|
||||
SA[m ^ 1] = 0, SA[m] = 1;
|
||||
return 0;
|
||||
}
|
||||
if((T == NULL) || (SA == NULL) || (n < 0)) { return -1; }
|
||||
else if(n == 0) { return 0; }
|
||||
else if(n == 1) { SA[0] = 0; return 0; }
|
||||
else if(n == 2) { m = (T[0] < T[1]); SA[m ^ 1] = 0, SA[m] = 1; return 0; }
|
||||
|
||||
bucket_A = (saidx_t *)malloc(BUCKET_A_SIZE * sizeof(saidx_t));
|
||||
bucket_B = (saidx_t *)malloc(BUCKET_B_SIZE * sizeof(saidx_t));
|
||||
|
||||
/* Suffixsort. */
|
||||
if ((bucket_A != nullptr) && (bucket_B != nullptr)) {
|
||||
if((bucket_A != NULL) && (bucket_B != NULL)) {
|
||||
m = sort_typeBstar(T, SA, bucket_A, bucket_B, n);
|
||||
construct_SA(T, SA, bucket_A, bucket_B, n, m);
|
||||
} else {
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace {
|
|||
|
||||
/*- Private Functions -*/
|
||||
|
||||
const saint_t lg_table_[256]= {
|
||||
const saint_t lg_table[256]= {
|
||||
-1,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
|
||||
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
|
||||
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
|
||||
|
@ -67,11 +67,11 @@ saint_t
|
|||
tr_ilg(saidx_t n) {
|
||||
return (n & 0xffff0000) ?
|
||||
((n & 0xff000000) ?
|
||||
24 + lg_table_[(n >> 24) & 0xff] :
|
||||
16 + lg_table_[(n >> 16) & 0xff]) :
|
||||
24 + lg_table[(n >> 24) & 0xff] :
|
||||
16 + lg_table[(n >> 16) & 0xff]) :
|
||||
((n & 0x0000ff00) ?
|
||||
8 + lg_table_[(n >> 8) & 0xff] :
|
||||
0 + lg_table_[(n >> 0) & 0xff]);
|
||||
8 + lg_table[(n >> 8) & 0xff] :
|
||||
0 + lg_table[(n >> 0) & 0xff]);
|
||||
}
|
||||
|
||||
|
||||
|
@ -352,7 +352,7 @@ tr_introsort(saidx_it ISA, const_saidx_it ISAd,
|
|||
|
||||
/* push */
|
||||
if(1 < (b - a)) {
|
||||
STACK_PUSH5(nullptr, a, b, 0, 0);
|
||||
STACK_PUSH5(NULL, a, b, 0, 0);
|
||||
STACK_PUSH5(ISAd - incr, first, last, -2, trlink);
|
||||
trlink = ssize - 2;
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit a0dc7d5efacbe2b744211289c276e2b9168bd4ae
|
||||
Subproject commit 1bb22cd03ab1ad48efb2bdee08cb805b5b593ea5
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 252029ddac664370bdda3f0761675785d92a1573
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 42629f744269e004907a6fb4f16c6c7f69acc586
|
7
3party/freetype/.mailmap
Normal file
7
3party/freetype/.mailmap
Normal file
|
@ -0,0 +1,7 @@
|
|||
Alexei Podtelezhnikov (Алексей Подтележников) <apodtele@gmail.com>
|
||||
Behdad Esfahbod <behdad@behdad.org> <behdad.esfahbod@gmail.com>
|
||||
Bram Tassyns <bramt@enfocus.be> bram tassyns <BramT@enfocus.be>
|
||||
Bram Tassyns <bramt@enfocus.be> <BramT@enfocus.com>
|
||||
Suzuki, Toshiya (鈴木俊哉) <mpsuzuki@hiroshima-u.ac.jp> <sssa@flavor1.ipc.hiroshima-u.ac.jp>
|
||||
Suzuki, Toshiya (鈴木俊哉) <mpsuzuki@hiroshima-u.ac.jp> sssa <sssa@IPA2004-mps.local>
|
||||
Suzuki, Toshiya (鈴木俊哉) <mpsuzuki@hiroshima-u.ac.jp> suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
|
|
@ -1,17 +1,125 @@
|
|||
# TODO: Check if enabling it provides benefits.
|
||||
set(FT_DISABLE_HARFBUZZ ON)
|
||||
project(freetype)
|
||||
|
||||
add_subdirectory(freetype)
|
||||
add_definitions(-DFT2_BUILD_LIBRARY)
|
||||
|
||||
# Fix warning with ONE_PIXEL macro clash.
|
||||
target_compile_options(freetype PRIVATE -Wno-macro-redefined)
|
||||
if (PLATFORM_LINUX AND CMAKE_COMPILER_IS_GNUCXX)
|
||||
add_definitions(-DOMIM_FULL_FREETYPE)
|
||||
endif ()
|
||||
|
||||
# Use ft2build.h from the current directory instead of the default.
|
||||
target_include_directories(freetype
|
||||
BEFORE PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
$<INSTALL_INTERFACE:include/freetype2>
|
||||
add_compile_options("-Wall")
|
||||
|
||||
add_clang_compile_options("-Wno-unused-function")
|
||||
add_gcc_compile_options(
|
||||
"-Wno-pointer-to-int-cast"
|
||||
"-Wno-unused-function"
|
||||
)
|
||||
|
||||
add_library(Freetype::Freetype ALIAS freetype)
|
||||
include_directories(include)
|
||||
|
||||
set(
|
||||
SRC
|
||||
src/autofit/afangles.c
|
||||
src/autofit/afblue.c
|
||||
src/autofit/afcjk.c
|
||||
src/autofit/afdummy.c
|
||||
src/autofit/afglobal.c
|
||||
src/autofit/afhints.c
|
||||
src/autofit/afindic.c
|
||||
src/autofit/aflatin.c
|
||||
src/autofit/afloader.c
|
||||
src/autofit/afmodule.c
|
||||
src/autofit/afranges.c
|
||||
src/autofit/afwarp.c
|
||||
src/autofit/hbshim.c
|
||||
src/base/ftadvanc.c
|
||||
src/base/ftbitmap.c
|
||||
src/base/ftcalc.c
|
||||
src/base/ftgloadr.c
|
||||
src/base/ftglyph.c
|
||||
src/base/ftinit.c
|
||||
src/base/ftobjs.c
|
||||
src/base/ftoutln.c
|
||||
src/base/ftrfork.c
|
||||
src/base/ftstream.c
|
||||
src/base/ftstroke.c
|
||||
src/base/ftsystem.c
|
||||
src/base/fttrigon.c
|
||||
src/base/ftutil.c
|
||||
src/bdf/bdfdrivr.c
|
||||
src/bdf/bdflib.c
|
||||
src/cache/ftcbasic.c
|
||||
src/cache/ftccache.c
|
||||
src/cache/ftccmap.c
|
||||
src/cache/ftcglyph.c
|
||||
src/cache/ftcimage.c
|
||||
src/cache/ftcmanag.c
|
||||
src/cache/ftcmru.c
|
||||
src/cache/ftcsbits.c
|
||||
src/cache/ftstrokedcache.c
|
||||
src/cff/cf2arrst.c
|
||||
src/cff/cf2blues.c
|
||||
src/cff/cf2error.c
|
||||
src/cff/cf2font.c
|
||||
src/cff/cf2ft.c
|
||||
src/cff/cf2hints.c
|
||||
src/cff/cf2intrp.c
|
||||
src/cff/cf2read.c
|
||||
src/cff/cf2stack.c
|
||||
src/cff/cffcmap.c
|
||||
src/cff/cffdrivr.c
|
||||
src/cff/cffgload.c
|
||||
src/cff/cffload.c
|
||||
src/cff/cffobjs.c
|
||||
src/cff/cffparse.c
|
||||
src/cid/cidgload.c
|
||||
src/cid/cidload.c
|
||||
src/cid/cidobjs.c
|
||||
src/cid/cidparse.c
|
||||
src/cid/cidriver.c
|
||||
src/gzip/ftgzip.c
|
||||
src/lzw/ftlzw.c
|
||||
src/pcf/pcfdrivr.c
|
||||
src/pcf/pcfread.c
|
||||
src/pcf/pcfutil.c
|
||||
src/pfr/pfrcmap.c
|
||||
src/pfr/pfrdrivr.c
|
||||
src/pfr/pfrgload.c
|
||||
src/pfr/pfrload.c
|
||||
src/pfr/pfrobjs.c
|
||||
src/pfr/pfrsbit.c
|
||||
src/psaux/afmparse.c
|
||||
src/psaux/psauxmod.c
|
||||
src/psaux/psconv.c
|
||||
src/psaux/psobjs.c
|
||||
src/psaux/t1cmap.c
|
||||
src/psaux/t1decode.c
|
||||
src/pshinter/pshalgo.c
|
||||
src/pshinter/pshglob.c
|
||||
src/pshinter/pshmod.c
|
||||
src/pshinter/pshrec.c
|
||||
src/psnames/psmodule.c
|
||||
src/raster/ftraster.c
|
||||
src/raster/ftrend1.c
|
||||
src/sfnt/sfdriver.c
|
||||
src/sfnt/sfobjs.c
|
||||
src/sfnt/ttbdf.c
|
||||
src/sfnt/ttcmap.c
|
||||
src/sfnt/ttkern.c
|
||||
src/sfnt/ttload.c
|
||||
src/sfnt/ttmtx.c
|
||||
src/sfnt/ttpost.c
|
||||
src/sfnt/ttsbit.c
|
||||
src/smooth/ftgrays.c
|
||||
src/smooth/ftsmooth.c
|
||||
src/truetype/truetype.c
|
||||
src/type1/t1afm.c
|
||||
src/type1/t1driver.c
|
||||
src/type1/t1gload.c
|
||||
src/type1/t1load.c
|
||||
src/type1/t1objs.c
|
||||
src/type1/t1parse.c
|
||||
src/type42/type42.c
|
||||
src/winfonts/winfnt.c
|
||||
)
|
||||
|
||||
add_library(${PROJECT_NAME} ${SRC})
|
||||
|
|
7329
3party/freetype/ChangeLog
Normal file
7329
3party/freetype/ChangeLog
Normal file
File diff suppressed because it is too large
Load diff
2613
3party/freetype/ChangeLog.20
Normal file
2613
3party/freetype/ChangeLog.20
Normal file
File diff suppressed because it is too large
Load diff
9439
3party/freetype/ChangeLog.21
Normal file
9439
3party/freetype/ChangeLog.21
Normal file
File diff suppressed because it is too large
Load diff
2837
3party/freetype/ChangeLog.22
Normal file
2837
3party/freetype/ChangeLog.22
Normal file
File diff suppressed because it is too large
Load diff
7948
3party/freetype/ChangeLog.23
Normal file
7948
3party/freetype/ChangeLog.23
Normal file
File diff suppressed because it is too large
Load diff
6360
3party/freetype/ChangeLog.24
Normal file
6360
3party/freetype/ChangeLog.24
Normal file
File diff suppressed because it is too large
Load diff
209
3party/freetype/Jamfile
Normal file
209
3party/freetype/Jamfile
Normal file
|
@ -0,0 +1,209 @@
|
|||
# FreeType 2 top Jamfile.
|
||||
#
|
||||
# Copyright 2001-2015 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# The HDRMACRO is already defined in FTJam and is used to add
|
||||
# the content of certain macros to the list of included header
|
||||
# files.
|
||||
#
|
||||
# We can compile FreeType 2 with classic Jam however thanks to
|
||||
# the following code
|
||||
#
|
||||
if ! $(JAM_TOOLSET)
|
||||
{
|
||||
rule HDRMACRO
|
||||
{
|
||||
# nothing
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# We need to invoke a SubDir rule if the FT2 source directory top is not the
|
||||
# current directory. This allows us to build FreeType 2 as part of a larger
|
||||
# project easily.
|
||||
#
|
||||
if $(FT2_TOP) != $(DOT)
|
||||
{
|
||||
SubDir FT2_TOP ;
|
||||
}
|
||||
|
||||
|
||||
# The following macros define the include directory, the source directory,
|
||||
# and the final library name (without library extensions). They can be
|
||||
# replaced by other definitions when the library is compiled as part of
|
||||
# a larger project.
|
||||
#
|
||||
|
||||
# Name of FreeType include directory during compilation.
|
||||
# This is relative to FT2_TOP.
|
||||
#
|
||||
FT2_INCLUDE_DIR ?= include ;
|
||||
|
||||
# Name of FreeType source directory during compilation.
|
||||
# This is relative to FT2_TOP.
|
||||
#
|
||||
FT2_SRC_DIR ?= src ;
|
||||
|
||||
# Name of final library, without extension.
|
||||
#
|
||||
FT2_LIB ?= $(LIBPREFIX)freetype ;
|
||||
|
||||
|
||||
# Define FT2_BUILD_INCLUDE to point to your build-specific directory.
|
||||
# This is prepended to FT2_INCLUDE_DIR. It can be used to specify
|
||||
# the location of a custom <ft2build.h> which will point to custom
|
||||
# versions of `ftmodule.h' and `ftoption.h', for example.
|
||||
#
|
||||
FT2_BUILD_INCLUDE ?= ;
|
||||
|
||||
# The list of modules to compile on any given build of the library.
|
||||
# By default, this will contain _all_ modules defined in FT2_SRC_DIR.
|
||||
#
|
||||
# IMPORTANT: You'll need to change the content of `ftmodule.h' as well
|
||||
# if you modify this list or provide your own.
|
||||
#
|
||||
FT2_COMPONENTS ?= autofit # auto-fitter
|
||||
base # base component (public APIs)
|
||||
bdf # BDF font driver
|
||||
bzip2 # support for bzip2-compressed PCF font
|
||||
cache # cache sub-system
|
||||
cff # CFF/CEF font driver
|
||||
cid # PostScript CID-keyed font driver
|
||||
gzip # support for gzip-compressed PCF font
|
||||
lzw # support for LZW-compressed PCF font
|
||||
pcf # PCF font driver
|
||||
pfr # PFR/TrueDoc font driver
|
||||
psaux # common PostScript routines module
|
||||
pshinter # PostScript hinter module
|
||||
psnames # PostScript names handling
|
||||
raster # monochrome rasterizer
|
||||
sfnt # SFNT-based format support routines
|
||||
smooth # anti-aliased rasterizer
|
||||
truetype # TrueType font driver
|
||||
type1 # PostScript Type 1 font driver
|
||||
type42 # PostScript Type 42 (embedded TrueType) driver
|
||||
winfonts # Windows FON/FNT font driver
|
||||
;
|
||||
|
||||
|
||||
# Don't touch.
|
||||
#
|
||||
FT2_INCLUDE = $(FT2_BUILD_INCLUDE)
|
||||
[ FT2_SubDir $(FT2_INCLUDE_DIR) ] ;
|
||||
|
||||
FT2_SRC = [ FT2_SubDir $(FT2_SRC_DIR) ] ;
|
||||
|
||||
# Location of API Reference Documentation
|
||||
#
|
||||
if $(DOC_DIR)
|
||||
{
|
||||
DOC_DIR = $(DOCDIR:T) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
DOC_DIR = docs/reference ;
|
||||
}
|
||||
|
||||
|
||||
# Only used by FreeType developers.
|
||||
#
|
||||
if $(DEBUG_HINTER)
|
||||
{
|
||||
CCFLAGS += -DDEBUG_HINTER ;
|
||||
}
|
||||
|
||||
|
||||
# We need `include' in the current include path in order to
|
||||
# compile any part of FreeType 2.
|
||||
#
|
||||
HDRS += $(FT2_INCLUDE) ;
|
||||
|
||||
|
||||
# We need to #define FT2_BUILD_LIBRARY so that our sources find the
|
||||
# internal headers
|
||||
#
|
||||
CCFLAGS += -DFT2_BUILD_LIBRARY ;
|
||||
|
||||
# Uncomment the following line if you want to build individual source files
|
||||
# for each FreeType 2 module. This is only useful during development, and
|
||||
# is better defined as an environment variable anyway!
|
||||
#
|
||||
# FT2_MULTI = true ;
|
||||
|
||||
|
||||
# The files `ftheader.h', `internal.h', and `ftserv.h' are used to define
|
||||
# macros that are later used in #include statements. They need to be parsed
|
||||
# in order to record these definitions.
|
||||
#
|
||||
HDRMACRO [ FT2_SubDir $(FT2_INCLUDE_DIR) freetype config ftheader.h ] ;
|
||||
HDRMACRO [ FT2_SubDir $(FT2_INCLUDE_DIR) freetype internal internal.h ] ;
|
||||
HDRMACRO [ FT2_SubDir $(FT2_INCLUDE_DIR) freetype internal ftserv.h ] ;
|
||||
|
||||
|
||||
# Now include the Jamfile in `freetype2/src', used to drive the compilation
|
||||
# of each FreeType 2 component and/or module.
|
||||
#
|
||||
SubInclude FT2_TOP $(FT2_SRC_DIR) ;
|
||||
|
||||
# Handle the generation of the `ftexport.sym' file, which contains the list
|
||||
# of exported symbols. This can be used on Unix by libtool.
|
||||
#
|
||||
SubInclude FT2_TOP $(FT2_SRC_DIR) tools ;
|
||||
|
||||
rule GenExportSymbols
|
||||
{
|
||||
local apinames = apinames$(SUFEXE) ;
|
||||
local headers = [ Glob $(2) : *.h ] ;
|
||||
|
||||
LOCATE on $(1) = $(ALL_LOCATE_TARGET) ;
|
||||
|
||||
APINAMES on $(1) = apinames$(SUFEXE) ;
|
||||
|
||||
Depends $(1) : $(apinames) $(headers) ;
|
||||
GenExportSymbols1 $(1) : $(headers) ;
|
||||
Clean clean : $(1) ;
|
||||
}
|
||||
|
||||
actions GenExportSymbols1 bind APINAMES
|
||||
{
|
||||
$(APINAMES) $(2) > $(1)
|
||||
}
|
||||
|
||||
GenExportSymbols ftexport.sym : include include/cache ;
|
||||
|
||||
# Test files (hinter debugging). Only used by FreeType developers.
|
||||
#
|
||||
if $(DEBUG_HINTER)
|
||||
{
|
||||
SubInclude FT2_TOP tests ;
|
||||
}
|
||||
|
||||
rule RefDoc
|
||||
{
|
||||
Depends $1 : all ;
|
||||
NotFile $1 ;
|
||||
Always $1 ;
|
||||
}
|
||||
|
||||
actions RefDoc
|
||||
{
|
||||
python $(FT2_SRC)/tools/docmaker/docmaker.py
|
||||
--prefix=ft2
|
||||
--title=FreeType-2.6
|
||||
--output=$(DOC_DIR)
|
||||
$(FT2_INCLUDE)/freetype/*.h
|
||||
$(FT2_INCLUDE)/freetype/config/*.h
|
||||
}
|
||||
|
||||
RefDoc refdoc ;
|
||||
|
||||
|
||||
# end of top Jamfile
|
71
3party/freetype/Jamrules
Normal file
71
3party/freetype/Jamrules
Normal file
|
@ -0,0 +1,71 @@
|
|||
# FreeType 2 JamRules.
|
||||
#
|
||||
# Copyright 2001-2015 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# This file contains the Jam rules needed to build the FreeType 2 library.
|
||||
# It is shared by all Jamfiles and is included only once in the build
|
||||
# process.
|
||||
#
|
||||
|
||||
|
||||
# Call SubDirHdrs on a list of directories.
|
||||
#
|
||||
rule AddSubDirHdrs
|
||||
{
|
||||
local x ;
|
||||
|
||||
for x in $(<)
|
||||
{
|
||||
SubDirHdrs $(x) ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Determine prefix of library file. We must use "libxxxxx" on Unix systems,
|
||||
# while all other simply use the real name.
|
||||
#
|
||||
if $(UNIX)
|
||||
{
|
||||
LIBPREFIX ?= lib ;
|
||||
}
|
||||
else
|
||||
{
|
||||
LIBPREFIX ?= "" ;
|
||||
}
|
||||
|
||||
# FT2_TOP contains the location of the FreeType source directory. You can
|
||||
# set it to a specific value if you want to compile the library as part of a
|
||||
# larger project.
|
||||
#
|
||||
FT2_TOP ?= $(DOT) ;
|
||||
|
||||
# Define a new rule used to declare a sub directory of the Nirvana source
|
||||
# tree.
|
||||
#
|
||||
rule FT2_SubDir
|
||||
{
|
||||
if $(FT2_TOP) = $(DOT)
|
||||
{
|
||||
return [ FDirName $(<) ] ;
|
||||
}
|
||||
else
|
||||
{
|
||||
return [ FDirName $(FT2_TOP) $(<) ] ;
|
||||
}
|
||||
}
|
||||
|
||||
# We also set ALL_LOCATE_TARGET in order to place all object and library
|
||||
# files in "objs".
|
||||
#
|
||||
ALL_LOCATE_TARGET ?= [ FT2_SubDir objs ] ;
|
||||
|
||||
|
||||
# end of Jamrules
|
84
3party/freetype/README
Normal file
84
3party/freetype/README
Normal file
|
@ -0,0 +1,84 @@
|
|||
FreeType 2.6
|
||||
============
|
||||
|
||||
Homepage: http://www.freetype.org
|
||||
|
||||
FreeType is a freely available software library to render fonts.
|
||||
|
||||
It is written in C, designed to be small, efficient, highly
|
||||
customizable, and portable while capable of producing high-quality
|
||||
output (glyph images) of most vector and bitmap font formats.
|
||||
|
||||
Please read the docs/CHANGES file, it contains IMPORTANT
|
||||
INFORMATION.
|
||||
|
||||
Read the files `docs/INSTALL*' for installation instructions; see
|
||||
the file `docs/LICENSE.TXT' for the available licenses.
|
||||
|
||||
The FreeType 2 API reference is located in `docs/reference'; use the
|
||||
file `ft2-toc.html' as the top entry point. Additional
|
||||
documentation is available as a separate package from our sites. Go
|
||||
to
|
||||
|
||||
http://download.savannah.gnu.org/releases/freetype/
|
||||
|
||||
and download one of the following files.
|
||||
|
||||
freetype-doc-2.6.tar.bz2
|
||||
freetype-doc-2.6.tar.gz
|
||||
ftdoc26.zip
|
||||
|
||||
To view the documentation online, go to
|
||||
|
||||
http://www.freetype.org/freetype2/documentation.html
|
||||
|
||||
|
||||
Mailing Lists
|
||||
=============
|
||||
|
||||
The preferred way of communication with the FreeType team is using
|
||||
e-mail lists.
|
||||
|
||||
general use and discussion: freetype@nongnu.org
|
||||
engine internals, porting, etc.: freetype-devel@nongnu.org
|
||||
announcements: freetype-announce@nongnu.org
|
||||
git repository tracker: freetype-commit@nongnu.org
|
||||
|
||||
The lists are moderated; see
|
||||
|
||||
http://www.freetype.org/contact.html
|
||||
|
||||
how to subscribe.
|
||||
|
||||
|
||||
Bugs
|
||||
====
|
||||
|
||||
Please submit bug reports at
|
||||
|
||||
https://savannah.nongnu.org/bugs/?group=freetype
|
||||
|
||||
Alternatively, you might report bugs by e-mail to
|
||||
`freetype-devel@nongnu.org'. Don't forget to send a detailed
|
||||
explanation of the problem -- there is nothing worse than receiving
|
||||
a terse message that only says `it doesn't work'.
|
||||
|
||||
|
||||
Enjoy!
|
||||
|
||||
|
||||
The FreeType Team
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright 2006-2015 by
|
||||
David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
|
||||
This file is part of the FreeType project, and may only be used,
|
||||
modified, and distributed under the terms of the FreeType project
|
||||
license, LICENSE.TXT. By continuing to use, modify, or distribute
|
||||
this file you indicate that you have read the license and understand
|
||||
and accept it fully.
|
||||
|
||||
|
||||
--- end of README ---
|
50
3party/freetype/README.git
Normal file
50
3party/freetype/README.git
Normal file
|
@ -0,0 +1,50 @@
|
|||
The git archive doesn't contain pre-built configuration scripts for
|
||||
UNIXish platforms. To generate them say
|
||||
|
||||
sh autogen.sh
|
||||
|
||||
which in turn depends on the following packages:
|
||||
|
||||
automake (1.10.1)
|
||||
libtool (2.2.4)
|
||||
autoconf (2.62)
|
||||
|
||||
The versions given in parentheses are known to work. Newer versions
|
||||
should work too, of course. Note that autogen.sh also sets up proper
|
||||
file permissions for the `configure' and auxiliary scripts.
|
||||
|
||||
The autogen.sh script now checks the version of above three packages
|
||||
whether they match the numbers above. Otherwise it will complain and
|
||||
suggest either upgrading or using an environment variable to point to
|
||||
a more recent version of the required tool(s).
|
||||
|
||||
Note that `aclocal' is provided by the `automake' package on Linux,
|
||||
and that `libtoolize' is called `glibtoolize' on Darwin (OS X).
|
||||
|
||||
|
||||
For static builds which don't use platform specific optimizations, no
|
||||
configure script is necessary at all; saying
|
||||
|
||||
make setup ansi
|
||||
make
|
||||
|
||||
should work on all platforms which have GNU make (or makepp).
|
||||
|
||||
|
||||
Similarly, a build with `cmake' can be done directly from the git
|
||||
repository.
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright 2005-2015 by
|
||||
David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
|
||||
This file is part of the FreeType project, and may only be used,
|
||||
modified, and distributed under the terms of the FreeType project
|
||||
license, LICENSE.TXT. By continuing to use, modify, or distribute
|
||||
this file you indicate that you have read the license and understand
|
||||
and accept it fully.
|
||||
|
||||
|
||||
--- end of README.git ---
|
166
3party/freetype/autogen.sh
Executable file
166
3party/freetype/autogen.sh
Executable file
|
@ -0,0 +1,166 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Copyright 2005-2015 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
run ()
|
||||
{
|
||||
echo "running \`$*'"
|
||||
eval $*
|
||||
|
||||
if test $? != 0 ; then
|
||||
echo "error while running \`$*'"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
get_major_version ()
|
||||
{
|
||||
echo $1 | sed -e 's/\([0-9][0-9]*\)\..*/\1/g'
|
||||
}
|
||||
|
||||
get_minor_version ()
|
||||
{
|
||||
echo $1 | sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/g'
|
||||
}
|
||||
|
||||
get_patch_version ()
|
||||
{
|
||||
# tricky: some version numbers don't include a patch
|
||||
# separated with a point, but something like 1.4-p6
|
||||
patch=`echo $1 | sed -e 's/[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/g'`
|
||||
if test "$patch" = "$1"; then
|
||||
patch=`echo $1 | sed -e 's/[0-9][0-9]*\.[0-9][0-9]*\-p\([0-9][0-9]*\).*/\1/g'`
|
||||
# if there isn't any patch number, default to 0
|
||||
if test "$patch" = "$1"; then
|
||||
patch=0
|
||||
fi
|
||||
fi
|
||||
echo $patch
|
||||
}
|
||||
|
||||
# $1: version to check
|
||||
# $2: minimum version
|
||||
|
||||
compare_to_minimum_version ()
|
||||
{
|
||||
MAJOR1=`get_major_version $1`
|
||||
MAJOR2=`get_major_version $2`
|
||||
if test $MAJOR1 -lt $MAJOR2; then
|
||||
echo 0
|
||||
return
|
||||
else
|
||||
if test $MAJOR1 -gt $MAJOR2; then
|
||||
echo 1
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
MINOR1=`get_minor_version $1`
|
||||
MINOR2=`get_minor_version $2`
|
||||
if test $MINOR1 -lt $MINOR2; then
|
||||
echo 0
|
||||
return
|
||||
else
|
||||
if test $MINOR1 -gt $MINOR2; then
|
||||
echo 1
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
PATCH1=`get_patch_version $1`
|
||||
PATCH2=`get_patch_version $2`
|
||||
if test $PATCH1 -lt $PATCH2; then
|
||||
echo 0
|
||||
else
|
||||
echo 1
|
||||
fi
|
||||
}
|
||||
|
||||
# check the version of a given tool against a minimum version number
|
||||
#
|
||||
# $1: tool path
|
||||
# $2: tool usual name (e.g. `aclocal')
|
||||
# $3: tool variable (e.g. `ACLOCAL')
|
||||
# $4: minimum version to check against
|
||||
# $5: option field index used to extract the tool version from the
|
||||
# output of --version
|
||||
|
||||
check_tool_version ()
|
||||
{
|
||||
field=$5
|
||||
# assume the output of "[TOOL] --version" is "toolname (GNU toolname foo bar) version"
|
||||
if test "$field"x = x; then
|
||||
field=3 # default to 3 for all GNU autotools, after filtering enclosed string
|
||||
fi
|
||||
version=`$1 --version | head -1 | sed 's/([^)]*)/()/g' | cut -d ' ' -f $field`
|
||||
version_check=`compare_to_minimum_version $version $4`
|
||||
if test "$version_check"x = 0x; then
|
||||
echo "ERROR: Your version of the \`$2' tool is too old."
|
||||
echo " Minimum version $4 is required (yours is version $version)."
|
||||
echo " Please upgrade or use the $3 variable to point to a more recent one."
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
if test ! -f ./builds/unix/configure.raw; then
|
||||
echo "You must be in the same directory as \`autogen.sh'."
|
||||
echo "Bootstrapping doesn't work if srcdir != builddir."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# On MacOS X, the GNU libtool is named `glibtool'.
|
||||
HOSTOS=`uname`
|
||||
if test "$LIBTOOLIZE"x != x; then
|
||||
:
|
||||
elif test "$HOSTOS"x = Darwinx; then
|
||||
LIBTOOLIZE=glibtoolize
|
||||
else
|
||||
LIBTOOLIZE=libtoolize
|
||||
fi
|
||||
|
||||
if test "$ACLOCAL"x = x; then
|
||||
ACLOCAL=aclocal
|
||||
fi
|
||||
|
||||
if test "$AUTOCONF"x = x; then
|
||||
AUTOCONF=autoconf
|
||||
fi
|
||||
|
||||
check_tool_version $ACLOCAL aclocal ACLOCAL 1.10.1
|
||||
check_tool_version $LIBTOOLIZE libtoolize LIBTOOLIZE 2.2.4
|
||||
check_tool_version $AUTOCONF autoconf AUTOCONF 2.62
|
||||
|
||||
# This sets freetype_major, freetype_minor, and freetype_patch.
|
||||
eval `sed -nf version.sed include/freetype/freetype.h`
|
||||
|
||||
# We set freetype-patch to an empty value if it is zero.
|
||||
if test "$freetype_patch" = ".0"; then
|
||||
freetype_patch=
|
||||
fi
|
||||
|
||||
cd builds/unix
|
||||
|
||||
echo "generating \`configure.ac'"
|
||||
sed -e "s;@VERSION@;$freetype_major$freetype_minor$freetype_patch;" \
|
||||
< configure.raw > configure.ac
|
||||
|
||||
run aclocal -I . --force
|
||||
run $LIBTOOLIZE --force --copy --install
|
||||
run autoconf --force
|
||||
|
||||
chmod +x mkinstalldirs
|
||||
chmod +x install-sh
|
||||
|
||||
cd ../..
|
||||
|
||||
chmod +x ./configure
|
||||
|
||||
# EOF
|
61
3party/freetype/builds/FindHarfBuzz.cmake
Normal file
61
3party/freetype/builds/FindHarfBuzz.cmake
Normal file
|
@ -0,0 +1,61 @@
|
|||
# Copyright (c) 2012, Intel Corporation
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright notice, this
|
||||
# list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
# * Neither the name of Intel Corporation nor the names of its contributors may
|
||||
# be used to endorse or promote products derived from this software without
|
||||
# specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# Try to find Harfbuzz include and library directories.
|
||||
#
|
||||
# After successful discovery, this will set for inclusion where needed:
|
||||
# HARFBUZZ_INCLUDE_DIRS - containg the HarfBuzz headers
|
||||
# HARFBUZZ_LIBRARIES - containg the HarfBuzz library
|
||||
|
||||
include(FindPkgConfig)
|
||||
|
||||
pkg_check_modules(PC_HARFBUZZ harfbuzz>=0.9.7)
|
||||
|
||||
find_path(HARFBUZZ_INCLUDE_DIRS NAMES hb.h
|
||||
HINTS ${PC_HARFBUZZ_INCLUDE_DIRS} ${PC_HARFBUZZ_INCLUDEDIR}
|
||||
)
|
||||
|
||||
find_library(HARFBUZZ_LIBRARIES NAMES harfbuzz
|
||||
HINTS ${PC_HARFBUZZ_LIBRARY_DIRS} ${PC_HARFBUZZ_LIBDIR}
|
||||
)
|
||||
|
||||
# HarfBuzz 0.9.18 split ICU support into a separate harfbuzz-icu library.
|
||||
if ("${PC_HARFBUZZ_VERSION}" VERSION_GREATER "0.9.17")
|
||||
pkg_check_modules(PC_HARFBUZZ_ICU harfbuzz-icu>=0.9.18 REQUIRED)
|
||||
find_library(HARFBUZZ_ICU_LIBRARIES NAMES harfbuzz-icu
|
||||
HINTS ${PC_HARFBUZZ_ICU_LIBRARY_DIRS} ${PC_HARFBUZZ_ICU_LIBDIR}
|
||||
)
|
||||
list(APPEND HARFBUZZ_LIBRARIES "${HARFBUZZ_ICU_LIBRARIES}")
|
||||
endif ()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(HarfBuzz DEFAULT_MSG HARFBUZZ_INCLUDE_DIRS HARFBUZZ_LIBRARIES)
|
||||
|
||||
mark_as_advanced(
|
||||
HARFBUZZ_ICU_LIBRARIES
|
||||
HARFBUZZ_INCLUDE_DIRS
|
||||
HARFBUZZ_LIBRARIES
|
||||
)
|
110
3party/freetype/builds/amiga/README
Normal file
110
3party/freetype/builds/amiga/README
Normal file
|
@ -0,0 +1,110 @@
|
|||
|
||||
README for the builds/amiga subdirectory.
|
||||
|
||||
Copyright 2005-2015 by
|
||||
Werner Lemberg and Detlef Würkner.
|
||||
|
||||
This file is part of the FreeType project, and may only be used, modified,
|
||||
and distributed under the terms of the FreeType project license,
|
||||
LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
indicate that you have read the license and understand and accept it
|
||||
fully.
|
||||
|
||||
|
||||
The makefile.os4 is for the AmigaOS4 SDK. To use it, type
|
||||
"make -f makefile.os4", it produces a link library libft2_ppc.a.
|
||||
|
||||
The makefile is for ppc-morphos-gcc-2.95.3-bin.tgz (gcc 2.95.3 hosted on
|
||||
68k-Amiga producing MorphOS-PPC-binaries from http://www.morphos.de).
|
||||
To use it, type "make assign", then "make"; it produces a link library
|
||||
libft2_ppc.a.
|
||||
|
||||
The smakefile is a makefile for Amiga SAS/C 6.58 (no longer available,
|
||||
latest sold version was 6.50, updates can be found in Aminet). It is
|
||||
based on the version found in the sourcecode of ttf.library 0.83b for
|
||||
FreeType 1.3.1 from Richard Griffith (ragriffi@sprynet.com,
|
||||
http://ragriffi.home.sprynet.com).
|
||||
|
||||
You will also need the latest include files and amiga.lib from the
|
||||
Amiga web site (http://www.amiga.com/3.9/download/NDK3.9.lha) for
|
||||
AmigaOS 3.9; the generated code should work under AmigaOS 2.04 and up.
|
||||
|
||||
To use it, call "smake assign" and then "smake" from the builds/amiga
|
||||
directory. The results are:
|
||||
|
||||
- A link library "ft2_680x0.lib" (where x depends on the setting of
|
||||
the CPU entry in the smakefile) containing all FreeType2 parts
|
||||
except of the init code, debugging code, and the system interface
|
||||
code.
|
||||
|
||||
- ftsystem.o, an object module containing the standard version of the
|
||||
system interface code which uses fopen() fclose() fread() fseek()
|
||||
ftell() malloc() realloc() and free() from lib:sc.lib (not pure).
|
||||
|
||||
- ftsystempure.o, an object module containing the pure version of the
|
||||
system interface code which uses Open() Close() Read() Seek()
|
||||
ExamineFH() AsmAllocPooled() AsmFreePooled() etc. This version can
|
||||
be used in both normal programs and in Amiga run-time shared system
|
||||
librarys (can be linked with lib:libinit.o, no copying of DATA and
|
||||
BSS hunks for each OpenLibrary() necessary). Source code is in
|
||||
src/base/ftsystem.c.
|
||||
|
||||
- ftdebug.o, an object module containing the standard version of the
|
||||
debugging code which uses vprintf() and exit() (not pure).
|
||||
Debugging can be turned on in FT:include/freetype/config/ftoption.h
|
||||
and with FT_SetTraceLevel().
|
||||
|
||||
- ftdebugpure.o, an object module containing the pure version of the
|
||||
debugging code which uses KVPrintf() from lib:debug.lib and no
|
||||
exit(). For debugging of Amiga run-time shared system libraries.
|
||||
Source code is in src/base/ftdebug.c.
|
||||
|
||||
- NO ftinit.o. Because linking with a link library should result in
|
||||
linking only the needed object modules in it, but standard
|
||||
ftsystem.o would force ALL FreeType2 modules to be linked to your
|
||||
program, I decided to use a different scheme: You must #include
|
||||
FT:src/base/ftinit.c in your sourcecode and specify with #define
|
||||
statements which modules you need. See
|
||||
include/freetype/config/ftmodule.h.
|
||||
|
||||
|
||||
To use in your own programs:
|
||||
|
||||
- Insert the #define and #include statements from top of
|
||||
include/freetype/config/ftmodule.h in your source code and
|
||||
uncomment the #define statements for the FreeType2 modules you need.
|
||||
|
||||
- You can use either PARAMETERS=REGISTER or PARAMETERS=STACK for
|
||||
calling the FreeType2 functions, because the link library and the
|
||||
object files are compiled with PARAMETERS=BOTH.
|
||||
|
||||
- "smake assign" (assign "FT:" to the FreeType2 main directory).
|
||||
|
||||
- Compile your program.
|
||||
|
||||
- Link with either ftsystem.o or ftsystempure.o, if debugging enabled
|
||||
with either ftdebug.o or (ftdebugpure.o and lib:debug.lib), and with
|
||||
ft2_680x0.lib as link library.
|
||||
|
||||
|
||||
To adapt to other compilers:
|
||||
|
||||
- The standard ANSI C maximum length of 31 significant characters in
|
||||
identifiers is not enough for FreeType2. Check if your compiler has
|
||||
a minimum length of 40 significant characters or can be switched to
|
||||
it. "idlen=40" is the option for SAS/C. Setting #define
|
||||
HAVE_LIMIT_ON_IDENTS in an include file may also work (not tested).
|
||||
|
||||
- Make sure that the include directory in builds/amiga is searched
|
||||
before the normal FreeType2 include directory, so you are able to
|
||||
replace problematic include files with your own version (same may be
|
||||
useful for the src directory).
|
||||
|
||||
- An example of how to replace/workaround a problematic include file
|
||||
is include/freetype/config/ftconfig.h; it changes a #define that
|
||||
would prevent SAS/C from generating XDEF's where it should do that and
|
||||
then includes the standard FreeType2 include file.
|
||||
|
||||
Local Variables:
|
||||
coding: latin-1
|
||||
End:
|
55
3party/freetype/builds/amiga/include/config/ftconfig.h
Normal file
55
3party/freetype/builds/amiga/include/config/ftconfig.h
Normal file
|
@ -0,0 +1,55 @@
|
|||
/***************************************************************************/
|
||||
/* */
|
||||
/* ftconfig.h */
|
||||
/* */
|
||||
/* Amiga-specific configuration file (specification only). */
|
||||
/* */
|
||||
/* Copyright 2005-2015 by */
|
||||
/* Werner Lemberg and Detlef Würkner. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
/* modified, and distributed under the terms of the FreeType project */
|
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
||||
/* this file you indicate that you have read the license and */
|
||||
/* understand and accept it fully. */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
/*
|
||||
* This is an example how to override the default FreeType2 header files
|
||||
* with Amiga-specific changes. When the compiler searches this directory
|
||||
* before the default directory, we can do some modifications.
|
||||
*
|
||||
* Here we must change FT_EXPORT_DEF so that SAS/C does
|
||||
* generate the needed XDEFs.
|
||||
*/
|
||||
|
||||
#if 0
|
||||
#define FT_EXPORT_DEF( x ) extern x
|
||||
#endif
|
||||
|
||||
#undef FT_EXPORT_DEF
|
||||
#define FT_EXPORT_DEF( x ) x
|
||||
|
||||
/* Now include the original file */
|
||||
#ifndef __MORPHOS__
|
||||
#ifdef __SASC
|
||||
#include "FT:include/freetype/config/ftconfig.h"
|
||||
#else
|
||||
#include "/FT/include/freetype/config/ftconfig.h"
|
||||
#endif
|
||||
#else
|
||||
/* We must define that, it seems that
|
||||
* lib/gcc-lib/ppc-morphos/2.95.3/include/syslimits.h is missing in
|
||||
* ppc-morphos-gcc-2.95.3-bin.tgz (gcc for 68k producing MorphOS PPC elf
|
||||
* binaries from http://www.morphos.de)
|
||||
*/
|
||||
#define _LIBC_LIMITS_H_
|
||||
#include "/FT/include/freetype/config/ftconfig.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
Local Variables:
|
||||
coding: latin-1
|
||||
End:
|
||||
*/
|
160
3party/freetype/builds/amiga/include/config/ftmodule.h
Normal file
160
3party/freetype/builds/amiga/include/config/ftmodule.h
Normal file
|
@ -0,0 +1,160 @@
|
|||
/***************************************************************************/
|
||||
/* */
|
||||
/* ftmodule.h */
|
||||
/* */
|
||||
/* Amiga-specific FreeType module selection. */
|
||||
/* */
|
||||
/* Copyright 2005-2015 by */
|
||||
/* Werner Lemberg and Detlef Würkner. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
/* modified, and distributed under the terms of the FreeType project */
|
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
||||
/* this file you indicate that you have read the license and */
|
||||
/* understand and accept it fully. */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
/*
|
||||
* To avoid that all your programs include all FreeType modules,
|
||||
* you copy the following piece of source code into your own
|
||||
* source file and specify which modules you really need in your
|
||||
* application by uncommenting the appropriate lines.
|
||||
*/
|
||||
/*
|
||||
//#define FT_USE_AUTOFIT // autofitter
|
||||
//#define FT_USE_RASTER // monochrome rasterizer
|
||||
//#define FT_USE_SMOOTH // anti-aliasing rasterizer
|
||||
//#define FT_USE_TT // truetype font driver
|
||||
//#define FT_USE_T1 // type1 font driver
|
||||
//#define FT_USE_T42 // type42 font driver
|
||||
//#define FT_USE_T1CID // cid-keyed type1 font driver // no cmap support
|
||||
//#define FT_USE_CFF // opentype font driver
|
||||
//#define FT_USE_BDF // bdf bitmap font driver
|
||||
//#define FT_USE_PCF // pcf bitmap font driver
|
||||
//#define FT_USE_PFR // pfr font driver
|
||||
//#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver
|
||||
//#define FT_USE_OTV // opentype validator
|
||||
//#define FT_USE_GXV // truetype gx validator
|
||||
#include "FT:src/base/ftinit.c"
|
||||
*/
|
||||
|
||||
/* Make sure that the needed support modules are built in.
|
||||
* Dependencies can be found by searching for FT_Get_Module.
|
||||
*/
|
||||
|
||||
#ifdef FT_USE_T42
|
||||
#define FT_USE_TT
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_TT
|
||||
#define FT_USE_SFNT
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_CFF
|
||||
#define FT_USE_SFNT
|
||||
#define FT_USE_PSHINT
|
||||
#define FT_USE_PSNAMES
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_T1
|
||||
#define FT_USE_PSAUX
|
||||
#define FT_USE_PSHINT
|
||||
#define FT_USE_PSNAMES
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_T1CID
|
||||
#define FT_USE_PSAUX
|
||||
#define FT_USE_PSHINT
|
||||
#define FT_USE_PSNAMES
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_PSAUX
|
||||
#define FT_USE_PSNAMES
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_SFNT
|
||||
#define FT_USE_PSNAMES
|
||||
#endif
|
||||
|
||||
/* Now include the modules */
|
||||
|
||||
#ifdef FT_USE_AUTOFIT
|
||||
FT_USE_MODULE( FT_Module_Class, autofit_module_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_TT
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_T1
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_CFF
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_T1CID
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_PFR
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_T42
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_WINFNT
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_PCF
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_PSAUX
|
||||
FT_USE_MODULE( FT_Module_Class, psaux_module_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_PSNAMES
|
||||
FT_USE_MODULE( FT_Module_Class, psnames_module_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_PSHINT
|
||||
FT_USE_MODULE( FT_Module_Class, pshinter_module_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_RASTER
|
||||
FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_SFNT
|
||||
FT_USE_MODULE( FT_Module_Class, sfnt_module_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_SMOOTH
|
||||
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class )
|
||||
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class )
|
||||
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_OTV
|
||||
FT_USE_MODULE( FT_Module_Class, otv_module_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_BDF
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )
|
||||
#endif
|
||||
|
||||
#ifdef FT_USE_GXV
|
||||
FT_USE_MODULE( FT_Module_Class, gxv_module_class )
|
||||
#endif
|
||||
|
||||
/*
|
||||
Local Variables:
|
||||
coding: latin-1
|
||||
End:
|
||||
*/
|
299
3party/freetype/builds/amiga/makefile
Normal file
299
3party/freetype/builds/amiga/makefile
Normal file
|
@ -0,0 +1,299 @@
|
|||
#
|
||||
# Makefile for FreeType2 link library using ppc-morphos-gcc-2.95.3-bin.tgz
|
||||
# (gcc 2.95.3 hosted on 68k-Amiga producing MorphOS-PPC-binaries from
|
||||
# http://www.morphos.de)
|
||||
#
|
||||
|
||||
|
||||
# Copyright 2005-2015 by
|
||||
# Werner Lemberg and Detlef Würkner.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
#
|
||||
# to build from the builds/amiga directory call
|
||||
#
|
||||
# make assign
|
||||
# make
|
||||
#
|
||||
# Your programs source code should start with this
|
||||
# (uncomment the parts you do not need to keep the program small):
|
||||
# ---8<---
|
||||
#define FT_USE_AUTOFIT // autofitter
|
||||
#define FT_USE_RASTER // monochrome rasterizer
|
||||
#define FT_USE_SMOOTH // anti-aliasing rasterizer
|
||||
#define FT_USE_TT // truetype font driver
|
||||
#define FT_USE_T1 // type1 font driver
|
||||
#define FT_USE_T42 // type42 font driver
|
||||
#define FT_USE_T1CID // cid-keyed type1 font driver
|
||||
#define FT_USE_CFF // opentype font driver
|
||||
#define FT_USE_BDF // bdf bitmap font driver
|
||||
#define FT_USE_PCF // pcf bitmap font driver
|
||||
#define FT_USE_PFR // pfr font driver
|
||||
#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver
|
||||
#define FT_USE_OTV // opentype validator
|
||||
#define FT_USE_GXV // truetype gx validator
|
||||
#include "FT:src/base/ftinit.c"
|
||||
# ---8<---
|
||||
#
|
||||
# link your programs with libft2_ppc.a and either ftsystem.ppc.o or ftsystempure.ppc.o
|
||||
# (and either ftdebug.ppc.o or ftdebugpure.ppc.o if you enabled FT_DEBUG_LEVEL_ERROR or
|
||||
# FT_DEBUG_LEVEL_TRACE in include/freetype/config/ftoption.h).
|
||||
|
||||
all: libft2_ppc.a ftsystem.ppc.o ftsystempure.ppc.o
|
||||
|
||||
assign:
|
||||
assign FT: //
|
||||
|
||||
FTSRC = /FT/src
|
||||
|
||||
CC = ppc-morphos-gcc
|
||||
AR = ppc-morphos-ar rc
|
||||
RANLIB = ppc-morphos-ranlib
|
||||
LD = ppc-morphos-ld
|
||||
CFLAGS = -DFT2_BUILD_LIBRARY -O2 -I/emu/emulinclude/includegcc -I/emu/include -Iinclude -I$(FTSRC) -I/FT/include
|
||||
|
||||
#
|
||||
# FreeType2 library base
|
||||
#
|
||||
ftbase.ppc.o: $(FTSRC)/base/ftbase.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftinit.ppc.o: $(FTSRC)/base/ftinit.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftsystem.ppc.o: $(FTSRC)/base/ftsystem.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
# pure version for use in run-time library etc
|
||||
ftsystempure.ppc.o: src/base/ftsystem.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftdebug.ppc.o: $(FTSRC)/base/ftdebug.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
# pure version for use in run-time library etc
|
||||
ftdebugpure.ppc.o: src/base/ftdebug.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library base extensions
|
||||
#
|
||||
ftbbox.ppc.o: $(FTSRC)/base/ftbbox.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftbdf.ppc.o: $(FTSRC)/base/ftbdf.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftbitmap.ppc.o: $(FTSRC)/base/ftbitmap.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftcid.ppc.o: $(FTSRC)/base/ftcid.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftfntfmt.ppc.o: $(FTSRC)/base/ftfntfmt.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftfstype.ppc.o: $(FTSRC)/base/ftfstype.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftgasp.ppc.o: $(FTSRC)/base/ftgasp.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftglyph.ppc.o: $(FTSRC)/base/ftglyph.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftgxval.ppc.o: $(FTSRC)/base/ftgxval.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftlcdfil.ppc.o: $(FTSRC)/base/ftlcdfil.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftmm.ppc.o: $(FTSRC)/base/ftmm.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftotval.ppc.o: $(FTSRC)/base/ftotval.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftpatent.ppc.o: $(FTSRC)/base/ftpatent.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftpfr.ppc.o: $(FTSRC)/base/ftpfr.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftstroke.ppc.o: $(FTSRC)/base/ftstroke.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftsynth.ppc.o: $(FTSRC)/base/ftsynth.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
fttype1.ppc.o: $(FTSRC)/base/fttype1.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
ftwinfnt.ppc.o: $(FTSRC)/base/ftwinfnt.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library autofitting module
|
||||
#
|
||||
autofit.ppc.o: $(FTSRC)/autofit/autofit.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library postscript hinting module
|
||||
#
|
||||
pshinter.ppc.o: $(FTSRC)/pshinter/pshinter.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library PS support module
|
||||
#
|
||||
psaux.ppc.o: $(FTSRC)/psaux/psaux.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library PS glyph names module
|
||||
#
|
||||
psnames.ppc.o: $(FTSRC)/psnames/psnames.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library monochrome raster module
|
||||
#
|
||||
raster.ppc.o: $(FTSRC)/raster/raster.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library anti-aliasing raster module
|
||||
#
|
||||
smooth.ppc.o: $(FTSRC)/smooth/smooth.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library 'sfnt' module
|
||||
#
|
||||
sfnt.ppc.o: $(FTSRC)/sfnt/sfnt.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library glyph and image caching system
|
||||
#
|
||||
ftcache.ppc.o: $(FTSRC)/cache/ftcache.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library OpenType font driver
|
||||
#
|
||||
cff.ppc.o: $(FTSRC)/cff/cff.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library TrueType font driver
|
||||
#
|
||||
truetype.ppc.o: $(FTSRC)/truetype/truetype.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library Type1 font driver
|
||||
#
|
||||
type1.ppc.o: $(FTSRC)/type1/type1.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library Type42 font driver
|
||||
#
|
||||
type42.ppc.o: $(FTSRC)/type42/type42.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library CID-keyed Type1 font driver
|
||||
#
|
||||
type1cid.ppc.o: $(FTSRC)/cid/type1cid.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library BDF bitmap font driver
|
||||
#
|
||||
bdf.ppc.o: $(FTSRC)/bdf/bdf.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library PCF bitmap font driver
|
||||
#
|
||||
pcf.ppc.o: $(FTSRC)/pcf/pcf.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library gzip support for compressed PCF bitmap fonts
|
||||
#
|
||||
gzip.ppc.o: $(FTSRC)/gzip/ftgzip.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
# FreeType2 library bzip2 support for compressed PCF bitmap fonts
|
||||
#
|
||||
bzip2.ppc.o: $(FTSRC)/bzip2/ftbzip2.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library compress support for compressed PCF bitmap fonts
|
||||
#
|
||||
lzw.ppc.o: $(FTSRC)/lzw/ftlzw.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library PFR font driver
|
||||
#
|
||||
pfr.ppc.o: $(FTSRC)/pfr/pfr.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library Windows FNT/FON bitmap font driver
|
||||
#
|
||||
winfnt.ppc.o: $(FTSRC)/winfonts/winfnt.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library TrueTypeGX Validator
|
||||
#
|
||||
gxvalid.ppc.o: $(FTSRC)/gxvalid/gxvalid.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library OpenType validator
|
||||
#
|
||||
otvalid.ppc.o: $(FTSRC)/otvalid/otvalid.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
BASEPPC = ftbase.ppc.o ftbbox.ppc.o ftbdf.ppc.o ftbitmap.ppc.o ftcid.ppc.o \
|
||||
ftfntfmt.ppc.oftfstype.ppc.o ftgasp.ppc.o ftglyph.ppc.o \
|
||||
ftgxval.ppc.o ftlcdfil.ppc.o ftmm.ppc.o ftotval.ppc.o \
|
||||
ftpatent.ppc.o ftpfr.ppc.o ftstroke.ppc.o ftsynth.ppc.o \
|
||||
fttype1.ppc.o ftwinfnt.ppc.o
|
||||
|
||||
DEBUGPPC = ftdebug.ppc.o ftdebugpure.ppc.o
|
||||
|
||||
AFITPPC = autofit.ppc.o
|
||||
|
||||
GXVPPC = gxvalid.ppc.o
|
||||
|
||||
OTVPPC = otvalid.ppc.o
|
||||
|
||||
PSPPC = psaux.ppc.o psnames.ppc.o pshinter.ppc.o
|
||||
|
||||
RASTERPPC = raster.ppc.o smooth.ppc.o
|
||||
|
||||
FONTDPPC = cff.ppc.o type1.ppc.o type42.ppc.o type1cid.ppc.o truetype.ppc.o\
|
||||
bdf.ppc.o pcf.ppc.o pfr.ppc.o winfnt.ppc.o
|
||||
|
||||
libft2_ppc.a: $(BASEPPC) $(AFITPPC) $(GXVPPC) $(OTVPPC) $(PSPPC) $(RASTERPPC) sfnt.ppc.o ftcache.ppc.o $(FONTDPPC) gzip.ppc.o bzip2.ppc.o lzw.ppc.o
|
||||
$(AR) $@ $(BASEPPC) $(AFITPPC) $(GXVPPC) $(OTVPPC) $(PSPPC) $(RASTERPPC) sfnt.ppc.o ftcache.ppc.o $(FONTDPPC) gzip.ppc.o bzip2.ppc.o lzw.ppc.o
|
||||
-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
|
||||
|
||||
#Local Variables:
|
||||
#coding: latin-1
|
||||
#End:
|
303
3party/freetype/builds/amiga/makefile.os4
Normal file
303
3party/freetype/builds/amiga/makefile.os4
Normal file
|
@ -0,0 +1,303 @@
|
|||
#
|
||||
# Makefile for FreeType2 link library using gcc 4.0.3 from the
|
||||
# AmigaOS4 SDK
|
||||
#
|
||||
|
||||
|
||||
# Copyright 2005-2015 by
|
||||
# Werner Lemberg and Detlef Würkner.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# to build from the builds/amiga directory call
|
||||
#
|
||||
# make -f makefile.os4
|
||||
#
|
||||
# Your programs source code should start with this
|
||||
# (uncomment the parts you do not need to keep the program small):
|
||||
# ---8<---
|
||||
#define FT_USE_AUTOFIT // autofitter
|
||||
#define FT_USE_RASTER // monochrome rasterizer
|
||||
#define FT_USE_SMOOTH // anti-aliasing rasterizer
|
||||
#define FT_USE_TT // truetype font driver
|
||||
#define FT_USE_T1 // type1 font driver
|
||||
#define FT_USE_T42 // type42 font driver
|
||||
#define FT_USE_T1CID // cid-keyed type1 font driver
|
||||
#define FT_USE_CFF // opentype font driver
|
||||
#define FT_USE_BDF // bdf bitmap font driver
|
||||
#define FT_USE_PCF // pcf bitmap font driver
|
||||
#define FT_USE_PFR // pfr font driver
|
||||
#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver
|
||||
#define FT_USE_OTV // opentype validator
|
||||
#define FT_USE_GXV // truetype gx validator
|
||||
#include "FT:src/base/ftinit.c"
|
||||
# ---8<---
|
||||
#
|
||||
# link your programs with libft2_ppc.a and either ftsystem.ppc.o or ftsystempure.ppc.o
|
||||
# (and either ftdebug.ppc.o or ftdebugpure.ppc.o if you enabled FT_DEBUG_LEVEL_ERROR or
|
||||
# FT_DEBUG_LEVEL_TRACE in include/freetype/config/ftoption.h).
|
||||
|
||||
all: assign libft2_ppc.a ftsystem.ppc.o ftsystempure.ppc.o
|
||||
|
||||
assign:
|
||||
assign FT: //
|
||||
|
||||
CC = ppc-amigaos-gcc
|
||||
AR = ppc-amigaos-ar
|
||||
RANLIB = ppc-amigaos-ranlib
|
||||
|
||||
DIRFLAGS = -Iinclude -I/FT/src -I/FT/include -I/SDK/include
|
||||
|
||||
WARNINGS = -Wall -W -Wundef -Wpointer-arith -Wbad-function-cast \
|
||||
-Waggregate-return -Wwrite-strings -Wshadow
|
||||
|
||||
OPTIONS = -DFT2_BUILD_LIBRARY -DNDEBUG -fno-builtin
|
||||
OPTIMIZE = -O2 -fomit-frame-pointer -fstrength-reduce -finline-functions
|
||||
|
||||
CFLAGS = -mcrt=clib2 $(DIRFLAGS) $(WARNINGS) $(FT2FLAGS) $(OPTIONS) $(OPTIMIZE)
|
||||
|
||||
#
|
||||
# FreeType2 library base
|
||||
#
|
||||
ftbase.ppc.o: FT:src/base/ftbase.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftbase.c
|
||||
|
||||
ftinit.ppc.o: FT:src/base/ftinit.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftinit.c
|
||||
|
||||
ftsystem.ppc.o: FT:src/base/ftsystem.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftsystem.c
|
||||
|
||||
# pure version for use in run-time library etc
|
||||
ftsystempure.ppc.o: src/base/ftsystem.c
|
||||
$(CC) -c $(CFLAGS) -o $@ src/base/ftsystem.c
|
||||
|
||||
#
|
||||
# FreeType2 library base extensions
|
||||
#
|
||||
ftbbox.ppc.o: FT:src/base/ftbbox.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftbbox.c
|
||||
|
||||
ftbdf.ppc.o: FT:src/base/ftbdf.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftbdf.c
|
||||
|
||||
ftbitmap.ppc.o: FT:src/base/ftbitmap.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftbitmap.c
|
||||
|
||||
ftcid.ppc.o: FT:src/base/ftcid.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftcid.c
|
||||
|
||||
ftdebug.ppc.o: FT:src/base/ftdebug.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftdebug.c
|
||||
|
||||
# pure version for use in run-time library etc
|
||||
ftdebugpure.ppc.o: src/base/ftdebug.c
|
||||
$(CC) -c $(CFLAGS) -o $@ src/base/ftdebug.c
|
||||
|
||||
ftfntfmt.ppc.o: FT:src/base/ftfntfmt.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftfntfmt.c
|
||||
|
||||
ftfstype.ppc.o: FT:src/base/ftfstype.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftfstype.c
|
||||
|
||||
ftgasp.ppc.o: FT:src/base/ftgasp.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftgasp.c
|
||||
|
||||
ftglyph.ppc.o: FT:src/base/ftglyph.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftglyph.c
|
||||
|
||||
ftgxval.ppc.o: FT:src/base/ftgxval.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftgxval.c
|
||||
|
||||
ftlcdfil.ppc.o: FT:src/base/ftlcdfil.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftlcdfil.c
|
||||
|
||||
ftmm.ppc.o: FT:src/base/ftmm.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftmm.c
|
||||
|
||||
ftotval.ppc.o: FT:src/base/ftotval.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftotval.c
|
||||
|
||||
ftpatent.ppc.o: FT:src/base/ftpatent.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftpatent.c
|
||||
|
||||
ftpfr.ppc.o: FT:src/base/ftpfr.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftpfr.c
|
||||
|
||||
ftstroke.ppc.o: FT:src/base/ftstroke.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftstroke.c
|
||||
|
||||
ftsynth.ppc.o: FT:src/base/ftsynth.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftsynth.c
|
||||
|
||||
fttype1.ppc.o: FT:src/base/fttype1.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/fttype1.c
|
||||
|
||||
ftwinfnt.ppc.o: FT:src/base/ftwinfnt.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftwinfnt.c
|
||||
|
||||
#
|
||||
# FreeType2 library autofitting module
|
||||
#
|
||||
autofit.ppc.o: FT:src/autofit/autofit.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/autofit/autofit.c
|
||||
|
||||
#
|
||||
# FreeType2 library postscript hinting module
|
||||
#
|
||||
pshinter.ppc.o: FT:src/pshinter/pshinter.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/pshinter/pshinter.c
|
||||
|
||||
#
|
||||
# FreeType2 library PS support module
|
||||
#
|
||||
psaux.ppc.o: FT:src/psaux/psaux.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/psaux/psaux.c
|
||||
|
||||
#
|
||||
# FreeType2 library PS glyph names module
|
||||
#
|
||||
psnames.ppc.o: FT:src/psnames/psnames.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/psnames/psnames.c
|
||||
|
||||
#
|
||||
# FreeType2 library monochrome raster module
|
||||
#
|
||||
raster.ppc.o: FT:src/raster/raster.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/raster/raster.c
|
||||
|
||||
#
|
||||
# FreeType2 library anti-aliasing raster module
|
||||
#
|
||||
smooth.ppc.o: FT:src/smooth/smooth.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/smooth/smooth.c
|
||||
|
||||
#
|
||||
# FreeType2 library 'sfnt' module
|
||||
#
|
||||
sfnt.ppc.o: FT:src/sfnt/sfnt.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/sfnt/sfnt.c
|
||||
|
||||
#
|
||||
# FreeType2 library glyph and image caching system
|
||||
#
|
||||
ftcache.ppc.o: FT:src/cache/ftcache.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/cache/ftcache.c
|
||||
|
||||
#
|
||||
# FreeType2 library OpenType font driver
|
||||
#
|
||||
cff.ppc.o: FT:src/cff/cff.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/cff/cff.c
|
||||
|
||||
#
|
||||
# FreeType2 library TrueType font driver
|
||||
#
|
||||
truetype.ppc.o: FT:src/truetype/truetype.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/truetype/truetype.c
|
||||
|
||||
#
|
||||
# FreeType2 library Type1 font driver
|
||||
#
|
||||
type1.ppc.o: FT:src/type1/type1.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/type1/type1.c
|
||||
|
||||
#
|
||||
# FreeType2 library Type42 font driver
|
||||
#
|
||||
type42.ppc.o: FT:src/type42/type42.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/type42/type42.c
|
||||
|
||||
#
|
||||
# FreeType2 library CID-keyed Type1 font driver
|
||||
#
|
||||
type1cid.ppc.o: FT:src/cid/type1cid.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/cid/type1cid.c
|
||||
|
||||
#
|
||||
# FreeType2 library BDF bitmap font driver
|
||||
#
|
||||
bdf.ppc.o: FT:src/bdf/bdf.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/bdf/bdf.c
|
||||
|
||||
#
|
||||
# FreeType2 library PCF bitmap font driver
|
||||
#
|
||||
pcf.ppc.o: FT:src/pcf/pcf.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/pcf/pcf.c
|
||||
|
||||
#
|
||||
# FreeType2 library gzip support for compressed PCF bitmap fonts
|
||||
#
|
||||
gzip.ppc.o: FT:src/gzip/ftgzip.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/gzip/ftgzip.c
|
||||
|
||||
#
|
||||
# FreeType2 library bzip2 support for compressed PCF bitmap fonts
|
||||
#
|
||||
bzip2.ppc.o: FT:src/bzip2/ftbzip2.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/bzip2/ftbzip2.c
|
||||
|
||||
#
|
||||
# FreeType2 library compress support for compressed PCF bitmap fonts
|
||||
#
|
||||
lzw.ppc.o: FT:src/lzw/ftlzw.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/lzw/ftlzw.c
|
||||
|
||||
#
|
||||
# FreeType2 library PFR font driver
|
||||
#
|
||||
pfr.ppc.o: FT:src/pfr/pfr.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/pfr/pfr.c
|
||||
|
||||
#
|
||||
# FreeType2 library Windows FNT/FON bitmap font driver
|
||||
#
|
||||
winfnt.ppc.o: FT:src/winfonts/winfnt.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/winfonts/winfnt.c
|
||||
|
||||
#
|
||||
# FreeType2 library TrueTypeGX Validator
|
||||
#
|
||||
gxvalid.ppc.o: FT:src/gxvalid/gxvalid.c
|
||||
$(CC) -c $(CFLAGS) -Wno-aggregate-return -o $@ /FT/src/gxvalid/gxvalid.c
|
||||
|
||||
#
|
||||
# FreeType2 library OpenType validator
|
||||
#
|
||||
otvalid.ppc.o: FT:src/otvalid/otvalid.c
|
||||
$(CC) -c $(CFLAGS) -o $@ /FT/src/otvalid/otvalid.c
|
||||
|
||||
BASE = ftbase.ppc.o ftbbox.ppc.o ftbdf.ppc.o ftbitmap.ppc.o ftcid.ppc.o \
|
||||
ftfntfmt.ppc.o ftfstype.ppc.o ftgasp.ppc.o ftglyph.ppc.o \
|
||||
ftgxval.ppc.o ftlcdfil.ppc.o ftmm.ppc.o ftotval.ppc.o \
|
||||
ftpatent.ppc.o ftpfr.ppc.o ftstroke.ppc.o ftsynth.ppc.o \
|
||||
fttype1.ppc.o ftwinfnt.ppc.o
|
||||
|
||||
DEBUG = ftdebug.ppc.o ftdebugpure.ppc.o
|
||||
|
||||
AFIT = autofit.ppc.o
|
||||
|
||||
GXV = gxvalid.ppc.o
|
||||
|
||||
OTV = otvalid.ppc.o
|
||||
|
||||
PS = psaux.ppc.o psnames.ppc.o pshinter.ppc.o
|
||||
|
||||
RASTER = raster.ppc.o smooth.ppc.o
|
||||
|
||||
FONTD = cff.ppc.o type1.ppc.o type42.ppc.o type1cid.ppc.o truetype.ppc.o\
|
||||
bdf.ppc.o pcf.ppc.o pfr.ppc.o winfnt.ppc.o
|
||||
|
||||
libft2_ppc.a: $(BASE) $(AFIT) $(GXV) $(OTV) $(PS) $(RASTER) sfnt.ppc.o ftcache.ppc.o $(FONTD) gzip.ppc.o lzw.ppc.o
|
||||
$(AR) r $@ $(BASE) $(AFIT) $(GXV) $(OTV) $(PS) $(RASTER) sfnt.ppc.o ftcache.ppc.o $(FONTD) gzip.ppc.o lzw.ppc.o
|
||||
$(RANLIB) $@
|
||||
|
||||
#Local Variables:
|
||||
#coding: latin-1
|
||||
#End:
|
303
3party/freetype/builds/amiga/smakefile
Normal file
303
3party/freetype/builds/amiga/smakefile
Normal file
|
@ -0,0 +1,303 @@
|
|||
#
|
||||
# Makefile for FreeType2 link library using Amiga SAS/C 6.58
|
||||
#
|
||||
|
||||
|
||||
# Copyright 2005-2015 by
|
||||
# Werner Lemberg and Detlef Würkner.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# to build from the builds/amiga directory call
|
||||
#
|
||||
# smake assign
|
||||
# smake
|
||||
#
|
||||
# Your programs source code should start with this
|
||||
# (uncomment the parts you do not need to keep the program small):
|
||||
# ---8<---
|
||||
#define FT_USE_AUTOFIT // autofitter
|
||||
#define FT_USE_RASTER // monochrome rasterizer
|
||||
#define FT_USE_SMOOTH // anti-aliasing rasterizer
|
||||
#define FT_USE_TT // truetype font driver
|
||||
#define FT_USE_T1 // type1 font driver
|
||||
#define FT_USE_T42 // type42 font driver
|
||||
#define FT_USE_T1CID // cid-keyed type1 font driver
|
||||
#define FT_USE_CFF // opentype font driver
|
||||
#define FT_USE_BDF // bdf bitmap font driver
|
||||
#define FT_USE_PCF // pcf bitmap font driver
|
||||
#define FT_USE_PFR // pfr font driver
|
||||
#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver
|
||||
#define FT_USE_OTV // opentype validator
|
||||
#define FT_USE_GXV // truetype gx validator
|
||||
#include "FT:src/base/ftinit.c"
|
||||
# ---8<---
|
||||
#
|
||||
# link your programs with ft2_680x0.lib and either ftsystem.o or ftsystempure.o
|
||||
# (and either ftdebug.o or ftdebugpure.o if you enabled FT_DEBUG_LEVEL_ERROR or
|
||||
# FT_DEBUG_LEVEL_TRACE in include/freetype/config/ftoption.h).
|
||||
|
||||
OBJBASE = ftbase.o ftbbox.o ftbdf.o ftbitmap.o ftcid.o ftfntfmt.o ftfstype.o \
|
||||
ftgasp.o ftglyph.o ftgxval.o ftlcdfil.o ftmm.o ftotval.o \
|
||||
ftpatent.o ftpfr.o ftstroke.o ftsynth.o fttype1.o ftwinfnt.o
|
||||
|
||||
OBJSYSTEM = ftsystem.o ftsystempure.o
|
||||
|
||||
OBJDEBUG = ftdebug.o ftdebugpure.o
|
||||
|
||||
OBJAFIT = autofit.o
|
||||
|
||||
OBJGXV = gxvalid.o
|
||||
|
||||
OBJOTV = otvalid.o
|
||||
|
||||
OBJPS = psaux.o psnames.o pshinter.o
|
||||
|
||||
OBJRASTER = raster.o smooth.o
|
||||
|
||||
OBJSFNT = sfnt.o
|
||||
|
||||
OBJCACHE = ftcache.o
|
||||
|
||||
OBJFONTD = cff.o type1.o type42.o type1cid.o\
|
||||
truetype.o winfnt.o bdf.o pcf.o pfr.o
|
||||
|
||||
CORE = FT:src/
|
||||
|
||||
CPU = 68000
|
||||
#CPU = 68020
|
||||
#CPU = 68030
|
||||
#CPU = 68040
|
||||
#CPU = 68060
|
||||
|
||||
OPTIMIZER = optinlocal
|
||||
|
||||
SCFLAGS = optimize opttime optsched strmerge data=faronly idlen=50 cpu=$(CPU)\
|
||||
idir=include/ idir=$(CORE) idir=FT:include/ nostackcheck nochkabort\
|
||||
noicons ignore=79,85,110,306 parameters=both define=FT2_BUILD_LIBRARY
|
||||
|
||||
LIB = ft2_$(CPU).lib
|
||||
|
||||
# sample linker options
|
||||
OPTS = link lib=$(LIB),lib:sc.lib,lib:amiga.lib,lib:debug.lib\
|
||||
smallcode smalldata noicons utillib
|
||||
|
||||
# sample program entry
|
||||
#myprog: myprog.c ftsystem.o $(LIB)
|
||||
# sc $< programname=$@ ftsystem.o $(SCFLAGS) $(OPTS)
|
||||
|
||||
all: $(LIB) $(OBJSYSTEM) $(OBJDEBUG)
|
||||
|
||||
assign:
|
||||
assign FT: //
|
||||
|
||||
# uses separate object modules in lib to make for easier debugging
|
||||
# also, can make smaller programs if entire engine is not used
|
||||
ft2_$(CPU).lib: $(OBJBASE) $(OBJAFIT) $(OBJOTV) $(OBJPS) $(OBJRASTER) $(OBJSFNT) $(OBJCACHE) $(OBJFONTD) lzw.o gzip.o bzip2.o
|
||||
oml $@ r $(OBJBASE) $(OBJAFIT) $(OBJOTV) $(OBJPS) $(OBJRASTER) $(OBJSFNT) $(OBJCACHE) $(OBJFONTD) lzw.o gzip.o bzip2.o
|
||||
|
||||
clean:
|
||||
-delete \#?.o
|
||||
|
||||
realclean: clean
|
||||
-delete ft2$(CPU).lib
|
||||
|
||||
#
|
||||
# freetype library base
|
||||
#
|
||||
ftbase.o: $(CORE)base/ftbase.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftinit.o: $(CORE)base/ftinit.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftsystem.o: $(CORE)base/ftsystem.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftsystempure.o: src/base/ftsystem.c ## pure version for use in run-time library etc
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftdebug.o: $(CORE)base/ftdebug.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftdebugpure.o: src/base/ftdebug.c ## pure version for use in run-time library etc
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
#
|
||||
# freetype library base extensions
|
||||
#
|
||||
ftbbox.o: $(CORE)base/ftbbox.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftbdf.o: $(CORE)base/ftbdf.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftbitmap.o: $(CORE)base/ftbitmap.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftcid.o: $(CORE)base/ftcid.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftfntfmt.o: $(CORE)base/ftfntfmt.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftfstype.o: $(CORE)base/ftfstype.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftgasp.o: $(CORE)base/ftgasp.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftglyph.o: $(CORE)base/ftglyph.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftgxval.o: $(CORE)base/ftgxval.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftlcdfil.o: $(CORE)base/ftlcdfil.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftmm.o: $(CORE)base/ftmm.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftotval.o: $(CORE)base/ftotval.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftpatent.o: $(CORE)base/ftpatent.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftpfr.o: $(CORE)base/ftpfr.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftstroke.o: $(CORE)base/ftstroke.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftsynth.o: $(CORE)base/ftsynth.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
fttype1.o: $(CORE)base/fttype1.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
ftwinfnt.o: $(CORE)base/ftwinfnt.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library autofitter module
|
||||
#
|
||||
autofit.o: $(CORE)autofit/autofit.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library PS hinting module
|
||||
#
|
||||
pshinter.o: $(CORE)pshinter/pshinter.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
#
|
||||
# freetype library PS support module
|
||||
#
|
||||
psaux.o: $(CORE)psaux/psaux.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library PS glyph names module
|
||||
#
|
||||
psnames.o: $(CORE)psnames/psnames.c
|
||||
sc $(SCFLAGS) code=far objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library monochrome raster module
|
||||
#
|
||||
raster.o: $(CORE)raster/raster.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library anti-aliasing raster module
|
||||
#
|
||||
smooth.o: $(CORE)smooth/smooth.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library 'sfnt' module
|
||||
#
|
||||
sfnt.o: $(CORE)sfnt/sfnt.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library glyph and image caching system (still experimental)
|
||||
#
|
||||
ftcache.o: $(CORE)cache/ftcache.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library OpenType font driver
|
||||
#
|
||||
cff.o: $(CORE)cff/cff.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library TrueType font driver
|
||||
#
|
||||
truetype.o: $(CORE)truetype/truetype.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library Type1 font driver
|
||||
#
|
||||
type1.o: $(CORE)type1/type1.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# FreeType2 library Type42 font driver
|
||||
#
|
||||
type42.o: $(CORE)type42/type42.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library CID-keyed Type1 font driver
|
||||
#
|
||||
type1cid.o: $(CORE)cid/type1cid.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
#
|
||||
# freetype library CID-keyed Type1 font driver extensions
|
||||
#
|
||||
#cidafm.o: $(CORE)cid/cidafm.c
|
||||
# sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library BDF bitmap font driver
|
||||
#
|
||||
bdf.o: $(CORE)bdf/bdf.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library PCF bitmap font driver
|
||||
#
|
||||
pcf.o: $(CORE)pcf/pcf.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library gzip support for compressed PCF bitmap fonts
|
||||
#
|
||||
gzip.o: $(CORE)gzip/ftgzip.c
|
||||
sc $(SCFLAGS) define FAR objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library bzip2 support for compressed PCF bitmap fonts
|
||||
#
|
||||
bzip2.o: $(CORE)bzip2/ftbzip2.c
|
||||
sc $(SCFLAGS) define FAR objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library compress support for compressed PCF bitmap fonts
|
||||
#
|
||||
lzw.o: $(CORE)lzw/ftlzw.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library PFR font driver
|
||||
#
|
||||
pfr.o: $(CORE)pfr/pfr.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library Windows FNT/FON bitmap font driver
|
||||
#
|
||||
winfnt.o: $(CORE)winfonts/winfnt.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library TrueTypeGX validator
|
||||
#
|
||||
gxvalid.o: $(CORE)gxvalid/gxvalid.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#
|
||||
# freetype library OpenType validator
|
||||
#
|
||||
otvalid.o: $(CORE)otvalid/otvalid.c
|
||||
sc $(SCFLAGS) objname=$@ $<
|
||||
|
||||
#Local Variables:
|
||||
#coding: latin-1
|
||||
#End:
|
297
3party/freetype/builds/amiga/src/base/ftdebug.c
Normal file
297
3party/freetype/builds/amiga/src/base/ftdebug.c
Normal file
|
@ -0,0 +1,297 @@
|
|||
/***************************************************************************/
|
||||
/* */
|
||||
/* ftdebug.c */
|
||||
/* */
|
||||
/* Debugging and logging component for amiga (body). */
|
||||
/* */
|
||||
/* Copyright 1996-2015 by */
|
||||
/* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
/* modified, and distributed under the terms of the FreeType project */
|
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
||||
/* this file you indicate that you have read the license and */
|
||||
/* understand and accept it fully. */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* This component contains various macros and functions used to ease the */
|
||||
/* debugging of the FreeType engine. Its main purpose is in assertion */
|
||||
/* checking, tracing, and error detection. */
|
||||
/* */
|
||||
/* There are now three debugging modes: */
|
||||
/* */
|
||||
/* - trace mode */
|
||||
/* */
|
||||
/* Error and trace messages are sent to the log file (which can be the */
|
||||
/* standard error output). */
|
||||
/* */
|
||||
/* - error mode */
|
||||
/* */
|
||||
/* Only error messages are generated. */
|
||||
/* */
|
||||
/* - release mode: */
|
||||
/* */
|
||||
/* No error message is sent or generated. The code is free from any */
|
||||
/* debugging parts. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/*
|
||||
* Based on the default ftdebug.c,
|
||||
* replaced vprintf() with KVPrintF(),
|
||||
* commented out exit(),
|
||||
* replaced getenv() with GetVar().
|
||||
*/
|
||||
|
||||
#include <exec/types.h>
|
||||
#include <utility/tagitem.h>
|
||||
#include <dos/exall.h>
|
||||
#include <dos/var.h>
|
||||
#define __NOLIBBASE__
|
||||
#define __NOLOBALIFACE__
|
||||
#define __USE_INLINE__
|
||||
#include <proto/dos.h>
|
||||
#include <clib/debug_protos.h>
|
||||
|
||||
#ifndef __amigaos4__
|
||||
extern struct Library *DOSBase;
|
||||
#else
|
||||
extern struct DOSIFace *IDOS;
|
||||
#endif
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
#include FT_INTERNAL_DEBUG_H
|
||||
|
||||
|
||||
#if defined( FT_DEBUG_LEVEL_ERROR )
|
||||
|
||||
/* documentation is in ftdebug.h */
|
||||
|
||||
FT_BASE_DEF( void )
|
||||
FT_Message( const char* fmt,
|
||||
... )
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
|
||||
va_start( ap, fmt );
|
||||
KVPrintF( fmt, ap );
|
||||
va_end( ap );
|
||||
}
|
||||
|
||||
|
||||
/* documentation is in ftdebug.h */
|
||||
|
||||
FT_BASE_DEF( void )
|
||||
FT_Panic( const char* fmt,
|
||||
... )
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
|
||||
va_start( ap, fmt );
|
||||
KVPrintF( fmt, ap );
|
||||
va_end( ap );
|
||||
|
||||
/* exit( EXIT_FAILURE ); */
|
||||
}
|
||||
|
||||
|
||||
/* documentation is in ftdebug.h */
|
||||
|
||||
FT_BASE_DEF( int )
|
||||
FT_Throw( FT_Error error,
|
||||
int line,
|
||||
const char* file )
|
||||
{
|
||||
FT_UNUSED( error );
|
||||
FT_UNUSED( line );
|
||||
FT_UNUSED( file );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* FT_DEBUG_LEVEL_ERROR */
|
||||
|
||||
|
||||
|
||||
#ifdef FT_DEBUG_LEVEL_TRACE
|
||||
|
||||
/* array of trace levels, initialized to 0 */
|
||||
int ft_trace_levels[trace_count];
|
||||
|
||||
|
||||
/* define array of trace toggle names */
|
||||
#define FT_TRACE_DEF( x ) #x ,
|
||||
|
||||
static const char* ft_trace_toggles[trace_count + 1] =
|
||||
{
|
||||
#include FT_INTERNAL_TRACE_H
|
||||
NULL
|
||||
};
|
||||
|
||||
#undef FT_TRACE_DEF
|
||||
|
||||
|
||||
/* documentation is in ftdebug.h */
|
||||
|
||||
FT_BASE_DEF( FT_Int )
|
||||
FT_Trace_Get_Count( void )
|
||||
{
|
||||
return trace_count;
|
||||
}
|
||||
|
||||
|
||||
/* documentation is in ftdebug.h */
|
||||
|
||||
FT_BASE_DEF( const char * )
|
||||
FT_Trace_Get_Name( FT_Int idx )
|
||||
{
|
||||
int max = FT_Trace_Get_Count();
|
||||
|
||||
|
||||
if ( idx < max )
|
||||
return ft_trace_toggles[idx];
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Initialize the tracing sub-system. This is done by retrieving the */
|
||||
/* value of the `FT2_DEBUG' environment variable. It must be a list of */
|
||||
/* toggles, separated by spaces, `;', or `,'. Example: */
|
||||
/* */
|
||||
/* export FT2_DEBUG="any:3 memory:7 stream:5" */
|
||||
/* */
|
||||
/* This requests that all levels be set to 3, except the trace level for */
|
||||
/* the memory and stream components which are set to 7 and 5, */
|
||||
/* respectively. */
|
||||
/* */
|
||||
/* See the file `include/freetype/internal/fttrace.h' for details of the */
|
||||
/* available toggle names. */
|
||||
/* */
|
||||
/* The level must be between 0 and 7; 0 means quiet (except for serious */
|
||||
/* runtime errors), and 7 means _very_ verbose. */
|
||||
/* */
|
||||
FT_BASE_DEF( void )
|
||||
ft_debug_init( void )
|
||||
{
|
||||
/* const char* ft2_debug = getenv( "FT2_DEBUG" ); */
|
||||
char buf[256];
|
||||
const char* ft2_debug = &buf[0];
|
||||
|
||||
|
||||
/* if ( ft2_debug ) */
|
||||
if ( GetVar( "FT2_DEBUG", (STRPTR)ft2_debug, 256, LV_VAR ) > 0 )
|
||||
{
|
||||
const char* p = ft2_debug;
|
||||
const char* q;
|
||||
|
||||
|
||||
for ( ; *p; p++ )
|
||||
{
|
||||
/* skip leading whitespace and separators */
|
||||
if ( *p == ' ' || *p == '\t' || *p == ',' || *p == ';' || *p == '=' )
|
||||
continue;
|
||||
|
||||
/* read toggle name, followed by ':' */
|
||||
q = p;
|
||||
while ( *p && *p != ':' )
|
||||
p++;
|
||||
|
||||
if ( !*p )
|
||||
break;
|
||||
|
||||
if ( *p == ':' && p > q )
|
||||
{
|
||||
FT_Int n, i, len = (FT_Int)( p - q );
|
||||
FT_Int level = -1, found = -1;
|
||||
|
||||
|
||||
for ( n = 0; n < trace_count; n++ )
|
||||
{
|
||||
const char* toggle = ft_trace_toggles[n];
|
||||
|
||||
|
||||
for ( i = 0; i < len; i++ )
|
||||
{
|
||||
if ( toggle[i] != q[i] )
|
||||
break;
|
||||
}
|
||||
|
||||
if ( i == len && toggle[i] == 0 )
|
||||
{
|
||||
found = n;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* read level */
|
||||
p++;
|
||||
if ( *p )
|
||||
{
|
||||
level = *p - '0';
|
||||
if ( level < 0 || level > 7 )
|
||||
level = -1;
|
||||
}
|
||||
|
||||
if ( found >= 0 && level >= 0 )
|
||||
{
|
||||
if ( found == trace_any )
|
||||
{
|
||||
/* special case for `any' */
|
||||
for ( n = 0; n < trace_count; n++ )
|
||||
ft_trace_levels[n] = level;
|
||||
}
|
||||
else
|
||||
ft_trace_levels[found] = level;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#else /* !FT_DEBUG_LEVEL_TRACE */
|
||||
|
||||
|
||||
FT_BASE_DEF( void )
|
||||
ft_debug_init( void )
|
||||
{
|
||||
/* nothing */
|
||||
}
|
||||
|
||||
|
||||
FT_BASE_DEF( FT_Int )
|
||||
FT_Trace_Get_Count( void )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
FT_BASE_DEF( const char * )
|
||||
FT_Trace_Get_Name( FT_Int idx )
|
||||
{
|
||||
FT_UNUSED( idx );
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
#endif /* !FT_DEBUG_LEVEL_TRACE */
|
||||
|
||||
/*
|
||||
Local Variables:
|
||||
coding: latin-1
|
||||
End:
|
||||
*/
|
||||
/* END */
|
530
3party/freetype/builds/amiga/src/base/ftsystem.c
Normal file
530
3party/freetype/builds/amiga/src/base/ftsystem.c
Normal file
|
@ -0,0 +1,530 @@
|
|||
/***************************************************************************/
|
||||
/* */
|
||||
/* ftsystem.c */
|
||||
/* */
|
||||
/* Amiga-specific FreeType low-level system interface (body). */
|
||||
/* */
|
||||
/* Copyright 1996-2015 by */
|
||||
/* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
/* modified, and distributed under the terms of the FreeType project */
|
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
||||
/* this file you indicate that you have read the license and */
|
||||
/* understand and accept it fully. */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* This file contains the Amiga interface used by FreeType to access */
|
||||
/* low-level, i.e. memory management, i/o access as well as thread */
|
||||
/* synchronisation. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Maintained by Detlef Würkner <TetiSoft@apg.lahn.de> */
|
||||
/* */
|
||||
/* Based on the original ftsystem.c, */
|
||||
/* modified to avoid fopen(), fclose(), fread(), fseek(), ftell(), */
|
||||
/* malloc(), realloc(), and free(). */
|
||||
/* */
|
||||
/* Those C library functions are often not thread-safe or cant be */
|
||||
/* used in a shared Amiga library. If that's not a problem for you, */
|
||||
/* you can of course use the default ftsystem.c with C library calls */
|
||||
/* instead. */
|
||||
/* */
|
||||
/* This implementation needs exec V39+ because it uses AllocPooled() etc */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
#define __NOLIBBASE__
|
||||
#define __NOGLOBALIFACE__
|
||||
#define __USE_INLINE__
|
||||
#include <proto/exec.h>
|
||||
#include <dos/stdio.h>
|
||||
#include <proto/dos.h>
|
||||
#ifdef __amigaos4__
|
||||
extern struct ExecIFace *IExec;
|
||||
extern struct DOSIFace *IDOS;
|
||||
#else
|
||||
extern struct Library *SysBase;
|
||||
extern struct Library *DOSBase;
|
||||
#endif
|
||||
|
||||
#define IOBUF_SIZE 512
|
||||
|
||||
/* structure that helps us to avoid
|
||||
* useless calls of Seek() and Read()
|
||||
*/
|
||||
struct SysFile
|
||||
{
|
||||
BPTR file;
|
||||
ULONG iobuf_start;
|
||||
ULONG iobuf_end;
|
||||
UBYTE iobuf[IOBUF_SIZE];
|
||||
};
|
||||
|
||||
#ifndef __amigaos4__
|
||||
/* C implementation of AllocVecPooled (see autodoc exec/AllocPooled) */
|
||||
APTR
|
||||
Alloc_VecPooled( APTR poolHeader,
|
||||
ULONG memSize )
|
||||
{
|
||||
ULONG newSize = memSize + sizeof ( ULONG );
|
||||
ULONG *mem = AllocPooled( poolHeader, newSize );
|
||||
|
||||
if ( !mem )
|
||||
return NULL;
|
||||
*mem = newSize;
|
||||
return mem + 1;
|
||||
}
|
||||
|
||||
/* C implementation of FreeVecPooled (see autodoc exec/AllocPooled) */
|
||||
void
|
||||
Free_VecPooled( APTR poolHeader,
|
||||
APTR memory )
|
||||
{
|
||||
ULONG *realmem = (ULONG *)memory - 1;
|
||||
|
||||
FreePooled( poolHeader, realmem, *realmem );
|
||||
}
|
||||
#endif
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_CONFIG_CONFIG_H
|
||||
#include FT_INTERNAL_DEBUG_H
|
||||
#include FT_SYSTEM_H
|
||||
#include FT_ERRORS_H
|
||||
#include FT_TYPES_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* MEMORY MANAGEMENT INTERFACE */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* It is not necessary to do any error checking for the */
|
||||
/* allocation-related functions. This is done by the higher level */
|
||||
/* routines like ft_mem_alloc() or ft_mem_realloc(). */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* ft_alloc */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* The memory allocation function. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* memory :: A pointer to the memory object. */
|
||||
/* */
|
||||
/* size :: The requested size in bytes. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* The address of newly allocated block. */
|
||||
/* */
|
||||
FT_CALLBACK_DEF( void* )
|
||||
ft_alloc( FT_Memory memory,
|
||||
long size )
|
||||
{
|
||||
#ifdef __amigaos4__
|
||||
return AllocVecPooled( memory->user, size );
|
||||
#else
|
||||
return Alloc_VecPooled( memory->user, size );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* ft_realloc */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* The memory reallocation function. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* memory :: A pointer to the memory object. */
|
||||
/* */
|
||||
/* cur_size :: The current size of the allocated memory block. */
|
||||
/* */
|
||||
/* new_size :: The newly requested size in bytes. */
|
||||
/* */
|
||||
/* block :: The current address of the block in memory. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* The address of the reallocated memory block. */
|
||||
/* */
|
||||
FT_CALLBACK_DEF( void* )
|
||||
ft_realloc( FT_Memory memory,
|
||||
long cur_size,
|
||||
long new_size,
|
||||
void* block )
|
||||
{
|
||||
void* new_block;
|
||||
|
||||
#ifdef __amigaos4__
|
||||
new_block = AllocVecPooled ( memory->user, new_size );
|
||||
#else
|
||||
new_block = Alloc_VecPooled ( memory->user, new_size );
|
||||
#endif
|
||||
if ( new_block != NULL )
|
||||
{
|
||||
CopyMem ( block, new_block,
|
||||
( new_size > cur_size ) ? cur_size : new_size );
|
||||
#ifdef __amigaos4__
|
||||
FreeVecPooled ( memory->user, block );
|
||||
#else
|
||||
Free_VecPooled ( memory->user, block );
|
||||
#endif
|
||||
}
|
||||
return new_block;
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* ft_free */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* The memory release function. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* memory :: A pointer to the memory object. */
|
||||
/* */
|
||||
/* block :: The address of block in memory to be freed. */
|
||||
/* */
|
||||
FT_CALLBACK_DEF( void )
|
||||
ft_free( FT_Memory memory,
|
||||
void* block )
|
||||
{
|
||||
#ifdef __amigaos4__
|
||||
FreeVecPooled( memory->user, block );
|
||||
#else
|
||||
Free_VecPooled( memory->user, block );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* RESOURCE MANAGEMENT INTERFACE */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* The macro FT_COMPONENT is used in trace mode. It is an implicit */
|
||||
/* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
|
||||
/* messages during execution. */
|
||||
/* */
|
||||
#undef FT_COMPONENT
|
||||
#define FT_COMPONENT trace_io
|
||||
|
||||
/* We use the macro STREAM_FILE for convenience to extract the */
|
||||
/* system-specific stream handle from a given FreeType stream object */
|
||||
#define STREAM_FILE( stream ) ( (struct SysFile *)stream->descriptor.pointer )
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* ft_amiga_stream_close */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* The function to close a stream. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* stream :: A pointer to the stream object. */
|
||||
/* */
|
||||
FT_CALLBACK_DEF( void )
|
||||
ft_amiga_stream_close( FT_Stream stream )
|
||||
{
|
||||
struct SysFile* sysfile;
|
||||
|
||||
sysfile = STREAM_FILE( stream );
|
||||
Close ( sysfile->file );
|
||||
FreeMem ( sysfile, sizeof ( struct SysFile ));
|
||||
|
||||
stream->descriptor.pointer = NULL;
|
||||
stream->size = 0;
|
||||
stream->base = 0;
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* ft_amiga_stream_io */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* The function to open a stream. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* stream :: A pointer to the stream object. */
|
||||
/* */
|
||||
/* offset :: The position in the data stream to start reading. */
|
||||
/* */
|
||||
/* buffer :: The address of buffer to store the read data. */
|
||||
/* */
|
||||
/* count :: The number of bytes to read from the stream. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* The number of bytes actually read. */
|
||||
/* */
|
||||
FT_CALLBACK_DEF( unsigned long )
|
||||
ft_amiga_stream_io( FT_Stream stream,
|
||||
unsigned long offset,
|
||||
unsigned char* buffer,
|
||||
unsigned long count )
|
||||
{
|
||||
struct SysFile* sysfile;
|
||||
unsigned long read_bytes;
|
||||
|
||||
if ( count != 0 )
|
||||
{
|
||||
sysfile = STREAM_FILE( stream );
|
||||
|
||||
/* handle the seek */
|
||||
if ( (offset < sysfile->iobuf_start) || (offset + count > sysfile->iobuf_end) )
|
||||
{
|
||||
/* requested offset implies we need a buffer refill */
|
||||
if ( !sysfile->iobuf_end || offset != sysfile->iobuf_end )
|
||||
{
|
||||
/* a physical seek is necessary */
|
||||
Seek( sysfile->file, offset, OFFSET_BEGINNING );
|
||||
}
|
||||
sysfile->iobuf_start = offset;
|
||||
sysfile->iobuf_end = 0; /* trigger a buffer refill */
|
||||
}
|
||||
|
||||
/* handle the read */
|
||||
if ( offset + count <= sysfile->iobuf_end )
|
||||
{
|
||||
/* we have buffer and requested bytes are all inside our buffer */
|
||||
CopyMem( &sysfile->iobuf[offset - sysfile->iobuf_start], buffer, count );
|
||||
read_bytes = count;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* (re)fill buffer */
|
||||
if ( count <= IOBUF_SIZE )
|
||||
{
|
||||
/* requested bytes is a subset of the buffer */
|
||||
read_bytes = Read( sysfile->file, sysfile->iobuf, IOBUF_SIZE );
|
||||
if ( read_bytes == -1UL )
|
||||
{
|
||||
/* error */
|
||||
read_bytes = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
sysfile->iobuf_end = offset + read_bytes;
|
||||
CopyMem( sysfile->iobuf, buffer, count );
|
||||
if ( read_bytes > count )
|
||||
{
|
||||
read_bytes = count;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* we actually need more than our buffer can hold, so we decide
|
||||
** to do a single big read, and then copy the last IOBUF_SIZE
|
||||
** bytes of that to our internal buffer for later use */
|
||||
read_bytes = Read( sysfile->file, buffer, count );
|
||||
if ( read_bytes == -1UL )
|
||||
{
|
||||
/* error */
|
||||
read_bytes = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
ULONG bufsize;
|
||||
|
||||
bufsize = ( read_bytes > IOBUF_SIZE ) ? IOBUF_SIZE : read_bytes;
|
||||
sysfile->iobuf_end = offset + read_bytes;
|
||||
sysfile->iobuf_start = sysfile->iobuf_end - bufsize;
|
||||
CopyMem( &buffer[read_bytes - bufsize] , sysfile->iobuf, bufsize );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
read_bytes = 0;
|
||||
}
|
||||
|
||||
return read_bytes;
|
||||
}
|
||||
|
||||
|
||||
/* documentation is in ftobjs.h */
|
||||
|
||||
FT_BASE_DEF( FT_Error )
|
||||
FT_Stream_Open( FT_Stream stream,
|
||||
const char* filepathname )
|
||||
{
|
||||
struct FileInfoBlock* fib;
|
||||
struct SysFile* sysfile;
|
||||
|
||||
|
||||
if ( !stream )
|
||||
return FT_THROW( Invalid_Stream_Handle );
|
||||
|
||||
#ifdef __amigaos4__
|
||||
sysfile = AllocMem ( sizeof (struct SysFile ), MEMF_SHARED );
|
||||
#else
|
||||
sysfile = AllocMem ( sizeof (struct SysFile ), MEMF_PUBLIC );
|
||||
#endif
|
||||
if ( !sysfile )
|
||||
{
|
||||
FT_ERROR(( "FT_Stream_Open:" ));
|
||||
FT_ERROR(( " could not open `%s'\n", filepathname ));
|
||||
|
||||
return FT_THROW( Cannot_Open_Resource );
|
||||
}
|
||||
sysfile->file = Open( (STRPTR)filepathname, MODE_OLDFILE );
|
||||
if ( !sysfile->file )
|
||||
{
|
||||
FreeMem ( sysfile, sizeof ( struct SysFile ));
|
||||
FT_ERROR(( "FT_Stream_Open:" ));
|
||||
FT_ERROR(( " could not open `%s'\n", filepathname ));
|
||||
|
||||
return FT_THROW( Cannot_Open_Resource );
|
||||
}
|
||||
|
||||
fib = AllocDosObject( DOS_FIB, NULL );
|
||||
if ( !fib )
|
||||
{
|
||||
Close ( sysfile->file );
|
||||
FreeMem ( sysfile, sizeof ( struct SysFile ));
|
||||
FT_ERROR(( "FT_Stream_Open:" ));
|
||||
FT_ERROR(( " could not open `%s'\n", filepathname ));
|
||||
|
||||
return FT_THROW( Cannot_Open_Resource );
|
||||
}
|
||||
if ( !( ExamineFH( sysfile->file, fib ) ) )
|
||||
{
|
||||
FreeDosObject( DOS_FIB, fib );
|
||||
Close ( sysfile->file );
|
||||
FreeMem ( sysfile, sizeof ( struct SysFile ));
|
||||
FT_ERROR(( "FT_Stream_Open:" ));
|
||||
FT_ERROR(( " could not open `%s'\n", filepathname ));
|
||||
|
||||
return FT_THROW( Cannot_Open_Resource );
|
||||
}
|
||||
stream->size = fib->fib_Size;
|
||||
FreeDosObject( DOS_FIB, fib );
|
||||
|
||||
stream->descriptor.pointer = (void *)sysfile;
|
||||
stream->pathname.pointer = (char*)filepathname;
|
||||
sysfile->iobuf_start = 0;
|
||||
sysfile->iobuf_end = 0;
|
||||
stream->pos = 0;
|
||||
|
||||
stream->read = ft_amiga_stream_io;
|
||||
stream->close = ft_amiga_stream_close;
|
||||
|
||||
if ( !stream->size )
|
||||
{
|
||||
ft_amiga_stream_close( stream );
|
||||
FT_ERROR(( "FT_Stream_Open:" ));
|
||||
FT_ERROR(( " opened `%s' but zero-sized\n", filepathname ));
|
||||
return FT_THROW( Cannot_Open_Stream );
|
||||
}
|
||||
|
||||
FT_TRACE1(( "FT_Stream_Open:" ));
|
||||
FT_TRACE1(( " opened `%s' (%ld bytes) successfully\n",
|
||||
filepathname, stream->size ));
|
||||
|
||||
return FT_Err_Ok;
|
||||
}
|
||||
|
||||
|
||||
#ifdef FT_DEBUG_MEMORY
|
||||
|
||||
extern FT_Int
|
||||
ft_mem_debug_init( FT_Memory memory );
|
||||
|
||||
extern void
|
||||
ft_mem_debug_done( FT_Memory memory );
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* documentation is in ftobjs.h */
|
||||
|
||||
FT_BASE_DEF( FT_Memory )
|
||||
FT_New_Memory( void )
|
||||
{
|
||||
FT_Memory memory;
|
||||
|
||||
|
||||
#ifdef __amigaos4__
|
||||
memory = (FT_Memory)AllocVec( sizeof ( *memory ), MEMF_SHARED );
|
||||
#else
|
||||
memory = (FT_Memory)AllocVec( sizeof ( *memory ), MEMF_PUBLIC );
|
||||
#endif
|
||||
if ( memory )
|
||||
{
|
||||
#ifdef __amigaos4__
|
||||
memory->user = CreatePool( MEMF_SHARED, 16384, 16384 );
|
||||
#else
|
||||
memory->user = CreatePool( MEMF_PUBLIC, 16384, 16384 );
|
||||
#endif
|
||||
if ( memory->user == NULL )
|
||||
{
|
||||
FreeVec( memory );
|
||||
memory = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
memory->alloc = ft_alloc;
|
||||
memory->realloc = ft_realloc;
|
||||
memory->free = ft_free;
|
||||
#ifdef FT_DEBUG_MEMORY
|
||||
ft_mem_debug_init( memory );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
return memory;
|
||||
}
|
||||
|
||||
|
||||
/* documentation is in ftobjs.h */
|
||||
|
||||
FT_BASE_DEF( void )
|
||||
FT_Done_Memory( FT_Memory memory )
|
||||
{
|
||||
#ifdef FT_DEBUG_MEMORY
|
||||
ft_mem_debug_done( memory );
|
||||
#endif
|
||||
|
||||
DeletePool( memory->user );
|
||||
FreeVec( memory );
|
||||
}
|
||||
|
||||
/*
|
||||
Local Variables:
|
||||
coding: latin-1
|
||||
End:
|
||||
*/
|
||||
/* END */
|
74
3party/freetype/builds/ansi/ansi-def.mk
Normal file
74
3party/freetype/builds/ansi/ansi-def.mk
Normal file
|
@ -0,0 +1,74 @@
|
|||
#
|
||||
# FreeType 2 configuration rules for a `normal' ANSI system
|
||||
#
|
||||
|
||||
|
||||
# Copyright 1996-2015 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
DELETE := rm -f
|
||||
CAT := cat
|
||||
SEP := /
|
||||
BUILD_DIR := $(TOP_DIR)/builds/ansi
|
||||
PLATFORM := ansi
|
||||
|
||||
|
||||
# The directory where all library files are placed.
|
||||
#
|
||||
# By default, this is the same as $(OBJ_DIR); however, this can be changed
|
||||
# to suit particular needs.
|
||||
#
|
||||
LIB_DIR := $(OBJ_DIR)
|
||||
|
||||
|
||||
# The name of the final library file. Note that the DOS-specific Makefile
|
||||
# uses a shorter (8.3) name.
|
||||
#
|
||||
LIBRARY := lib$(PROJECT)
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := -I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := -D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L := -l
|
||||
|
||||
|
||||
# Target flag.
|
||||
#
|
||||
T := -o$(space)
|
||||
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
|
||||
# ANSI compliance.
|
||||
#
|
||||
CFLAGS ?= -c
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
ANSIFLAGS :=
|
||||
|
||||
|
||||
# EOF
|
21
3party/freetype/builds/ansi/ansi.mk
Normal file
21
3party/freetype/builds/ansi/ansi.mk
Normal file
|
@ -0,0 +1,21 @@
|
|||
#
|
||||
# FreeType 2 configuration rules for a `normal' pseudo ANSI compiler/system
|
||||
#
|
||||
|
||||
|
||||
# Copyright 1996-2015 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
include $(TOP_DIR)/builds/ansi/ansi-def.mk
|
||||
include $(TOP_DIR)/builds/compiler/ansi-cc.mk
|
||||
include $(TOP_DIR)/builds/link_std.mk
|
||||
|
||||
|
||||
# EOF
|
20
3party/freetype/builds/atari/ATARI.H
Normal file
20
3party/freetype/builds/atari/ATARI.H
Normal file
|
@ -0,0 +1,20 @@
|
|||
#if defined( __GXVALID_H__ )
|
||||
#pragma warn -aus /* too many unevaluated variables in gxvalid */
|
||||
#endif
|
||||
|
||||
#ifndef ATARI_H
|
||||
#define ATARI_H
|
||||
|
||||
#pragma warn -stu
|
||||
|
||||
/* PureC doesn't like 32bit enumerations */
|
||||
|
||||
#ifndef FT_IMAGE_TAG
|
||||
#define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) value
|
||||
#endif /* FT_IMAGE_TAG */
|
||||
|
||||
#ifndef FT_ENC_TAG
|
||||
#define FT_ENC_TAG( value, a, b, c, d ) value
|
||||
#endif /* FT_ENC_TAG */
|
||||
|
||||
#endif /* ATARI_H */
|
37
3party/freetype/builds/atari/FNames.SIC
Normal file
37
3party/freetype/builds/atari/FNames.SIC
Normal file
|
@ -0,0 +1,37 @@
|
|||
/* the following changes file names for PureC projects */
|
||||
|
||||
if (argc > 0)
|
||||
{
|
||||
ordner = argv[0];
|
||||
if (basename(ordner) == "") /* ist Ordner */
|
||||
{
|
||||
ChangeFilenames(ordner);
|
||||
}
|
||||
}
|
||||
|
||||
proc ChangeFilenames(folder)
|
||||
local i,entries,directory,file;
|
||||
{
|
||||
entries = filelist(directory,folder);
|
||||
for (i = 0; i < entries; ++i)
|
||||
{
|
||||
file = directory[i,0];
|
||||
if ((directory[i,3]&16) > 0) /* subdirectory */
|
||||
{
|
||||
ChangeFilenames(folder+file+"\\");
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((stricmp(suffix(file),".h")==0)|(stricmp(suffix(file),".c")==0))
|
||||
ChangeFilename(folder,file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
proc ChangeFilename(path,datei)
|
||||
local newfile,err;
|
||||
{
|
||||
newfile=datei;
|
||||
newfile[0]=(newfile[0] | 32) ^ 32;
|
||||
err=files.rename("-q",path+datei,newfile);
|
||||
}
|
32
3party/freetype/builds/atari/FREETYPE.PRJ
Normal file
32
3party/freetype/builds/atari/FREETYPE.PRJ
Normal file
|
@ -0,0 +1,32 @@
|
|||
;FreeType project file
|
||||
|
||||
FREETYPE.LIB
|
||||
|
||||
.C [-K -P -R -A]
|
||||
.L [-J -V]
|
||||
.S
|
||||
|
||||
=
|
||||
|
||||
..\..\src\base\ftsystem.c
|
||||
..\..\src\base\ftdebug.c
|
||||
|
||||
..\..\src\base\ftinit.c
|
||||
..\..\src\base\ftglyph.c
|
||||
..\..\src\base\ftmm
|
||||
..\..\src\base\ftbbox
|
||||
|
||||
..\..\src\base\ftbase.c
|
||||
..\..\src\autohint\autohint.c
|
||||
;..\..\src\cache\ftcache.c
|
||||
..\..\src\cff\cff.c
|
||||
..\..\src\cid\type1cid.c
|
||||
..\..\src\psaux\psaux.c
|
||||
..\..\src\pshinter\pshinter.c
|
||||
..\..\src\psnames\psnames.c
|
||||
..\..\src\raster\raster.c
|
||||
..\..\src\sfnt\sfnt.c
|
||||
..\..\src\smooth\smooth.c
|
||||
..\..\src\truetype\truetype.c
|
||||
..\..\src\type1\type1.c
|
||||
..\..\src\type42\type42.c
|
51
3party/freetype/builds/atari/README.TXT
Normal file
51
3party/freetype/builds/atari/README.TXT
Normal file
|
@ -0,0 +1,51 @@
|
|||
Compiling FreeType 2 with PureC compiler
|
||||
========================================
|
||||
|
||||
[See below for a German version.]
|
||||
|
||||
To compile FreeType 2 as a library the following changes must be applied:
|
||||
|
||||
- All *.c files must start with an uppercase letter.
|
||||
(In case GEMSCRIPT is available:
|
||||
Simply drag the whole FreeType 2 directory to the file `FNames.SIC'.)
|
||||
|
||||
- You have to change the INCLUDE directory in PureC's compiler options
|
||||
to contain both the `INCLUDE' and `freetype2\include' directory.
|
||||
Example:
|
||||
|
||||
INCLUDE;E:\freetype2\include
|
||||
|
||||
- The file `freetype2/include/Ft2build.h' must be patched as follows to
|
||||
include ATARI.H:
|
||||
|
||||
#ifndef __FT2_BUILD_GENERIC_H__
|
||||
#define __FT2_BUILD_GENERIC_H__
|
||||
|
||||
#include "ATARI.H"
|
||||
|
||||
|
||||
|
||||
Compilieren von FreeType 2 mit PureC
|
||||
====================================
|
||||
|
||||
Um FreeType 2 als eine Bibliothek (library) zu compilieren, muss folgendes
|
||||
ge„ndert werden:
|
||||
|
||||
- Alle *.c-files m<>ssen mit einem GROSSBUCHSTABEN beginnen.
|
||||
(Falls GEMSCRIPT zur Verf<72>gung steht:
|
||||
Den kompletten Ordner freetype2 auf die Datei `FNames.SIC' draggen.)
|
||||
|
||||
- In den Compiler-Optionen von PureC muss das INCLUDE directory auf INCLUDE
|
||||
und freetype2\include verweisen. Z.B.:
|
||||
|
||||
INCLUDE;E:\freetype2\include
|
||||
|
||||
- In der Datei freetype2/include/Ft2build.h muss zu Beginn
|
||||
ein #include "ATARI.H" wie folgt eingef<65>gt werden:
|
||||
|
||||
#ifndef __FT2_BUILD_GENERIC_H__
|
||||
#define __FT2_BUILD_GENERIC_H__
|
||||
|
||||
#include "ATARI.H"
|
||||
|
||||
--- end of README.TXT ---
|
181
3party/freetype/builds/atari/deflinejoiner.awk
Normal file
181
3party/freetype/builds/atari/deflinejoiner.awk
Normal file
|
@ -0,0 +1,181 @@
|
|||
#!/usr/bin/env awk
|
||||
|
||||
|
||||
function shift( array, \
|
||||
junk, elm0, l )
|
||||
{
|
||||
elm0 = array[0]
|
||||
for ( l = 0; l < asorti( array, junk ) - 1; l++ )
|
||||
array[l] = array[l+1];
|
||||
delete array[l]
|
||||
return elm0
|
||||
}
|
||||
|
||||
|
||||
function init_cpp_src_line()
|
||||
{
|
||||
logical_line = ""
|
||||
delete break_pos
|
||||
}
|
||||
|
||||
|
||||
function shift_valid_bp( array, \
|
||||
junk, elm )
|
||||
{
|
||||
elm = -1
|
||||
|
||||
if ( 0 < asorti( array, junk ) )
|
||||
do {
|
||||
elm = shift( array )
|
||||
} while ( 0 > elm );
|
||||
|
||||
return elm
|
||||
}
|
||||
|
||||
|
||||
function check_cpp_src_line_break_pos( \
|
||||
i, junk )
|
||||
{
|
||||
printf( "break_pos:" )
|
||||
for ( i = 0; i < asorti( break_pos, junk ); i++ )
|
||||
printf( " %d", break_pos[i] );
|
||||
printf( "\n" )
|
||||
}
|
||||
|
||||
|
||||
function check_cpp_src_line()
|
||||
{
|
||||
printf( "logical_line[%s]\n", logical_line )
|
||||
check_cpp_src_line_break_pos()
|
||||
}
|
||||
|
||||
|
||||
function append_line( phys_line, \
|
||||
filt_line, bp_len )
|
||||
{
|
||||
filt_line = phys_line
|
||||
sub( /\\$/, " ", filt_line )
|
||||
logical_line = logical_line filt_line
|
||||
bp_len = asorti( break_pos, junk )
|
||||
break_pos[bp_len] = length( logical_line ) - 1
|
||||
}
|
||||
|
||||
|
||||
function print_line( \
|
||||
c0, c1, i, junk, part_str )
|
||||
{
|
||||
c0 = 0
|
||||
|
||||
while( asorti( break_pos, junk ) > 1 )
|
||||
{
|
||||
if ( ( c1 = shift_valid_bp( break_pos ) ) < 1 )
|
||||
{
|
||||
part_str = substr( logical_line, c0 + 1 )
|
||||
printf( "%s\n", part_str )
|
||||
return
|
||||
}
|
||||
|
||||
part_str = substr( logical_line, c0 + 1, c1 - c0 + 1 )
|
||||
gsub( / $/, "\\", part_str )
|
||||
printf( "%s\n", part_str )
|
||||
c0 = c1 + 1
|
||||
}
|
||||
|
||||
part_str = substr( logical_line, c0 + 1 )
|
||||
printf( "%s\n", part_str )
|
||||
}
|
||||
|
||||
|
||||
function shrink_spaces( pos, \
|
||||
tail, removed_length, k )
|
||||
{
|
||||
tail = substr( logical_line, pos )
|
||||
sub( /^[ \t]+/, " ", tail )
|
||||
removed_length = length( logical_line ) - pos - length( tail ) + 1
|
||||
logical_line = substr( logical_line, 0, pos - 1 ) tail
|
||||
|
||||
|
||||
for ( k = 0; k < asorti( break_pos, junk ); k++ )
|
||||
if ( ( pos + removed_length ) <= break_pos[k] )
|
||||
break_pos[k] = break_pos[k] - removed_length;
|
||||
else if ( pos <= break_pos[k] )
|
||||
break_pos[k] = -1;
|
||||
|
||||
return removed_length
|
||||
}
|
||||
|
||||
|
||||
function shrink_spaces_to_linebreak( pos, \
|
||||
junk, part_str, removed_length, i )
|
||||
{
|
||||
for ( i = 0; i < asorti( break_pos, junk ) && break_pos[i] < pos ; i++ )
|
||||
;
|
||||
|
||||
if ( break_pos[i] < 1 )
|
||||
return;
|
||||
|
||||
part_str = substr( logical_line, pos, break_pos[i] - pos + 1 )
|
||||
sub( /^[ \t]+/, " ", part_str )
|
||||
removed_length = ( break_pos[i] - pos + 1 ) - length( part_str )
|
||||
|
||||
tail = substr( logical_line, pos + removed_length )
|
||||
logical_line = substr( logical_line, 0, pos - 1 ) tail
|
||||
|
||||
for ( ; i < asorti( break_pos, junk ); i++ )
|
||||
break_pos[i] -= removed_length;
|
||||
|
||||
return removed_length
|
||||
}
|
||||
|
||||
|
||||
function delete_linebreaks_in_2nd_token( \
|
||||
tail, paren_depth, junk, i, j, k, l )
|
||||
{
|
||||
if ( logical_line ~ /^[ \t]*#[ \t]*define[ \t]+[0-9A-Za-z_]+\(/ )
|
||||
{
|
||||
tail = logical_line
|
||||
sub( /^[ \t]*#[ \t]*define[ \t]+[0-9A-Za-z_]+/, "", tail )
|
||||
|
||||
paren_depth = 0
|
||||
l = 0
|
||||
i = length( logical_line ) - length( tail ) + 1 # seek to the 1st op paren
|
||||
j = i
|
||||
do {
|
||||
if ( substr( logical_line, j, 2 ) ~ /[ \t][ \t]/ )
|
||||
l = shrink_spaces( j );
|
||||
else if ( substr( logical_line, j, 1 ) == "(" )
|
||||
paren_depth += 1;
|
||||
else if ( substr( logical_line, j, 1 ) == ")" )
|
||||
paren_depth -= 1;
|
||||
j += 1
|
||||
} while ( j < length( logical_line ) && paren_depth != 0 )
|
||||
|
||||
for ( k = 0; k < asorti( break_pos, junk ); k++ )
|
||||
if ( i <= break_pos[k] && break_pos[k] < j )
|
||||
break_pos[k] = -1;
|
||||
|
||||
if ( l > 0 )
|
||||
shrink_spaces_to_linebreak( j );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BEGIN{
|
||||
init_cpp_src_line()
|
||||
}
|
||||
{
|
||||
append_line( $0 )
|
||||
if ( $0 !~ /\\$/ )
|
||||
{
|
||||
delete_linebreaks_in_2nd_token()
|
||||
print_line()
|
||||
init_cpp_src_line()
|
||||
}
|
||||
}
|
||||
END{
|
||||
if ( 0 < length( logical_line ) )
|
||||
{
|
||||
delete_linebreaks_in_2nd_token()
|
||||
print_line()
|
||||
}
|
||||
}
|
40
3party/freetype/builds/atari/gen-purec-patch.sh
Executable file
40
3party/freetype/builds/atari/gen-purec-patch.sh
Executable file
|
@ -0,0 +1,40 @@
|
|||
#!/bin/sh
|
||||
|
||||
TOP_DIR=.
|
||||
OBJ_DIR=.
|
||||
|
||||
for x in "$@"
|
||||
do
|
||||
case x"$x" in
|
||||
x--srcdir=* | x--topdir=* )
|
||||
TOP_DIR=`echo $x | sed 's/^--[a-z]*dir=//'`
|
||||
;;
|
||||
x--builddir=* | x--objdir=* )
|
||||
OBJ_DIR=`echo $x | sed 's/^--[a-z]*dir=//'`
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
mkdir -p ${OBJ_DIR}/builds/atari/tmp/orig
|
||||
|
||||
( cd ${TOP_DIR} && find . -name '*.[CHch]' -type f | fgrep -v builds/atari/tmp | cpio -o ) | \
|
||||
( cd ${OBJ_DIR}/builds/atari/tmp/orig && cpio -idum )
|
||||
cp ${TOP_DIR}/builds/atari/deflinejoiner.awk ${OBJ_DIR}/builds/atari/tmp
|
||||
|
||||
pushd ${OBJ_DIR}/builds/atari/tmp
|
||||
|
||||
cp -pr orig purec
|
||||
for f in `cd orig && find . -type f`
|
||||
do
|
||||
echo filter $f
|
||||
env LANG=C awk -f deflinejoiner.awk < orig/$f > purec/$f
|
||||
done
|
||||
|
||||
echo '#define FT2_BUILD_LIBRARY' > purec/include/ft2build.h
|
||||
echo '#include "ATARI.H"' >> purec/include/ft2build.h
|
||||
env LANG=C awk -f deflinejoiner.awk < orig/include/ft2build.h >> purec/include/ft2build.h
|
||||
|
||||
env LANG=C diff -ur orig purec > ../purec.diff
|
||||
|
||||
popd
|
||||
rm -rf ${OBJ_DIR}/builds/atari/tmp
|
76
3party/freetype/builds/beos/beos-def.mk
Normal file
76
3party/freetype/builds/beos/beos-def.mk
Normal file
|
@ -0,0 +1,76 @@
|
|||
#
|
||||
# FreeType 2 configuration rules for a BeOS system
|
||||
#
|
||||
# this is similar to the "ansi-def.mk" file, except for BUILD and PLATFORM
|
||||
#
|
||||
|
||||
|
||||
# Copyright 1996-2015 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
DELETE := rm -f
|
||||
CAT := cat
|
||||
SEP := /
|
||||
BUILD_DIR := $(TOP_DIR)/builds/beos
|
||||
PLATFORM := beos
|
||||
|
||||
|
||||
# The directory where all library files are placed.
|
||||
#
|
||||
# By default, this is the same as $(OBJ_DIR); however, this can be changed
|
||||
# to suit particular needs.
|
||||
#
|
||||
LIB_DIR := $(OBJ_DIR)
|
||||
|
||||
|
||||
# The name of the final library file. Note that the DOS-specific Makefile
|
||||
# uses a shorter (8.3) name.
|
||||
#
|
||||
LIBRARY := lib$(PROJECT)
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := -I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := -D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L := -l
|
||||
|
||||
|
||||
# Target flag.
|
||||
#
|
||||
T := -o$(space)
|
||||
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
|
||||
# ANSI compliance.
|
||||
#
|
||||
CFLAGS ?= -c
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
ANSIFLAGS :=
|
||||
|
||||
|
||||
# EOF
|
19
3party/freetype/builds/beos/beos.mk
Normal file
19
3party/freetype/builds/beos/beos.mk
Normal file
|
@ -0,0 +1,19 @@
|
|||
#
|
||||
# FreeType 2 configuration rules for a BeOS system
|
||||
#
|
||||
|
||||
# Copyright 1996-2015 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
include $(TOP_DIR)/builds/beos/beos-def.mk
|
||||
include $(TOP_DIR)/builds/compiler/ansi-cc.mk
|
||||
include $(TOP_DIR)/builds/link_std.mk
|
||||
|
||||
|
||||
# EOF
|
41
3party/freetype/builds/beos/detect.mk
Normal file
41
3party/freetype/builds/beos/detect.mk
Normal file
|
@ -0,0 +1,41 @@
|
|||
#
|
||||
# FreeType 2 configuration file to detect an BeOS host platform.
|
||||
#
|
||||
|
||||
|
||||
# Copyright 1996-2015 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
.PHONY: setup
|
||||
|
||||
|
||||
ifeq ($(PLATFORM),ansi)
|
||||
|
||||
ifdef BE_HOST_CPU
|
||||
|
||||
PLATFORM := beos
|
||||
|
||||
endif # test MACHTYPE beos
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),beos)
|
||||
|
||||
DELETE := rm -f
|
||||
CAT := cat
|
||||
SEP := /
|
||||
BUILD_DIR := $(TOP_DIR)/builds/beos
|
||||
CONFIG_FILE := beos.mk
|
||||
|
||||
setup: std_setup
|
||||
|
||||
endif # test PLATFORM beos
|
||||
|
||||
|
||||
# EOF
|
275
3party/freetype/builds/cmake/iOS.cmake
Normal file
275
3party/freetype/builds/cmake/iOS.cmake
Normal file
|
@ -0,0 +1,275 @@
|
|||
# iOS.cmake
|
||||
#
|
||||
# Copyright 2014-2015 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# Written by David Wimsey <david@wimsey.us>
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
#
|
||||
#
|
||||
# This file is derived from the files `Platform/Darwin.cmake' and
|
||||
# `Platform/UnixPaths.cmake', which are part of CMake 2.8.4. It has been
|
||||
# altered for iOS development.
|
||||
|
||||
|
||||
# Options
|
||||
# -------
|
||||
#
|
||||
# IOS_PLATFORM = OS | SIMULATOR
|
||||
#
|
||||
# This decides whether SDKS are selected from the `iPhoneOS.platform' or
|
||||
# `iPhoneSimulator.platform' folders.
|
||||
#
|
||||
# OS - the default, used to build for iPhone and iPad physical devices,
|
||||
# which have an ARM architecture.
|
||||
# SIMULATOR - used to build for the Simulator platforms, which have an
|
||||
# x86 architecture.
|
||||
#
|
||||
# CMAKE_IOS_DEVELOPER_ROOT = /path/to/platform/Developer folder
|
||||
#
|
||||
# By default, this location is automatically chosen based on the
|
||||
# IOS_PLATFORM value above. If you manually set this variable, it
|
||||
# overrides the default location and forces the use of a particular
|
||||
# Developer Platform.
|
||||
#
|
||||
# CMAKE_IOS_SDK_ROOT = /path/to/platform/Developer/SDKs/SDK folder
|
||||
#
|
||||
# By default, this location is automatically chosen based on the
|
||||
# CMAKE_IOS_DEVELOPER_ROOT value. In this case it is always the most
|
||||
# up-to-date SDK found in the CMAKE_IOS_DEVELOPER_ROOT path. If you
|
||||
# manually set this variable, it forces the use of a specific SDK
|
||||
# version.
|
||||
#
|
||||
#
|
||||
# Macros
|
||||
# ------
|
||||
#
|
||||
# set_xcode_property (TARGET XCODE_PROPERTY XCODE_VALUE)
|
||||
#
|
||||
# A convenience macro for setting Xcode specific properties on targets.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# set_xcode_property(myioslib IPHONEOS_DEPLOYMENT_TARGET "3.1")
|
||||
#
|
||||
# find_host_package (PROGRAM ARGS)
|
||||
#
|
||||
# A macro to find executable programs on the host system, not within the
|
||||
# iOS environment. Thanks to the `android-cmake' project for providing
|
||||
# the command.
|
||||
|
||||
|
||||
# standard settings
|
||||
set(CMAKE_SYSTEM_NAME Darwin)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(UNIX True)
|
||||
set(APPLE True)
|
||||
set(IOS True)
|
||||
|
||||
# required as of cmake 2.8.10
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET ""
|
||||
CACHE STRING "Force unset of the deployment target for iOS" FORCE
|
||||
)
|
||||
|
||||
# determine the cmake host system version so we know where to find the iOS
|
||||
# SDKs
|
||||
find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin)
|
||||
if (CMAKE_UNAME)
|
||||
exec_program(uname ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION)
|
||||
string(REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\1"
|
||||
DARWIN_MAJOR_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
|
||||
endif (CMAKE_UNAME)
|
||||
|
||||
# force the compilers to gcc for iOS
|
||||
include(CMakeForceCompiler)
|
||||
CMAKE_FORCE_C_COMPILER(gcc gcc)
|
||||
CMAKE_FORCE_CXX_COMPILER(g++ g++)
|
||||
|
||||
# skip the platform compiler checks for cross compiling
|
||||
set(CMAKE_CXX_COMPILER_WORKS TRUE)
|
||||
set(CMAKE_C_COMPILER_WORKS TRUE)
|
||||
|
||||
# all iOS/Darwin specific settings - some may be redundant
|
||||
set(CMAKE_SHARED_LIBRARY_PREFIX "lib")
|
||||
set(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib")
|
||||
set(CMAKE_SHARED_MODULE_PREFIX "lib")
|
||||
set(CMAKE_SHARED_MODULE_SUFFIX ".so")
|
||||
set(CMAKE_MODULE_EXISTS 1)
|
||||
set(CMAKE_DL_LIBS "")
|
||||
|
||||
set(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG
|
||||
"-compatibility_version ")
|
||||
set(CMAKE_C_OSX_CURRENT_VERSION_FLAG
|
||||
"-current_version ")
|
||||
set(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG
|
||||
"${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}")
|
||||
set(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG
|
||||
"${CMAKE_C_OSX_CURRENT_VERSION_FLAG}")
|
||||
|
||||
# hidden visibility is required for cxx on iOS
|
||||
set(CMAKE_C_FLAGS_INIT "")
|
||||
set(CMAKE_CXX_FLAGS_INIT
|
||||
"-headerpad_max_install_names -fvisibility=hidden -fvisibility-inlines-hidden")
|
||||
|
||||
set(CMAKE_C_LINK_FLAGS
|
||||
"-Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}")
|
||||
set(CMAKE_CXX_LINK_FLAGS
|
||||
"-Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}")
|
||||
|
||||
set(CMAKE_PLATFORM_HAS_INSTALLNAME 1)
|
||||
set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS
|
||||
"-dynamiclib -headerpad_max_install_names")
|
||||
set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS
|
||||
"-bundle -headerpad_max_install_names")
|
||||
set(CMAKE_SHARED_MODULE_LOADER_C_FLAG
|
||||
"-Wl,-bundle_loader,")
|
||||
set(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG
|
||||
"-Wl,-bundle_loader,")
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES
|
||||
".dylib" ".so" ".a")
|
||||
|
||||
# hack: If a new cmake (which uses CMAKE_INSTALL_NAME_TOOL) runs on an old
|
||||
# build tree (where `install_name_tool' was hardcoded), and where
|
||||
# CMAKE_INSTALL_NAME_TOOL isn't in the cache and still cmake didn't
|
||||
# fail in `CMakeFindBinUtils.cmake' (because it isn't rerun), hardcode
|
||||
# CMAKE_INSTALL_NAME_TOOL here to `install_name_tool' so it behaves as
|
||||
# it did before.
|
||||
if (NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
|
||||
find_program(CMAKE_INSTALL_NAME_TOOL install_name_tool)
|
||||
endif (NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
|
||||
|
||||
# set up iOS platform unless specified manually with IOS_PLATFORM
|
||||
if (NOT DEFINED IOS_PLATFORM)
|
||||
set(IOS_PLATFORM "OS")
|
||||
endif (NOT DEFINED IOS_PLATFORM)
|
||||
|
||||
set(IOS_PLATFORM ${IOS_PLATFORM} CACHE STRING "Type of iOS Platform")
|
||||
|
||||
# check the platform selection and setup for developer root
|
||||
if (${IOS_PLATFORM} STREQUAL "OS")
|
||||
set(IOS_PLATFORM_LOCATION "iPhoneOS.platform")
|
||||
|
||||
# this causes the installers to properly locate the output libraries
|
||||
set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos")
|
||||
|
||||
elseif (${IOS_PLATFORM} STREQUAL "SIMULATOR")
|
||||
set(IOS_PLATFORM_LOCATION "iPhoneSimulator.platform")
|
||||
|
||||
# this causes the installers to properly locate the output libraries
|
||||
set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphonesimulator")
|
||||
|
||||
else (${IOS_PLATFORM} STREQUAL "OS")
|
||||
message(FATAL_ERROR
|
||||
"Unsupported IOS_PLATFORM value selected. Please choose OS or SIMULATOR.")
|
||||
|
||||
endif (${IOS_PLATFORM} STREQUAL "OS")
|
||||
|
||||
# set up iOS developer location unless specified manually with
|
||||
# CMAKE_IOS_DEVELOPER_ROOT --
|
||||
# note that Xcode 4.3 changed the installation location; choose the most
|
||||
# recent one available
|
||||
set(XCODE_POST_43_ROOT
|
||||
"/Applications/Xcode.app/Contents/Developer/Platforms/${IOS_PLATFORM_LOCATION}/Developer")
|
||||
set(XCODE_PRE_43_ROOT
|
||||
"/Developer/Platforms/${IOS_PLATFORM_LOCATION}/Developer")
|
||||
|
||||
if (NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT)
|
||||
if (EXISTS ${XCODE_POST_43_ROOT})
|
||||
set(CMAKE_IOS_DEVELOPER_ROOT ${XCODE_POST_43_ROOT})
|
||||
elseif (EXISTS ${XCODE_PRE_43_ROOT})
|
||||
set(CMAKE_IOS_DEVELOPER_ROOT ${XCODE_PRE_43_ROOT})
|
||||
endif (EXISTS ${XCODE_POST_43_ROOT})
|
||||
endif (NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT)
|
||||
|
||||
set(CMAKE_IOS_DEVELOPER_ROOT ${CMAKE_IOS_DEVELOPER_ROOT}
|
||||
CACHE PATH "Location of iOS Platform"
|
||||
)
|
||||
|
||||
# find and use the most recent iOS SDK unless specified manually with
|
||||
# CMAKE_IOS_SDK_ROOT
|
||||
if (NOT DEFINED CMAKE_IOS_SDK_ROOT)
|
||||
file(GLOB _CMAKE_IOS_SDKS "${CMAKE_IOS_DEVELOPER_ROOT}/SDKs/*")
|
||||
if (_CMAKE_IOS_SDKS)
|
||||
list(SORT _CMAKE_IOS_SDKS)
|
||||
list(REVERSE _CMAKE_IOS_SDKS)
|
||||
list(GET _CMAKE_IOS_SDKS 0 CMAKE_IOS_SDK_ROOT)
|
||||
else (_CMAKE_IOS_SDKS)
|
||||
message(FATAL_ERROR
|
||||
"No iOS SDK's found in default search path ${CMAKE_IOS_DEVELOPER_ROOT}. Manually set CMAKE_IOS_SDK_ROOT or install the iOS SDK.")
|
||||
endif (_CMAKE_IOS_SDKS)
|
||||
|
||||
message(STATUS "Toolchain using default iOS SDK: ${CMAKE_IOS_SDK_ROOT}")
|
||||
endif (NOT DEFINED CMAKE_IOS_SDK_ROOT)
|
||||
|
||||
set(CMAKE_IOS_SDK_ROOT ${CMAKE_IOS_SDK_ROOT}
|
||||
CACHE PATH "Location of the selected iOS SDK"
|
||||
)
|
||||
|
||||
# set the sysroot default to the most recent SDK
|
||||
set(CMAKE_OSX_SYSROOT ${CMAKE_IOS_SDK_ROOT}
|
||||
CACHE PATH "Sysroot used for iOS support"
|
||||
)
|
||||
|
||||
# set the architecture for iOS --
|
||||
# note that currently both ARCHS_STANDARD_32_BIT and
|
||||
# ARCHS_UNIVERSAL_IPHONE_OS set armv7 only, so set both manually
|
||||
if (${IOS_PLATFORM} STREQUAL "OS")
|
||||
set(IOS_ARCH $(ARCHS_STANDARD_32_64_BIT))
|
||||
else (${IOS_PLATFORM} STREQUAL "OS")
|
||||
set(IOS_ARCH i386)
|
||||
endif (${IOS_PLATFORM} STREQUAL "OS")
|
||||
|
||||
set(CMAKE_OSX_ARCHITECTURES ${IOS_ARCH}
|
||||
CACHE string "Build architecture for iOS"
|
||||
)
|
||||
|
||||
# set the find root to the iOS developer roots and to user defined paths
|
||||
set(CMAKE_FIND_ROOT_PATH
|
||||
${CMAKE_IOS_DEVELOPER_ROOT}
|
||||
${CMAKE_IOS_SDK_ROOT}
|
||||
${CMAKE_PREFIX_PATH}
|
||||
CACHE string "iOS find search path root"
|
||||
)
|
||||
|
||||
# default to searching for frameworks first
|
||||
set(CMAKE_FIND_FRAMEWORK FIRST)
|
||||
|
||||
# set up the default search directories for frameworks
|
||||
set(CMAKE_SYSTEM_FRAMEWORK_PATH
|
||||
${CMAKE_IOS_SDK_ROOT}/System/Library/Frameworks
|
||||
${CMAKE_IOS_SDK_ROOT}/System/Library/PrivateFrameworks
|
||||
${CMAKE_IOS_SDK_ROOT}/Developer/Library/Frameworks
|
||||
)
|
||||
|
||||
# only search the iOS SDKs, not the remainder of the host filesystem
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
|
||||
# this little macro lets you set any Xcode specific property
|
||||
macro(set_xcode_property TARGET XCODE_PROPERTY XCODE_VALUE)
|
||||
set_property(TARGET ${TARGET}
|
||||
PROPERTY XCODE_ATTRIBUTE_${XCODE_PROPERTY} ${XCODE_VALUE})
|
||||
endmacro(set_xcode_property)
|
||||
|
||||
# this macro lets you find executable programs on the host system
|
||||
macro(find_host_package)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)
|
||||
set(IOS FALSE)
|
||||
|
||||
find_package(${ARGN})
|
||||
|
||||
set(IOS TRUE)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
endmacro(find_host_package)
|
||||
|
||||
# eof
|
80
3party/freetype/builds/compiler/ansi-cc.mk
Normal file
80
3party/freetype/builds/compiler/ansi-cc.mk
Normal file
|
@ -0,0 +1,80 @@
|
|||
#
|
||||
# FreeType 2 generic pseudo ANSI compiler
|
||||
#
|
||||
|
||||
|
||||
# Copyright 1996-2015 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# Compiler command line name
|
||||
#
|
||||
CC := cc
|
||||
COMPILER_SEP := $(SEP)
|
||||
|
||||
|
||||
# The object file extension (for standard and static libraries). This can be
|
||||
# .o, .tco, .obj, etc., depending on the platform.
|
||||
#
|
||||
O := o
|
||||
SO := o
|
||||
|
||||
# The library file extension (for standard and static libraries). This can
|
||||
# be .a, .lib, etc., depending on the platform.
|
||||
#
|
||||
A := a
|
||||
SA := a
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := -I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := -D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L := -l
|
||||
|
||||
|
||||
# Target flag.
|
||||
#
|
||||
T := -o$(space)
|
||||
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
|
||||
# ANSI compliance.
|
||||
#
|
||||
CFLAGS ?= -c
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
# we assume the compiler is already strictly ANSI
|
||||
#
|
||||
ANSIFLAGS :=
|
||||
|
||||
|
||||
# Library linking
|
||||
#
|
||||
CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
|
||||
LINK_LIBRARY = $(AR) -r $@ $(subst /,$(COMPILER_SEP),$(OBJECTS_LIST))
|
||||
|
||||
|
||||
# EOF
|
86
3party/freetype/builds/compiler/bcc-dev.mk
Normal file
86
3party/freetype/builds/compiler/bcc-dev.mk
Normal file
|
@ -0,0 +1,86 @@
|
|||
#
|
||||
# FreeType 2 Borland C++-specific with NO OPTIMIZATIONS + DEBUGGING
|
||||
#
|
||||
|
||||
|
||||
# Copyright 1996-2015 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# Compiler command line name
|
||||
#
|
||||
CC := bcc32
|
||||
COMPILER_SEP := $(SEP)
|
||||
|
||||
|
||||
# The object file extension (for standard and static libraries). This can be
|
||||
# .o, .tco, .obj, etc., depending on the platform.
|
||||
#
|
||||
O := obj
|
||||
SO := obj
|
||||
|
||||
# The library file extension (for standard and static libraries). This can
|
||||
# be .a, .lib, etc., depending on the platform.
|
||||
#
|
||||
A := lib
|
||||
SA := lib
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := -I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := -D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L :=
|
||||
|
||||
|
||||
# Target flag -- no trailing space.
|
||||
#
|
||||
T := -o
|
||||
TE := -e
|
||||
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
|
||||
# ANSI compliance.
|
||||
#
|
||||
CFLAGS ?= -q -c -y -d -v -Od -w-par -w-ccc -w-rch -w-pro -w-aus
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
ANSIFLAGS := -A
|
||||
|
||||
|
||||
# Library linking
|
||||
#
|
||||
CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
|
||||
LINK_LIBRARY = tlib /u /P128 $(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST:%=+%))
|
||||
|
||||
|
||||
# Borland C++ specific temporary files
|
||||
#
|
||||
CLEAN += \
|
||||
$(subst /,$(SEP),$(TOP_DIR)/apinames.$(O)) \
|
||||
$(subst /,$(SEP),$(OBJ_DIR)/apinames.tds)
|
||||
|
||||
|
||||
# EOF
|
86
3party/freetype/builds/compiler/bcc.mk
Normal file
86
3party/freetype/builds/compiler/bcc.mk
Normal file
|
@ -0,0 +1,86 @@
|
|||
#
|
||||
# FreeType 2 Borland C++-specific rules
|
||||
#
|
||||
|
||||
|
||||
# Copyright 1996-2015 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# Compiler command line name
|
||||
#
|
||||
CC := bcc32
|
||||
COMPILER_SEP := $(SEP)
|
||||
|
||||
|
||||
# The object file extension (for standard and static libraries). This can be
|
||||
# .o, .tco, .obj, etc., depending on the platform.
|
||||
#
|
||||
O := obj
|
||||
SO := obj
|
||||
|
||||
# The library file extension (for standard and static libraries). This can
|
||||
# be .a, .lib, etc., depending on the platform.
|
||||
#
|
||||
A := lib
|
||||
SA := lib
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := -I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := -D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L :=
|
||||
|
||||
|
||||
# Target flag -- no trailing space.
|
||||
#
|
||||
T := -o
|
||||
TE := -e
|
||||
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
|
||||
# ANSI compliance.
|
||||
#
|
||||
CFLAGS ?= -c -q -y -d -v -Od -w-par -w-ccc -w-rch -w-pro -w-aus
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
ANSIFLAGS := -A
|
||||
|
||||
|
||||
# Library linking
|
||||
#
|
||||
CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
|
||||
LINK_LIBRARY = tlib /u /P128 $(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST:%=+%))
|
||||
|
||||
|
||||
# Borland C++ specific temporary files
|
||||
#
|
||||
CLEAN += \
|
||||
$(subst /,$(SEP),$(TOP_DIR)/apinames.$(O)) \
|
||||
$(subst /,$(SEP),$(OBJ_DIR)/apinames.tds)
|
||||
|
||||
|
||||
# EOF
|
77
3party/freetype/builds/compiler/emx.mk
Normal file
77
3party/freetype/builds/compiler/emx.mk
Normal file
|
@ -0,0 +1,77 @@
|
|||
#
|
||||
# FreeType 2 emx-specific definitions
|
||||
#
|
||||
|
||||
|
||||
# Copyright 2003-2015 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# Compiler command line name
|
||||
#
|
||||
CC := set GCCOPT="-ansi -pedantic"; gcc
|
||||
COMPILER_SEP := /
|
||||
|
||||
|
||||
# The object file extension (for standard and static libraries). This can be
|
||||
# .o, .tco, .obj, etc., depending on the platform.
|
||||
#
|
||||
O := o
|
||||
SO := o
|
||||
|
||||
# The library file extension (for standard and static libraries). This can
|
||||
# be .a, .lib, etc., depending on the platform.
|
||||
#
|
||||
A := a
|
||||
SA := a
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := -I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := -D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L := -l
|
||||
|
||||
|
||||
# Target flag.
|
||||
#
|
||||
T := -o$(space)
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
|
||||
# ANSI compliance.
|
||||
#
|
||||
CFLAGS ?= -c -g -O6 -Wall
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
ANSIFLAGS :=
|
||||
|
||||
|
||||
# Library linking
|
||||
#
|
||||
CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
|
||||
LINK_LIBRARY = $(foreach m,$(OBJECTS_LIST),$(AR) -r $@ $(m);) echo > nul
|
||||
|
||||
|
||||
# EOF
|
95
3party/freetype/builds/compiler/gcc-dev.mk
Normal file
95
3party/freetype/builds/compiler/gcc-dev.mk
Normal file
|
@ -0,0 +1,95 @@
|
|||
#
|
||||
# FreeType 2 gcc-specific with NO OPTIMIZATIONS + DEBUGGING
|
||||
#
|
||||
|
||||
|
||||
# Copyright 1996-2015 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# Compiler command line name
|
||||
#
|
||||
CC := gcc
|
||||
COMPILER_SEP := /
|
||||
|
||||
|
||||
# The object file extension (for standard and static libraries). This can be
|
||||
# .o, .tco, .obj, etc., depending on the platform.
|
||||
#
|
||||
O := o
|
||||
SO := o
|
||||
|
||||
# The library file extension (for standard and static libraries). This can
|
||||
# be .a, .lib, etc., depending on the platform.
|
||||
#
|
||||
A := a
|
||||
SA := a
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := -I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := -D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L := -l
|
||||
|
||||
|
||||
# Target flag.
|
||||
#
|
||||
T := -o$(space)
|
||||
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
|
||||
# ANSI compliance.
|
||||
#
|
||||
ifndef CFLAGS
|
||||
ifeq ($(findstring g++,$(CC)),)
|
||||
nested_externs := -Wnested-externs
|
||||
strict_prototypes := -Wstrict-prototypes
|
||||
endif
|
||||
|
||||
CFLAGS := -c -g -O0 \
|
||||
-Wall \
|
||||
-W \
|
||||
-Wundef \
|
||||
-Wshadow \
|
||||
-Wpointer-arith \
|
||||
-Wwrite-strings \
|
||||
-Wredundant-decls \
|
||||
-Wno-long-long \
|
||||
$(nested_externs) \
|
||||
$(strict_prototypes)
|
||||
endif
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
ANSIFLAGS := -ansi -pedantic
|
||||
|
||||
|
||||
# Library linking
|
||||
#
|
||||
CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
|
||||
LINK_LIBRARY = $(AR) -r $@ $(OBJECTS_LIST)
|
||||
|
||||
|
||||
# EOF
|
77
3party/freetype/builds/compiler/gcc.mk
Normal file
77
3party/freetype/builds/compiler/gcc.mk
Normal file
|
@ -0,0 +1,77 @@
|
|||
#
|
||||
# FreeType 2 gcc-specific definitions
|
||||
#
|
||||
|
||||
|
||||
# Copyright 1996-2015 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# Compiler command line name
|
||||
#
|
||||
CC := gcc
|
||||
COMPILER_SEP := /
|
||||
|
||||
|
||||
# The object file extension (for standard and static libraries). This can be
|
||||
# .o, .tco, .obj, etc., depending on the platform.
|
||||
#
|
||||
O := o
|
||||
SO := o
|
||||
|
||||
# The library file extension (for standard and static libraries). This can
|
||||
# be .a, .lib, etc., depending on the platform.
|
||||
#
|
||||
A := a
|
||||
SA := a
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := -I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := -D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L := -l
|
||||
|
||||
|
||||
# Target flag.
|
||||
#
|
||||
T := -o$(space)
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
|
||||
# ANSI compliance.
|
||||
#
|
||||
CFLAGS ?= -c -g -O3 -Wall
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
ANSIFLAGS := -ansi -pedantic
|
||||
|
||||
|
||||
# Library linking
|
||||
#
|
||||
CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
|
||||
LINK_LIBRARY = $(AR) -r $@ $(OBJECTS_LIST)
|
||||
|
||||
|
||||
# EOF
|
85
3party/freetype/builds/compiler/intelc.mk
Normal file
85
3party/freetype/builds/compiler/intelc.mk
Normal file
|
@ -0,0 +1,85 @@
|
|||
#
|
||||
# FreeType 2 Intel C/C++ definitions (VC++ compatibility mode)
|
||||
#
|
||||
|
||||
|
||||
# Copyright 1996-2015 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# compiler command line name
|
||||
#
|
||||
CC := icl
|
||||
COMPILER_SEP := $(SEP)
|
||||
|
||||
|
||||
# The object file extension (for standard and static libraries). This can be
|
||||
# .o, .tco, .obj, etc., depending on the platform.
|
||||
#
|
||||
O := obj
|
||||
SO := obj
|
||||
|
||||
|
||||
# The library file extension (for standard and static libraries). This can
|
||||
# be .a, .lib, etc., depending on the platform.
|
||||
#
|
||||
A := lib
|
||||
SA := lib
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := /I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := /D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L := /Fl
|
||||
|
||||
|
||||
# Target flag.
|
||||
#
|
||||
T := /Fo
|
||||
TE := /Fe
|
||||
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
|
||||
# ANSI compliance.
|
||||
#
|
||||
# Note that the Intel C/C++ compiler version 4.5 complains about
|
||||
# the use of FT_FIELD_OFFSET with "value must be arithmetic type"!
|
||||
# This really looks like a bug in the compiler because the macro
|
||||
# _does_ compute an arithmetic value, so we disable this warning
|
||||
# with "/Qwd32".
|
||||
#
|
||||
CFLAGS ?= /nologo /c /Ox /G5 /W3 /Qwd32
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
ANSIFLAGS := /Qansi_alias /Za
|
||||
|
||||
# Library linking
|
||||
#
|
||||
#CLEAN_LIBRARY =
|
||||
LINK_LIBRARY = lib /nologo /out:$(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST))
|
||||
|
||||
|
||||
# EOF
|
83
3party/freetype/builds/compiler/unix-lcc.mk
Normal file
83
3party/freetype/builds/compiler/unix-lcc.mk
Normal file
|
@ -0,0 +1,83 @@
|
|||
#
|
||||
# FreeType 2 Unix LCC specific definitions
|
||||
#
|
||||
|
||||
|
||||
# Copyright 1996-2015 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# Command line name
|
||||
#
|
||||
CC := lcc
|
||||
COMPILER_SEP := $(SEP)
|
||||
|
||||
|
||||
# The object file extension (for standard and static libraries). This can be
|
||||
# .o, .tco, .obj, etc., depending on the platform.
|
||||
#
|
||||
O := o
|
||||
SO := o
|
||||
|
||||
|
||||
# The library file extension (for standard and static libraries). This can
|
||||
# be .a, .lib, etc., depending on the platform.
|
||||
#
|
||||
A := a
|
||||
SA := a
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := -I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := -D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L := -l
|
||||
|
||||
|
||||
# Target flag.
|
||||
#
|
||||
T := -o$(space)
|
||||
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
|
||||
# ANSI compliance.
|
||||
#
|
||||
CFLAGS ?= -c -g
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
# LCC is pure ANSI anyway!
|
||||
#
|
||||
# the "-A" flag simply increments verbosity about non ANSI code
|
||||
#
|
||||
ANSIFLAGS := -A
|
||||
|
||||
|
||||
# library linking
|
||||
#
|
||||
CLEAN_LIBRARY ?= $(DELETE) $(PROJECT_LIBRARY)
|
||||
LINK_LIBRARY = $(AR) -r $@ $(OBJECTS_LIST)
|
||||
|
||||
|
||||
# EOF
|
76
3party/freetype/builds/compiler/visualage.mk
Normal file
76
3party/freetype/builds/compiler/visualage.mk
Normal file
|
@ -0,0 +1,76 @@
|
|||
#
|
||||
# FreeType 2 Visual Age C++ specific definitions
|
||||
#
|
||||
|
||||
|
||||
# Copyright 1996-2015 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# command line compiler name
|
||||
#
|
||||
CC := icc
|
||||
COMPILER_SEP := $(SEP)
|
||||
|
||||
|
||||
# The object file extension (for standard and static libraries). This can be
|
||||
# .o, .tco, .obj, etc., depending on the platform.
|
||||
#
|
||||
O := obj
|
||||
SO := obj
|
||||
|
||||
|
||||
# The library file extension (for standard and static libraries). This can
|
||||
# be .a, .lib, etc., depending on the platform.
|
||||
#
|
||||
A := lib
|
||||
SA := lib
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := /I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := /D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L := /Fl
|
||||
|
||||
|
||||
# Target flag.
|
||||
#
|
||||
T := /Fo
|
||||
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
CFLAGS ?= /Q- /Gd+ /O2 /G5 /W3 /C
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
ANSI_FLAGS := /Sa
|
||||
|
||||
|
||||
# Library linking
|
||||
#
|
||||
#CLEAN_LIBRARY :=
|
||||
LINK_LIBRARY = lib /nologo /out:$(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST))
|
||||
|
||||
|
||||
# EOF
|
82
3party/freetype/builds/compiler/visualc.mk
Normal file
82
3party/freetype/builds/compiler/visualc.mk
Normal file
|
@ -0,0 +1,82 @@
|
|||
#
|
||||
# FreeType 2 Visual C++ definitions
|
||||
#
|
||||
|
||||
|
||||
# Copyright 1996-2015 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# compiler command line name
|
||||
#
|
||||
CC := cl
|
||||
COMPILER_SEP := $(SEP)
|
||||
|
||||
|
||||
# The object file extension (for standard and static libraries). This can be
|
||||
# .o, .tco, .obj, etc., depending on the platform.
|
||||
#
|
||||
O := obj
|
||||
SO := obj
|
||||
|
||||
|
||||
# The library file extension (for standard and static libraries). This can
|
||||
# be .a, .lib, etc., depending on the platform.
|
||||
#
|
||||
A := lib
|
||||
SA := lib
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := /I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := /D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L := /Fl
|
||||
|
||||
|
||||
# Target flag.
|
||||
#
|
||||
T := /Fo
|
||||
|
||||
# Target executable flag
|
||||
#
|
||||
TE := /Fe
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
|
||||
# ANSI compliance.
|
||||
#
|
||||
CFLAGS ?= /nologo /c /Ox /W3 /WX
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
ANSIFLAGS := /Za /D_CRT_SECURE_NO_DEPRECATE
|
||||
|
||||
|
||||
# Library linking
|
||||
#
|
||||
#CLEAN_LIBRARY =
|
||||
LINK_LIBRARY = lib /nologo /out:$(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST))
|
||||
|
||||
|
||||
# EOF
|
81
3party/freetype/builds/compiler/watcom.mk
Normal file
81
3party/freetype/builds/compiler/watcom.mk
Normal file
|
@ -0,0 +1,81 @@
|
|||
#
|
||||
# FreeType 2 Watcom-specific definitions
|
||||
#
|
||||
|
||||
|
||||
# Copyright 1996-2015 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# Compiler command line name
|
||||
#
|
||||
CC := wcc386
|
||||
COMPILER_SEP := $(SEP)
|
||||
|
||||
|
||||
# The object file extension (for standard and static libraries). This can be
|
||||
# .o, .tco, .obj, etc., depending on the platform.
|
||||
#
|
||||
O := obj
|
||||
SO := obj
|
||||
|
||||
|
||||
# The library file extension (for standard and static libraries). This can
|
||||
# be .a, .lib, etc., depending on the platform.
|
||||
#
|
||||
A := lib
|
||||
SA := lib
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := -I=
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := -D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L := -l
|
||||
|
||||
|
||||
# Target flag.
|
||||
#
|
||||
T := -FO=
|
||||
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
|
||||
# ANSI compliance.
|
||||
#
|
||||
CFLAGS ?= -zq
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
ANSIFLAGS := -za
|
||||
|
||||
|
||||
# Library linking
|
||||
#
|
||||
CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
|
||||
LINK_LIBRARY = $(subst /,$(COMPILER_SEP), \
|
||||
wlib -q -n $@; \
|
||||
$(foreach m, $(OBJECTS_LIST), wlib -q $@ +$(m);) \
|
||||
echo > nul)
|
||||
|
||||
# EOF
|
81
3party/freetype/builds/compiler/win-lcc.mk
Normal file
81
3party/freetype/builds/compiler/win-lcc.mk
Normal file
|
@ -0,0 +1,81 @@
|
|||
#
|
||||
# FreeType 2 Win32-LCC specific definitions
|
||||
#
|
||||
|
||||
|
||||
# Copyright 1996-2015 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# Command line name
|
||||
#
|
||||
CC := lcc
|
||||
COMPILER_SEP := $(SEP)
|
||||
|
||||
|
||||
# The object file extension (for standard and static libraries). This can be
|
||||
# .o, .tco, .obj, etc., depending on the platform.
|
||||
#
|
||||
O := obj
|
||||
SO := obj
|
||||
|
||||
|
||||
# The library file extension (for standard and static libraries). This can
|
||||
# be .a, .lib, etc., depending on the platform.
|
||||
#
|
||||
A := lib
|
||||
SA := lib
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := -I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := -D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L := -Fl
|
||||
|
||||
|
||||
# Target flag.
|
||||
#
|
||||
T := -Fo
|
||||
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
|
||||
# ANSI compliance.
|
||||
#
|
||||
CFLAGS ?= -c -g2 -O
|
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
# LCC is pure ANSI anyway!
|
||||
#
|
||||
ANSIFLAGS :=
|
||||
|
||||
|
||||
# library linking
|
||||
#
|
||||
#CLEAN_LIBRARY :=
|
||||
LINK_LIBRARY = lcclib /out:$(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST))
|
||||
|
||||
|
||||
# EOF
|
154
3party/freetype/builds/detect.mk
Normal file
154
3party/freetype/builds/detect.mk
Normal file
|
@ -0,0 +1,154 @@
|
|||
#
|
||||
# FreeType 2 host platform detection rules
|
||||
#
|
||||
|
||||
|
||||
# Copyright 1996-2015 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# This sub-Makefile is in charge of detecting the current platform. It sets
|
||||
# the following variables:
|
||||
#
|
||||
# BUILD_DIR The configuration and system-specific directory. Usually
|
||||
# `builds/$(PLATFORM)' but can be different for custom builds
|
||||
# of the library.
|
||||
#
|
||||
# The following variables must be defined in system specific `detect.mk'
|
||||
# files:
|
||||
#
|
||||
# PLATFORM The detected platform. This will default to `ansi' if
|
||||
# auto-detection fails.
|
||||
# CONFIG_FILE The configuration sub-makefile to use. This usually depends
|
||||
# on the compiler defined in the `CC' environment variable.
|
||||
# DELETE The shell command used to remove a given file.
|
||||
# COPY The shell command used to copy one file.
|
||||
# SEP The platform-specific directory separator.
|
||||
# COMPILER_SEP The separator used in arguments of the compilation tools.
|
||||
# CC The compiler to use.
|
||||
#
|
||||
# You need to set the following variable(s) before calling it:
|
||||
#
|
||||
# TOP_DIR The top-most directory in the FreeType library source
|
||||
# hierarchy. If not defined, it will default to `.'.
|
||||
|
||||
# Set auto-detection default to `ansi' resp. UNIX-like operating systems.
|
||||
#
|
||||
PLATFORM := ansi
|
||||
DELETE := $(RM)
|
||||
COPY := cp
|
||||
CAT := cat
|
||||
SEP := /
|
||||
|
||||
BUILD_CONFIG := $(TOP_DIR)/builds
|
||||
|
||||
# These two assignments must be delayed.
|
||||
BUILD_DIR = $(BUILD_CONFIG)/$(PLATFORM)
|
||||
CONFIG_RULES = $(BUILD_DIR)/$(CONFIG_FILE)
|
||||
|
||||
# We define the BACKSLASH variable to hold a single back-slash character.
|
||||
# This is needed because a line like
|
||||
#
|
||||
# SEP := \
|
||||
#
|
||||
# does not work with GNU Make (the backslash is interpreted as a line
|
||||
# continuation). While a line like
|
||||
#
|
||||
# SEP := \\
|
||||
#
|
||||
# really defines $(SEP) as `\' on Unix, and `\\' on Dos and Windows!
|
||||
#
|
||||
BACKSLASH := $(strip \ )
|
||||
|
||||
# Find all auto-detectable platforms.
|
||||
#
|
||||
PLATFORMS := $(notdir $(subst /detect.mk,,$(wildcard $(BUILD_CONFIG)/*/detect.mk)))
|
||||
.PHONY: $(PLATFORMS) ansi
|
||||
|
||||
# Filter out platform specified as setup target.
|
||||
#
|
||||
PLATFORM := $(firstword $(filter $(MAKECMDGOALS),$(PLATFORMS)))
|
||||
|
||||
# If no setup target platform was specified, enable auto-detection/
|
||||
# default platform.
|
||||
#
|
||||
ifeq ($(PLATFORM),)
|
||||
PLATFORM := ansi
|
||||
endif
|
||||
|
||||
# If the user has explicitly asked for `ansi' on the command line,
|
||||
# disable auto-detection.
|
||||
#
|
||||
ifeq ($(findstring ansi,$(MAKECMDGOALS)),)
|
||||
# Now, include all detection rule files found in the `builds/<system>'
|
||||
# directories. Note that the calling order of the various `detect.mk'
|
||||
# files isn't predictable.
|
||||
#
|
||||
include $(wildcard $(BUILD_CONFIG)/*/detect.mk)
|
||||
endif
|
||||
|
||||
# In case no detection rule file was successful, use the default.
|
||||
#
|
||||
ifndef CONFIG_FILE
|
||||
CONFIG_FILE := ansi.mk
|
||||
setup: std_setup
|
||||
.PHONY: setup
|
||||
endif
|
||||
|
||||
# The following targets are equivalent, with the exception that they use
|
||||
# a slightly different syntax for the `echo' command.
|
||||
#
|
||||
# std_setup: defined for most (i.e. Unix-like) platforms
|
||||
# dos_setup: defined for Dos-ish platforms like Dos, Windows & OS/2
|
||||
#
|
||||
.PHONY: std_setup dos_setup
|
||||
|
||||
std_setup:
|
||||
@echo ""
|
||||
@echo "$(PROJECT_TITLE) build system -- automatic system detection"
|
||||
@echo ""
|
||||
@echo "The following settings are used:"
|
||||
@echo ""
|
||||
@echo " platform $(PLATFORM)"
|
||||
@echo " compiler $(CC)"
|
||||
@echo " configuration directory $(BUILD_DIR)"
|
||||
@echo " configuration rules $(CONFIG_RULES)"
|
||||
@echo ""
|
||||
@echo "If this does not correspond to your system or settings please remove the file"
|
||||
@echo "\`$(CONFIG_MK)' from this directory then read the INSTALL file for help."
|
||||
@echo ""
|
||||
@echo "Otherwise, simply type \`$(MAKE)' again to build the library,"
|
||||
@echo "or \`$(MAKE) refdoc' to build the API reference (this needs python >= 2.6)."
|
||||
@echo ""
|
||||
@$(COPY) $(CONFIG_RULES) $(CONFIG_MK)
|
||||
|
||||
|
||||
# Special case for Dos, Windows, OS/2, where echo "" doesn't work correctly!
|
||||
#
|
||||
dos_setup:
|
||||
@type builds$(SEP)newline
|
||||
@echo $(PROJECT_TITLE) build system -- automatic system detection
|
||||
@type builds$(SEP)newline
|
||||
@echo The following settings are used:
|
||||
@type builds$(SEP)newline
|
||||
@echo platformÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ$(PLATFORM)
|
||||
@echo compilerÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ$(CC)
|
||||
@echo configuration directoryÿÿÿÿÿÿ$(subst /,$(SEP),$(BUILD_DIR))
|
||||
@echo configuration rulesÿÿÿÿÿÿÿÿÿÿ$(subst /,$(SEP),$(CONFIG_RULES))
|
||||
@type builds$(SEP)newline
|
||||
@echo If this does not correspond to your system or settings please remove the file
|
||||
@echo '$(CONFIG_MK)' from this directory then read the INSTALL file for help.
|
||||
@type builds$(SEP)newline
|
||||
@echo Otherwise, simply type 'make' again to build the library.
|
||||
@echo or 'make refdoc' to build the API reference (this needs python >= 2.6).
|
||||
@type builds$(SEP)newline
|
||||
@$(COPY) $(subst /,$(SEP),$(CONFIG_RULES) $(CONFIG_MK)) > nul
|
||||
|
||||
|
||||
# EOF
|
142
3party/freetype/builds/dos/detect.mk
Normal file
142
3party/freetype/builds/dos/detect.mk
Normal file
|
@ -0,0 +1,142 @@
|
|||
#
|
||||
# FreeType 2 configuration file to detect a DOS host platform.
|
||||
#
|
||||
|
||||
|
||||
# Copyright 1996-2015 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
.PHONY: setup
|
||||
|
||||
|
||||
ifeq ($(PLATFORM),ansi)
|
||||
|
||||
# Test for DJGPP by checking the DJGPP environment variable, which must be
|
||||
# set in order to use the system (ie. it will always be present when the
|
||||
# `make' utility is run).
|
||||
#
|
||||
# We test for the COMSPEC environment variable, then run the `ver'
|
||||
# command-line program to see if its output contains the word `Dos' or
|
||||
# `DOS'.
|
||||
#
|
||||
# If this is true, we are running a Dos-ish platform (or an emulation).
|
||||
#
|
||||
ifdef DJGPP
|
||||
PLATFORM := dos
|
||||
else
|
||||
ifdef COMSPEC
|
||||
is_dos := $(findstring DOS,$(subst Dos,DOS,$(shell ver)))
|
||||
|
||||
# We try to recognize a Dos session under OS/2. The `ver' command
|
||||
# returns `Operating System/2 ...' there, so `is_dos' should be empty.
|
||||
#
|
||||
# To recognize a Dos session under OS/2, we check COMSPEC for the
|
||||
# substring `MDOS\COMMAND'
|
||||
#
|
||||
ifeq ($(is_dos),)
|
||||
is_dos := $(findstring MDOS\COMMAND,$(COMSPEC))
|
||||
endif
|
||||
|
||||
# We also try to recognize Dos 7.x without Windows 9X launched.
|
||||
# See builds/windows/detect.mk for explanations about the logic.
|
||||
#
|
||||
ifeq ($(is_dos),)
|
||||
ifdef winbootdir
|
||||
#ifneq ($(OS),Windows_NT)
|
||||
# If windows is available, do not trigger this test.
|
||||
ifndef windir
|
||||
is_dos := $(findstring Windows,$(strip $(shell ver)))
|
||||
endif
|
||||
#endif
|
||||
endif
|
||||
endif
|
||||
|
||||
endif # test COMSPEC
|
||||
|
||||
ifneq ($(is_dos),)
|
||||
|
||||
PLATFORM := dos
|
||||
|
||||
endif # test Dos
|
||||
endif # test DJGPP
|
||||
endif # test PLATFORM ansi
|
||||
|
||||
ifeq ($(PLATFORM),dos)
|
||||
|
||||
# Use DJGPP (i.e. gcc) by default.
|
||||
#
|
||||
CONFIG_FILE := dos-gcc.mk
|
||||
CC ?= gcc
|
||||
|
||||
# additionally, we provide hooks for various other compilers
|
||||
#
|
||||
ifneq ($(findstring emx,$(MAKECMDGOALS)),) # EMX gcc
|
||||
CONFIG_FILE := dos-emx.mk
|
||||
CC := gcc
|
||||
emx: setup
|
||||
.PHONY: emx
|
||||
endif
|
||||
|
||||
ifneq ($(findstring turboc,$(MAKECMDGOALS)),) # Turbo C
|
||||
CONFIG_FILE := dos-tcc.mk
|
||||
CC := tcc
|
||||
turboc: setup
|
||||
.PHONY: turboc
|
||||
endif
|
||||
|
||||
ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++
|
||||
CONFIG_FILE := dos-wat.mk
|
||||
CC := wcc386
|
||||
watcom: setup
|
||||
.PHONY: watcom
|
||||
endif
|
||||
|
||||
ifneq ($(findstring borlandc,$(MAKECMDGOALS)),) # Borland C/C++ 32-bit
|
||||
CONFIG_FILE := dos-bcc.mk
|
||||
CC := bcc32
|
||||
borlandc: setup
|
||||
.PHONY: borlandc
|
||||
endif
|
||||
|
||||
ifneq ($(findstring borlandc16,$(MAKECMDGOALS)),) # Borland C/C++ 16-bit
|
||||
CONFIG_FILE := dos-bcc.mk
|
||||
CC := bcc
|
||||
borlandc16: setup
|
||||
.PHONY: borlandc16
|
||||
endif
|
||||
|
||||
ifneq ($(findstring bash,$(SHELL)),) # check for bash
|
||||
SEP := /
|
||||
DELETE := rm
|
||||
COPY := cp
|
||||
CAT := cat
|
||||
setup: std_setup
|
||||
else
|
||||
SEP := $(BACKSLASH)
|
||||
DELETE := del
|
||||
CAT := type
|
||||
|
||||
# Setting COPY is a bit trickier. We can be running DJGPP on some
|
||||
# Windows NT derivatives, like XP. See builds/windows/detect.mk for
|
||||
# explanations why we need hacking here.
|
||||
#
|
||||
ifeq ($(OS),Windows_NT)
|
||||
COPY := cmd.exe /c copy
|
||||
else
|
||||
COPY := copy
|
||||
endif # test NT
|
||||
|
||||
setup: dos_setup
|
||||
endif
|
||||
|
||||
endif # test PLATFORM dos
|
||||
|
||||
|
||||
# EOF
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue