Skip to content

Commit

Permalink
Merge pull request #3 from krkhan/master
Browse files Browse the repository at this point in the history
Bump to fish 3.3.1
  • Loading branch information
anki-code authored Feb 12, 2022
2 parents 38b98e8 + deaf3c6 commit 1783108
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
16 changes: 16 additions & 0 deletions enable-static-linking.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 51805628f..95c66af63 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,11 +24,6 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE "${DEFAULT_BUILD_TYPE}")
endif()

-# Error out when linking statically, it doesn't work.
-if (CMAKE_EXE_LINKER_FLAGS MATCHES ".*-static.*")
- message(FATAL_ERROR "Fish does not support static linking")
-endif()
-
# Force colored warnings in Ninja's output, if the compiler has -fdiagnostics-color support.
# Rationale in https://github.com/ninja-build/ninja/issues/814
if (CMAKE_GENERATOR STREQUAL "Ninja" AND
5 changes: 4 additions & 1 deletion fish-portable-musl-alpine.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM alpine
VOLUME /result

ENV NCURSES_VER 6.2
ENV FISH_VER 3.2.0
ENV FISH_VER 3.3.1
ENV LDFLAGS -static

RUN apk update && apk add wget mc alpine-sdk git g++ make cmake ncurses ncurses-dev ncurses-libs xz
Expand All @@ -18,6 +18,9 @@ WORKDIR /build/ncurses-$NCURSES_VER
RUN ./configure && make
RUN cp lib/libncurses.a /usr/lib/ && cp lib/libncurses.a /usr/lib/libcurses.a

COPY enable-static-linking.patch /tmp/enable-static-linking.patch
WORKDIR /build/fish-$FISH_VER
RUN patch -p1 -i /tmp/enable-static-linking.patch
WORKDIR /build/fish-$FISH_VER/build
# https://github.com/fish-shell/fish-shell/issues/6808#issuecomment-603992552
RUN mkdir /fish && cmake -DCMAKE_INSTALL_PREFIX=/fish -DCMAKE_BUILD_TYPE=Release .. && make && make install
Expand Down

0 comments on commit 1783108

Please sign in to comment.