[haiku-commits] r40888 - in haiku/trunk/src: build/libbe/storage/mime tools

  • From: jonas@xxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 9 Mar 2011 14:18:34 +0100 (CET)

Author: kirilla
Date: 2011-03-09 14:18:34 +0100 (Wed, 09 Mar 2011)
New Revision: 40888
Changeset: http://dev.haiku-os.org/changeset/40888

Modified:
   haiku/trunk/src/build/libbe/storage/mime/UpdateMimeInfoThread.cpp
   haiku/trunk/src/tools/Jamfile
Log:
Jamfile changes to make <build>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 <build>mimeset. Thanks Ingo!

Modified: haiku/trunk/src/build/libbe/storage/mime/UpdateMimeInfoThread.cpp
===================================================================
--- haiku/trunk/src/build/libbe/storage/mime/UpdateMimeInfoThread.cpp   
2011-03-08 23:11:48 UTC (rev 40887)
+++ haiku/trunk/src/build/libbe/storage/mime/UpdateMimeInfoThread.cpp   
2011-03-09 13:18:34 UTC (rev 40888)
@@ -269,9 +269,6 @@
                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 @@
                        err = appFileInfoWrite.SetCatalogEntry(NULL);
                if (err != B_OK)
                        return err;
-*/
+
                // app flags
                uint32 appFlags;
                err = appFileInfoRead.GetAppFlags(&appFlags);

Modified: haiku/trunk/src/tools/Jamfile
===================================================================
--- haiku/trunk/src/tools/Jamfile       2011-03-08 23:11:48 UTC (rev 40887)
+++ haiku/trunk/src/tools/Jamfile       2011-03-09 13:18:34 UTC (rev 40888)
@@ -58,15 +58,32 @@
 if $(HOST_PLATFORM_BEOS_COMPATIBLE) {
        AddResources <build>mimeset : mimeset.rdef ;
 }
-BuildPlatformMain <build>mimeset :
+
+local mimesetSources =
        mimeset.cpp
        Mime.cpp
        database_support.cpp
        UpdateMimeInfoThread.cpp
        MimeUpdateThread.cpp
+;
+
+if $(HOST_PLATFORM) = haiku_host {
+       mimesetSources += AppFileInfo.cpp ;
+}
+
+BuildPlatformMain <build>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 <build>mkindex : mkindex.cpp : $(HOST_LIBBE) ;
 
 # We want rm_attrs to be self-contained, so we link against the static libroot.


Other related posts:

  • » [haiku-commits] r40888 - in haiku/trunk/src: build/libbe/storage/mime tools - jonas