diff options
author | midipix <writeonce@midipix.org> | 2024-07-21 02:23:17 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-07-22 00:10:51 +0000 |
commit | f98cb2926767a4045a976b5f9b46d8b6d03a37ff (patch) | |
tree | 518c06bd9b1cc25594efe03a561c0641526219e7 /src | |
parent | 99eb57ae04ee435a5d498c01badff4e7a58e5bf1 (diff) | |
download | slibtool-f98cb2926767a4045a976b5f9b46d8b6d03a37ff.tar.bz2 slibtool-f98cb2926767a4045a976b5f9b46d8b6d03a37ff.tar.xz |
slibtoolize: compatibility: install (copy or symlink) a no-op ar-lib as needed.
Diffstat (limited to 'src')
-rw-r--r-- | src/logic/slbt_exec_stoolie.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/logic/slbt_exec_stoolie.c b/src/logic/slbt_exec_stoolie.c index 698faaa..7701735 100644 --- a/src/logic/slbt_exec_stoolie.c +++ b/src/logic/slbt_exec_stoolie.c @@ -88,6 +88,7 @@ static int slbt_exec_stoolie_perform_actions( char auxdir[PATH_MAX]; char slibm4[PATH_MAX]; char ltmain[PATH_MAX]; + char arlib [PATH_MAX]; bool fslibm4; bool fltmain; @@ -106,6 +107,12 @@ static int slbt_exec_stoolie_perform_actions( "ltmain.sh") < 0) return SLBT_BUFFER_ERROR(dctx); + if (slbt_snprintf( + arlib,sizeof(arlib),"%s/%s", + SLBT_PACKAGE_DATADIR, + "ar-lib") < 0) + return SLBT_BUFFER_ERROR(dctx); + /* --force? */ if (dctx->cctx->drvflags & SLBT_DRIVER_STOOLIE_FORCE) { if (ictx->fdm4 >= 0) @@ -115,6 +122,9 @@ static int slbt_exec_stoolie_perform_actions( if (slbt_exec_stoolie_remove_file(dctx,ictx->fdaux,"ltmain.sh") < 0) return SLBT_NESTED_ERROR(dctx); + if (slbt_exec_stoolie_remove_file(dctx,ictx->fdaux,"ar-lib") < 0) + return SLBT_NESTED_ERROR(dctx); + fslibm4 = (ictx->fdm4 >= 0); fltmain = true; } else { @@ -158,6 +168,9 @@ static int slbt_exec_stoolie_perform_actions( if (slbt_util_copy_file(ectx,ltmain,auxdir) < 0) return SLBT_NESTED_ERROR(dctx); + + if (slbt_util_copy_file(ectx,arlib,auxdir) < 0) + return SLBT_NESTED_ERROR(dctx); } } else { /* default to symlinks */ @@ -170,7 +183,7 @@ static int slbt_exec_stoolie_perform_actions( SLBT_SYMLINK_LITERAL) < 0) return SLBT_NESTED_ERROR(dctx); - if (fltmain) + if (fltmain) { if (slbt_create_symlink_ex( dctx,ectx, ictx->fdaux, @@ -178,6 +191,15 @@ static int slbt_exec_stoolie_perform_actions( "ltmain.sh", SLBT_SYMLINK_LITERAL) < 0) return SLBT_NESTED_ERROR(dctx); + + if (slbt_create_symlink_ex( + dctx,ectx, + ictx->fdaux, + arlib, + "ar-lib", + SLBT_SYMLINK_LITERAL) < 0) + return SLBT_NESTED_ERROR(dctx); + } } return 0; |