Skip to content

Commit

Permalink
Merge pull request #398 from go-gl/drop-v3.2-upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacalz committed Mar 7, 2024
2 parents ea2d699 + b3e36ef commit a69d953
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 37 deletions.
2 changes: 1 addition & 1 deletion scripts/glfw_tree_rebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ git add glfw
HASH=$(git write-tree)
rm $GIT_INDEX_FILE

sed -Ei 's/const upstreamTreeSHA = "[0-9a-f]+"/const upstreamTreeSHA = "'${HASH}'"/' glfw_tree_rebuild.go
sed -Ei 's/const upstreamTreeSHA = "[0-9a-f]+"/const upstreamTreeSHA = "'${HASH}'"/' glfw_tree_rebuild.go
37 changes: 1 addition & 36 deletions scripts/grab-upstream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ excludes=(
--exclude=glfw-*/CMakeLists.txt
--exclude=glfw-*/docs
--exclude=glfw-*/examples
# Deleted later because it is needed for patches:
# --exclude=glfw-*/README.md
--exclude=glfw-*/README.md
--exclude=glfw-*/CONTRIBUTORS.md
--exclude=glfw-*/src/*.in
--exclude=glfw-*/src/CMakeLists.txt
Expand Down Expand Up @@ -58,38 +57,6 @@ EOF
done
}

# v3.2
{
grab-upstream v3.2/glfw

cat > v3.2/glfw/glfw/deps/dummy.go <<EOF
//go:build required
// +build required
// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
import (
// Prevent go tooling from stripping out the c source files.
_ "github.com/go-gl/glfw/v3.2/glfw/glfw/deps/KHR"
_ "github.com/go-gl/glfw/v3.2/glfw/glfw/deps/glad"
_ "github.com/go-gl/glfw/v3.2/glfw/glfw/deps/mingw"
_ "github.com/go-gl/glfw/v3.2/glfw/glfw/deps/vulkan"
)
EOF

# Replay PR #226.
curl -s -L https://github.com/glfw/glfw/commit/4ff66a7818e3eaa5362c828a18220b12f1cd9bc8.diff |
patch --directory=v3.2/glfw/glfw -p1 --no-backup-if-mismatch --reject-file=-

scripts/generate-wayland-protocols.sh ./v3.2/glfw/glfw/src
# Generates unnecessary differences.
sed -i 's|/\* Generated by wayland-scanner .* \*/|/* Generated by wayland-scanner */|' \
./*/glfw/glfw/src/wayland-*

rm v3.2/glfw/glfw/README.md
}

# v3.3
{
grab-upstream v3.3/glfw
Expand All @@ -112,8 +79,6 @@ EOF
scripts/generate-wayland-protocols.sh ./v3.3/glfw/glfw/src
sed -i 's|/\* Generated by wayland-scanner .* \*/|/* Generated by wayland-scanner */|' \
./*/glfw/glfw/src/wayland-*

rm v3.3/glfw/glfw/README.md

go generate ./v3.3/glfw/glfw_tree_rebuild.go
}
Expand Down

0 comments on commit a69d953

Please sign in to comment.