Changeset View
Changeset View
Standalone View
Standalone View
portage/extragear/rkward/rkward.py
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Line(s) | |||||
47 | class Package( CMakePackageBase ): | 47 | class Package( CMakePackageBase ): | ||
48 | def __init__( self ): | 48 | def __init__( self ): | ||
49 | CMakePackageBase.__init__( self ) | 49 | CMakePackageBase.__init__( self ) | ||
50 | self.blacklist_file = [ | 50 | self.blacklist_file = [ | ||
51 | PackagerLists.runtimeBlacklist #, os.path.join(os.path.dirname(__file__), 'blacklist.txt') | 51 | PackagerLists.runtimeBlacklist #, os.path.join(os.path.dirname(__file__), 'blacklist.txt') | ||
52 | ] | 52 | ] | ||
53 | 53 | | |||
54 | if OsUtils.isWin(): | 54 | if OsUtils.isWin(): | ||
55 | if compiler.isX64(): | 55 | if craftCompiler.isX64(): | ||
56 | self.r_dir = os.path.join( self.mergeDestinationDir(), "lib", "R", "bin", "x64" ) | 56 | self.r_dir = os.path.join( self.mergeDestinationDir(), "lib", "R", "bin", "x64" ) | ||
57 | else: | 57 | else: | ||
58 | self.r_dir = os.path.join( self.mergeDestinationDir(), "lib", "R", "bin", "i386" ) | 58 | self.r_dir = os.path.join( self.mergeDestinationDir(), "lib", "R", "bin", "i386" ) | ||
59 | self.subinfo.options.configure.args = " -DR_EXECUTABLE=" + os.path.join (self.r_dir, "R.exe").replace( "\\\\", "/" ) | 59 | self.subinfo.options.configure.args = " -DR_EXECUTABLE=" + os.path.join (self.r_dir, "R.exe").replace( "\\\\", "/" ) | ||
60 | if compiler.isMSVC(): | 60 | if craftCompiler.isMSVC(): | ||
61 | self.realconfigure = self.configure | 61 | self.realconfigure = self.configure | ||
62 | self.configure = self.msvcconfigure | 62 | self.configure = self.msvcconfigure | ||
63 | # NOTE: On Mac, we'll let RKWard try to auto-detect R (installed with officlal installer, or MacPorts, or something else) | 63 | # NOTE: On Mac, we'll let RKWard try to auto-detect R (installed with officlal installer, or MacPorts, or something else) | ||
64 | 64 | | |||
65 | def fetch(self): | 65 | def fetch(self): | ||
66 | ret = CMakePackageBase.fetch(self) | 66 | ret = CMakePackageBase.fetch(self) | ||
67 | craftDebug.step( "Fetching translations" ) | 67 | craftDebug.step( "Fetching translations" ) | ||
68 | RKTranslations( self ).fetch() | 68 | RKTranslations( self ).fetch() | ||
69 | return ret | 69 | return ret | ||
70 | 70 | | |||
71 | def install( self ): | 71 | def install( self ): | ||
72 | ret = CMakePackageBase.install( self ) | 72 | ret = CMakePackageBase.install( self ) | ||
73 | if OsUtils.isWin(): | 73 | if OsUtils.isWin(): | ||
74 | # Make installation movable, by providing rkward.ini with relative path to R | 74 | # Make installation movable, by providing rkward.ini with relative path to R | ||
75 | rkward_ini = open( os.path.join( self.imageDir(), "bin", "rkward.ini" ), "w" ) | 75 | rkward_ini = open( os.path.join( self.imageDir(), "bin", "rkward.ini" ), "w" ) | ||
76 | if compiler.isX64(): | 76 | if craftCompiler.isX64(): | ||
77 | rkward_ini.write( "R executable=../lib/R/bin/x64/R.exe\n" ) | 77 | rkward_ini.write( "R executable=../lib/R/bin/x64/R.exe\n" ) | ||
78 | else: | 78 | else: | ||
79 | rkward_ini.write( "R executable=../lib/R/bin/i386/R.exe\n" ) | 79 | rkward_ini.write( "R executable=../lib/R/bin/i386/R.exe\n" ) | ||
80 | rkward_ini.close() | 80 | rkward_ini.close() | ||
81 | return ret | 81 | return ret | ||
82 | 82 | | |||
83 | def msvcconfigure( self ): | 83 | def msvcconfigure( self ): | ||
84 | # Need to create a .lib-file for R.dll, first | 84 | # Need to create a .lib-file for R.dll, first | ||
Show All 25 Lines |