mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
libplatform, fix for cmake > 4, move/rename to proper place (#12856)
This commit is contained in:
71
dev-libs/libplatform/libplatform-2.1.0.1.recipe
Normal file
71
dev-libs/libplatform/libplatform-2.1.0.1.recipe
Normal file
@@ -0,0 +1,71 @@
|
||||
SUMMARY="Platform support library used by libCEC and binary add-ons for Kodi"
|
||||
DESCRIPTION="This library provides platform specific support for other libraries"
|
||||
HOMEPAGE="http://libcec.pulse-eight.com/"
|
||||
COPYRIGHT="2011-2015 Pulse-Eight Limited"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="3"
|
||||
SOURCE_URI="https://github.com/Pulse-Eight/platform/archive/p8-platform-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="064f8d2c358895c7e0bea9ae956f8d46f3f057772cb97f2743a11d478a0f68a0"
|
||||
SOURCE_DIR="platform-p8-platform-$portVersion"
|
||||
PATCHES="libplatform-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libVersion="$portVersion"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
libplatform$secondaryArchSuffix = $portVersion
|
||||
lib:libp8_platform$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
REPLACES="
|
||||
libp8_platform$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
libplatform${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libp8_platform$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
libplatform$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
|
||||
-DCMAKE_INSTALL_PREFIX=$prefix \
|
||||
-DCMAKE_INSTALL_LIBDIR=$libDir \
|
||||
-DCMAKE_INSTALL_INCLUDEDIR=$includeDir \
|
||||
-DBUILD_SHARED_LIBS=1 \
|
||||
-Wno-dev
|
||||
|
||||
make -C build $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make -C build install
|
||||
|
||||
prepareInstalledDevelLib libp8-platform
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$libDir/cmake
|
||||
}
|
||||
115
dev-libs/libplatform/patches/libplatform-2.1.0.1.patchset
Normal file
115
dev-libs/libplatform/patches/libplatform-2.1.0.1.patchset
Normal file
@@ -0,0 +1,115 @@
|
||||
From fb9a73866d8264fd2457faa2449e768d363f0c91 Mon Sep 17 00:00:00 2001
|
||||
From: TURX <turx2003@gmail.com>
|
||||
Date: Thu, 23 Jan 2020 02:34:28 +0800
|
||||
Subject: add includedir support for cmake
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 7144b0b..8f09ba8 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -22,7 +22,7 @@ if(WIN32)
|
||||
src/windows/os-threads.cpp)
|
||||
endif()
|
||||
|
||||
-set(p8-platform_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include/p8-platform")
|
||||
+set(p8-platform_INCLUDE_DIRS "${CMAKE_INSTALL_INCLUDEDIR}/p8-platform")
|
||||
IF(WIN32)
|
||||
LIST(APPEND p8-platform_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include/p8-platform/windows")
|
||||
ENDIF(WIN32)
|
||||
@@ -42,7 +42,7 @@ set_target_properties(p8-platform PROPERTIES VERSION ${p8-platform_VERSION_MAJOR
|
||||
SOVERSION ${p8-platform_VERSION_MAJOR})
|
||||
|
||||
install(TARGETS p8-platform DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
-install(FILES src/os.h DESTINATION include/p8-platform)
|
||||
+install(FILES src/os.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/p8-platform)
|
||||
IF(WIN32)
|
||||
INSTALL(FILES src/windows/dlfcn-win32.h
|
||||
src/windows/os-socket.h
|
||||
@@ -53,23 +53,23 @@ ELSE(WIN32)
|
||||
install(FILES src/posix/os-socket.h
|
||||
src/posix/os-threads.h
|
||||
src/posix/os-types.h
|
||||
- DESTINATION include/p8-platform/posix)
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/p8-platform/posix)
|
||||
ENDIF(WIN32)
|
||||
install(FILES src/sockets/cdevsocket.h
|
||||
src/sockets/socket.h
|
||||
src/sockets/tcp.h
|
||||
- DESTINATION include/p8-platform/sockets)
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/p8-platform/sockets)
|
||||
install(FILES src/threads/atomics.h
|
||||
src/threads/mutex.h
|
||||
src/threads/threads.h
|
||||
- DESTINATION include/p8-platform/threads)
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/p8-platform/threads)
|
||||
install(FILES src/util/atomic.h
|
||||
src/util/buffer.h
|
||||
src/util/StringUtils.h
|
||||
src/util/StdString.h
|
||||
src/util/timeutils.h
|
||||
src/util/util.h
|
||||
- DESTINATION include/p8-platform/util)
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/p8-platform/util)
|
||||
|
||||
IF(NOT WIN32)
|
||||
configure_file(p8-platform.pc.in p8-platform.pc @ONLY)
|
||||
diff --git a/p8-platform.pc.in b/p8-platform.pc.in
|
||||
index f97a2d4..611edb7 100644
|
||||
--- a/p8-platform.pc.in
|
||||
+++ b/p8-platform.pc.in
|
||||
@@ -1,6 +1,6 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@
|
||||
-includedir=@CMAKE_INSTALL_PREFIX@/include
|
||||
+includedir=@CMAKE_INSTALL_INCLUDEDIR@
|
||||
DEPENDENCIES=@p8-platform_LIBRARIES@
|
||||
|
||||
Name: @p8-platform_NAME@
|
||||
--
|
||||
2.37.3
|
||||
|
||||
|
||||
From c34abe1d4c86660a8b62d041bacea12347624943 Mon Sep 17 00:00:00 2001
|
||||
From: TURX <turx2003@gmail.com>
|
||||
Date: Thu, 23 Jan 2020 02:34:56 +0800
|
||||
Subject: fix Haiku support
|
||||
|
||||
|
||||
diff --git a/src/posix/os-types.h b/src/posix/os-types.h
|
||||
index 7fb832c..dcb8a61 100644
|
||||
--- a/src/posix/os-types.h
|
||||
+++ b/src/posix/os-types.h
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <sys/time.h>
|
||||
-#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__)
|
||||
+#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__HAIKU__)
|
||||
#include <sys/prctl.h>
|
||||
#endif
|
||||
#include <pthread.h>
|
||||
--
|
||||
2.37.3
|
||||
|
||||
|
||||
From 16da42d05ffcd5518c32d65a16bc1270b7484a0b Mon Sep 17 00:00:00 2001
|
||||
From: begasus <begasus@gmail.com>
|
||||
Date: Fri, 7 Apr 2023 09:08:19 +0200
|
||||
Subject: Set correct path for cmake configuration file
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 8f09ba8..084f851 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -81,5 +81,5 @@ ENDIF(NOT WIN32)
|
||||
configure_file (p8-platform-config.cmake.in
|
||||
p8-platform-config.cmake @ONLY)
|
||||
install(FILES ${CMAKE_BINARY_DIR}/p8-platform-config.cmake
|
||||
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/p8-platform)
|
||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/p8-platform)
|
||||
|
||||
--
|
||||
2.37.3
|
||||
|
||||
Reference in New Issue
Block a user