Skip to content

Commit

Permalink
pkgin: Link pkgsrc libraries statically.
Browse files Browse the repository at this point in the history
There have been enough reports of failed upgrades due to libarchive
going awry to warrant this and simply avoid that failure mode completely.
  • Loading branch information
jperkin committed Dec 20, 2023
1 parent cfe6beb commit 3cd5cdb
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions pkgtools/pkgin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,22 @@ CFLAGS.SunOS+= -D_FILE_OFFSET_BITS=64

DEPENDS+= pkg_install>=20200701:../../pkgtools/pkg_install

#
# Ensure all libraries from pkgsrc are linked statically to avoid any potential
# issues during upgrades. This means we also need to add libraries that are
# indirect dependents of the shared libraries we remove.
#
LIBS.Darwin+= -lbz2 -liconv -llzma -lz
LIBS.SunOS+= -lbz2 -llzma -lm -lnsl -lz

.for dep in libarchive sqlite3 libfetch openssl
BUILDLINK_DEPMETHOD.${dep}= build
.endfor

pre-configure:
${RM} -f ${BUILDLINK_DIR}/lib/*.dylib
${RM} -f ${BUILDLINK_DIR}/lib/*.so*

.include "options.mk"

# those have official repositories
Expand Down

0 comments on commit 3cd5cdb

Please sign in to comment.