Cleanup cmake-2.8.11.2 recipe and patch

* Some tests are not passing, so marking the port as broken for now.
 * Make sure the patch is actually used when building.
This commit is contained in:
Adrien Destugues
2013-10-01 10:47:50 +02:00
parent 5da5387840
commit f0cda2a5a4
2 changed files with 148 additions and 114 deletions

View File

@@ -1,33 +1,58 @@
DESCRIPTION="cmake - Cross platform Make"
SUMMARY="Cross platform Make"
DESCRIPTION="CMake is a cross-platform, open-source build system. It is a
family of tools designed to build, test and package software. CMake is used
to control the software compilation process using simple platform and
compiler independent configuration files. CMake generates native makefiles
and workspaces that can be used in the compiler environment of your choice.
"
HOMEPAGE="http://www.cmake.org"
LICENSE="CMake"
COPYRIGHT="2002-2013 Kitware, Inc., Insight Consortium, All rights reserved."
SRC_URI="http://www.cmake.org/files/v2.8/cmake-2.8.11.2.tar.gz"
#CHECKSUM_MD5=""
CHECKSUM_MD5="6f5d7b8e7534a5d9e1a7664ba63cf882"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND=""
BUILD {
cd cmake-2.8.11.2
# cmake appends the prefix to mandir and datadir
# so using ../../ to back that part out but for some reason
# the doc was also picking up /boot, so had to back it out 3 times
# this seems to work but might still need some further adjusting
# sed -i 's/${CMAKE_DATA_DIR}\/include cmCPluginAPI.h/${CMAKE_PREFIX_DIR}\/include cmCPluginAPI.h/g' Source/CMakeLists.txt
./configure --prefix=`finddir B_COMMON_DIRECTORY` \
--datadir=/data/cmake \
--docdir=/documentation/doc/CMake \
--mandir=/documentation/man
make
ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64"
PROVIDES="
cmake = $portVersion compat >= 2.8
cmd:cmake = $portVersion compat >= 2.8
cmd:cpack = $portVersion compat >= 2.8
cmd:ctest = $portVersion compat >= 2.8
"
REQUIRES="
haiku >= $haikuVersion
"
BUILD_REQUIRES="
lib:libncurses
"
BUILD_PREREQUIRES="
haiku_devel >= $haikuVersion
ncurses_devel
cmd:gcc
cmd:grep
cmd:ld
cmd:libtool
cmd:make
cmd:sed
"
PATCHES="cmake-2.8.11.2.patchset"
BUILD()
{
./configure --prefix=$prefix \
--datadir=/$relativeDataDir/cmake \
--docdir=/$relativeDocDir \
--mandir=/$relativeManDir
make $jobArgs
}
INSTALL {
cd cmake-2.8.11.2
INSTALL()
{
make install
}
TEST {
cd cmake-2.8.11.2
TEST()
{
make test
}
LICENSE="CMake"
COPYRIGHT="2002-2013 Kitware, Inc., Insight Consortium, All rights reserved."

View File

@@ -1,61 +1,66 @@
diff -urN cmake-2.8.11.2-orig/Modules/Platform/Haiku.cmake cmake-2.8.11.2/Modules/Platform/Haiku.cmake
--- cmake-2.8.11.2-orig/Modules/FindFreetype.cmake 2012-11-27 13:26:32.037486592 +0000
+++ cmake-2.8.11.2/Modules/FindFreetype.cmake 2013-02-10 23:15:25.000000000 +0000
@@ -46,20 +46,22 @@
HINTS
ENV FREETYPE_DIR
PATHS
+ /boot/develop/headers
From 9e15fe26a3a573bbe68face114d682b98a45c875 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Tue, 1 Oct 2013 10:36:36 +0200
Subject: Convert existing patch to patchset format.
* This will need cleanup, but it will do for now.
diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake
index 1df2399..2a68616 100644
--- a/Modules/FindFreetype.cmake
+++ b/Modules/FindFreetype.cmake
@@ -50,6 +50,7 @@ find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
/usr/local/X11R6
/usr/local/X11
/usr/freeware
- PATH_SUFFIXES include/freetype2 include
+ PATH_SUFFIXES include/freetype2 include 3rdparty
+ /boot/common/develop/headers
PATH_SUFFIXES include/freetype2 include
)
find_path(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
HINTS
ENV FREETYPE_DIR
PATHS
+ /boot/develop/headers
@@ -61,6 +62,7 @@ find_path(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
/usr/local/X11R6
/usr/local/X11
/usr/freeware
- PATH_SUFFIXES include/freetype2 include
+ PATH_SUFFIXES include/freetype2 include 3rdparty/freetype2 3rdparty
+ /boot/common/develop/headers
PATH_SUFFIXES include/freetype2 include
)
find_library(FREETYPE_LIBRARY
@@ -68,6 +70,7 @@
ENV FREETYPE_DIR
PATH_SUFFIXES lib
PATHS
+ /boot/system/lib
@@ -74,6 +76,7 @@ find_library(FREETYPE_LIBRARY
/usr/local/X11R6
/usr/local/X11
/usr/freeware
--- cmake-2.8.11.2-orig/Modules/Platform/Haiku.cmake 2012-12-03 12:11:47.804519936 -0800
+++ cmake-2.8.11.2/Modules/Platform/Haiku.cmake 2012-12-03 12:02:17.652738560 -0800
+ /boot/develop/lib
)
# set the user variables
diff --git a/Modules/Platform/Haiku.cmake b/Modules/Platform/Haiku.cmake
index 8987783..3236b58 100644
--- a/Modules/Platform/Haiku.cmake
+++ b/Modules/Platform/Haiku.cmake
@@ -1,20 +1,25 @@
-set(BEOS 1)
+set(HAIKU 1)
+set(UNIX 1)
+
+set(CMAKE_DL_LIBS "")
-set(BEOS 1)
-
-set(CMAKE_DL_LIBS root be)
-set(CMAKE_C_COMPILE_OPTIONS_PIC "-fPIC")
-set(CMAKE_C_COMPILE_OPTIONS_PIE "-fPIE")
+set(CMAKE_DL_LIBS "")
set(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")
+set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared")
-set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-nostart")
+set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared")
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
+set(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
+set(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
+
-include(Platform/UnixPaths)
-list(APPEND CMAKE_SYSTEM_PREFIX_PATH /boot/common)
-list(APPEND CMAKE_SYSTEM_INCLUDE_PATH /boot/common/include)
-list(APPEND CMAKE_SYSTEM_LIBRARY_PATH /boot/common/lib)
-list(APPEND CMAKE_SYSTEM_PROGRAM_PATH /boot/common/bin)
-list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES /boot/common/lib)
+list(APPEND CMAKE_SYSTEM_PREFIX_PATH
+ /boot/common/non-packaged
+ /boot/common
@@ -66,19 +71,41 @@ diff -urN cmake-2.8.11.2-orig/Modules/Platform/Haiku.cmake cmake-2.8.11.2/Module
+ /boot/common/lib
+ /boot/develop/lib/x86
+ )
-
-include(Platform/UnixPaths)
-list(APPEND CMAKE_SYSTEM_PREFIX_PATH /boot/common)
-list(APPEND CMAKE_SYSTEM_INCLUDE_PATH /boot/common/include)
-list(APPEND CMAKE_SYSTEM_LIBRARY_PATH /boot/common/lib)
-list(APPEND CMAKE_SYSTEM_PROGRAM_PATH /boot/common/bin)
-list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES /boot/common/lib)
list(APPEND CMAKE_SYSTEM_INCLUDE_PATH /boot/develop/headers/3rdparty)
list(APPEND CMAKE_SYSTEM_LIBRARY_PATH /boot/develop/lib/x86)
diff -urN cmake-2.8.11.2-orig/Source/cmExportCommand.cxx cmake-2.8.11.2/Source/cmExportCommand.cxx
--- cmake-2.8.11.2-orig/Source/cmExportCommand.cxx 2012-11-27 05:26:33.039059456 -0800
+++ cmake-2.8.11.2/Source/cmExportCommand.cxx 2012-12-03 12:02:17.665059328 -0800
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 7cc1522..5d66522 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -26,7 +26,8 @@
#include <algorithm>
#if defined(__HAIKU__)
-#include <StorageKit.h>
+#include <FindDirectory.h>
+#include <StorageDefs.h>
#endif
//----------------------------------------------------------------------
@@ -1263,10 +1264,10 @@ const char* cmCPackGenerator::GetInstallPath()
this->InstallPath += "-";
this->InstallPath += this->GetOption("CPACK_PACKAGE_VERSION");
#elif defined(__HAIKU__)
- BPath dir;
- if (find_directory(B_COMMON_DIRECTORY, &dir) == B_OK)
+ char dir[B_PATH_NAME_LENGTH];
+ if (find_directory(B_COMMON_DIRECTORY, -1, false, dir, sizeof(dir)) == B_OK)
{
- this->InstallPath = dir.Path();
+ this->InstallPath = dir;
}
else
{
diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx
index 1cc1754..fcb66a7 100644
--- a/Source/cmExportCommand.cxx
+++ b/Source/cmExportCommand.cxx
@@ -20,7 +20,8 @@
#include "cmExportBuildFileGenerator.h"
@@ -89,7 +116,7 @@ diff -urN cmake-2.8.11.2-orig/Source/cmExportCommand.cxx cmake-2.8.11.2/Source/c
#endif
cmExportCommand::cmExportCommand()
@@ -305,14 +306,15 @@
@@ -305,14 +306,15 @@ void cmExportCommand::StorePackageRegistryDir(std::string const& package,
const char* hash)
{
#if defined(__HAIKU__)
@@ -110,9 +137,10 @@ diff -urN cmake-2.8.11.2-orig/Source/cmExportCommand.cxx cmake-2.8.11.2/Source/c
#else
const char* home = cmSystemTools::GetEnv("HOME");
if(!home)
diff -urN cmake-2.8.11.2-orig/Source/cmFindPackageCommand.cxx cmake-2.8.11.2/Source/cmFindPackageCommand.cxx
--- cmake-2.8.11.2-orig/Source/cmFindPackageCommand.cxx 2012-11-27 05:26:33.059768832 -0800
+++ cmake-2.8.11.2/Source/cmFindPackageCommand.cxx 2012-12-03 12:02:17.666107904 -0800
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index aa3a73d..a09958b 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -19,7 +19,9 @@
#endif
@@ -124,7 +152,7 @@ diff -urN cmake-2.8.11.2-orig/Source/cmFindPackageCommand.cxx cmake-2.8.11.2/Sou
#endif
void cmFindPackageNeedBackwardsCompatibility(const std::string& variable,
@@ -1583,12 +1585,13 @@
@@ -1584,12 +1586,13 @@ void cmFindPackageCommand::AddPrefixesUserRegistry()
#if defined(_WIN32) && !defined(__CYGWIN__)
this->LoadPackageRegistryWinUser();
#elif defined(__HAIKU__)
@@ -143,9 +171,10 @@ diff -urN cmake-2.8.11.2-orig/Source/cmFindPackageCommand.cxx cmake-2.8.11.2/Sou
}
#else
if(const char* home = cmSystemTools::GetEnv("HOME"))
diff -urN cmake-2.8.11.2-orig/Source/cmLocalGenerator.cxx cmake-2.8.11.2/Source/cmLocalGenerator.cxx
--- cmake-2.8.11.2-orig/Source/cmLocalGenerator.cxx 2012-11-27 05:26:33.035389440 -0800
+++ cmake-2.8.11.2/Source/cmLocalGenerator.cxx 2012-12-03 12:02:17.672399360 -0800
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index ee5b9d8..ba8faf3 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -37,7 +37,8 @@
#include <assert.h>
@@ -156,7 +185,7 @@ diff -urN cmake-2.8.11.2-orig/Source/cmLocalGenerator.cxx cmake-2.8.11.2/Source/
#endif
cmLocalGenerator::cmLocalGenerator()
@@ -354,12 +355,12 @@
@@ -354,12 +355,12 @@ void cmLocalGenerator::GenerateInstallRules()
prefix = prefix_win32.c_str();
}
#elif defined(__HAIKU__)
@@ -172,37 +201,11 @@ diff -urN cmake-2.8.11.2-orig/Source/cmLocalGenerator.cxx cmake-2.8.11.2/Source/
}
else
{
diff -urN cmake-2.8.11.2-orig/Source/CPack/cmCPackGenerator.cxx cmake-2.8.11.2/Source/CPack/cmCPackGenerator.cxx
--- cmake-2.8.11.2-orig/Source/CPack/cmCPackGenerator.cxx 2012-11-27 05:26:32.015466496 -0800
+++ cmake-2.8.11.2/Source/CPack/cmCPackGenerator.cxx 2012-12-03 12:02:17.677904384 -0800
@@ -27,7 +27,8 @@
#include <algorithm>
#if defined(__HAIKU__)
-#include <StorageKit.h>
+#include <FindDirectory.h>
+#include <StorageDefs.h>
#endif
//----------------------------------------------------------------------
@@ -1265,10 +1266,10 @@
this->InstallPath += "-";
this->InstallPath += this->GetOption("CPACK_PACKAGE_VERSION");
#elif defined(__HAIKU__)
- BPath dir;
- if (find_directory(B_COMMON_DIRECTORY, &dir) == B_OK)
+ char dir[B_PATH_NAME_LENGTH];
+ if (find_directory(B_COMMON_DIRECTORY, -1, false, dir, sizeof(dir)) == B_OK)
{
- this->InstallPath = dir.Path();
+ this->InstallPath = dir;
}
else
{
diff -urN cmake-2.8.11.2-orig/Tests/ComplexOneConfig/Library/CMakeLists.txt cmake-2.8.11.2/Tests/ComplexOneConfig/Library/CMakeLists.txt
--- cmake-2.8.11.2-orig/Tests/ComplexOneConfig/Library/CMakeLists.txt 2012-11-27 05:26:34.013369344 -0800
+++ cmake-2.8.11.2/Tests/ComplexOneConfig/Library/CMakeLists.txt 2012-12-03 12:02:42.181665792 -0800
@@ -51,7 +51,7 @@
diff --git a/Tests/ComplexOneConfig/Library/CMakeLists.txt b/Tests/ComplexOneConfig/Library/CMakeLists.txt
index 5c43052..f00cbd6 100644
--- a/Tests/ComplexOneConfig/Library/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/Library/CMakeLists.txt
@@ -51,7 +51,7 @@ define_property(
FULL_DOCS "A simple etst proerty that means nothign and is used for nothing"
)
set_target_properties(CMakeTestCLibraryShared PROPERTIES FOO BAR)
@@ -211,10 +214,11 @@ diff -urN cmake-2.8.11.2-orig/Tests/ComplexOneConfig/Library/CMakeLists.txt cmak
set_target_properties(CMakeTestCLibraryShared PROPERTIES LINK_FLAGS "-lm")
endif()
get_target_property(FOO_BAR_VAR CMakeTestCLibraryShared FOO)
diff -urN cmake-2.8.11.2-orig/Utilities/cmcurl/CMake/CurlTests.c cmake-2.8.11.2/Utilities/cmcurl/CMake/CurlTests.c
--- cmake-2.8.11.2-orig/Utilities/cmcurl/CMake/CurlTests.c 2012-11-27 05:26:34.045350912 -0800
+++ cmake-2.8.11.2/Utilities/cmcurl/CMake/CurlTests.c 2012-12-03 12:02:42.189005824 -0800
@@ -38,7 +38,7 @@
diff --git a/Utilities/cmcurl/CMake/CurlTests.c b/Utilities/cmcurl/CMake/CurlTests.c
index d74a4f0..c5ba7c2 100644
--- a/Utilities/cmcurl/CMake/CurlTests.c
+++ b/Utilities/cmcurl/CMake/CurlTests.c
@@ -38,7 +38,7 @@ main ()
# define PLATFORM_AIX_V3
#endif
@@ -223,9 +227,10 @@ diff -urN cmake-2.8.11.2-orig/Utilities/cmcurl/CMake/CurlTests.c cmake-2.8.11.2/
#error "O_NONBLOCK does not work on this platform"
#endif
int socket;
diff -urN cmake-2.8.11.2-orig/Utilities/cmcurl/select.c cmake-2.8.11.2/Utilities/cmcurl/select.c
--- cmake-2.8.11.2-orig/Utilities/cmcurl/select.c 2012-11-27 05:26:34.055312384 -0800
+++ cmake-2.8.11.2/Utilities/cmcurl/select.c 2012-12-03 12:02:42.189792256 -0800
diff --git a/Utilities/cmcurl/select.c b/Utilities/cmcurl/select.c
index 51adbcf..82f9dc2 100644
--- a/Utilities/cmcurl/select.c
+++ b/Utilities/cmcurl/select.c
@@ -39,7 +39,7 @@
#error "We can't compile without select() support!"
#endif
@@ -235,9 +240,10 @@ diff -urN cmake-2.8.11.2-orig/Utilities/cmcurl/select.c cmake-2.8.11.2/Utilities
/* BeOS has FD_SET defined in socket.h */
#include <socket.h>
#endif
diff -urN cmake-2.8.11.2-orig/Utilities/cmzlib/zconf.h cmake-2.8.11.2/Utilities/cmzlib/zconf.h
--- cmake-2.8.11.2-orig/Utilities/cmzlib/zconf.h 2012-11-27 05:26:34.022020096 -0800
+++ cmake-2.8.11.2/Utilities/cmzlib/zconf.h 2012-12-03 12:02:42.190578688 -0800
diff --git a/Utilities/cmzlib/zconf.h b/Utilities/cmzlib/zconf.h
index 6eb52d1..7a3b6fd 100644
--- a/Utilities/cmzlib/zconf.h
+++ b/Utilities/cmzlib/zconf.h
@@ -237,7 +237,7 @@
# endif
#endif
@@ -247,3 +253,6 @@ diff -urN cmake-2.8.11.2-orig/Utilities/cmzlib/zconf.h cmake-2.8.11.2/Utilities/
# ifdef ZLIB_DLL
# ifdef ZLIB_INTERNAL
# define ZEXPORT __declspec(dllexport)
--
1.8.3.4