From 212e4c4243f307ec1231344a9957bbed1c77c616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sundstr=C3=B6m?= Date: Wed, 9 Mar 2011 13:18:34 +0000 Subject: [PATCH] Jamfile changes to make mimeset pick up headers/build/os/storage/AppFileInfo.h rather than the one in /boot/develop/headers on a BeOS-compatible host. This enables use of BAppFileInfo::Get/SetCatalogEntry() in mimeset. Thanks Ingo! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40888 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../storage/mime/UpdateMimeInfoThread.cpp | 5 +---- src/tools/Jamfile | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/build/libbe/storage/mime/UpdateMimeInfoThread.cpp b/src/build/libbe/storage/mime/UpdateMimeInfoThread.cpp index d399787de8..f6550eca85 100644 --- a/src/build/libbe/storage/mime/UpdateMimeInfoThread.cpp +++ b/src/build/libbe/storage/mime/UpdateMimeInfoThread.cpp @@ -269,9 +269,6 @@ UpdateMimeInfoThread::DoMimeUpdate(const entry_ref *entry, bool *entryIsDir) if (err != B_OK) return err; -/* TODO: figure out why this doesn't compile here - when the same code works in src/servers/registrar/mime - // catalog entry char catalogEntry[B_MIME_TYPE_LENGTH * 3]; err = appFileInfoRead.GetCatalogEntry(catalogEntry); @@ -281,7 +278,7 @@ UpdateMimeInfoThread::DoMimeUpdate(const entry_ref *entry, bool *entryIsDir) err = appFileInfoWrite.SetCatalogEntry(NULL); if (err != B_OK) return err; -*/ + // app flags uint32 appFlags; err = appFileInfoRead.GetAppFlags(&appFlags); diff --git a/src/tools/Jamfile b/src/tools/Jamfile index 0f889ae425..376563e117 100644 --- a/src/tools/Jamfile +++ b/src/tools/Jamfile @@ -58,15 +58,32 @@ BuildPlatformMain listattr : listattr.cpp : $(HOST_LIBBE) ; if $(HOST_PLATFORM_BEOS_COMPATIBLE) { AddResources mimeset : mimeset.rdef ; } -BuildPlatformMain mimeset : + +local mimesetSources = mimeset.cpp Mime.cpp database_support.cpp UpdateMimeInfoThread.cpp MimeUpdateThread.cpp +; + +if $(HOST_PLATFORM) = haiku_host { + mimesetSources += AppFileInfo.cpp ; +} + +BuildPlatformMain mimeset : + $(mimesetSources) : $(HOST_LIBBE) $(HOST_LIBSTDC++) $(HOST_LIBSUPC++) $(libHaikuCompat) ; +if $(HOST_PLATFORM_BEOS_COMPATIBLE) { + SEARCH on [ FGristFiles AppFileInfo.cpp ] + = [ FDirName $(HAIKU_TOP) src build libbe storage ] ; + + SourceSysHdrs AppFileInfo.cpp UpdateMimeInfoThread.cpp + : [ FDirName $(HAIKU_TOP) headers build os storage ] ; +} + BuildPlatformMain mkindex : mkindex.cpp : $(HOST_LIBBE) ; # We want rm_attrs to be self-contained, so we link against the static libroot.