Skip to content

Commit

Permalink
dev-libs/libmpack: fix build on Darwin and keyword
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Bauman <[email protected]>
  • Loading branch information
FuzzyGophers committed Mar 8, 2021
1 parent 0b3f269 commit c6170e3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dev-libs/libmpack/libmpack-1.0.5.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="amd64 ~arm ~arm64 x86"
KEYWORDS="amd64 ~arm ~arm64 x86 ~x64-macos"

DEPEND=""
RDEPEND="${DEPEND}"
Expand All @@ -30,6 +30,7 @@ src_prepare() {

src_compile() {
local myemakeargs=(
"PREFIX=/usr"
"CC=$(tc-getCC)"
"config=release"
"LIBDIR=/usr/$(get_libdir)"
Expand All @@ -52,5 +53,10 @@ src_install() {

emake "${myemakeargs[@]}" install

if [[ ${CHOST} == *-darwin* ]] ; then
local file="libmpack.0.0.0.dylib"
install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${file}" "${ED}/usr/$(get_libdir)/${file}" || die "Failed to adjust install_name"
fi

find "${ED}" -name '*.la' -delete || die
}

0 comments on commit c6170e3

Please sign in to comment.