+# -s causes libgs.so to be fully stripped
+LDFLAGS+=' '
+LDFLAGS="${LDFLAGS//-s }"
+
LIBS+=" -lz" default_build &&
if [[ $GS_LIBGS == y ]]; then
diff --git a/printer/ghostscript/HISTORY b/printer/ghostscript/HISTORY
index 3e7cab2..808ab8e 100644
--- a/printer/ghostscript/HISTORY
+++ b/printer/ghostscript/HISTORY
@@ -1,3 +1,9 @@
+2019-08-13 Ismael Luceno <ismael AT sourcemage.org>
+ * BUILD: avoid stripping, ruins libgs.so
+
+2019-08-12 Ismael Luceno <ismael AT sourcemage.org>
+ * PRE_BUILD: linking fix reverted, toolchain fixed
+
2019-06-02 Ismael Luceno <ismael AT sourcemage.org>
* PRE_BUILD: Fixed linking issues with libtiff
diff --git a/printer/ghostscript/PRE_BUILD b/printer/ghostscript/PRE_BUILD
index 94dbf1d..c21f123 100755
--- a/printer/ghostscript/PRE_BUILD
+++ b/printer/ghostscript/PRE_BUILD
@@ -3,9 +3,6 @@ cd $SOURCE_DIRECTORY &&
apply_patch_dir patches &&
-# The custom libtiff test is flaky, and fails to add dependencies
-sed -i 's/--libs libtiff-4/--static &/' configure{.ac,} &&
-
# remove most of the embedded libraries. use the system ones instead
rm -rf freetype jpeg libpng tiff lcms2 ijs openjpeg zlib &&
diff --git a/security/wipe/BUILD b/security/wipe/BUILD
new file mode 100755
index 0000000..a9ac6dd
--- /dev/null
+++ b/security/wipe/BUILD
@@ -0,0 +1,4 @@
+case "$HOST" in
+*-musl) CFLAGS+=" -Du_int32_t=uint32_t" ;;
+esac &&
+default_build
diff --git a/security/wipe/HISTORY b/security/wipe/HISTORY
index 5ecf965..98aa4bf 100644
--- a/security/wipe/HISTORY
+++ b/security/wipe/HISTORY
@@ -1,3 +1,7 @@
+2019-08-12 Ismael Luceno <ismael AT sourcemage.org>
+ * BUILD, PRE_BUILD: Fixed build against musl
+ Fixed passing of CFLAGS
+
2016-07-09 Ismael Luceno <ismael AT sourcemage.org>
* DETAILS: updated spell to 2.3.1
diff --git a/security/wipe/PRE_BUILD b/security/wipe/PRE_BUILD
new file mode 100755
index 0000000..96893bc
--- /dev/null
+++ b/security/wipe/PRE_BUILD
@@ -0,0 +1,5 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+sedit 's!maybe_os in$!& linux-musl*|\\!' config.sub &&
+# Fix passing of CFLAGS
+sedit '/^fullCFLAGS=""/s/"/"$CFLAGS/' configure
diff --git a/x11/recordmydesktop/HISTORY b/x11/recordmydesktop/HISTORY
index dde1a8d..fdc7ae4 100644
--- a/x11/recordmydesktop/HISTORY
+++ b/x11/recordmydesktop/HISTORY
@@ -1,3 +1,6 @@
+2019-08-12 Ismael Luceno <ismael AT sourcemage.org>
+ * PRE_BUILD: Fixed build against musl
+
2015-05-25 Thomas Orgis <sobukus AT sourcemage.org>
* DETAILS: remove SOURCEFORGE_URL usage (automated)