aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Talavera-Greenberg <jessetalavera@aol.com>2017-07-14 19:46:45 -0400
committerJesse Talavera-Greenberg <jessetalavera@aol.com>2017-07-14 19:46:45 -0400
commit6d986f5112ab9dfa4f3a67e13a347cc6f40f62b1 (patch)
treea871a3aeebb14883db989f7ebcacfd7d383ebb2f
parent6af7b6716cba48d44d2935da4b4499fd4a3cd187 (diff)
downloadvcpkg-6d986f5112ab9dfa4f3a67e13a347cc6f40f62b1.tar.gz
vcpkg-6d986f5112ab9dfa4f3a67e13a347cc6f40f62b1.zip
Add a port for allegro5
-rw-r--r--ports/allegro5/CONTROL4
-rw-r--r--ports/allegro5/portfile.cmake36
2 files changed, 40 insertions, 0 deletions
diff --git a/ports/allegro5/CONTROL b/ports/allegro5/CONTROL
new file mode 100644
index 000000000..2f7ff0ccd
--- /dev/null
+++ b/ports/allegro5/CONTROL
@@ -0,0 +1,4 @@
+Source: allegro5
+Version: 5.2.1.0
+Description: Allegro is a cross-platform library mainly aimed at video game and multimedia programming. It handles common, low-level tasks such as creating windows, accepting user input, loading data, drawing images, playing sounds, etc. and generally abstracting away the underlying platform. However, Allegro is not a game engine: you are free to design and structure your program as you like.
+Build-Depends: opengl, zlib, freetype, libogg, libvorbis, opus, libflac, openal-soft, libpng, bzip2 \ No newline at end of file
diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake
new file mode 100644
index 000000000..0028a090a
--- /dev/null
+++ b/ports/allegro5/portfile.cmake
@@ -0,0 +1,36 @@
+# Common Ambient Variables:
+# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
+# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
+# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
+# PORT = current port name (zlib, etc)
+# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
+# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
+# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
+# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
+# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
+#
+
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/allegro5-5.2.1.0)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/liballeg/allegro5/archive/5.2.1.0.zip"
+ FILENAME "allegro5-5.2.1.0.zip"
+ SHA512 3271483714699e10d6ec0c0d94491d20d227b5a767d5134b592418bd0838c64d3a6448ba8448d568aeb846a6b50004656507deabb2d82dfe748f4ccc83ba1a53
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA # Disable this option if project cannot be built with Ninja
+ OPTIONS -DSHARED=OFF -DWANT_DOCS=OFF -DALLEGRO_SDL=OFF -DWANT_STATIC_RUNTIME=ON -DWANT_DEMO=OFF -DWANT_EXAMPLES=OFF -DWANT_CURL_EXAMPLE=OFF -DWANT_TESTS=OFF
+ OPTIONS_RELEASE -DWANT_ALLOW_SSE=ON
+ OPTIONS_DEBUG -DWANT_ALLOW_SSE=OFF
+)
+
+vcpkg_install_cmake()
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/allegro5)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/allegro5/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/allegro5/copyright)
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) \ No newline at end of file