aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-07-20 19:11:02 -0700
committerGitHub <noreply@github.com>2017-07-20 19:11:02 -0700
commit4c71ef3cc884385024306cb8aaec765b3605e569 (patch)
tree69ba08a1eb3c4f246505e8d42ab6c57410dc6922
parent96574d20b922fd6ea956cd192b2c6fb5a0524e42 (diff)
parenta354afaae34f3c1525271da8f58044b7a3b5ea40 (diff)
downloadvcpkg-4c71ef3cc884385024306cb8aaec765b3605e569.tar.gz
vcpkg-4c71ef3cc884385024306cb8aaec765b3605e569.zip
Merge pull request #1466 from JesseTG/jtg/two-libraries
Add ports for libmikmod and allegro5
-rw-r--r--ports/allegro5/CONTROL4
-rw-r--r--ports/allegro5/fix-pdb-install.patch13
-rw-r--r--ports/allegro5/portfile.cmake95
-rw-r--r--ports/libmikmod/CONTROL4
-rw-r--r--ports/libmikmod/portfile.cmake52
5 files changed, 168 insertions, 0 deletions
diff --git a/ports/allegro5/CONTROL b/ports/allegro5/CONTROL
new file mode 100644
index 000000000..2d3003935
--- /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, libflac, openal-soft, libpng, bzip2, physfs, libtheora \ No newline at end of file
diff --git a/ports/allegro5/fix-pdb-install.patch b/ports/allegro5/fix-pdb-install.patch
new file mode 100644
index 000000000..ef964b9f3
--- /dev/null
+++ b/ports/allegro5/fix-pdb-install.patch
@@ -0,0 +1,13 @@
+diff --git a/cmake/Common.cmake b/cmake/Common.cmake
+index 782196f..de29535 100644
+--- a/cmake/Common.cmake
++++ b/cmake/Common.cmake
+@@ -223,7 +223,7 @@ function(install_our_library target filename)
+ # PUBLIC_HEADER DESTINATION "include"
+ )
+ if(MSVC AND BUILD_SHARED_LIBS)
+- install(FILES ${CMAKE_BINARY_DIR}/lib/\${CMAKE_INSTALL_CONFIG_NAME}/${filename}.pdb
++ install(FILES ${CMAKE_BINARY_DIR}/lib/${filename}.pdb
+ DESTINATION lib
+ CONFIGURATIONS Debug RelWithDebInfo
+ )
diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake
new file mode 100644
index 000000000..d2801d5d4
--- /dev/null
+++ b/ports/allegro5/portfile.cmake
@@ -0,0 +1,95 @@
+# 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-7d8892a9278c57f2d8bb1e555f9ec59cf9ed4f73)
+vcpkg_from_github(
+ OUT_SOURCE_PATH ${SOURCE_PATH}
+ REPO liballeg/allegro5
+ REF 7d8892a9278c57f2d8bb1e555f9ec59cf9ed4f73
+ SHA512 b1531fa2f22023ecd4e053d03d1c54bf0b94aa3af004a3a06245c4d8278fea64e9d354467873ebd665301903d954795fed88e2467c88441f39c273e7e0d87d6e
+ HEAD_REF master
+)
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+ set(ALLEGRO_USE_STATIC -DSHARED=ON)
+else()
+ set(ALLEGRO_USE_STATIC -DSHARED=OFF)
+endif()
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/fix-pdb-install.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA # Disable this option if project cannot be built with Ninja
+ OPTIONS
+ -DWANT_DOCS=OFF
+ -DALLEGRO_SDL=OFF
+ -DWANT_DEMO=OFF
+ ${ALLEGRO_USE_STATIC}
+ -DWANT_EXAMPLES=OFF
+ -DWANT_CURL_EXAMPLE=OFF
+ -DWANT_TESTS=OFF
+ -DWANT_AUDIO=ON
+ -DWANT_COLOR=ON
+ -DWANT_D3D=ON
+ -DWANT_D3D9EX=OFF # Not available on vcpkg
+ -DWANT_DSOUND=ON
+ -DWANT_FLAC=ON
+ -DWANT_FONT=ON
+ -DWANT_GLES2=ON
+ -DWANT_GLES3=ON
+ -DWANT_IMAGE=ON
+ -DWANT_IMAGE_JPG=ON
+ -DWANT_IMAGE_PNG=ON
+ -DWANT_MEMFILE=ON
+ -DWANT_MODAUDIO=OFF # Not available on vcpkg right now
+ -DWANT_NATIVE_DIALOG=ON
+ -DWANT_NATIVE_IMAGE_LOADER=ON
+ -DWANT_OGG_VIDEO=ON
+ -DWANT_OPENAL=ON
+ -DWANT_OPENGL=ON
+ -DWANT_OPENSL=OFF # Not yet available on vcpkg
+ -DWANT_OPUS=OFF # opus is available on vcpkg, but opusfile isn't
+ -DWANT_PHYSFS=ON
+ -DWANT_POPUP_EXAMPLES=OFF
+ -DWANT_PRIMITIVES=ON
+ -DWANT_RELEASE_LOGGING=OFF
+ -DWANT_SHADERS_D3D=ON
+ -DWANT_SHADERS_GL=ON
+ -DWANT_TREMOR=OFF # Not yet available on vcpkg
+ -DWANT_TTF=ON
+ -DWANT_VIDEO=ON
+ -DWANT_VORBIS=ON
+ -DOPENAL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/AL
+ -DZLIB_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include
+ 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)
+
+file(GLOB PDB_GLOB ${CURRENT_BUILDTREES_DIR}-dbg/lib/*.pdb)
+file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}-dbg/lib/Debug)
+file(COPY ${PDB_GLOB} DESTINATION ${CURRENT_BUILDTREES_DIR}-dbg/lib/Debug)
+
+vcpkg_copy_pdbs()
diff --git a/ports/libmikmod/CONTROL b/ports/libmikmod/CONTROL
new file mode 100644
index 000000000..b9f970959
--- /dev/null
+++ b/ports/libmikmod/CONTROL
@@ -0,0 +1,4 @@
+Source: libmikmod
+Version: 3.3.11.1
+Description: Mikmod is a module player and library supporting many formats, including mod, s3m, it, and xm.
+Build-Depends: openal-soft \ No newline at end of file
diff --git a/ports/libmikmod/portfile.cmake b/ports/libmikmod/portfile.cmake
new file mode 100644
index 000000000..1231f5bfa
--- /dev/null
+++ b/ports/libmikmod/portfile.cmake
@@ -0,0 +1,52 @@
+# 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/libmikmod-3.3.11.1)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://downloads.sourceforge.net/project/mikmod/libmikmod/3.3.11.1/libmikmod-3.3.11.1.tar.gz"
+ FILENAME "libmikmod-3.3.11.1.tar.gz"
+ SHA512 f2439e2b691613847cd0787dd4e050116683ce7b05c215b8afecde5c6add819ea6c18e678e258c0a80786bef463f406072de15127f64368f694287a5e8e1a9de
+)
+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
+ -DENABLE_DOC=OFF
+ -DENABLE_THREADS=ON
+ -DDISABLE_HQMIXER=OFF
+ -DENABLE_AF=ON
+ -DENABLE_AIFF=ON
+ -DENABLE_NAS=ON
+ -DENABLE_OPENAL=ON
+ -DENABLE_PIPE=ON
+ -DENABLE_RAW=ON
+ -DENABLE_STDOUT=ON
+ -DENABLE_WAV=ON
+ -DOPENAL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include
+ OPTIONS_RELEASE -DENABLE_SIMD=ON
+ OPTIONS_DEBUG -DENABLE_SIMD=OFF
+)
+
+vcpkg_install_cmake()
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/COPYING.LESSER DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmikmod)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmikmod/COPYING.LESSER ${CURRENT_PACKAGES_DIR}/share/libmikmod/copyright)
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
+endif() \ No newline at end of file