From 2e2525d4c144f9053a013b69730e735ccfd5c408 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Fri, 18 Jul 2014 16:16:21 -0400 Subject: [PATCH] kdelibs4: preliminary recipe. This does not work: it gets about halfway through and then stops because of an unresolved symbol that runtime_loader cannot seem to find. I haven't pinpointed the source of the problem yet, but I figured this should be online for others to review and scrutinize. --- dev-qt/kdelibs4/kdelibs4-4.13.2.recipe | 112 +++++++++++ dev-qt/kdelibs4/patches/kdelibs4-4.13.2.patch | 180 ++++++++++++++++++ 2 files changed, 292 insertions(+) create mode 100644 dev-qt/kdelibs4/kdelibs4-4.13.2.recipe create mode 100644 dev-qt/kdelibs4/patches/kdelibs4-4.13.2.patch diff --git a/dev-qt/kdelibs4/kdelibs4-4.13.2.recipe b/dev-qt/kdelibs4/kdelibs4-4.13.2.recipe new file mode 100644 index 000000000..8beea75de --- /dev/null +++ b/dev-qt/kdelibs4/kdelibs4-4.13.2.recipe @@ -0,0 +1,112 @@ +SUMMARY="Librares that help developers build software on top of Qt." +DESCRIPTION="KDE (the K Desktop Environment) is a powerful, open-source \ +graphical desktop environment. It combines ease of use, contemporary \ +functionality, and outstanding graphical design." +HOMEPAGE="http://www.kde.org" +SRC_URI="http://download.kde.org/stable/4.13.2/src/kdelibs-4.13.2.tar.xz" +CHECKSUM_SHA256="559809c602b80ff1091a4fb67e8c98b0ebb91c3cd437d1583068ddde19efda0e" +SOURCE_DIR="kdelibs-4.13.2" +LICENSE="GNU LGPL v2.1" +COPYRIGHT="2014 KDE e.V." +REVISION="1" +ARCHITECTURES="x86 ?x86_64" +if [ $effectiveTargetArchitecture != x86_gcc2 ]; then + # x86_gcc2 is fine as primary target architecture as long as we're building + # for a different secondary architecture. + ARCHITECTURES="$ARCHITECTURES x86_gcc2" +else + ARCHITECTURES="$ARCHITECTURES !x86_gcc2" +fi +SECONDARY_ARCHITECTURES="x86" +PATCHES="kdelibs4-4.13.2.patch" + +PROVIDES=" + kdelibs4$secondaryArchSuffix = $portVersion compat >= 4.8 + " + +REQUIRES=" + haiku$secondaryArchSuffix >= $haikuVersion + libqt4$secondaryArchSuffix >= 4.8 + lib:libz$secondaryArchSuffix + lib:libbz2$secondaryArchSuffix + lib:liblzma$secondaryArchSuffix + lib:libssl$secondaryArchSuffix + lib:libcrypto$secondaryArchSuffix + lib:libqca$secondaryArchSuffix + lib:libintl$secondaryArchSuffix + lib:libpcre$secondaryArchSuffix + lib:libxml2$secondaryArchSuffix + lib:libxslt$secondaryArchSuffix + lib:libgif$secondaryArchSuffix + lib:libpng$secondaryArchSuffix + lib:libjpeg$secondaryArchSuffix + lib:libjasper$secondaryArchSuffix + lib:libattica$secondaryArchSuffix + lib:libdbusmenu_qt$secondaryArchSuffix + shared_mime_info$secondaryArchSuffix + strigi$secondaryArchSuffix + " + +BUILD_REQUIRES=" + libqt4${secondaryArchSuffix}_devel >= 4.8 + devel:libz$secondaryArchSuffix + devel:libbz2$secondaryArchSuffix + devel:liblzma$secondaryArchSuffix + devel:libssl$secondaryArchSuffix + devel:libcrypto$secondaryArchSuffix + devel:libqca$secondaryArchSuffix + devel:libintl$secondaryArchSuffix + devel:libpcre$secondaryArchSuffix + devel:libxml2$secondaryArchSuffix + devel:libxslt$secondaryArchSuffix + devel:libgif$secondaryArchSuffix + devel:libpng$secondaryArchSuffix + devel:libjpeg$secondaryArchSuffix + devel:libjasper$secondaryArchSuffix + devel:libattica$secondaryArchSuffix + devel:libdbusmenu_qt$secondaryArchSuffix + docbook_xml_dtd + docbook_xsl_stylesheets + shared_mime_info$secondaryArchSuffix + strigi${secondaryArchSuffix}_devel + " + +BUILD_PREREQUIRES=" + haiku${secondaryArchSuffix}_devel >= $haikuVersion + cmd:cmake + cmd:pkg_config$secondaryArchSuffix + cmd:automoc4 + cmd:perl + cmd:flex + cmd:bison$secondaryArchSuffix + cmd:xmllint + cmd:ninja + cmd:g++$secondaryArchSuffix + " + +PROVIDES_devel=" + kdelibs4${secondaryArchSuffix}_devel = $portVersion compat >= 4.13 + " + +REQUIRES_devel=" + haiku$secondaryArchSuffix >= $haikuVersion + kdelibs4${secondaryArchSuffix} == $portVersion base + libqt4${secondaryArchSuffix}_devel == $portVersion + " + +BUILD() +{ + mkdir -p build + cd build + cmake -Wno-dev -DCMAKE_INSTALL_PREFIX=$prefix \ + -DDOCBOOKXML_CURRENTDTD_DIR=/system/data/xml/docbook/xml-dtd-4.5 \ + -DDOCBOOKXSL_DIR=/system/data/xml/docbook/xsl-stylesheets-1.78.1 \ + -DCMAKE_BUILD_TYPE=Release -DKDE4_BUILD_TESTS=Off -GNinja .. + ninja $jobArgs +} + +INSTALL() +{ + cd build + ninja install +} diff --git a/dev-qt/kdelibs4/patches/kdelibs4-4.13.2.patch b/dev-qt/kdelibs4/patches/kdelibs4-4.13.2.patch new file mode 100644 index 000000000..ce236c9ff --- /dev/null +++ b/dev-qt/kdelibs4/patches/kdelibs4-4.13.2.patch @@ -0,0 +1,180 @@ +From 29ddb0a1bf13d1f4599d2dc71c876f7fe5c595d8 Mon Sep 17 00:00:00 2001 +From: Augustin Cavalier +Date: Thu, 17 Jul 2014 11:55:15 -0400 +Subject: [PATCH] Fix compile on Haiku. + +--- + CMakeLists.txt | 4 ++-- + kdecore/io/kfilesystemtype_p.cpp | 2 +- + kdecore/io/kmountpoint.cpp | 4 ++-- + kdecore/util/kshareddatacache_p.h | 2 +- + kinit/CMakeLists.txt | 2 ++ + kinit/kinit.cpp | 3 +++ + kio/misc/kpac/CMakeLists.txt | 1 + + kio/misc/kpac/kpac_dhcp_helper.c | 5 +++++ + solid/solid/CMakeLists.txt | 3 ++- + 9 files changed, 19 insertions(+), 7 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a2620f6..ccd0916 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -316,10 +316,10 @@ check_library_exists(socket connect "" HAVE_SOCKET_LIBRARY) + add_subdirectory( cmake ) + add_subdirectory( kdecore ) + add_subdirectory( kdeui ) +-if (UNIX) ++if (UNIX AND NOT HAIKU) + add_subdirectory( kpty ) + add_subdirectory( kdesu ) +-endif (UNIX) ++endif (UNIX AND NOT HAIKU) + if(NOT WINCE) + add_subdirectory( kjs ) + add_subdirectory( kjsembed ) +diff --git a/kdecore/io/kfilesystemtype_p.cpp b/kdecore/io/kfilesystemtype_p.cpp +index 158f51d..ba0604c 100644 +--- a/kdecore/io/kfilesystemtype_p.cpp ++++ b/kdecore/io/kfilesystemtype_p.cpp +@@ -129,11 +129,11 @@ KFileSystemType::Type determineFileSystemTypeImpl(const QByteArray& path) + } + #endif + #else ++#endif + KFileSystemType::Type determineFileSystemTypeImpl(const QByteArray& path) + { + return KFileSystemType::Unknown; + } +-#endif + + KFileSystemType::Type KFileSystemType::fileSystemType(const QString& path) + { +diff --git a/kdecore/io/kmountpoint.cpp b/kdecore/io/kmountpoint.cpp +index 96f5de9..d39b4cf 100644 +--- a/kdecore/io/kmountpoint.cpp ++++ b/kdecore/io/kmountpoint.cpp +@@ -142,7 +142,7 @@ KMountPoint::~KMountPoint() + #define MOUNTTYPE(var) var->mnt_type + #define MOUNTOPTIONS(var) var->mnt_opts + #define FSNAME(var) var->mnt_fsname +-#else ++#elif !defined(__HAIKU__) + #define SETMNTENT fopen + #define ENDMNTENT fclose + #define STRUCT_MNTENT struct mnttab +@@ -421,7 +421,7 @@ KMountPoint::List KMountPoint::currentMountPoints(DetailsNeededFlags infoNeeded) + mp->d->mountPoint = QString("/"); + result.append(mp); + +-#else ++#elif !defined(__HAIKU__) + STRUCT_SETMNTENT mnttab; + if ((mnttab = SETMNTENT(MNTTAB, "r")) == 0) + return result; +diff --git a/kdecore/util/kshareddatacache_p.h b/kdecore/util/kshareddatacache_p.h +index 931de4d..af10807 100644 +--- a/kdecore/util/kshareddatacache_p.h ++++ b/kdecore/util/kshareddatacache_p.h +@@ -53,7 +53,7 @@ int ksdcArea(); + #define KSDC_THREAD_PROCESS_SHARED_SUPPORTED 1 + #endif + +-#if defined(_POSIX_SEMAPHORES) && ((_POSIX_SEMAPHORES == 0) || (_POSIX_SEMAPHORES >= 200112L)) ++#if !defined(Q_OS_HAIKU) && defined(_POSIX_SEMAPHORES) && ((_POSIX_SEMAPHORES == 0) || (_POSIX_SEMAPHORES >= 200112L)) + #include + #define KSDC_SEMAPHORES_SUPPORTED 1 + #endif +diff --git a/kinit/CMakeLists.txt b/kinit/CMakeLists.txt +index dcde429..1eda927 100644 +--- a/kinit/CMakeLists.txt ++++ b/kinit/CMakeLists.txt +@@ -21,6 +21,8 @@ check_function_exists(setproctitle HAVE_SETPROCTITLE) + # used by 4 executables in this file + if(HAVE_SOCKET_LIBRARY) + set(KINIT_SOCKET_LIBRARY socket) ++elseif(HAIKU) ++ set(KINIT_SOCKET_LIBRARY network) + else(HAVE_SOCKET_LIBRARY) + set(KINIT_SOCKET_LIBRARY) + endif(HAVE_SOCKET_LIBRARY) +diff --git a/kinit/kinit.cpp b/kinit/kinit.cpp +index e41845a..c688356 100644 +--- a/kinit/kinit.cpp ++++ b/kinit/kinit.cpp +@@ -119,6 +119,9 @@ static char sock_file[MAX_SOCK_FILE]; + #define DISPLAY "MAC_DISPLAY" + #elif defined(Q_WS_WIN) + #define DISPLAY "WIN_DISPLAY" ++#elif defined(Q_OS_HAIKU) ++/* this will do nothing! */ ++#define DISPLAY "DISPLAY_HAIKU_NONEXISTENT" + #else + #error Use QT/X11 or QT/Embedded + #endif +diff --git a/kio/misc/kpac/CMakeLists.txt b/kio/misc/kpac/CMakeLists.txt +index 81fa79a..2e36926 100644 +--- a/kio/misc/kpac/CMakeLists.txt ++++ b/kio/misc/kpac/CMakeLists.txt +@@ -40,6 +40,7 @@ install(TARGETS kded_proxyscout DESTINATION ${PLUGIN_INSTALL_DIR} ) + set(kpac_dhcp_helper_SRCS kpac_dhcp_helper.c) + + kde4_add_executable(kpac_dhcp_helper NOGUI ${kpac_dhcp_helper_SRCS}) ++target_link_libraries(kpac_dhcp_helper network) + + if (HAVE_NSL_LIBRARY) + # Assume Solaris +diff --git a/kio/misc/kpac/kpac_dhcp_helper.c b/kio/misc/kpac/kpac_dhcp_helper.c +index c5c38eb..419b022 100644 +--- a/kio/misc/kpac/kpac_dhcp_helper.c ++++ b/kio/misc/kpac/kpac_dhcp_helper.c +@@ -29,7 +29,9 @@ + + #include + #include ++#ifndef __HAIKU__ + #include ++#endif + #include + #include + #include +@@ -169,6 +171,7 @@ static struct response send_request_for(int sock, const char* hostname) + /* Fills the DHCPINFORM request packet, returns the transaction id */ + static uint32_t send_request(int sock) + { ++#ifndef __HAIKU__ + char hostname[NI_MAXHOST]; + struct ifaddrs *ifaddr, *ifa; + int status = -1; +@@ -207,6 +210,8 @@ static uint32_t send_request(int sock) + exit(1); + + return status; ++#endif ++ exit(1); + } + + /* Reads the reply from the socket, checks it and outputs the URL to STDOUT */ +diff --git a/solid/solid/CMakeLists.txt b/solid/solid/CMakeLists.txt +index a7f1f07..5372c75 100644 +--- a/solid/solid/CMakeLists.txt ++++ b/solid/solid/CMakeLists.txt +@@ -324,6 +324,7 @@ if(NOT WIN32 AND NOT APPLE) + endif ( WITH_SOLID_UDISKS2 ) + endif (CMAKE_SYSTEM_NAME MATCHES Linux) + ++if(NOT HAIKU) + message(STATUS "Building Solid fstab backend." ) + set(solid_LIB_SRCS ${solid_LIB_SRCS} + backends/fstab/fstabmanager.cpp +@@ -333,7 +334,7 @@ if(NOT WIN32 AND NOT APPLE) + backends/fstab/fstabhandling.cpp + backends/fstab/fstabwatcher.cpp + ) +- ++endif(NOT HAIKU) + endif(NOT WIN32 AND NOT APPLE) + + if(APPLE) +-- +1.8.3.4 +