aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Christensen <philc@microsoft.com>2018-12-20 14:00:59 -0800
committerGitHub <noreply@github.com>2018-12-20 14:00:59 -0800
commit00b4fe651479ebbbdba65a3e9d5627319fc5d8da (patch)
treea139dc9c18c24270a1a82f9b61fd955a220f36c7
parentedec46528d897c584ab1d9454b36a58f7fece217 (diff)
parent751aa7809d7f8e3286d00ffd8ab90d95ceebe8b2 (diff)
downloadvcpkg-00b4fe651479ebbbdba65a3e9d5627319fc5d8da.tar.gz
vcpkg-00b4fe651479ebbbdba65a3e9d5627319fc5d8da.zip
Merge pull request #4973 from JuhaSointusalo/ftgl-new-port
[ftgl] add new port
-rw-r--r--ports/ftgl/0001-fix-building-DLL-on-Windows.patch26
-rw-r--r--ports/ftgl/CONTROL6
-rw-r--r--ports/ftgl/portfile.cmake24
3 files changed, 56 insertions, 0 deletions
diff --git a/ports/ftgl/0001-fix-building-DLL-on-Windows.patch b/ports/ftgl/0001-fix-building-DLL-on-Windows.patch
new file mode 100644
index 000000000..e9b8c52a5
--- /dev/null
+++ b/ports/ftgl/0001-fix-building-DLL-on-Windows.patch
@@ -0,0 +1,26 @@
+From b56270d28a59297518e91f85333a2e1a7fecdc9e Mon Sep 17 00:00:00 2001
+From: Juha Sointusalo <juha.sointusalo@gmail.com>
+Date: Thu, 13 Dec 2018 21:38:23 +0200
+Subject: [PATCH] fix building DLL on Windows
+
+Without FTGL_LIBRARY all symbols are declared to be imported instead of
+exported and linking the library fails.
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d6c5a57..6b230ce 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -27,6 +27,7 @@ ENDIF(NOT CMAKE_BUILD_TYPE)
+ OPTION(BUILD_SHARED_LIBS "Build Shared Libraries" ON)
+ IF(BUILD_SHARED_LIBS)
+ SET(LIB_TYPE SHARED)
++ ADD_DEFINITIONS(-DFTGL_LIBRARY)
+ ELSE(BUILD_SHARED_LIBS)
+ SET(LIB_TYPE STATIC)
+ ADD_DEFINITIONS(-D FTGL_LIBRARY_STATIC)
+--
+2.18.0.windows.1
+
diff --git a/ports/ftgl/CONTROL b/ports/ftgl/CONTROL
new file mode 100644
index 000000000..2abfa8778
--- /dev/null
+++ b/ports/ftgl/CONTROL
@@ -0,0 +1,6 @@
+Source: ftgl
+Version: 2.3.1
+Description: FTGL is a free open source library to enable developers to use arbitrary fonts in their OpenGL (www.opengl.org) applications.
+ Unlike other OpenGL font libraries FTGL uses standard font file formats so doesn't need a preprocessing step to convert the high quality font data into a lesser quality, proprietary format.
+ FTGL uses the Freetype (www.freetype.org) font library to open and 'decode' the fonts. It then takes that output and stores it in a format most efficient for OpenGL rendering.
+Build-Depends: freetype, opengl
diff --git a/ports/ftgl/portfile.cmake b/ports/ftgl/portfile.cmake
new file mode 100644
index 000000000..a8878af0f
--- /dev/null
+++ b/ports/ftgl/portfile.cmake
@@ -0,0 +1,24 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO frankheckenbach/ftgl
+ REF 2.3.1
+ SHA512 4c3c92e79371aa9048a0de6c27bd008036be19fe6179bce472f36ced359026aaeaa5b63c83f90ffc1d425dd2e587479efc700dc1082c2ed0189d16ea87838c9a
+ HEAD_REF master
+ PATCHES "0001-fix-building-DLL-on-Windows.patch"
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
+vcpkg_test_cmake(PACKAGE_NAME FTGL)
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ftgl)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/ftgl/COPYING ${CURRENT_PACKAGES_DIR}/share/ftgl/copyright)