Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chromebrew
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
chromebrew
Commits
91d807f9
Commit
91d807f9
authored
May 02, 2021
by
Ed Reel
Committed by
GitHub
May 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add freecad package (#5718)
parent
8de4a326
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
0 deletions
+61
-0
packages/freecad.rb
packages/freecad.rb
+61
-0
No files found.
packages/freecad.rb
0 → 100644
View file @
91d807f9
require
'package'
class
Freecad
<
Package
description
'A free and opensource multiplatform 3D parametric modeler.'
homepage
'https://www.freecadweb.org/'
version
'0.19.2'
license
'GPL-2'
compatibility
'x86_64'
source_url
'https://github.com/FreeCAD/FreeCAD/releases/download/0.19.2/FreeCAD_0.19-24291-Linux-Conda_glibc2.12-x86_64.AppImage'
source_sha256
'c196a6e59349ed452cc9b9af2c6a0d983a698831630aa5c7077565ed8570c9ad'
binary_url
({
})
binary_sha256
({
})
depends_on
'sommelier'
def
self
.
preflight
free_space
=
`echo $(($(stat -f --format="%a*%S" .)))`
.
chomp
.
to_i
abort
'Not enough free disk space. You need at least 5.2 GB to install.'
.
lightred
if
free_space
<
5583457485
end
def
self
.
patch
system
"sed -i 's,LD_LIBRARY_PATH=
\$
{HERE}/usr/lib,LD_LIBRARY_PATH=
\$
{HERE}/usr/lib:
\$
{LD_LIBRARY_PATH},' AppRun"
end
def
self
.
build
@freecad
=
<<~
EOF
#!/bin/bash
cd
#{
CREW_PREFIX
}
/share/freecad
./AppRun "$@"
EOF
IO
.
write
(
'freecad.sh'
,
@freecad
)
end
def
self
.
install
FileUtils
.
mkdir_p
"
#{
CREW_DEST_PREFIX
}
/bin"
FileUtils
.
mkdir_p
"
#{
CREW_DEST_PREFIX
}
/share/freecad"
FileUtils
.
install
'freecad.sh'
,
"
#{
CREW_DEST_PREFIX
}
/bin/freecad"
,
mode:
0755
FileUtils
.
mv
Dir
.
glob
(
'*'
),
"
#{
CREW_DEST_PREFIX
}
/share/freecad"
end
def
self
.
postinstall
puts
"
\n
Type 'freecad' to get started.
\n
"
.
lightblue
end
def
self
.
remove
config_dir
=
"
#{
HOME
}
/.FreeCAD"
if
Dir
.
exist?
"
#{
config_dir
}
"
print
"
\n
Would you like to remove
#{
config_dir
}
? [y/N] "
case
$stdin
.
getc
when
'y'
,
'Y'
FileUtils
.
rm_rf
"
#{
config_dir
}
"
puts
"
#{
config_dir
}
removed."
.
lightred
else
puts
"
#{
config_dir
}
saved."
.
lightgreen
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment