yices: drop symlink hack, avoid ldconfig on linux

Reported by sternenseemann as a failure on darwin:
https://github.com/NixOS/nixpkgs/pull/141541#discussion_r739634263

Instead of emulating symlink creation in `.nix` file let's create
them in Makefile.build directly in a way that can be upstreamed.

authored by

Sergei Trofimovich and committed by
sterni
597eb07e c5809ba0

+19 -16
+6 -16
pkgs/applications/science/logic/yices/default.nix
··· 12 12 sha256 = "1jx3854zxvfhxrdshbipxfgyq1yxb9ll9agjc2n0cj4vxkjyh9mn"; 13 13 }; 14 14 15 + patches = [ 16 + # musl las no ldconfig, create symlinks explicitly 17 + ./linux-no-ldconfig.patch 18 + ]; 19 + postPatch = "patchShebangs tests/regress/check.sh"; 20 + 15 21 nativeBuildInputs = [ autoreconfHook ]; 16 22 buildInputs = [ cudd gmp-static gperf libpoly ]; 17 23 configureFlags = ··· 22 28 23 29 enableParallelBuilding = true; 24 30 doCheck = true; 25 - 26 - # Usual shenanigans 27 - patchPhase = "patchShebangs tests/regress/check.sh"; 28 - 29 - # Includes a fix for the embedded soname being libyices.so.X.Y, but 30 - # only installing the libyices.so.X.Y.Z file. 31 - installPhase = let 32 - ver_XdotY = lib.versions.majorMinor version; 33 - in '' 34 - make install LDCONFIG=true 35 - # guard against packaging of unstable versions: they 36 - # have a soname of hext (not current) release. 37 - echo "Checking expected library version to be ${version}" 38 - [ -f $out/lib/libyices.so.${version} ] 39 - ln -sfr $out/lib/libyices.so.{${version},${ver_XdotY}} 40 - ''; 41 31 42 32 meta = with lib; { 43 33 description = "A high-performance theorem prover and SMT solver";
+13
pkgs/applications/science/logic/yices/linux-no-ldconfig.patch
··· 1 + --- a/Makefile.build 2 + +++ b/Makefile.build 3 + @@ -474,8 +474,9 @@ install-darwin: install-default 4 + install-solaris: install-default 5 + $(LDCONFIG) -n $(DESTDIR)$(libdir) && (cd $(DESTDIR)$(libdir) && $(LN_S) -f libyices.so.$(YICES_VERSION) libyices.so) 6 + 7 + +# avoid ldconfig as it's not present on musl 8 + install-linux install-unix: install-default 9 + - $(LDCONFIG) -n $(DESTDIR)$(libdir) && (cd $(DESTDIR)$(libdir) && $(LN_S) -f libyices.so.$(YICES_VERSION) libyices.so) 10 + + (cd $(DESTDIR)$(libdir) && $(LN_S) -f libyices.so.$(YICES_VERSION) libyices.so.$(MAJOR).$(MINOR) && $(LN_S) -f libyices.so.$(MAJOR).$(MINOR) libyices.so) 11 + 12 + # on FreeBSD: the library file is libyices.so.X.Y and ldconfig does not take -n 13 + # TODO: fix this. We must also create a symbolic link: libyices.so.X in libdir