-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
multilib: refactor kiss hook outside README
- Loading branch information
git-bruh
committed
Apr 27, 2021
1 parent
15608bf
commit 4c50446
Showing
2 changed files
with
47 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/sh -e | ||
|
||
case "$TYPE" in | ||
pre-build) | ||
export _CC="${CC:-cc}" | ||
export _CXX="${CXX:-c++}" | ||
export _PKG_CONFIG_PATH="$PKG_CONFIG_PATH" | ||
|
||
case "$PKG" in | ||
lib32-*) | ||
export CC="gcc -m32" | ||
export CXX="g++ -m32" | ||
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig" | ||
;; | ||
esac | ||
;; | ||
|
||
post-build) | ||
: "${DEST:?DEST is unset}" | ||
|
||
export CC="$_CC" | ||
export CXX="$_CXX" | ||
export PKG_CONFIG_PATH="$_PKG_CONFIG_PATH" | ||
|
||
case "$PKG" in | ||
lib32-glibc) ;; | ||
lib32-*) | ||
rm -rf "$3/etc" \ | ||
"$3/usr/bin" \ | ||
"$3/usr/include" \ | ||
"$3/usr/share" | ||
;; | ||
esac | ||
|
||
# Default package manager hook. | ||
rm -rf "$3/usr/share/gettext" \ | ||
"$3/usr/share/polkit-1" \ | ||
"$3/usr/share/locale" \ | ||
"$3/usr/share/info" | ||
;; | ||
esac |