aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/eabase
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/eabase
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/eabase')
-rw-r--r--vcpkg/ports/eabase/EABaseConfig.cmake.in6
-rw-r--r--vcpkg/ports/eabase/fix_cmake_install.patch61
-rw-r--r--vcpkg/ports/eabase/portfile.cmake29
-rw-r--r--vcpkg/ports/eabase/vcpkg.json16
4 files changed, 112 insertions, 0 deletions
diff --git a/vcpkg/ports/eabase/EABaseConfig.cmake.in b/vcpkg/ports/eabase/EABaseConfig.cmake.in
new file mode 100644
index 0000000..afc9b10
--- /dev/null
+++ b/vcpkg/ports/eabase/EABaseConfig.cmake.in
@@ -0,0 +1,6 @@
+@PACKAGE_INIT@
+
+# Provide path for scripts
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
+
+include(${CMAKE_CURRENT_LIST_DIR}/EABaseTargets.cmake) \ No newline at end of file
diff --git a/vcpkg/ports/eabase/fix_cmake_install.patch b/vcpkg/ports/eabase/fix_cmake_install.patch
new file mode 100644
index 0000000..67c1b61
--- /dev/null
+++ b/vcpkg/ports/eabase/fix_cmake_install.patch
@@ -0,0 +1,61 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 652f07f..264aaf5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -4,6 +4,9 @@
+ cmake_minimum_required(VERSION 3.1)
+ project(EABase CXX)
+
++include(GNUInstallDirs)
++include(CMakePackageConfigHelpers)
++
+ #-------------------------------------------------------------------------------------------
+ # Options
+ #-------------------------------------------------------------------------------------------
+@@ -24,14 +27,38 @@ add_definitions(-D_CHAR16T)
+ #-------------------------------------------------------------------------------------------
+ # Header only library
+ #-------------------------------------------------------------------------------------------
+-add_library(EABase INTERFACE)
+-
++add_library(EABase INTERFACE)
++add_library(EABase::EABase ALIAS EABase)
+ #-------------------------------------------------------------------------------------------
+ # Include dirs
+ #-------------------------------------------------------------------------------------------
+-target_include_directories(EABase INTERFACE include/Common)
+-
+-#-------------------------------------------------------------------------------------------
+-# Installation
+-#-------------------------------------------------------------------------------------------
+-install(DIRECTORY include/Common/EABase DESTINATION include)
++target_include_directories(EABase INTERFACE
++ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include/Common>
++ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
++)
++# create and install an export set for eabase target as EABase::EABase
++set(EABase_CMAKE_CONFIG_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/EABase")
++configure_package_config_file(
++ EABaseConfig.cmake.in
++ ${CMAKE_CURRENT_BINARY_DIR}/EABaseConfig.cmake
++ INSTALL_DESTINATION ${EABase_CMAKE_CONFIG_DESTINATION}
++)
++# create and install an export set for Terra target as Terra
++install(
++ TARGETS EABase EXPORT EABaseTargets
++ DESTINATION ${CMAKE_INSTALL_LIBDIR}
++)
++install(EXPORT EABaseTargets DESTINATION ${EABase_CMAKE_CONFIG_DESTINATION})
++write_basic_package_version_file(
++ "${CMAKE_CURRENT_BINARY_DIR}/EABaseConfigVersion.cmake"
++ VERSION 2.09.12
++ COMPATIBILITY SameMajorVersion
++)
++install(TARGETS EABase LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
++install(DIRECTORY "include/Common/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
++install(
++ FILES
++ "${CMAKE_CURRENT_BINARY_DIR}/EABaseConfig.cmake"
++ "${CMAKE_CURRENT_BINARY_DIR}/EABaseConfigVersion.cmake"
++ DESTINATION ${EABase_CMAKE_CONFIG_DESTINATION}
++)
diff --git a/vcpkg/ports/eabase/portfile.cmake b/vcpkg/ports/eabase/portfile.cmake
new file mode 100644
index 0000000..21c520f
--- /dev/null
+++ b/vcpkg/ports/eabase/portfile.cmake
@@ -0,0 +1,29 @@
+vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO electronicarts/EABase
+ REF 123363eb82e132c0181ac53e43226d8ee76dea12
+ SHA512 8df5279d1b303047e832b8b0ddb6cdf51cca753efaeb2a36f7fa5ebc015c2f37cc6a68184b919deb45f09dfd89f9f8f79f18c487817d231f1b049102ceae610f
+ HEAD_REF master
+ PATCHES
+ fix_cmake_install.patch
+)
+
+file(COPY "${CMAKE_CURRENT_LIST_DIR}/EABaseConfig.cmake.in" DESTINATION "${SOURCE_PATH}")
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DEABASE_BUILD_TESTS:BOOL=OFF
+)
+vcpkg_cmake_install()
+
+vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/EABase)
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/lib")
+
+vcpkg_copy_pdbs()
+
+# Handle copyright
+file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
diff --git a/vcpkg/ports/eabase/vcpkg.json b/vcpkg/ports/eabase/vcpkg.json
new file mode 100644
index 0000000..f4af37e
--- /dev/null
+++ b/vcpkg/ports/eabase/vcpkg.json
@@ -0,0 +1,16 @@
+{
+ "name": "eabase",
+ "version-date": "2024-08-18",
+ "description": "Electronic Arts Base. EABase is a small set of header files that define platform-independent data types and macros.",
+ "homepage": "https://github.com/electronicarts/EABase",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}