Skip to content

Commit

Permalink
[pixel] Update to master (#23550)
Browse files Browse the repository at this point in the history
* Remove pixel from ci baseline

* don't build examples

* [pixel] update to master

* copy license from portfile.cmake

* version

* license

* version

* fix typo

* version

* use version-date

* version

* change version date to today

* version

* disable crt warnings on uwp

* version
  • Loading branch information
Thomas1664 committed Mar 16, 2022
1 parent 1449bea commit 4a34f75
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 18 deletions.
38 changes: 38 additions & 0 deletions ports/pixel/001-prevent-examples.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b910231..71f7ddf 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,6 +34,8 @@ else()
target_link_libraries(pixel PUBLIC SDL2::SDL2)
endif()

+option(BUILD_EXAMPLES "Build examples" OFF)
+if(BUILD_EXAMPLES)
add_executable(image_swap examples/image_swap/src/image_swap.cpp)
target_link_libraries(image_swap PRIVATE pixel)
add_executable(randomdots examples/randomdots/src/randomdots.cpp)
@@ -50,7 +52,11 @@ add_executable(simple examples/simple/src/simple.cpp)
target_link_libraries(simple PRIVATE pixel)
add_executable(starfield examples/starfield/src/starfield.cpp)
target_link_libraries(starfield PRIVATE pixel)
+endif()

+if(MSVC)
+ add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
+endif()

# Install Section
include(GNUInstallDirs)
@@ -87,12 +93,6 @@ install(
DESTINATION ${CMAKE_INSTALL_PREFIX}
)

-install(
- FILES
- ${PROJECT_SOURCE_DIR}/LICENSE
- DESTINATION ${CMAKE_INSTALL_DATADIR}/pixel/copyright
- )
-
install(
FILES
${PROJECT_BINARY_DIR}/pixelConfig.cmake
21 changes: 13 additions & 8 deletions ports/pixel/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,24 @@ endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO dascandy/pixel
REF v0.3
SHA512 d7d622679195d0eb30c8ed411333711369b108e2171d1e4b0a93c7ae3bd1fb36a25fbe1f5771c858615c07ee139412e5353b8cb5489cb409dd94829253c18a7b
REF c4411f67746fdd811aa5f8c102ac340e9eaf4ec5
SHA512 e4f704c076bb61220349524b0b1033a92c44128bb81e79dbd32ea2d1aa9d4abb0d6daab3617f69b59d1c1e50d750767153174fea015d8718804612f4d9f68ff6
HEAD_REF master
PATCHES
001-prevent-examples.patch
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_EXAMPLES=OFF
)

vcpkg_install_cmake()
vcpkg_cmake_install()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")

vcpkg_copy_pdbs()

file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
9 changes: 6 additions & 3 deletions ports/pixel/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"name": "pixel",
"version": "0.3",
"port-version": 4,
"version-date": "2022-03-15",
"description": "Simple 2D Graphics based on standard and portable OpenGL.",
"homepage": "https://github.com/dascandy/pixel",
"supports": "!windows",
"license": "Apache-2.0",
"dependencies": [
"glew",
"opengl",
Expand All @@ -19,6 +18,10 @@
{
"name": "sdl2",
"platform": "!linux"
},
{
"name": "vcpkg-cmake",
"host": true
}
]
}
5 changes: 0 additions & 5 deletions scripts/ci.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -966,11 +966,6 @@ pfring:x64-osx=fail
# errors, and warnings trigger with the Linux kernel headers in the Azure images.
pfring:x64-linux=fail
physx:arm64-windows=fail
pixel:x64-uwp=fail
pixel:x64-windows=fail
pixel:x64-windows-static=fail
pixel:x64-windows-static-md=fail
pixel:x86-windows=fail
pixman:arm-uwp=fail
platform-folders:arm-uwp=fail
platform-folders:x64-uwp=fail
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5361,8 +5361,8 @@
"port-version": 3
},
"pixel": {
"baseline": "0.3",
"port-version": 4
"baseline": "2022-03-15",
"port-version": 0
},
"pixman": {
"baseline": "0.40.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/p-/pixel.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "dbf76415a78802e7dc2717280e2a44123a04df69",
"version-date": "2022-03-15",
"port-version": 0
},
{
"git-tree": "346ea5fe92b2cfe055a1cd242868605e56d94318",
"version": "0.3",
Expand Down

0 comments on commit 4a34f75

Please sign in to comment.