aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcodicodi <rob.ceglinski@gmail.com>2017-07-25 15:05:23 +0200
committercodicodi <rob.ceglinski@gmail.com>2017-07-25 15:56:17 +0200
commita01242655af7aba9712156b803e7c4381b234fc2 (patch)
tree8a0573b2cafc1eddac984fb1c41a6b4ffbe79637
parentb277b4dda3a2793fd59a6cca5de96f8bc65f1357 (diff)
downloadvcpkg-a01242655af7aba9712156b803e7c4381b234fc2.tar.gz
vcpkg-a01242655af7aba9712156b803e7c4381b234fc2.zip
[openal-soft] update to 1.18.0
-rw-r--r--ports/openal-soft/CONTROL4
-rw-r--r--ports/openal-soft/dont-export-symbols-in-static-build.patch13
-rw-r--r--ports/openal-soft/portfile.cmake59
3 files changed, 63 insertions, 13 deletions
diff --git a/ports/openal-soft/CONTROL b/ports/openal-soft/CONTROL
index e54c98e64..4d423e2fa 100644
--- a/ports/openal-soft/CONTROL
+++ b/ports/openal-soft/CONTROL
@@ -1,3 +1,3 @@
Source: openal-soft
-Version: 1.17.2
-Description: OpenAL Soft is an LGPL-licensed, cross-platform, software implementation of the OpenAL 3D audio API. \ No newline at end of file
+Version: 1.18.0
+Description: OpenAL Soft is an LGPL-licensed, cross-platform, software implementation of the OpenAL 3D audio API.
diff --git a/ports/openal-soft/dont-export-symbols-in-static-build.patch b/ports/openal-soft/dont-export-symbols-in-static-build.patch
new file mode 100644
index 000000000..6663ad208
--- /dev/null
+++ b/ports/openal-soft/dont-export-symbols-in-static-build.patch
@@ -0,0 +1,13 @@
+diff --git a/config.h.in b/config.h.in
+index a71b54f..8d84645 100644
+--- a/config.h.in
++++ b/config.h.in
+@@ -1,6 +1,8 @@
+ /* API declaration export attribute */
++#ifndef AL_LIBTYPE_STATIC
+ #define AL_API ${EXPORT_DECL}
+ #define ALC_API ${EXPORT_DECL}
++#endif
+
+ /* Define any available alignment declaration */
+ #define ALIGN(x) ${ALIGN_DECL}
diff --git a/ports/openal-soft/portfile.cmake b/ports/openal-soft/portfile.cmake
index bfb8b4ffb..992993821 100644
--- a/ports/openal-soft/portfile.cmake
+++ b/ports/openal-soft/portfile.cmake
@@ -1,32 +1,69 @@
-if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
- message(STATUS "Warning: Static building not supported yet. Building dynamic.")
- set(VCPKG_LIBRARY_LINKAGE dynamic)
+if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
+ message(FATAL_ERROR "WindowsStore not supported")
endif()
+
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openal-soft-1.17.2)
-vcpkg_download_distfile(ARCHIVE
- URLS "http://openal-soft.org/openal-releases/openal-soft-1.17.2.tar.bz2"
- FILENAME "openal-soft-1.17.2.tar.bz2"
- MD5 1764e0d8fec499589b47ebc724e0913d
- SHA512 50c20cd3ddada55d91643a79c2894d5a14315d5fc1ed8e870e3d8d3f410e8b7d8da29b838226e7fce37fbeca719ff919b51806f72e4cd529a18fbe8bd68860e3
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO kcat/openal-soft
+ REF openal-soft-1.18.0
+ SHA512 b3f1ac7eaaef38ef960cdfaf7bd475c32258f752718e762333188837ab33eb6e3f9a39776138a52a434dec42157ffba10f0592ef8d3ec3b023a5261e05832a69
+ HEAD_REF master
)
-vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH}
+ PATCHES ${CMAKE_CURRENT_LIST_DIR}/dont-export-symbols-in-static-build.patch)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+ set(OPENAL_LIBTYPE "SHARED")
+else()
+ set(OPENAL_LIBTYPE "STATIC")
+endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
OPTIONS
+ -DLIBTYPE=${OPENAL_LIBTYPE}
-DALSOFT_UTILS=OFF
-DALSOFT_NO_CONFIG_UTIL=ON
-DALSOFT_EXAMPLES=OFF
-DALSOFT_TESTS=OFF
-DALSOFT_CONFIG=OFF
-DALSOFT_HRTF_DEFS=OFF
+ -DALSOFT_AMBDEC_PRESETS=OFF
+ -DALSOFT_BACKEND_ALSA=OFF
+ -DALSOFT_BACKEND_OSS=OFF
+ -DALSOFT_BACKEND_SOLARIS=OFF
+ -DALSOFT_BACKEND_SNDIO=OFF
+ -DALSOFT_BACKEND_QSA=OFF
+ -DALSOFT_BACKEND_PORTAUDIO=OFF
+ -DALSOFT_BACKEND_PULSEAUDIO=OFF
+ -DALSOFT_BACKEND_COREAUDIO=OFF
+ -DALSOFT_BACKEND_JACK=OFF
+ -DALSOFT_BACKEND_OPENSL=OFF
+ -DALSOFT_BACKEND_WAVE=ON
+ -DALSOFT_REQUIRE_WINMM=ON
+ -DALSOFT_REQUIRE_DSOUND=ON
+ -DALSOFT_REQUIRE_MMDEVAPI=ON
)
vcpkg_install_cmake()
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/OpenAL)
+
+foreach(HEADER al.h alc.h)
+ file(READ ${CURRENT_PACKAGES_DIR}/include/AL/${HEADER} AL_H)
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ string(REPLACE "defined(AL_LIBTYPE_STATIC)" "1" AL_H "${AL_H}")
+ else()
+ string(REPLACE "defined(AL_LIBTYPE_STATIC)" "0" AL_H "${AL_H}")
+ endif()
+ file(WRITE ${CURRENT_PACKAGES_DIR}/include/AL/${HEADER} "${AL_H}")
+endforeach()
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/openal-soft)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/openal-soft/COPYING ${CURRENT_PACKAGES_DIR}/share/openal-soft/copyright)
vcpkg_copy_pdbs()
-