[SCM] FreeCAD packaging branch, cmake_migration, updated. debian/0.12.5284-dfsg-7-9-gbbcd17c

Anton Gladky gladky.anton at gmail.com
Mon Nov 19 20:42:01 UTC 2012


The following commit has been merged in the cmake_migration branch:
commit 36766ed1b9a5f331201f95815947d5cb1c3e8382
Author: Sandro Knauß <bugs at sandroknauss.de>
Date:   Mon Nov 19 21:38:27 2012 +0100

    Add debian/patches/use_share.pach.

diff --git a/debian/patches/series b/debian/patches/series
index 5d47b96..ce2a07b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ fix_FTBFS_on_precise.patch
 set_install_rpath.patch
 dir_as_string.patch
 use_install_rpath.patch
+use_share.patch
diff --git a/debian/patches/use_share.patch b/debian/patches/use_share.patch
new file mode 100644
index 0000000..e791d12
--- /dev/null
+++ b/debian/patches/use_share.patch
@@ -0,0 +1,127 @@
+Description: playground to push all platform-independent 
+  shared data to /usr/share.
+Author: Sandro Knauß <bugs at sandroknauss.de>
+Applied-by: Anton Gladky <gladky.anton at gmail.com>
+Last-update: 2012-11-19
+
+--- a/src/App/FreeCADInit.py
++++ b/src/App/FreeCADInit.py
+@@ -43,6 +43,8 @@
+ 	# Checking on FreeCAD module path ++++++++++++++++++++++++++++++++++++++++++
+ 	ModDir = FreeCAD.getHomePath()+'Mod'
+ 	ModDir = os.path.realpath(ModDir)
++	ModShareDir = '/usr/share/freecad/Mod'
++	ModShareDir = os.path.realpath(ModShareDir)
+ 	BinDir = FreeCAD.getHomePath()+'bin'
+ 	BinDir = os.path.realpath(BinDir)
+ 	LibDir = FreeCAD.getHomePath()+'lib'
+@@ -65,6 +67,14 @@
+ 		for i in ModDirs: ModDict[i.lower()] = os.path.join(ModDir,i)
+ 	else:
+ 		Wrn ("No modules found in " + ModDir + "\n")
++
++	if os.path.isdir(ModShareDir):
++		Log("")
++		ModDirs = os.listdir(ModShareDir)
++		for i in ModDirs: ModDict[i.lower()] = os.path.join(ModShareDir,i)
++	else:
++		Wrn ("No modules found in " + ModShareDir + "\n")
++
+ 	# Search for additional modules in the home directory
+ 	if os.path.isdir(HomeMod):
+ 		HomeMods = os.listdir(HomeMod)
+@@ -105,6 +115,8 @@
+ 	sys.path.insert(0,LibDir)
+ 	sys.path.insert(0,ModDir)
+ 	Log("Using "+ModDir+" as module path!\n")
++	sys.path.insert(0,ModShareDir)
++	Log("Using "+ModShareDir+" as module path!\n")
+ 	# new paths must be prepended to avoid to load a wrong version of a library
+ 	os.environ["PATH"] = PathExtension + os.environ["PATH"]
+ 	path = os.environ["PATH"].split(os.pathsep)
+--- a/src/Mod/Drawing/App/CMakeLists.txt
++++ b/src/Mod/Drawing/App/CMakeLists.txt
+@@ -86,7 +86,7 @@
+ 
+ fc_target_copy_resource(Drawing 
+     ${CMAKE_SOURCE_DIR}/src/Mod/Drawing
+-    ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Drawing
++    ${CMAKE_INSTALL_DATADIR}/Mod/Drawing
+     ${Drawing_Templates})
+ 
+ if(MSVC)
+--- a/src/Mod/Robot/App/CMakeLists.txt
++++ b/src/Mod/Robot/App/CMakeLists.txt
+@@ -135,7 +135,7 @@
+ 
+ fc_target_copy_resource(Robot 
+     ${CMAKE_SOURCE_DIR}/src/Mod/Robot
+-    ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Robot
++    ${CMAKE_INSTALL_DATADIR}/Mod/Robot
+     ${Robot_Resources})
+ 
+ 
+--- a/src/Mod/Start/Gui/CMakeLists.txt
++++ b/src/Mod/Start/Gui/CMakeLists.txt
+@@ -68,7 +68,7 @@
+ 
+ fc_target_copy_resource(StartGui 
+     ${CMAKE_SOURCE_DIR}/src/Mod/Start
+-    ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Start
++    ${CMAKE_INSTALL_DATADIR}/Mod/Start
+     ${StartPage_Resources})
+ 
+ if(MSVC)
+--- a/src/Mod/Start/CMakeLists.txt
++++ b/src/Mod/Start/CMakeLists.txt
+@@ -10,5 +10,5 @@
+         Init.py
+         InitGui.py
+     DESTINATION
+-        Mod/Start
++        ${CMAKE_INSTALL_DATADIR}/Mod/Start
+ )
+--- a/src/Mod/Start/StartPage/CMakeLists.txt
++++ b/src/Mod/Start/StartPage/CMakeLists.txt
+@@ -29,7 +29,7 @@
+ )
+ 
+ INSTALL(FILES ${StartPage_SRCS}
+-    DESTINATION Mod/Start/StartPage
++    DESTINATION ${CMAKE_INSTALL_DATADIR}/Mod/Start/StartPage
+ )
+ 
+ INSTALL(FILES ${StartPage_DATA}
+--- a/src/Mod/Raytracing/CMakeLists.txt
++++ b/src/Mod/Raytracing/CMakeLists.txt
+@@ -10,7 +10,7 @@
+         InitGui.py
+         RaytracingExample.py
+     DESTINATION
+-        Mod/Raytracing
++        ${CMAKE_INSTALL_DATADIR}/Mod/Raytracing
+ )
+ 
+ INSTALL(
+--- a/src/Mod/Drawing/CMakeLists.txt
++++ b/src/Mod/Drawing/CMakeLists.txt
+@@ -12,7 +12,7 @@
+         DrawingExample.py
+         DrawingTests.py
+     DESTINATION
+-        Mod/Drawing
++        ${CMAKE_INSTALL_DATADIR}/Mod/Drawing
+ )
+ 
+ INSTALL(
+--- a/src/Mod/Robot/CMakeLists.txt
++++ b/src/Mod/Robot/CMakeLists.txt
+@@ -13,7 +13,7 @@
+         RobotExample.py
+         RobotExampleTrajectoryOutOfShapes.py
+     DESTINATION
+-        Mod/Robot
++        ${CMAKE_INSTALL_DATADIR}/Mod/Robot
+ )
+ 
+ INSTALL(

-- 
FreeCAD packaging



More information about the debian-science-commits mailing list