From 77fdc32a2efd921844096bc0a484edf60e74ebfd Mon Sep 17 00:00:00 2001 From: Andrew <51118083+ArionThinker@users.noreply.github.com> Date: Thu, 15 Feb 2024 18:15:14 +0200 Subject: [PATCH] +github.com/jpsim/SourceKitten (#5199) * new file: projects/github.com/jpsim/SourceKitten/package.yml new file: projects/github.com/jpsim/SourceKitten/patch.diff new file: projects/github.com/jpsim/SourceKitten/test.swift * patch comment --- .../github.com/jpsim/SourceKitten/package.yml | 26 +++++++++++++++++++ .../github.com/jpsim/SourceKitten/patch.diff | 18 +++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 projects/github.com/jpsim/SourceKitten/package.yml create mode 100644 projects/github.com/jpsim/SourceKitten/patch.diff diff --git a/projects/github.com/jpsim/SourceKitten/package.yml b/projects/github.com/jpsim/SourceKitten/package.yml new file mode 100644 index 00000000..426846c9 --- /dev/null +++ b/projects/github.com/jpsim/SourceKitten/package.yml @@ -0,0 +1,26 @@ +distributable: + url: git+https://github.com/jpsim/SourceKitten.git + ref: ${{version.tag}} + +versions: + github: jpsim/SourceKitten + +platforms: + - darwin + +build: + # https://github.com/jpsim/SourceKitten/pull/794 remove in release > 0.34.1 + # fix this issue https://github.com/jpsim/SourceKitten/issues/793 + - run: patch -p1 < props/patch.diff + if: <=0.34.1 + - make prefix_install PREFIX={{prefix}} TEMPORARY_FOLDER=$PWD/SourceKitten.dst --jobs={{hw.concurrency}} + +provides: + - bin/sourcekitten + +test: + env: + IN_PROCESS_SOURCEKIT: YES + script: + - sourcekitten version | grep {{version}} + - sourcekitten syntax --text "import Foundation" \ No newline at end of file diff --git a/projects/github.com/jpsim/SourceKitten/patch.diff b/projects/github.com/jpsim/SourceKitten/patch.diff new file mode 100644 index 00000000..ca296590 --- /dev/null +++ b/projects/github.com/jpsim/SourceKitten/patch.diff @@ -0,0 +1,18 @@ +__END__ +diff --git a/Makefile b/Makefile +index 8ed333c5..cbad6d26 100644 +--- a/Makefile ++++ b/Makefile +@@ -8,13 +8,6 @@ XCODEFLAGS=-workspace 'SourceKitten.xcworkspace' \ + OTHER_LDFLAGS=-Wl,-headerpad_max_install_names + + SWIFT_BUILD_FLAGS=--configuration release +-UNAME=$(shell uname) +-ifeq ($(UNAME), Darwin) +-USE_SWIFT_STATIC_STDLIB:=$(shell test -d $$(dirname $$(xcrun --find swift))/../lib/swift_static/macosx && echo yes) +-ifeq ($(USE_SWIFT_STATIC_STDLIB), yes) +-SWIFT_BUILD_FLAGS+= -Xswiftc -static-stdlib +-endif +-endif + + SOURCEKITTEN_EXECUTABLE=$(shell swift build $(SWIFT_BUILD_FLAGS) --show-bin-path)/sourcekitten \ No newline at end of file