Files
haikuports/dev-libs/tvision/patches/tvision-2024.02.04~git.patchset
OscarL 492a62c623 tvision: new recipe. (#10135)
Leaving tests disabled, as they are run during BUILD.

All test passed locally.
2024-02-25 17:16:20 +01:00

106 lines
3.4 KiB
Plaintext

From eec0ebb78fa9325b1438a2779d2522eace82d317 Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Wed, 27 Dec 2023 14:53:46 -0300
Subject: Fix build under Haiku beta4.
Otherwise we get:
/boot/system/develop/headers/posix/string.h:72:26: error: conflicting declaration of 'char* strupr(char*)' with 'C' linkage
72 | extern char *strupr(char *string);
| ^~~~~~
In file included from /sources/tvision/include/tvision/tv.h:666:
/sources/tvision/include/tvision/util.h:106:7: note: previous declaration with 'C++' linkage
Changes to be committed:
106 | char *strupr(char *s) noexcept;
| ^~~~~~
Kudos to @coolcoder613eb.
diff --git a/include/tvision/util.h b/include/tvision/util.h
index 9b2742a..c7afaf0 100644
--- a/include/tvision/util.h
+++ b/include/tvision/util.h
@@ -103,7 +103,9 @@ int vsnprintf( char _FAR *buffer, size_t size, const char _FAR *format,
int stricmp( const char *s1, const char *s2 ) noexcept;
int strnicmp( const char *s1, const char *s2, size_t maxlen ) noexcept;
+#ifndef __HAIKU__
char *strupr(char *s) noexcept;
+#endif
char *itoa( int value, char *buffer, int radix ) noexcept;
char *ltoa( long value, char *buffer, int radix ) noexcept;
char *ultoa( ulong value, char *buffer, int radix ) noexcept;
--
2.43.2
From 1bf36a1b4ffa2022faac9da0fa3339d17c8c9c69 Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Wed, 27 Dec 2023 15:52:53 -0300
Subject: Compile as a shared library.
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index 253e3f2..a2824e0 100644
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -3,7 +3,7 @@
file(GLOB_RECURSE TVSOURCE "${CMAKE_CURRENT_LIST_DIR}/*/*.cpp")
list(REMOVE_ITEM TVSOURCE "${CMAKE_CURRENT_LIST_DIR}/tvision/geninc.cpp")
-add_library(${PROJECT_NAME} STATIC ${TVSOURCE})
+add_library(${PROJECT_NAME} SHARED ${TVSOURCE})
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_14)
--
2.43.2
From b6e657c29d4fc90dc0b4ebba790660b28270b5e2 Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Wed, 27 Dec 2023 18:51:15 -0300
Subject: Fix headers file location.
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index a2824e0..5a391a3 100644
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -169,7 +169,8 @@ install(EXPORT ${PROJECT_NAME}-config
# includes
# ./include/tvision and children copied to destination/include/tvision etc...
#
-install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/tvision" DESTINATION include)
+install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/tvision" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+
# Build optimization
--
2.43.2
From 1cd6a68cc98b7ca46f89cd655de180cb3d046f1a Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Fri, 23 Feb 2024 08:23:45 -0300
Subject: Fix hardcoded lib/cmake path.
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index 5a391a3..bd81cb2 100644
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -160,7 +160,7 @@ install(TARGETS ${PROJECT_NAME}
# package configuration
install(EXPORT ${PROJECT_NAME}-config
- DESTINATION lib/cmake/${PROJECT_NAME}
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
NAMESPACE ${PROJECT_NAME}::
FILE ${PROJECT_NAME}-config.cmake
COMPONENT library
--
2.43.2