Skip to content

Commit

Permalink
Trac #21103: Update rubiks' patches to conform to same format as othe…
Browse files Browse the repository at this point in the history
…r patches

The `rubiks` package is copying files instead of proper patching. Clean
this up.

See also #20837 and #20933 which did the same for other packages.

URL: https://trac.sagemath.org/21103
Reported by: jdemeyer
Ticket author(s): Erik Bray, Jeroen Demeyer
Reviewer(s): Jeroen Demeyer, Erik Bray, Matthias Koeppe
  • Loading branch information
Release Manager authored and vbraun committed Sep 16, 2016
2 parents f3b6fe9 + 87963a9 commit e0f94ac
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 277 deletions.
2 changes: 1 addition & 1 deletion build/pkgs/rubiks/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20070912.p18
20070912.p19
40 changes: 0 additions & 40 deletions build/pkgs/rubiks/patches/dietz-cu2-Makefile

This file was deleted.

43 changes: 0 additions & 43 deletions build/pkgs/rubiks/patches/dietz-mcube-Makefile

This file was deleted.

33 changes: 0 additions & 33 deletions build/pkgs/rubiks/patches/dietz-solver-Makefile

This file was deleted.

11 changes: 0 additions & 11 deletions build/pkgs/rubiks/patches/gcc-4.3-buildfix.patch

This file was deleted.

121 changes: 0 additions & 121 deletions build/pkgs/rubiks/patches/makefile.dik.cygwin

This file was deleted.

8 changes: 0 additions & 8 deletions build/pkgs/rubiks/patches/reid-Makefile

This file was deleted.

8 changes: 4 additions & 4 deletions build/pkgs/rubiks/patches/reid-Makefile.patch
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
--- patches/reid-Makefile Tue Sep 29 00:08:41 2009
+++ src/reid/Makefile Fri Apr 25 07:11:40 2008
@@ -1,5 +1,6 @@
--- a/reid/Makefile 2016-07-04 13:37:19.218923000 +0000
+++ b/reid/Makefile 2016-07-04 13:46:28.070923000 +0000
@@ -1,6 +1,5 @@
all: optimal twist

+CFLAGS=-O2 -g
-CFLAGS=-O2 -g

clean:
rm -f *.o
26 changes: 10 additions & 16 deletions build/pkgs/rubiks/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -123,35 +123,29 @@ export CPPFLAGS
# End of pretty general spkg-install file.
# Now do the specific things needed for this package (rubiks)

# Copy some sensible Makefiles, which don't have a load of hard-coded
# junk in them. The original makefiles were a mess. I doubt they
# would have created 64-bit binaries, but that would have been
# the least of their problems. They had the compiler g++ hardcoded
# which made building with Sun Studio impossible.

cp patches/dietz-mcube-Makefile src/dietz/mcube/Makefile
cp patches/dietz-solver-Makefile src/dietz/solver/Makefile
cp patches/dietz-cu2-Makefile src/dietz/cu2/Makefile
cp patches/reid-Makefile src/reid/Makefile

if [ $UNAME = "CYGWIN" ]; then
cp patches/makefile.dik.cygwin src/dik/makefile
fi

if [ $UNAME = "SunOS" ]; then
INSTALL=cp; export INSTALL
else
INSTALL=install; export INSTALL
fi



# remove the old dik binary since the has a name collision
# with polynmake - see #2595
rm -f $SAGE_LOCAL/bin/cube

cd src

for patch in ../patches/*.patch; do
[ -r "$patch" ] || continue # Skip non-existing or non-readable patches
echo "Applying $patch"
patch -p1 <"$patch"
if [ $? -ne 0 ]; then
echo >&2 "Error applying '$patch'"
exit 1
fi
done

echo "Building Rubiks cube solvers"
$MAKE install PREFIX="$SAGE_LOCAL"

0 comments on commit e0f94ac

Please sign in to comment.