Add recipe for libclaw.

This commit is contained in:
Adrien Destugues
2014-04-05 18:27:12 +02:00
parent 557903a154
commit c3d080908e
2 changed files with 179 additions and 0 deletions

View File

@@ -0,0 +1,90 @@
SUMMARY="Absolutely Wonderful C++ Library"
DESCRIPTION="
Claw is a generalist library written in C++ and providing various structures
and algorithms, like containers, string algorithms, tweeners, Bézier curves and
more.
The story of Claw begins when I wanted to group all the small tools I have made
along my studies at the university. The library progress from time to time,
mostly when I need a new tool for Plee the Bear, a game I am actively working
on.
Claw wants to be standard compliant and as portable as possible. Of course,
because I'm currently the only developer, the task is a little bit difficult
and you could have some minor problems. If you experience any problem, please
let me know by contacting me.
Claw stands for \"C++ Library Absolutely Wonderful\".
"
HOMEPAGE="http://libclaw.sourceforge.net/"
SRC_URI="http://sourceforge.net/projects/libclaw/files/libclaw/$portVersion/libclaw-$portVersion.tar.gz"
CHECKSUM_SIZE="341952"
CHECKSUM_RMD160="65347487ad9973b08f3f1d4aa0418ac4f947ec61"
CHECKSUM_SHA512="704dc49832210a502b69b691fba75272a7fa62ab4b1ee3b8c99a7923fd537084abdc6263fde495585113f4b3da257e0fe0525ccc2e2601347a8642aff6f0384b"
REVISION="1"
LICENSE="GNU LGPL v2.1"
COPYRIGHT="2008-2014 Julien Jorge"
ARCHITECTURES="x86 ?x86_64"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
else
ARCHITECTURES="$ARCHITECTURES !x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
libclaw$secondaryArchSuffix = $portVersion
lib:libclaw$secondaryArchSuffix
cmd:claw_config
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
lib:libpng$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
devel:libjpeg$secondaryArchSuffix
devel:libpng$secondaryArchSuffix
devel:libz$secondaryArchSuffix
boost_devel${secondaryArchSuffix}
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:cmake
cmd:make
cmd:gettext
"
PATCHES="libclaw-$portVersion.patchset"
BUILD()
{
cmake . -DCMAKE_INSTALL_PREFIX=$prefix
make $jobArgs
}
INSTALL()
{
make install
packageEntries devel $developDir $libDir/libclaw/
}
TEST() {
true
}
PROVIDES_devel="
libclaw${secondaryArchSuffix}_devel = $portVersion
devel:libclaw$secondaryArchSuffix
"
REQUIRES_devel="
haiku$secondaryArchSuffix >= $haikuVersion
libclaw$secondaryArchSuffix == $portVersion base
"

View File

@@ -0,0 +1,89 @@
From 3741d051e648f729859cb3957be8cfb35a3263c1 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sat, 5 Apr 2014 18:04:49 +0200
Subject: Add missing include.
diff --git a/claw/socket_traits_unix.hpp b/claw/socket_traits_unix.hpp
index 16761ab..bc471b0 100644
--- a/claw/socket_traits_unix.hpp
+++ b/claw/socket_traits_unix.hpp
@@ -31,6 +31,7 @@
#define __CLAW_SOCKET_TRAITS_UNIX_HPP__
#include <sys/types.h>
+#include <sys/select.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <netinet/in.h>
--
1.8.3.4
From 5e3860a46838f92828846b2f8408ea2a458ae9b8 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sat, 5 Apr 2014 18:09:50 +0200
Subject: Fix installation paths for Haiku.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0716825..66607b0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,12 +27,20 @@ if(SVN_ENTRIES)
endif(Subversion_FOUND)
endif(SVN_ENTRIES)
-set( CLAW_CODE_DIR claw/code/ )
+if (HAIKU)
+set( CLAW_INCLUDE_DIRECTORY "${CMAKE_INSTALL_PREFIX}/develop/headers/" )
+set( CLAW_INSTALLDIR_DOC data/doc/libclaw${CLAW_VERSION_MAJOR}/ )
+set( CLAW_TRANSLATIONS_INSTALL_DIR "data/locale" )
+set( CLAW_INSTALLDIR_SOURCE develop/headers/claw/ )
+else()
set( CLAW_INCLUDE_DIRECTORY "${CMAKE_INSTALL_PREFIX}/include/" )
-set( CLAW_INSTALLDIR_SOURCE include/claw/ )
-set( CLAW_INSTALLDIR_LIB lib/ )
set( CLAW_INSTALLDIR_DOC share/doc/libclaw${CLAW_VERSION_MAJOR}/ )
set( CLAW_TRANSLATIONS_INSTALL_DIR "share/locale" )
+set( CLAW_INSTALLDIR_SOURCE include/claw/ )
+endif()
+
+set( CLAW_CODE_DIR claw/code/ )
+set( CLAW_INSTALLDIR_LIB lib/ )
set( CLAW_EXECUTABLE_DIR bin/ )
set( CLAW_LIBRARIES
diff --git a/cmake-module/CMakeLists.txt b/cmake-module/CMakeLists.txt
index a08a799..c486c5c 100644
--- a/cmake-module/CMakeLists.txt
+++ b/cmake-module/CMakeLists.txt
@@ -3,7 +3,11 @@ cmake_minimum_required(VERSION 2.6)
project(claw:cmake-modules)
if( NOT CLAW_CMAKE_MODULES_INSTALL_PATH )
- set( CLAW_CMAKE_MODULES_INSTALL_PATH "share/cmake/libclaw" )
+ if(HAIKU)
+ set( CLAW_CMAKE_MODULES_INSTALL_PATH "lib/${CMAKE_HAIKU_SECONDARY_ARCH}/libclaw/cmake/" )
+ else()
+ set( CLAW_CMAKE_MODULES_INSTALL_PATH "share/cmake/libclaw" )
+ endif()
endif( NOT CLAW_CMAKE_MODULES_INSTALL_PATH )
set( CLAW_CMAKE_MODULES
diff --git a/desktop/locale/libclaw/CMakeLists.txt b/desktop/locale/libclaw/CMakeLists.txt
index f0973ac..8de90bd 100644
--- a/desktop/locale/libclaw/CMakeLists.txt
+++ b/desktop/locale/libclaw/CMakeLists.txt
@@ -22,7 +22,7 @@ macro(GETTEXT_CREATE_TRANSLATIONS_CUSTOM _targetName _potFile _firstPoFile)
install(
FILES ${_gmoFile}
- DESTINATION share/locale/${_lang}/LC_MESSAGES
+ DESTINATION ${CLAW_TRANSLATIONS_INSTALL_DIR}/${_lang}/LC_MESSAGES
RENAME ${_potBasename}.mo
)
--
1.8.3.4