Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
package-helpers
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kevin
package-helpers
Commits
58c2cc4c
Commit
58c2cc4c
authored
9 years ago
by
Santiago Rodriguez
Browse files
Options
Downloads
Patches
Plain Diff
compiz: remove recomendation to use non-free software
Original helper from Ryan Houlgate Closes #1942
parent
e9974e99
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
helpers/make-compiz
+100
-0
100 additions, 0 deletions
helpers/make-compiz
with
100 additions
and
0 deletions
helpers/make-compiz
0 → 100644
+
100
−
0
View file @
58c2cc4c
#!/bin/sh
#
# Copyright (C) 2012 Ryan Houlgate <rhoulgate@member.fsf.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
VERSION
=
1
.
./config
# Need to remove an 'option' in the XML file.
# It extends for five lines, so we will comment
# them out.
xmlFileName
=
workarounds/workarounds.xml.in
xmlStringToLookFor
=
fglrx_xgl_fix
xmlSkipLines
=
4
cat
$xmlFileName
|
while
read
line
;
do
if
(
echo
$line
|grep
$xmlStringToLookFor
>
/dev/null
)
;
then
echo
"<!-- Removing recommendation to use non-free software"
echo
"
$line
"
count
=
0
while
[
"
$count
"
-lt
"
$xmlSkipLines
"
]
;
do
count
=
`
expr
$count
+ 1
`
;
read
line
echo
"
$line
"
done
echo
"-->"
else
echo
"
$line
"
fi
done
>
$xmlFileName
.tmp
mv
$xmlFileName
.tmp
$xmlFileName
# The C++ code calls methods that appear to be based
# on the part of the XML file that we removed.
# There is a method that returns a boolean to
# indicate whether or not this feature should
# be exhibited. I've created a dummy method
# that always returns false for that.
# It's declared as "extern" in the "*.h" file.
# It's defined at the end of the "*.cpp" file.
# There is another call to a related method.
# I just comment out that call.
cppFileName
=
workarounds/src/workarounds.cpp
cppStringToLookFor
=
optionSetFglrxXglFixNotify
cppSkipLines
=
2
cat
$cppFileName
|
while
read
line
;
do
if
(
echo
$line
|grep
$cppStringToLookFor
>
/dev/null
)
;
then
echo
"/**************** Removing recommendation to use non-free software"
echo
"
$line
"
count
=
0
while
[
"
$count
"
-lt
"
$cppSkipLines
"
]
;
do
count
=
`
expr
$count
+ 1
`
;
read
line
echo
"
$line
"
done
echo
"****************/"
else
echo
"
$line
"
fi
done
>
$cppFileName
.tmp
mv
$cppFileName
.tmp
$cppFileName
# Create declaration of method in the *.h file
echo
"extern bool optionGetFglrxXglFix();"
>>
workarounds/src/workarounds.h
# Create definition of method in the *.cpp file
echo
"// Providing dummy method to always return false due to the removal"
>>
workarounds/src/workarounds.cpp
echo
"// of non-free software recommendation"
>>
workarounds/src/workarounds.cpp
echo
"bool optionGetFglrxXglFix() { return false; }"
>>
workarounds/src/workarounds.cpp
changelog
"Remove recomendation to use fglrx (non-free software)"
compile
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment