[haiku-commits] r39176 - in haiku/trunk: build/jam src/add-ons/index_server/FullText src/tests/add-ons/index_server/fulltext_search

  • From: clemens.zeidler@xxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 28 Oct 2010 22:57:12 +0200 (CEST)

Author: czeidler
Date: 2010-10-28 22:57:11 +0200 (Thu, 28 Oct 2010)
New Revision: 39176
Changeset: http://dev.haiku-os.org/changeset/39176

Modified:
   haiku/trunk/build/jam/OptionalBuildFeatures
   haiku/trunk/src/add-ons/index_server/FullText/Jamfile
   haiku/trunk/src/tests/add-ons/index_server/fulltext_search/Jamfile
Log:
Cleanup OptionalBuildFeatures and add CLucene as optional build feature / fix 
dependencies.



Modified: haiku/trunk/build/jam/OptionalBuildFeatures
===================================================================
--- haiku/trunk/build/jam/OptionalBuildFeatures 2010-10-28 18:12:14 UTC (rev 
39175)
+++ haiku/trunk/build/jam/OptionalBuildFeatures 2010-10-28 20:57:11 UTC (rev 
39176)
@@ -110,6 +110,20 @@
 }
 
 
+# zip file and output directory
+HAIKU_ICU_DEVEL_ZIP_FILE = [ DownloadFile $(HAIKU_ICU_DEVEL_PACKAGE)
+               : $(baseURL)/$(HAIKU_ICU_DEVEL_PACKAGE) ] ;
+HAIKU_ICU_DEVEL_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
+       $(HAIKU_ICU_DEVEL_PACKAGE:B) ] ;
+
+# extract headers
+HAIKU_ICU_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_ICU_DEVEL_DIR)
+       : develop/headers/3rdparty : $(HAIKU_ICU_DEVEL_ZIP_FILE) ] ;
+
+HAIKU_ICU_HEADERS
+       = [ FDirName $(HAIKU_ICU_DEVEL_DIR) develop headers 3rdparty ] ;
+
+
 # EtPan
 
 # Automatically install the EtPan mail lib, when the optional EtPan optional
@@ -121,44 +135,74 @@
 HAIKU_ETPAN_GCC_2_PACKAGE = etpan-1.0-x86-gcc2-2010-10-20.zip ;
 HAIKU_ETPAN_GCC_4_PACKAGE = etpan-1.0-x86-gcc4-2010-10-20.zip ;
 
-if $(TARGET_ARCH) != x86 {
-       Echo "EtPan not available for $(TARGET_ARCH)" ;
-} else {
-       local etpan_package ;
-       if $(HAIKU_GCC_VERSION[1]) = 2 {
-               etpan_package = $(HAIKU_ETPAN_GCC_2_PACKAGE) ;
+if $(HAIKU_BUILD_FEATURE_ETPAN) {
+       if $(TARGET_ARCH) != x86 {
+               Echo "EtPan not available for $(TARGET_ARCH)" ;
        } else {
-               etpan_package = $(HAIKU_ETPAN_GCC_4_PACKAGE) ;
+               local etpan_package ;
+               if $(HAIKU_GCC_VERSION[1]) = 2 {
+                       etpan_package = $(HAIKU_ETPAN_GCC_2_PACKAGE) ;
+               } else {
+                       etpan_package = $(HAIKU_ETPAN_GCC_4_PACKAGE) ;
+               }
+
+               local zipFile = [ DownloadFile $(etpan_package)
+                       : $(baseURL)/$(etpan_package) ] ;
+
+               # zip file and output directory
+               HAIKU_ETPAN_ZIP_FILE = $(zipFile) ;
+               HAIKU_ETPAN_DIR = [ FDirName 
$(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
+                       $(etpan_package:B) ] ;
+
+               # extract libraries
+               HAIKU_ETPAN_LIBS = [ ExtractArchive $(HAIKU_ETPAN_DIR)
+                       :
+                       common/lib/libetpan.a
+                       : $(zipFile)
+               ] ;
+               HAIKU_ETPAN_HEADERS
+                               = [ FDirName $(HAIKU_ETPAN_DIR) common include 
] ;
        }
+}
 
-       local zipFile = [ DownloadFile $(etpan_package)
-               : $(baseURL)/$(etpan_package) ] ;
 
-       # zip file and output directory
-       HAIKU_ETPAN_ZIP_FILE = $(zipFile) ;
-       HAIKU_ETPAN_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
-               $(etpan_package:B) ] ;
+# CLucene
 
-       # extract libraries
-       HAIKU_ETPAN_LIBS = [ ExtractArchive $(HAIKU_ETPAN_DIR)
-               :
-               common/lib/libetpan.a
-               : $(zipFile)
-       ] ;
-       HAIKU_ETPAN_HEADERS
-                       = [ FDirName $(HAIKU_ETPAN_DIR) common include ] ;
+# Automatically install the CLucene feature, when the optional CLucene optional
+# package is enabled.
+if [ IsOptionalHaikuImagePackageAdded CLucene ] {
+       HAIKU_BUILD_FEATURE_CLUCENE = 1 ;
 }
 
+local baseURL = http://haiku-files.org/files/optional-packages ;
+HAIKU_CLUCENE_PACKAGE = clucene-0.9.21svn-x86-gcc4-haiku-2009-08-11.zip ;
+HAIKU_CLUCENE_URL = $(baseURL)/$(HAIKU_CLUCENE_PACKAGE) ;
 
-# zip file and output directory
-HAIKU_ICU_DEVEL_ZIP_FILE = [ DownloadFile $(HAIKU_ICU_DEVEL_PACKAGE)
-               : $(baseURL)/$(HAIKU_ICU_DEVEL_PACKAGE) ] ;
-HAIKU_ICU_DEVEL_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
-       $(HAIKU_ICU_DEVEL_PACKAGE:B) ] ;
+if $(HAIKU_BUILD_FEATURE_CLUCENE) {
+       if $(TARGET_ARCH) != x86 {
+               Echo "CLucene build feature not available for $(TARGET_ARCH)" ;
+       } else {
+               # Download the zip archive.
+               local zipFile = [ DownloadFile $(HAIKU_CLUCENE_PACKAGE)
+                       : $(HAIKU_CLUCENE_URL) ] ;
 
-# extract headers
-HAIKU_ICU_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_ICU_DEVEL_DIR)
-       : develop/headers/3rdparty : $(HAIKU_ICU_DEVEL_ZIP_FILE) ] ;
+               # zip file and output directory
+               HAIKU_CLUCENE_ZIP_FILE = $(zipFile) ;
+               HAIKU_CLUCENE_DIR = [ FDirName 
$(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
+                       $(HAIKU_CLUCENE_PACKAGE:B) ] ;
 
-HAIKU_ICU_HEADERS
-       = [ FDirName $(HAIKU_ICU_DEVEL_DIR) develop headers 3rdparty ] ;
+               # extract headers and libraries
+               HAIKU_CLUCENE_HEADERS_DEPENDENCY = [ ExtractArchive 
$(HAIKU_CLUCENE_DIR)
+                       : common/include/ : $(zipFile)
+               ] ;
+
+               HAIKU_CLUCENE_LIBS = [ ExtractArchive $(HAIKU_CLUCENE_DIR)
+                       :
+                       common/lib/libclucene.a
+                       : $(zipFile)
+               ] ;
+
+               HAIKU_CLUCENE_HEADERS
+                       = [ FDirName $(HAIKU_CLUCENE_DIR) common include ] ;
+       }
+}

Modified: haiku/trunk/src/add-ons/index_server/FullText/Jamfile
===================================================================
--- haiku/trunk/src/add-ons/index_server/FullText/Jamfile       2010-10-28 
18:12:14 UTC (rev 39175)
+++ haiku/trunk/src/add-ons/index_server/FullText/Jamfile       2010-10-28 
20:57:11 UTC (rev 39176)
@@ -2,13 +2,20 @@
 
 UsePrivateHeaders index_server shared ;
 
-SubDirSysHdrs $(HAIKU_CLUCENE_HEADERS) ;
-
-Addon FullTextAnalyser :
+local sources =
        CLuceneDataBase.cpp
        FullTextAnalyser.cpp
 
        IndexServerAddOn.cpp
+       ;
+
+SubDirSysHdrs $(HAIKU_CLUCENE_HEADERS) ;
+Includes [ FGristFiles $(sources) ] : $(HAIKU_CLUCENE_HEADERS_DEPENDENCY) ;
+               # Dependency needed to trigger downloading/unzipping the 
package before
+               # compiling the files.
+
+Addon FullTextAnalyser :
+       $(sources)
        :
        be translation $(HAIKU_CLUCENE_LIBS) $(TARGET_LIBSTDC++)
 ;

Modified: haiku/trunk/src/tests/add-ons/index_server/fulltext_search/Jamfile
===================================================================
--- haiku/trunk/src/tests/add-ons/index_server/fulltext_search/Jamfile  
2010-10-28 18:12:14 UTC (rev 39175)
+++ haiku/trunk/src/tests/add-ons/index_server/fulltext_search/Jamfile  
2010-10-28 20:57:11 UTC (rev 39176)
@@ -1,13 +1,20 @@
 SubDir HAIKU_TOP src tests add-ons index_server fulltext_search ;
 
+local sources =
+       BeaconSearcher.cpp
+       main.cpp
+       SearchWindow.cpp
+       ;
+
 UsePrivateHeaders index_server shared ;
 SubDirSysHdrs $(HAIKU_CLUCENE_HEADERS) ;
+local cluceneSources ;
+Includes [ FGristFiles $(sources) ] : $(HAIKU_CLUCENE_HEADERS_DEPENDENCY) ;
+               # Dependency needed to trigger downloading/unzipping the 
package before
+               # compiling the files.
 
-
 Application FullTextSearch :
-       BeaconSearcher.cpp
-       main.cpp
-       SearchWindow.cpp
-       : be $(HAIKU_CLUCENE_LIBS) $(TARGET_LIBSTDC++)
-#      : Sudoku.rdef
+       $(sources)
+       :
+       be $(HAIKU_CLUCENE_LIBS) $(TARGET_LIBSTDC++)
        ;


Other related posts:

  • » [haiku-commits] r39176 - in haiku/trunk: build/jam src/add-ons/index_server/FullText src/tests/add-ons/index_server/fulltext_search - clemens . zeidler