Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gts] Enables osx and android, fixes, cleanup. #34673

Merged
merged 8 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions ports/gts/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
cmake_minimum_required(VERSION 3.14)

project(gts C)
project(gts VERSION "${VERSION}" LANGUAGES C)

find_package(PkgConfig REQUIRED)
pkg_check_modules(GLIB2 glib-2.0 IMPORTED_TARGET)

if(WIN32)
add_definitions(-DNATIVE_WIN32 -D_USE_MATH_DEFINES)
else()
add_definitions(-DHAVE_FPU_CONTROL_H)
include(CheckIncludeFile)
check_include_file("fpu_control.h" HAVE_FPU_CONTROL_H)
if(HAVE_FPU_CONTROL_H)
add_definitions(-DHAVE_FPU_CONTROL_H)
endif()
endif()

add_definitions(
-DGTS_COMPILATION
-DGTS_MAJOR_VERSION=0
-DGTS_MINOR_VERSION=7
-DGTS_MICRO_VERSION=6
-DGTS_MAJOR_VERSION=${PROJECT_VERSION_MAJOR}
-DGTS_MINOR_VERSION=${PROJECT_VERSION_MINOR}
-DGTS_MICRO_VERSION=${PROJECT_VERSION_PATCH}
-DGTS_INTERFACE_AGE=1
-DGTS_BINARY_AGE=1
-DGTS_VERSION=${GTS_MAJOR_VERSION}.${GTS_MINOR_VERSION}.${GTS_MICRO_VERSION}
-DGTS_VERSION=${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}
)

file(GLOB src src/*.c src/gts.def)
Expand Down
13 changes: 0 additions & 13 deletions ports/gts/fix-dllexport_2.patch

This file was deleted.

13 changes: 0 additions & 13 deletions ports/gts/fix_missing_extern.patch

This file was deleted.

17 changes: 6 additions & 11 deletions ports/gts/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
set(patches fix-dllexport.patch)
elseif(VCPKG_TARGET_IS_WINDOWS)
set(patches fix-dllexport_2.patch fix_missing_extern.patch)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FTR the dll exports are handled by upstream's def file now.

endif()

vcpkg_from_sourceforge(
OUT_SOURCE_PATH SOURCE_PATH
REPO gts/gts
REF 0.7.6
FILENAME gts-0.7.6.tar.gz
SHA512 645123b72dba3d04dad3c5d936d7e55947826be0fb25e84595368919b720deccddceb7c3b30865a5a40f2458254c2af793b7c014e6719cf07e7f8e6ff30890f8
PATCHES ${patches}
PATCHES
fix-dllexport.patch
)

file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
Expand All @@ -21,14 +16,14 @@ vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
"-DVERSION=${VERSION}"
)

vcpkg_cmake_install()

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

vcpkg_fixup_pkgconfig()
vcpkg_copy_pdbs()

configure_file("${SOURCE_PATH}/COPYING" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
7 changes: 3 additions & 4 deletions ports/gts/usage
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
The port gts supports consumption from CMake:
gts can be imported via CMake FindPkgConfig module:

find_package(PkgConfig REQUIRED)
pkg_check_modules(GTS gts REQUIRED)
target_compile_options(main PRIVATE ${GTS_CFLAGS})
target_link_libraries(main PRIVATE ${GTS_LDFLAGS})
pkg_check_modules(GTS gts REQUIRED IMPORTED_TARGET)
target_link_libraries(main PRIVATE PkgConfig::GTS)
6 changes: 3 additions & 3 deletions ports/gts/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "gts",
"version": "0.7.6",
"port-version": 7,
"port-version": 8,
"description": "3D surfaces meshed with interconnected triangles",
"homepage": "http://gts.sourceforge.net/",
"supports": "!osx",
"homepage": "https://gts.sourceforge.net/",
"license": "LGPL-2.0-or-later",
"dependencies": [
"glib",
{
Expand Down
4 changes: 1 addition & 3 deletions scripts/ci.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,6 @@ gstreamer:x64-android=fail
gstreamer:x64-windows-static = skip
gstreamer:x64-windows-static-md = skip
gtk:x64-windows-static-md=fail
gts:arm-neon-android=fail
gts:arm64-android=fail
gts:x64-android=fail
gul14:arm-neon-android=fail
gul14:arm64-android=fail
gul14:x64-android=fail
Expand All @@ -466,6 +463,7 @@ iceoryx:x64-android=fail
iceoryx:arm64-android=fail
iceoryx:arm-neon-android=fail
ignition-common1:x64-linux=fail
ignition-common1:x64-osx=fail
Comment on lines 465 to +466
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

osx didn't build before this PR, and now suffers from the same problem as linux.
So it is not a regression, and fixing it is out of scope for this PR. (With gz-common5, there is a working successor.)

ignition-msgs1:arm-neon-android=fail
ignition-msgs1:arm64-android=fail
ignition-msgs1:arm64-windows=fail
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3118,7 +3118,7 @@
},
"gts": {
"baseline": "0.7.6",
"port-version": 7
"port-version": 8
},
"gtsam": {
"baseline": "4.2a9",
Expand Down
5 changes: 5 additions & 0 deletions versions/g-/gts.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "1c12aefc981ca389e3235cf1940883f881dddb4d",
"version": "0.7.6",
"port-version": 8
},
{
"git-tree": "1bce412085edcd46e3f358cca2c3bb1cffb25cfa",
"version": "0.7.6",
Expand Down